GNU bug report logs - #36919
[PATCH 0/2] Make the KDE updater find packaes in subdirectories

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Sun, 4 Aug 2019 10:27:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 36919 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36919 <at> debbugs.gnu.org
Subject: Re: [bug#36919] [PATCH 1/2] gnu-maintenance: KDE updater no longer
 relies on FTP access.
Date: Tue, 27 Aug 2019 10:30:32 +0200
Hi Ludo,

thanks for the coding advice. This was what I've been asking for :-)
Just one point:

Am 17.08.19 um 23:01 schrieb Ludovic Courtès:
> As a rule of thumb we don’t use ‘set!’ in Guix, except in special
> circumstances.  In this case you can write:
>
>   (define (canonicalize-path path)
>     (cond ((string-prefix? …)
>            (string-drop path 17))
>           ((string-suffix? …)
>            (string-drop-right path 1))
>           …))

AFAIK, `cond` only processes the first expression where `test ` is true.
In this case, we need to process *all* cases where the test is true.
This means we need to nest the evaluation, which is ugly and hard to
read IMHO. Is there some more "linear" syntax?

(BTW: The manual [1] is not quite precise on `cond`, so I needed to test
it. Maybe I did it wrong.)

[1] https://www.gnu.org/software/guile/manual/html_node/Conditionals.html

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





This bug report was last modified 5 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.