Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Parenscript (common-lisp.dev)
64 points by andsoitis on March 2, 2023 | hide | past | favorite | 15 comments


I used this at a startup and it was pretty bad. It sort of vaguely looks like Common Lisp, but you pretty much have to program in Javascript and there are a lot of weird edge cases (eg (apply #'+ '(1 2 3)) doesn't work because there is no + function in Javasccript.

Just write Javascript.


If you want to write common lisp to run in the browser, use jscl or the webasm version of ECL.

Parenscript is JS with macros written in CL, which is extremely handy for me.


I tried looking for the webasm version of ECL, but couldn't find it. The official ECL homepage doesn't mention a wasm target. Do you have a link maybe?


https://news.ycombinator.com/item?id=33113200

For context "jackdaniel" is Daniel Kochmański, ECL's maintainer, so 4 months ago at least it was planned to be merged for the next release.

Branch is at https://gitlab.com/embeddable-common-lisp/ecl/-/tree/emscrip...


Thanks!

I suspect the work is still ongoing. But maybe not on priority.

This diff from around 3 months ago shows it's likely possible to run it in the browser currently but with a lot of caveats (pretty great nonetheless!).

https://gitlab.com/embeddable-common-lisp/ecl/-/commit/6af4b...


If you're not a Scheme hater, Biwa Scheme is quite nice, and the Javascript interop is very low friction.


I'm the opposite of a Scheme hater. I developed a whole (smallish) arena roguelike in Scheme.


Personally I'm agnostic between Lisp and Scheme (or whether Scheme is, in fact, a Lisp), but some people have Strong Opinions on this. :-)


I wouldn't describe my opinions as strong, but I have a pretty big preference for the simplicity of Scheme.


I love Parenscript specifically, and in general I love--as the Hylang project puts it--"Lisp lipstick on [language]" projects. I understand the sentiments that Parenscript isn't really Lisp and that "you could just use [real Lisp X]", I do. However, Javascript really did eat the world and sometimes being able to sling it really is essential.

Math envy often means people downplay syntax when discussing programming languages, but the S-expression syntax is why I fell in love with Lisp all over again as a more experienced developer. S-expressions and macro based tooling give me the confidence to refactor in a much more experimental and improvisational manner. I can move logic around or invert the order of calls without having to worry if the change will leave the code in a broken state. Yes, VS and other IDE's offer similar features (especially as they embrace AI) but in my experience they just aren't as powerful, flexible, or--most importantly--reliable as decades old tools that exploits S-expressions.

Parenscript brings this confidence and power to Javascript. And it isn't just syntax. The project goes out of its way to give little "quality of life" semantic boosts like supporting a proper "loop" macro and multiple value return.

I use Parenscript extensively for my hobby projects[^1] and games[^2] and it's been great.

Don't let the slow pace of dev scare you off. It's a cultural difference in the Lisp adjacent communities. There's this radical idea that projects can asymptotically reach "done" because the language is sensibly forward compatible and the projects have clear goals and aren't all agile managed CV-bait nightmares that want to grow into all encompassing "frameworks". At work, I comfortably rely on Common Lisp projects that haven't been touched in more than a decade because they do what they are supposed to regardless of how the calling enviroment around them changes.

[^1]: https://github.com/trevorjay/Jerrica [^2]: https://kittyhawkmontrose.newgrounds.com/games


I've always been a fan of LispyScript. Too bad it never too off.

https://github.com/santoshrajan/lispyscript


Is this being actively developed anymore?

Asking because the Nyxt browser apparently depends on it.


I'm a contributor. Yes it's being developed. Right now there is discussion and code e.g. about the best way to incorporate features from more recent versions of the ECMA standard.

It moves a bit slowly both because it works right now, and because many features can be implemented as libraries (e.g. someone has an early implementation of tagbody they they recently posted to the mailing list).


I just wanted to say thank you for your and your colleagues work. It would not be an exaggeration to say that Parenscript saved me from burn out and let me rediscover why I became a techie to begin with.


I have just put a few minor fixes in, but glad to hear it!

It really made web development far less painful for me as well.




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

Search: