7 ms·
Embeddable Common Lisp 23.9.9
- ducktective 3y agoExciting news! Last release was 2021. Thanks to the dev team :)
- superdisk 3y agoI like ECL for its ability to compile Lisp to C and have a native executable. One dream I have is to write a game using the CL-SDL2 bindings and cross compile it for Wasm; It seems possible to do now but the flow isn't very well defined. I got pretty close hacking around a month or two ago but didn't quite finish.
- jackdaniel 3y agoThat's why the support is "preliminary". I plan to write some compelling examples for the emscripten target. Here is a "raw" build that shows repl (on some browsers results of evaluation show in the javascript console): http://turtleware.eu/static/ecl/ecl.html http://turtleware.eu/static/ecl/ecl.html -- this is a little older build, but following instructions in INSTALL will get you to the same place.
- ynniv 3y agoHistorically it's been hamstrung by wasm's lack of tail call elimination, but that appears to have been merged: https://v8.dev/blog/wasm-tail-call https://v8.dev/blog/wasm-tail-call
- dig1 3y agoI'm happy to see ECL's restarted development! How many changes are between ECL and MKCL (MKCL was/is an ECL fork)? If I'm not mistaken, ECL is (one of a few) embeddable languages that can generate a C code and provide real threads, even if used as a library. [1] https://gitlab.common-lisp.net/mkcl/mkcl https://gitlab.common-lisp.net/mkcl/mkcl
- jackdaniel 3y agoThanks! I think that the number of changes between ECL and MKCL is quite big. ECL had a short break in development between 2013 and 2015, other than that it is an actively developed project.
- hyllos 3y agoHow does it compare to Janet https://janet-lang.org/ https://janet-lang.org/ ? https://news.ycombinator.com/item?id=23164614 https://news.ycombinator.com/item?id=23164614 https://news.ycombinator.com/item?id=28255116 https://news.ycombinator.com/item?id=28255116
- BaculumMeumEst 3y agoJanet is not an implementation of common lisp, so you cannot run lisp code with it. ECL is an implementation of common lisp, so it can run common lisp code. If you don't care about running common lisp code, you can get up and running in janet more quickly. In terms of ease of embedding in C code, a comparison of different languages IME would be Lua/Fennel > Janet > Chibi Scheme > Guile Scheme > ECL.
- ngcc_hk 3y agoCan you run janet in iOS?
- BaculumMeumEst 3y agoyes, objective C is a superset of C, so you can include janet's amalgamation follow the regular embedding steps. i'm sure you can get it running from swift as well.
- baq 3y agoTangential: I wanted to embed a sane sandboxed scripting language in a node app and found… nothing. Only options were a completely broken node sub vm, half-broken js sandbox which isn’t maintained and slightly less half broken js sandbox? Does everyone roll their own when they need to embed logic expressions in their yamls?
- crabmusket 3y agoI've wondered the same. There's https://jsonlogic.com/ https://jsonlogic.com/ but that seems like a data interchange format for logic, not something an end user or developer would write themselves.
- Nihilartikel 3y agoThe SCI/babashka clojure interpreter might be a good fit, if you're ok with a lisp. It's mature and fully sandboxed. https://github.com/babashka/nbb https://github.com/babashka/nbb
- 0cf8612b2e1e 3y agoLua is usually the embedded language of choice. If you are focused on security, you could check out the Roblox fork, Luau (https://github.com/Roblox/luau https://github.com/Roblox/luau) where the creators took extra care to lock down the language on what scripts could do.
- dmux 3y agoIf Scheme is something you enjoy, BiwaScheme's interpreter can be instantiated from within Javascript and can be used to evaluate Scheme code. https://www.biwascheme.org/ https://www.biwascheme.org/
- datr 3y ago[flagged]
- datr 3y ago[flagged]
- mark_l_watson 3y agoI am just installing from source on the tiny Linux laptop I travel with. Until recently I always paid for a LispWorks Pro license, but after retiring check out dropped that and am just using SBCL. I like the idea of having a "second Common Lisp" so I want to try out a Emacs+Slime workflow.
- shrubble 3y agoIt would be interesting to see if writing "shell scripts" in ECL and compiling to small static binaries would work in terms of startup and execution speed.
- koito17 3y agoWhile simple scripts can produce binaries as small as simple C programs, you are forgetting that dynamically loading libraries has its own cost. e.g. a "hello world" on my machine is a 50 kb binary, which sounds awesome, but running otool on the binary shows a different story. hello: @rpath/libecl.21.2.dylib (compatibility version 21.2.1, current version 0.0.0) /opt/local/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0) /opt/local/lib/libgc.1.dylib (compatibility version 7.0.0, current version 7.2.0) /opt/local/lib/libffi.8.dylib (compatibility version 10.0.0, current version 10.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1) Depending on how many dynamically linked libraries you have to load, this can result in lower runtime performance than simply using e.g. Clozure CL, which has pretty fast startup time (approx. 13 ms on my machine) but much larger binaries since the binary is essentially self-contained and contains a whole CL implementation, runtime, kernel, etc. inside.
- shrubble 3y agoYes I have found that in my testing of other compiled programs, where you have a choice between dynamically loaded libs and compiling fully static. It would be a trade-off and even on simple programs there is a difference in RAM usage and execution time due to the overhead.