The Embeddable Common Lisp (2005) [pdf]
ecl.common-lisp.dev
ecl.common-lisp.dev
EDIT: other people and companies had LispWorks apps accepted by the Apple Store
If I recall correctly Paul has a few applications in the Apple Store, but you'd need to ask him directly to confirm that.
By default, ECL seems to link with a libecl (or something like that) shared object. If I compile with “--disable-shared”, it seems to also remove the “compile to native” part. Or at least that’s how it appeared to me.
It’s possible I’m misunderstanding, but it I didn’t see why those two aspects (static binary and native/non-byte code) are coupled. Again, apologies if I’m just misinterpreting!
Edit: my motivation is I have some small utilities that I’d like to be able to just copy to any Linux box (even musl libc-based Alpine) and have them work, regardless of glibc/ECL being present.
Even when you compile with "--disable-shared" you'll link against libc (but everything else will be statically linked). The function "--disable-shared" does not remove the compiler to native, it removes compilation of fasls to native. The reason for that is this:
- "native" fasls are shared objects under disguise linked against libecl (dlopen)
- they can't not link against libecl unless you want to statically link whole ecl with the fasl
Imagine that you call a PRINT function from the FASL. The symbol you will probably reference is ecl_print that is defined in ECL core runtime (usually in libecl.so, libecl.a/static-ecl).
The native compiler still can produce statically linked native binaries.
Now I'll get into current ECL developments - mind that this is not granted that this pan out as expected - perhaps I'll scrap whole work at some point:
I'm refactoring ECL compiler to have multiple frontends and backends (something like LLVM) - currently passes are far more coupled. With that I hope to have a better control over a generated code and we could use static analysis about which parts of CL are used, and in an opt-in manner we could allow minimal static builds that do not depend on full CL. Such static binaries could be really small.
As for the FASL compilation part, it sounds like I did indeed misunderstand the documentation, but I’ll need to digest your comment a bit more :)
Thanks!
If you manage to link musl libc statically then I'd greatly appreciate if you share your experience on our issue tracker or on irc (#ecl @ libera.chat), and if you have problems with it, you may ask in either for advice.
What is the main difference between ECL and GCL?
[1] One of current GCL goals is to reach it
What do you love it about it? What do you wish was better or different?
I’ve also read elsewhere that ECL runs on OpenBSD, where other CLs have traditionally not been fully featured.
Edit: also seems like it could help with compiling to WebAssembly (again, when performance is not critical), although I think their work there is not complete yet.
SDL2 is installed to /opt/homebrew/lib/libSDL2.dylib but I've never really learned how to work with cffi in common lisp for different architectures other than to search github issues and pray
https://manpages.ubuntu.com/manpages/jammy/man1/sdl2-config.....
Have you tried that?
Right now I’m trying and failing to load cl-sdl2 it from an ECL repl- I’m not sure how sdl2-config would be used in that situation. ECL is installed via homebrew but I’m not really sure how it’s configured to look for C libraries for cffi or how I should tell it where to look.
https://github.com/lispgames/cl-sdl2/issues/154#issuecomment...
https://developer.apple.com/library/archive/documentation/De...
LD_LIBRARY_PATH
DYLD_LIBRARY_PATH
DYLD_FALLBACK_LIBRARY_PATH
I don’t know if there’s a way to do that from within ECL. cffi:*foreign-library-directories*
cffi:*darwin-framework-directories*
and if that doesn't work for whatever reason, patching the library definition in cl-sdl2 https://raw.githubusercontent.com/lispgames/cl-sdl2/main/src...