5 ms·
I wish they'd mention the size of the binaries produced this way, and whether they are standalone.
by Narishma 6y ago
I wish they'd mention the size of the binaries produced this way, and whether they are standalone.
- 13415 6y agoI was wondering about that, too. Last time I checked SBCL binaries weren't exactly small, more around 40MB.
- wglb 6y agoTypically; if you use the :compress feature, more like 14 meg.
- aidenn0 6y agoThe following data is for standalone executables (modulo things like libc and libm that most Linux executables depend on) Columns are: - apparent size (I run FS compression so the actual on-disk size is nearly the same between the compressed and uncompressed) - Executable name: $IMPLEMENTATION.{big|compress} implementation here is either SBCL or CCL. "Big" means I load the drakma library before saving the image (which pulls in things like unicode tables). "compress" means I attempt to enable image compression; the numbers make it looks my system's CCL does not support compression. - Mean time to run a program that quits immediately as a startup time proxy; sbcl pays a big penalty for compression as without compression it just MMAPs the image in so doesn't ever load most of the image when you quit immediately. /bin/true is included for a minimal "fast and tiny C program" as a comparison. 31K /bin/true 85% .0004 43M sbcl 99% .0036 29M ccl 93% .0053 58M sbcl.big 99% .0049 14M sbcl.compress 99% .2012 44M ccl.big 95% .0071 44M ccl.compress 95% .0071
- nonameiguess 6y ago/bin/true will still forever irk me: https://twitter.com/rob_pike/status/966896123548872705 https://twitter.com/rob_pike/status/966896123548872705
- aidenn0 6y agoI should also comment that ECL makes very compact binaries, and the runtime, which is a dynamic dependency is a single digit number of megabytes. The start up time suffers though; on the order of half a second.
- frompdx 6y agoJanet is a good option if you are looking for small binaries. Some people argue Janet is not really a lisp. Regardless, it has many lisp features you would expect like macros, is cross platform, and can produce statically linked binaries.
- klibertp 6y ago> Some people argue Janet is not really a lisp. Out of curiosity: on what basis? Janet is definitely a Lisp, although it's not the (Common) Lisp.
- aidenn0 6y agoMany people argue that Scheme is not a lisp, so the bar for "some people argue that X is not really a lisp" is fairly low.
- frompdx 6y agoI mostly add that some people argue it is not a lisp because frequently someone will comment saying Janet is not a lisp whenever I mention it in the context of other lisps.
- frompdx 6y agoThe arguments I have seen are based on Janet using arrays/tuples rather than cons cells. Here is the author addressing this on reddit a while back. https://old.reddit.com/r/programming/comments/aqwedz/janet_is_a_tiny_lisp_weighing_in_at_200300_kb_for/egjgw6z/ https://old.reddit.com/r/programming/comments/aqwedz/janet_i... The debate continues in the thread. Either way, I think Janet is very useful for situations where you want something lisp like and also want/need small executables. I've experimented with it quite a bit and have found it really useful for putting together cli apps. The sh package is really useful for gluing together other shell programs. https://github.com/andrewchambers/janet-sh https://github.com/andrewchambers/janet-sh
- klibertp 6y ago