From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: bug-guix@gnu.org
Subject: Re: [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures.
Date: Tue, 26 Mar 2013 21:50:57 +0100 [thread overview]
Message-ID: <87620dx4um.fsf@gnu.org> (raw)
In-Reply-To: <8738vhud12.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 27 Mar 2013 00:22:33 +0400")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
>> “Eval is evil”, as lispers love to say.
>
> Yeah, I've heard this one.
>
>> It should never be used, unless there’s a very good reason to do so.
>
> I've heard this too. But people always fail to explain the "a very good
> reason" part.
There are many reasons, including: it’s hard to reason about code
generated at run time, it’s easy to generate invalid code, generated
code cannot be compiled & optimized, and evaluating code is much slower
than running compiled code.
>> In my unfinished binary substitute where a similar situation arises,
>> I’ve done this:
>
> [...]
>
>> And then, it is used like this:
>
>> (alist->record properties
>> (cut %make-cache url <...>)
>> '("StoreDir" "WantMassQuery"))
>
> So, keys and values are strings here, right?
Keys are strings, and values can be anything.
> But I want to store setters as values.
The suggestion I made was in favor of using a single
‘make-gnu-record-descriptor’ call with all the field values (as opposed
to creating the record with all fields set to #f, and then using
‘setters’ to change them to their actual value.)
In the example above, the end result is a single call to the
constructor, equivalent to:
(%make-cache url
(assoc-ref properties "StoreDir")
(assoc-ref properties "WantMassQuery"))
HTH,
Ludo’.
next prev parent reply other threads:[~2013-03-26 20:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 5:29 [PATCH] gnu-maintenance: Add 'find-package-with-attrs' and '%package-list' Nikita Karetnikov
2013-02-22 10:00 ` Ludovic Courtès
2013-03-06 18:54 ` [PATCH] gnu-maintenance: Replace 'official-gnu-packages' with 'find-packages' Nikita Karetnikov
2013-03-06 23:28 ` Ludovic Courtès
2013-03-16 19:30 ` [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add the related procedures Nikita Karetnikov
2013-03-16 23:13 ` Ludovic Courtès
2013-03-22 1:37 ` Nikita Karetnikov
2013-03-22 10:08 ` Brandon Invergo
2013-03-22 12:30 ` Ludovic Courtès
2013-03-22 12:19 ` Ludovic Courtès
2013-03-26 20:22 ` Nikita Karetnikov
2013-03-26 20:50 ` Ludovic Courtès [this message]
2013-03-26 20:59 ` Nikita Karetnikov
2013-03-26 21:21 ` Ludovic Courtès
2013-03-27 6:05 ` Nikita Karetnikov
2013-03-27 10:08 ` Ludovic Courtès
2013-03-31 22:50 ` Ludovic Courtès
2013-03-26 20:49 ` Nikita Karetnikov
2013-03-26 21:02 ` Ludovic Courtès
2013-03-28 2:08 ` [PATCH] gnu-maintenance: Improve 'official-gnu-packages'; add " Nikita Karetnikov
2013-03-28 16:48 ` Ludovic Courtès
2013-03-28 22:40 ` Nikita Karetnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87620dx4um.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bug-guix@gnu.org \
--cc=nikita@karetnikov.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).