3 ms·
If you want to write a program in a Lisp and ship it as a compiled binary, your best bet is to use Common Lisp and compile it with SBCL. A stripped SLAD binary
by slondr 8y ago
If you want to write a program in a Lisp and ship it as a compiled binary, your best bet is to use Common Lisp and compile it with SBCL. A stripped SLAD binary will be way smaller with way less overhead then running a whole host of bytecode on a VM like Racket or Clojure.
- drcode 8y agoBut few people care about overhead or executable size much anymore, outside of embedded systems. What most people care about is computational performance, and clojure performs OK by this metric (certainly SBCL can still beat it in many use cases on this metric as well, but often only by a modest margin)
- fiddlerwoaroof 8y agosbcl also has the ability to statically link all your C dependencies using CFFI’s STATIC-IMAGE-OP
- lincpa 8y agoClojure can also do it. Java Abstracted Foreign Function Layer https://github.com/jnr/jnr-ffi https://github.com/jnr/jnr-ffi
- fiddlerwoaroof 8y agoI don't think that's exactly the same: CFFI has the ability to bind C libraries with minimal boilerplate just like jnr-ffi does. But, in addition, with CFFI (and sbcl built with a particular set of flags) you can generate an CL image that only depends on GLIBC because you've statically linked all your .so dependencies into the resulting image.