From ... From: Erik Naggum Subject: Re: [executables] was: why Haskell hasn't replaced CL yet? Date: 2000/02/26 Message-ID: <3160523543335494@naggum.no>#1/1 X-Deja-AN: 590574859 References: mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 951683838 16168 195.0.192.66 (27 Feb 2000 20:37:18 GMT) Organization: Naggum Software; +47 8800 8879 or +1 510 435 8604; fax: +47 2210 9077; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 27 Feb 2000 20:37:18 GMT Newsgroups: comp.lang.lisp * Tunc Simsek | 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 unchallenging. 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. #:Erik