Subject: Re: [executables] was: why Haskell hasn't replaced CL yet?
From: Erik Naggum <>
Date: 2000/02/26
Newsgroups: comp.lang.lisp
Message-ID: <>

* Tunc Simsek <simsek@paleale.EECS.Berkeley.EDU>
| Regarding this point, I was asked the following question:  "how small of 
| an executable can you get from a CL program that simply prints HELLO WORLD
| at the term".

  note that "how small an executable" actually means "how much do the
  operating system and the executable agree on".  e.g., in the case of C
  programs under Unix, so much that the executable can effectively be a few
  hundred bytes, as the shared libraries that are involved and the
  initialization code for the program are, after all, what the entire
  operating system is optimized for.  this does not mean the memory
  footprint of the executable when loaded into memory will be small, or
  that it won't do a lot of work behind the scenes.

| I don't know the answer, infact I don't even know how to produce an
| executable from a Lisp program, I never had any need for it.

  exactly.  therefore, the smallest "executable Common Lisp program" that
  does the same meaningless task as the typical "hello, world" demo that
  shows off how functions and interactive invocation work under Unix, is
  either simply the string "hello, world" typed to a listener (and what's
  the sport in that?) or (defun hello () "hello, world") which is almost as

  what we have to realize and counter with is that building lots of tiny
  little programs in C is a very inefficient way to build an interactive
  environment.  think of all the programs and scripts and whatnot as small
  functions that can pass values around only as textual strings in pipes at
  best.  each program is ephemeral and must use the disk for its variables
  or state if it has any, or it must receive environment variables and
  options each time and the state is maintained in the caller.  each
  program is run by loading and dynamically linking a *huge* amount of
  stuff every time.  in contrast, a Common Lisp system got all of this
  interactive development environment stuff _right_, with very much simpler
  and faster function invocation once you start it up, but you also have to
  start up a shell to start you hello program.  so why focus on the size of
  the "executable".  refocus on the amount of work involved and how having
  to use an executable on disk for such a trivial behavior is really not a
  good thing to begin with.