4 ms·
How did you get Common Lisp running on wasm? I thought wasm didn’t support tail call recursive
by dartos 2y ago
How did you get Common Lisp running on wasm? I thought wasm didn’t support tail call recursive
- jackdaniel 2y agoCommon Lisp does not require TCO. This runs on emscripten port of Embeddable Common Lisp - this platform support is relatively new. I'm also working on WASI port and an optimizing compiler at runtime (currently we use bytecodes compiler when running).
- dartos 2y agoOh wow. I always thought TCO was part of the spec itself.
- jackdaniel 2y agoScheme requires TCO. It is a different Lisp (it also has standard[s]).
- ted_dunning 2y agoAnd revisions[n].
- JoelMcCracken 2y agoCL is not particularly functionally oriented. Many things like this are absent (or present, in some cases).
- aidenn0 2y agoThe platform supporting tail-recursion is irrelevant to hosting languages that support it; e.g. the JVM does (or at least did) not support tail recursion, but kawa scheme (which does) runs just fine on the JVM.
- fulafel 2y agoNitpick: JVM supports recursive tail calls, but doesn't have the "tail call elimination" optimization that would make tail calls consume 0 stack.
- aidenn0 2y agoThat's a reasonable nitpick; tail-recursion is just a special case of tail-calls, and you can do tail-calls without TCE, just not unboundedly.
- p_l 2y agoWASM supports tail calls and multiple return values now