all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Meaning of symbol prefixed with "#$"
       [not found] <CAEavL=UnjHtxpWmjE0sxMFV7QFYoRdNdov6=N-sfUKxfbeX3bg@mail.gmail.com>
@ 2023-05-26 19:14 ` Ricardo Wurmus
  2023-05-27 23:31   ` N. Y.
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2023-05-26 19:14 UTC (permalink / raw)
  To: N. Y.; +Cc: help-guix


(Moving this to help-guix instead of guile-user.)

"N. Y." <ningyuan.sg@gmail.com> writes:

> (arguments
>   '(#:phases (modify-phases %standard-phases
>     (add-after 'unpack 'amend-version
>       (lambda _
>         (substitute* "setup.py"
>           (("versioneer.get_version\\(\\)")
>           (string-append "\"" #$version "\"")))))

You can only use #$ inside an expression starting with #~.  This should
work:

--8<---------------cut here---------------start------------->8---
(arguments
  (list
    #:phases
    #~(modify-phases %standard-phases
       (add-after 'unpack 'amend-version
         (lambda _
           (substitute* "setup.py"
             (("versioneer.get_version\\(\\)")
             (string-append "\"" #$version "\""))))))))
--8<---------------cut here---------------end--------------->8---

-- 
Ricardo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meaning of symbol prefixed with "#$"
  2023-05-26 19:14 ` Meaning of symbol prefixed with "#$" Ricardo Wurmus
@ 2023-05-27 23:31   ` N. Y.
  2023-05-28  7:28     ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: N. Y. @ 2023-05-27 23:31 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Thanks so much for your suggestion! Can I ask for a name for these
notations, #~ and #$? I would like to learn more about them, but they are
difficult to Google for.

On Fri, May 26, 2023 at 7:17 PM Ricardo Wurmus <rekado@elephly.net> wrote:

>
> (Moving this to help-guix instead of guile-user.)
>
> "N. Y." <ningyuan.sg@gmail.com> writes:
>
> > (arguments
> >   '(#:phases (modify-phases %standard-phases
> >     (add-after 'unpack 'amend-version
> >       (lambda _
> >         (substitute* "setup.py"
> >           (("versioneer.get_version\\(\\)")
> >           (string-append "\"" #$version "\"")))))
>
> You can only use #$ inside an expression starting with #~.  This should
> work:
>
> --8<---------------cut here---------------start------------->8---
> (arguments
>   (list
>     #:phases
>     #~(modify-phases %standard-phases
>        (add-after 'unpack 'amend-version
>          (lambda _
>            (substitute* "setup.py"
>              (("versioneer.get_version\\(\\)")
>              (string-append "\"" #$version "\""))))))))
> --8<---------------cut here---------------end--------------->8---
>
> --
> Ricardo
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meaning of symbol prefixed with "#$"
  2023-05-27 23:31   ` N. Y.
@ 2023-05-28  7:28     ` Ricardo Wurmus
  2023-05-29  8:40       ` N. Y.
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2023-05-28  7:28 UTC (permalink / raw)
  To: N. Y.; +Cc: help-guix


Hi,

> Thanks so much for your suggestion! Can I ask for a name for these
> notations, #~ and #$? I would like to learn more about them, but they
> are difficult to Google for.

These are syntax for “gexp” and “ungexp”.  The Guix manual explains them
in great detail in the section 9.12 G-Expressions.

If you need more detail you can find it here:
https://inria.hal.science/hal-01580582/en

-- 
Ricardo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Meaning of symbol prefixed with "#$"
  2023-05-28  7:28     ` Ricardo Wurmus
@ 2023-05-29  8:40       ` N. Y.
  0 siblings, 0 replies; 4+ messages in thread
From: N. Y. @ 2023-05-29  8:40 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Thanks so much, I'll read up!

On Sun, May 28, 2023 at 7:31 AM Ricardo Wurmus <rekado@elephly.net> wrote:

>
> Hi,
>
> > Thanks so much for your suggestion! Can I ask for a name for these
> > notations, #~ and #$? I would like to learn more about them, but they
> > are difficult to Google for.
>
> These are syntax for “gexp” and “ungexp”.  The Guix manual explains them
> in great detail in the section 9.12 G-Expressions.
>
> If you need more detail you can find it here:
> https://inria.hal.science/hal-01580582/en
>
> --
> Ricardo
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-29 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAEavL=UnjHtxpWmjE0sxMFV7QFYoRdNdov6=N-sfUKxfbeX3bg@mail.gmail.com>
2023-05-26 19:14 ` Meaning of symbol prefixed with "#$" Ricardo Wurmus
2023-05-27 23:31   ` N. Y.
2023-05-28  7:28     ` Ricardo Wurmus
2023-05-29  8:40       ` N. Y.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.