Re: Why does Lisp (SBCL) produce so huge executables?
- From: Christopher Browne <cbbrowne@xxxxxxxxxxxxxxx>
- Date: Fri, 02 May 2008 22:14:36 GMT
mac <emailmac@xxxxxxxxx> writes:
I am a big admirer of Lisp, but it makes me wonder why the executable
produced by SBCL (the latest version) that I use on Ubuntu, is so big?
When I started learning CL (and getting the idea), I also have this
thought - wouldn't it be great to write all the programs in lisp
instead of C/C++?
But then it just doesn't work this way, you can't deliver a self-
contained hello-world CL program in under 100k.
So the thought of replacing all the ls, cat utilities weighting at
50mb each is a scary thought indeed.
Silly seems a better term.
The average Unix shell has some set of these sorts of utilities as
built-in features, so it is frequently the case that the shell is not
unlike a Lisp REPL.
And once we have an analogy so direct, it becomes clear that the
*right* answer is NOT to create binaries for these things, but rather
to invoke them from within a Lisp environment.
I haven't done much with this in a while, but was, at one point,
building some wrappers for bits of MH and NNTP functionality in Lisp.
It wouldn't make much sense to run those functions from a Unix shell,
but it surely WOULD be logical to run them in a Lisp REPL.
In the (now-old) "Lisp Machine" environments, that was very much the
idea; you might have a huge "base executable," but it would
immediately include great gobs of stuff.
But you can get creative - I have used CL to generate C code (macros
hide all the boiler plate code from me) and that's a big win for me.
I spent a fair bit of this week writing bits of Lisp code that was
generating SQL schemas. Nobody (aside from me) will ever see the Lisp
code; it has been a convenient way of experimentally generating a
pretty sophisticated schema.
For lisp in general, Scheme implementations usually have much smaller
footprint (because the core is smaller, there's no CLOS built-in for
example).
Usually they're not that much smaller, because having useful sets of
libraries brings them back up in size to be not particularly smaller
than CL...
--
output = ("cbbrowne" "@" "cbbrowne.com")
http://www3.sympatico.ca/cbbrowne/linuxxian.html
"Optimization hinders evolution." -- Alan J. Perlis
.
- Prev by Date: cl-httpd on cmu common lisp
- Next by Date: Re: You want abbreviations? You can't handle abbreviations!
- Previous by thread: cl-httpd on cmu common lisp
- Next by thread: Re: Why does Lisp (SBCL) produce so huge executables?
- Index(es):
Relevant Pages
|