[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#48729] [PATCH v5 24/25] gnu: Add bitmask.
From: |
Maxime Devos |
Subject: |
[bug#48729] [PATCH v5 24/25] gnu: Add bitmask. |
Date: |
Sun, 20 Jun 2021 13:43:17 +0200 |
User-agent: |
Evolution 3.34.2 |
Raghav Gururajan schreef op zo 20-06-2021 om 05:52 [-0400]:
> Hi Maxime!
>
> > Snippets can be G-expressions. Personally, I'd go with a G-expression
> > instead of an S-expression, because
> >
> > * that makes it more obvious it is staged code, and not, say, SXML
> > * G-exps are cool [citation needed]
> >
> > > + (build-system go-build-system)
> > > + (arguments [...])
>
> I see. Would you be able to illustrate with a snippet please? I haven't
> used G-exps much.
Here's an example, from the guile-2.2 package, using a S-exp:
(snippet '(begin
(for-each delete-file
(find-files "prebuilt" "\\.go$"))
#t))))
and equivalently, using a G-exp
(snippet #~(begin
(for-each delete-file
(find-files "prebuilt" "\\.go$"))
#t))))
Basically, replace the ' with #~.
Here, using a G-exp doesn't buy much though, besides making it
a bit more obvious the code is staged. G-exps can be useful
if, say, 'sed' or 'tar' or something needs to be run during
the snippet. (E.g., something like
#~(invoke* #+(file-append tar "/bin/tar") args ...))
Greetings,
Maxime
signature.asc
Description: This is a digitally signed message part
- [bug#48729] [PATCH v5 25/25] services: Add bitmask-service-type., (continued)