Re:Directly compiling Scheme to WebAssembly: lambdas, recurs...
by beepbooptheory on Wednesday May 31, 2023 @09:24AM
(#36138091)
All day I push out js for a paycheck, all night I live and tinker in my Lisp/scheme worlds. Maybe one day these will be overlayed.
[ Parent
| on HN ]
Re:Directly compiling Scheme to WebAssembly: lambdas, recurs...
by Turing_Machine on Wednesday May 31, 2023 @11:42AM
(#36139635)
This project is very exciting. In the meantime, there are a couple of options:
BiwaScheme: https://www.biwascheme.org/
Advantages: written in JavaScript, with excellent JS interop. Project has some history.
Disadvantages: slower than S7 (though still plenty fast for many uses), less-complete (e.g., no syntax-rules or syntax-case, though it does have its own define-macro).
S7 Scheme: https://cm-gitlab.stanford.edu/bil/s7
Written in C, but can be transpiled to WASM (see https://github.com/actonDev/s7-playground/ )
Advantages: This project also has some history. Considerably faster than BiwaScheme.
Disadvantages: JS interop is clumsier (basically the same issues as JS interop with any WASM code... this could probably be mitigated considerably if someone wanted to take the time).
Re:Directly compiling Scheme to WebAssembly: lambdas, recurs...
by bitwize on Wednesday May 31, 2023 @12:29PM
(#36140263)
Gambit has a JavaScript compilation target backend. It works really well. The runtime code you need to run JS-compiled Gambit code is large, but compared to the neutron-star density of most projects' node_modules it's utterly manageable. It's a little harder to justify on the front end though.
Re:Directly compiling Scheme to WebAssembly: lambdas, recurs...
by kaba0 on Wednesday May 31, 2023 @01:53PM
(#36141366)
ClojureScript? I hear it is a really great guest language that fits within its respective host ecosystem very nicely (though I have mostly used it on the JVM), but the underlying library that converts it to JS is very battle-tested and produces great code!