News for hackers. Stuff that matters.

Ask HN: Import Common Lisp Code into Parenscript

I have trouble understanding what parenscript does and not does.

Am I "out on Mars" in the Lisp world with parenscript or can I also make use of other Common Lisp Code easily like trivia etc? What are people actually doing with parenscript, develop everything themselves from "the ground up"?

Thanks

( 5 comments | 2 points | on HN )
Re:Ask HN: Import Common Lisp Code into Parenscript by remexre on Thursday October 01, 2020 @12:16AM (#24647288)
Most Lisp libraries won't automatically work with Parenscript -- think of Parenscript as just being more Lisp-like syntax for JS, rather than a compile from Lisp to JS. It's quite useful if you want to dynamically generate JS, or wish JS had macros, but it won't give you trivia for free.

Hopefully some day there'll be a production-quality Lisp implementation that runs in WebAssembly... Though, I wonder if you could hack together ECL and emscripten?

Re:Ask HN: Import Common Lisp Code into Parenscript by tresilience on Thursday October 01, 2020 @08:20AM (#24650044)
Noted. I wasn't too sure.. thanks!
Re:Ask HN: Import Common Lisp Code into Parenscript by jinwoo68 on Saturday October 03, 2020 @07:40PM (#24675498)
There's JSCL [1], an implementation of Common Lisp in JS. It's not a full implementation but you would be able to use some CL libraries, I guess.

[1] https://github.com/jscl-project/jscl

Re:Ask HN: Import Common Lisp Code into Parenscript by tresilience on Sunday October 04, 2020 @06:02PM (#24682610)
I'll have a look. There is also

(ps:import-macros-from-lisp 'rutils:aif)

in Parenscript which lets one import macros from CL.

https://40ants.com/lisp-project-of-the-day/2020/05/0071-pare...

Re:Ask HN: Import Common Lisp Code into Parenscript by jinwoo68 on Monday October 05, 2020 @08:23PM (#24693625)
Cool. But I wouldn't expect import-macros-from-lisp to work with many existing CL macros. Parenscript is quite mechanical in its transpiling to JS.