This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi! >>>>> Jim Blandy writes: JB> I think it would be cool to have a foreign function interface JB> that could work both dynamically, by calling functions using JB> libffi, and statically, by generating stubs. Then you could hack JB> around in dynamic mode, and then flip a switch and generate C JB> code for speed, or simplicity of distribution. Exactly. When the gh_* interface matures and people no longer have to use scm_*, then Guile will be in a fantastic position. I've been talking with the RScheme maintainer, and he may be willing to put it under a relaxed GPL and contribute it as an alternative Guile backend. RScheme is nice in that the `generate C code for speed' option is very mature, and accessible from a Schemey interface. You can do things like: (define-glue (parse-format-string str) { extern obj parse_format_string( obj string ); REG0 = parse_format_string(str); RETURN1(); }) Then you can run Scheme functions that execs the C compiler, builds a PIC object, and dlopens it, all without leaving your repl. Scary. -- Gordon Matzigkeit <gord@fig.org> //\ I'm a FIG (http://www.fig.org/) Lovers of freedom, unite! \// I use GNU (http://www.gnu.org/) Copyright (C) 1998 FIG.org; the creator offers you this gift and wants it to remain free. See http://www.fig.org/freedom.html for details. This work may be copied, modified and distributed under the GNU General Public License (GPL). See http://www.gnu.org/copyleft/gpl.html.