From: Olivier Dion via <gwl-devel@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: gwl-devel@gnu.org
Subject: Re: Guile code snippet
Date: Wed, 20 Apr 2022 12:13:03 -0400 [thread overview]
Message-ID: <87ee1rohrk.fsf@laura> (raw)
In-Reply-To: <87r15srshn.fsf@elephly.net>
On Wed, 20 Apr 2022, Ricardo Wurmus <rekado@elephly.net> wrote:
> Hi Olivier,
>
>> Is there an easy way to do code snippet in Guile? I currently do:
>> # { guile snippet.scm }
>
> The manual introduces how to use code snippets:
> https://guixwl.org/manual/html_node/Code-Snippets.html
>
> This
>
> # { … }
>
> is just a shorthand for
>
> # /bin/bash -c { … }
>
> You can use any interpreter after the hash, e.g.
>
> # /bin/guile … { … }
>
> But you could just as well provide a quoted Scheme expression or an
> actual G-expression right there, e.g.
>
> (procedure
> `(call-with-output-file ,(first outputs)
> (lambda (port)
> (format port "Hello, world!~%"))))
This does not work in my case for example:
process guile-foo
packages "guile" "guile-foo"
procedure
` use-modules (foo)
| no code for module (libpatch patch)
and when I try the guile shebang:
# /bin/guile { (display "foo") }
| ERROR: In procedure %resolve-variable:
| Unbound variable: ungexp
--
Olivier Dion
oldiob.dev
next prev parent reply other threads:[~2022-04-20 16:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 3:37 Guile code snippet Olivier Dion via
2022-04-20 9:47 ` Ricardo Wurmus
2022-04-20 16:13 ` Olivier Dion via [this message]
2022-04-20 16:26 ` Ricardo Wurmus
2022-04-20 16:35 ` Olivier Dion via
2022-04-20 21:21 ` Ricardo Wurmus
2022-04-21 16:30 ` Olivier Dion via
2022-04-21 18:14 ` Ricardo Wurmus
2022-04-21 20:08 ` Olivier Dion via
2022-04-21 20:46 ` Ricardo Wurmus
2022-04-21 22:02 ` Olivier Dion via
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://www.guixwl.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ee1rohrk.fsf@laura \
--to=gwl-devel@gnu.org \
--cc=olivier.dion@polymtl.ca \
--cc=rekado@elephly.net \
/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.
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).