if lambda were applicable, this would work in both cases:
(define-macro (progv vars vals . body)
`(apply (apply lambda ,vars ',body) ,vals))
> (let ((s '(one two)) (v '(1 2))) (progv s v (+ one two)))
3
> (progv '(one two) '(1 2) (+ one two))
3
(running a mystery scheme...)
> and that I don't know what's in that list.
oops, I missed that requirement. hmmm -- there must be a way.
I think this works in Guile 1.8.7 (I don't have a later version):
(define-macro (progv vars vals . body)
`(let (,@(map (lambda (var val)
(list var val))
(cadr vars)
(cadr vals)))
,@body))
(progv '(one two) '(1 2) (+ one two))
3
Maybe pre
in that list, the Snd xen.c case is not a true use -- that macro
is never true (because I apparently forgot to include it in my
configure script), so the code is never used. I probably had
gh_init 10 years ago, then changed it to scm_init_guile --
can't remember now.
> Would it be possible for the snd team to spend
> some time factoring out these things?
There's a short answer, and a very long answer that would take me
several hours to compose. The short one is that two large sections
have been extracted into stand-alone libraries: sndlib and xmlib.
sndlib i
> that it could be wiser to write a semi
> automatic tool for making guile bindings from C headers
For gl.c in the snd (or libxm) tarball, that's tools/makegl.scm,
using the predigested header info in gldata.scm. gl.c needs
only xen.[ch], I think, so you could easily extract it from Snd.
There's
> Right, although I question the "language for extensions" paradigm: why
> would you choose language Y for "extensions" and language X for the
> rest, given that (i) X sucks, (ii) Y rocks, and (iii) nothing inherently
> makes programs in language Y "slower". :-)
There are several reasons to h
> Or have people lost interest?
There's libxm -- xg.c has all the gtk bindings up to the current gtk version,
as well as a bunch from pango, and a few from glib.
ftp://ccrma-ftp.stanford.edu/pub/Lisp/libxm.tar.gz
Lots of examples in the Snd tarball (at the same site). If I remember
right, it