HN user

lritter303

19 karma
Posts0
Comments4
View on HN
No posts found.

Dev here. I promise to make good on that. The language was part of another project, and most of the test cases haven't been moved over yet.

Neither is suitable. Guile has the wrong license, none of these three has bindings for a no-JIT code generator like LLVM.

It's no big deal though. The Scheme -> Lua compiler is small (300 lines) the dialect is better suited for hash tables and the dynamic part is mostly a driver to generate/execute machine code at runtime.

At this point, a switch to Scheme would service purism more than pragmatism. Lua is already a good Scheme VM (has been strongly inspired by Scheme, in fact) so it'll do. At least I hope it will. ;-)

Actually, I very much wanted to do that, the problem is that there seems to be no Scheme implementation available that offers such a tight and convenient libffi integration. LuaJIT parses preprocessed C header files with very few adjustments. Terra, which links LuaJIT with LLVM, goes the full mile and directly uses libclang to generate interfaces.

If you know a Scheme implementation that does this (including supporting a LLVM back-end in addition to a regular, possibly JIT'ed interpreter), please do not hesitate to mention!