From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>, Alex Kost <alezost@gmail.com>
Subject: Re: [PATCH 3/5] build: Add 'emacs-build-system'
Date: Sat, 27 Jun 2015 11:59:10 +0200 [thread overview]
Message-ID: <87d20h321d.fsf@inria.fr> (raw)
In-Reply-To: CAKrPhPOHJLtdK7+TQz33MZ3McwE6AYgtPwnc0U8td7HZvQoVDw@mail.gmail.com
Federico Beffa <beffa@ieee.org> skribis:
> On Thu, Jun 25, 2015 at 2:33 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Federico Beffa <beffa@ieee.org> skribis:
[...]
>> The problem is that this forcefully introduces bindings in an opaque way
>> (that is, regardless of whether the ‘outputs’ binding appears in the
>> source, there’s an ‘outputs’ binding that magically appears; this is
>> “unhygienic” or “non referentially transparent,” or just “bad”. ;-))
>>
>> Ideally, the identifiers that appear in the macro expansion should
>> either be in the source, or be unique (compiler-generated.)
>
> I was so sure that you would say so, that I did a copy of the file
> before removing the 'let's and introducing the syntax.
:-)
> If this would be proposed as a general utility, then I would agree
> with you. But it's not. It is a module internal implementation detail
Sure, sure, but the problems here are not theoretical. The possibility
of having one user introduce a binding that clashes without noticing is
real, and it can be hard to debug. “But it’s all internal in a single
file,” right, but some future hacker might not notice the
unhygenically-introduced bindings.
Simply put, people may not expect such issues to arise in Scheme, so
it’s best to not violate the rule of least surprise, IMO.
>>> + (filter (lambda (p)
>>> + (and (pair? p)
>>> + (emacs-package? (package-name->name+version (first p)))))
>>
>> (match-lambda
>> ((label . directory)
>> (emacs-package? (package-name+version directory))))
>>
>> (Which means the ‘first’ above should have been ‘second’?)
>
> I'm not sure I understand your comment:
> 'package-name->name+version' takes a package name, therefore I pass it
> the 1st element of each input.
The first element of an input is a label, which often happens to be a
package name, but doesn’t have to. Would it be possible to extract the
package name from the directory name?
> (By the way, 'match-lambda' appears not to be documented in Guile.)
Oops.
> From e24d0b11280f4fcd106f371b98b7481f7c044eb0 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Sun, 21 Jun 2015 10:10:05 +0200
> Subject: [PATCH 3/5] build: Add 'emacs-build-system'.
>
> * Makefile.am (MODULES): Add 'guix/build-system/emacs.scm' and
> 'guix/build/emacs-build-system.scm'.
> * guix/build-system/emacs.scm: New file.
> * guix/build/emacs-build-system.scm: New file.
> * doc/guix.texi (Build Systems): Document it.
[...]
> +(define (emacs-inputs-directories inputs)
> + "Extract the list of Emacs package directories from INPUTS."
> + (let ((emacs-ins (emacs-inputs inputs)))
> + (match emacs-ins
> + (((name . dir) ...) dir))))
Minor issue, but I would s/emacs-ins/inputs/, s/dir/directories/,
s/name/names/. (See the “Naming” section in
<http://mumble.net/~campbell/scheme/style.txt>.)
OK to push with changes to this and ‘emacs-inputs’ as discussed above.
Thank you, and sorry for being as predictable and boring as you
expected. ;-)
Ludo’.
next prev parent reply other threads:[~2015-06-27 9:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 8:31 [PATCH 3/5] build: Add 'emacs-build-system' Federico Beffa
2015-06-21 20:40 ` Alex Kost
2015-06-22 8:51 ` Federico Beffa
2015-06-22 11:49 ` Mathieu Lirzin
2015-06-22 17:59 ` Alex Kost
2015-06-22 19:33 ` Federico Beffa
2015-06-22 19:40 ` Thompson, David
2015-06-23 6:51 ` Federico Beffa
2015-06-25 11:57 ` Ludovic Courtès
2015-06-25 18:39 ` Federico Beffa
2015-06-23 11:57 ` Alex Kost
2015-06-24 16:12 ` Federico Beffa
2015-06-25 12:33 ` Ludovic Courtès
2015-06-25 18:36 ` Federico Beffa
2015-06-27 9:59 ` Ludovic Courtès [this message]
2015-07-06 17:47 ` Alex Kost
-- strict thread matches above, loose matches on Subject: below --
2015-07-07 7:21 Federico Beffa
2015-07-07 16:58 ` Alex Kost
2015-07-08 20:22 ` Federico Beffa
2015-07-09 8:51 ` Alex Kost
2015-07-09 20:41 ` Federico Beffa
2015-07-10 6:47 ` Alex Kost
2015-07-10 7:43 ` Federico Beffa
2015-07-15 21:52 ` Ludovic Courtès
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=87d20h321d.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=alezost@gmail.com \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.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).