is it possible to write a cljs compiler backend that emits lua code? I found an abandoned project from 7 years ago that tried to do that: https://github.com/raph-amiard/clojurescript-lua (as well as discussion with David Nolen, apparently with the same person who tried that: https://archive.clojure.org/design-wiki/display/design/Decoupling%2Bcljs.core.html) but I guess clojurescript changed a lot in last 7 years?
Sure. Or you could just use fennel. It's similar syntactically but otherwise it's just lua with parens (and macros, some sugar here there), which has both pros and cons
I don't want lua with parens, I want clojure on another host
I guess you answered your question yourself earlier then: it's possible.
@vlaad I don’t think there is any conceptual problem with doing that, but there are some issues with the result, in particular the Lua/LuaJIT GC is not very performant, so persistent datastructures will almost certainly perform badly. IIRC Tim Baldridge had similar problems with Pixie.
Oops @vlaaad ^^^
There’s a #cljs-dev which is probably a better place to ask this. Also, you might want to check out https://fennel-lang.org/, which is somewhat clojurey but is more like lua with a skin.