5 ms·
Parenscript compiles a Common Lisp subset to JavaScript
- r3n48w46 6y agoshenlanguage (http://shenlanguage.org/ http://shenlanguage.org/) also has a javascript port listed on https://github.com/Shen-Language/wiki/wiki https://github.com/Shen-Language/wiki/wiki
- staycoolboy 6y agoThis is cool. Last year I spent a week transliterating someone's Python to JavaScript. It never occurred to me to Ask HN if that already existed. Is there a good one?
- vanyaklimenko 6y agoThere is Brython[1], and it's pretty good—we use it to check Python code submissions on a educational site and so far it worked flawlessly for that kind of stuff. [1] https://brython.info/ https://brython.info/
- staycoolboy 6y agoThat is cool! It would not have worked for us though because we developed an electronJS packaged app and there is no python installed on the host system.
- ngcc_hk 6y agoworry about this "The latest Parenscript release, version 2.7.1, came out on December 5, 2018 "
- marijn 6y agonb: This project has been going for 13 years.
- masukomi 6y agoThe lisp community is a lot more like the Unix community than the JavaScript community. We have a lot of good tools, that work well, and don't need constant poking. Do you worry about the viability or usefulnes of "cd" or "cat" or most of the other core unix tools even though they probably haven't been touched for many many years? Don't worry if a lisp project hasn't been touched for years. Worry if a project has a boatload of open/known bugs AND hasn't been touched for years.
- spaethnl 6y agoWhen I was looking into this months ago I had the same concern. I've read about how common lisp packages tend to become "finished" and not updated after a while, but that doesn't intuitively make sense to me for a package like this that has an external moving target. How much has JavaScript changed since the last update of ParenScript? How many new language features, that might add real benefit, are not accounted for? Maybe the answer is that the new features are unnecessary to parenscript, I genuinely don't know, but it would be nice to at least see discussion/acknowledgment of this featured somewhere prominently.
- kazinator 6y agoA code generator to JS should produce code that will work flawlessly in a decade-old browser. One of the benefits of working in such a thing in the first place is to be isolated from the churning toilet bowl, and some of the value of that is negated if the project lets itself be churned.
- brudgers 6y agoStability is a feature not a bug.
- jwr 6y agoThis is a good time to mention that Clojure has ClojureScript, which is the full language hosted on JavaScript, and compiled using Google Closure (sigh about the naming confusion) advanced compilation mode, with dead code elimination and full-program optimization. [context: I used to write in CL and used Parenscript before I switched to Clojure]
- jnxx 6y agoThere is also babashka(https://github.com/borkdude/babashka https://github.com/borkdude/babashka) which is basically a subset of Clojure suitable for scripting (including Clojure concurrency features) running on GraalVM
- bachmeier 6y agoIf you want to use Scheme instead of Common Lisp, I found Biwascheme to be quite easy to use. https://www.biwascheme.org/index.html https://www.biwascheme.org/index.html
- masukomi 6y agoChicken Scheme has Spock: https://wiki.call-cc.org/eggref/4/spock https://wiki.call-cc.org/eggref/4/spock SPOCK is a compiler and runtime system for translating most of R5RS Scheme into JavaScript. You can use it either by statically generating JavaScript files from Scheme source files or by translating s-expressions containing Scheme code on the fly. The compiler uses Henry Baker's Cheney-on-the-MTA compilation strategy.