[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile code snippet
From: |
Ricardo Wurmus |
Subject: |
Re: Guile code snippet |
Date: |
Wed, 20 Apr 2022 23:21:37 +0200 |
User-agent: |
mu4e 1.6.10; emacs 28.0.50 |
Hi Olivier,
> and when I try the guile shebang:
> # /bin/guile { (display "foo") }
>
> | ERROR: In procedure %resolve-variable:
> | Unbound variable: ungexp
This is now fixed with commit dceec9ecb9e24252ab9130f7a3626c00b2ff1a68.
I added a new test that checks the generated code when using a custom
interpreter. Previously, it only checked that the interpreter was
extracted correctly and code was generated at all…
The problem was that we accidentally wrote code to a file that was
supposed to be evaluated so that its *result* could be written to a
file. It wrote:
(apply system*
(append (list (string-append (getenv "_GWL_PROFILE")
(ungexp (sanitize-path (symbol->string name)))))
…))
…instead of:
(apply system*
(append (list (string-append (getenv "_GWL_PROFILE")
"/bin/guile") "-c")
…))
The cause was the use of a macro. It is now implemented as a procedure.
It works with the custom interpreter, but also direct Scheme embedding
works fine:
--8<---------------cut here---------------start------------->8---
process run
packages "guile"
procedure `(display ,name)
workflow do-the-thing
processes run
--8<---------------cut here---------------end--------------->8---
Could you please try again and report back? Thanks in advance!
--
Ricardo
- Guile code snippet, Olivier Dion, 2022/04/19
- Re: Guile code snippet, Ricardo Wurmus, 2022/04/20
- Re: Guile code snippet, Olivier Dion, 2022/04/20
- Re: Guile code snippet,
Ricardo Wurmus <=
- Re: Guile code snippet, Olivier Dion, 2022/04/21
- Re: Guile code snippet, Ricardo Wurmus, 2022/04/21
- Re: Guile code snippet, Olivier Dion, 2022/04/21
- Re: Guile code snippet, Ricardo Wurmus, 2022/04/21
- Re: Guile code snippet, Olivier Dion, 2022/04/21