Hacker News new | past | comments | ask | show | jobs | submit login
Parenscript compiles a Common Lisp subset to JavaScript (common-lisp.net)
69 points by brudgers on June 7, 2020 | hide | past | favorite | 14 comments



This 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]


There is also babashka(https://github.com/borkdude/babashka) which is basically a subset of Clojure suitable for scripting (including Clojure concurrency features) running on GraalVM


shenlanguage (http://shenlanguage.org/) also has a javascript port listed on https://github.com/Shen-Language/wiki/wiki


If you want to use Scheme instead of Common Lisp, I found Biwascheme to be quite easy to use.

https://www.biwascheme.org/index.html


Chicken Scheme has 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.


This 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?


There 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/


That 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.


worry about this "The latest Parenscript release, version 2.7.1, came out on December 5, 2018 "


The 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.


When 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.


A 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.


Stability is a feature not a bug.


nb: This project has been going for 13 years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: