Ask HN: Any good Lisp-lile language that compiles to both JS and Python?

7 points by nnq ↗ HN
What would be the best recommendations for a Lisp-family language (with macros + friendly to functiona-programming idioms + good suport for repl driven development) that:

1. transpiles to both Javascript and Python,

2. produces readable code in target language, so it can be "ejected out of the project" after the prototype stage, so the final version delivered to client would not contain too "exotic" technologies in it (shipping readable and documented source code is a requirement)?

5 comments

[ 3.1 ms ] story [ 20.4 ms ] thread
Off-topic but there's a typo in the title: "lile".
It's not a Lisp, but Haxe ( https://haxe.org/ ) transpiles both to JS and Python. It does have a Lisp interpreter/REPL ( https://github.com/tluyben/hatch ) but it won't actually transpile the Lisp code itself.

That being said, I think it might be difficult to find a language satisfying (2) - transpilers typically don't target readability, IME.

For a fun example of (2) look at GWT.
I'm not aware of anything that meets both of these requirements. If you just wanted Javascript, Clojurescript is definitely worth a look, but the readability of generated code is debatable (especially since you're strongly encouraged to use Google Closure compiler, at least for production builds).

One thing that's worth a look in terms of being relatively lightweight and scoring well on output readability is https://fennel-lang.org. That's targeting Lua, but it does seem like a good pointer to how something like what you're asking for could exist, given some work.

Common Lisp has parenscript and Clpython. They might provide what you need.