CL subset?
From: Chris Capel (ch.ris_at_iba.nktech.net)
Date: 11/21/04
- Next message: sketerpot_at_gmail.com: "Re: CL subset?"
- Previous message: David Steuber: "Re: redundant operators in a programming language (was: C++ sucks for games)"
- Next in thread: sketerpot_at_gmail.com: "Re: CL subset?"
- Reply: sketerpot_at_gmail.com: "Re: CL subset?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 20 Nov 2004 19:44:13 -0600
I've read that a program can be a conforming subset implementation of CL in
the case that any programs written in that subset will run as intended,
unmodified, on a fully conforming CL implementation. The primary advantage
that I can see to this sort of thing is to optimize the size of the runtime
required for deployment (disk/memory footprint, startup times). In fact,
given the right subset, it might be possible to do development on a full
version of CL and then deploy with the subset. For instance, the majority
of programs could run fine without a compiler or debugger (or EVAL) in the
final image. Many small ones could make do without various other features
(the reader, the condition system), although some would be harder to take
out or modularize than others.
I think there are probably quite a few people developing small systems
intended for widespread, casual use, that would voluntarily choose to use
such an implementation--sacrificing the more dynamic features of the
language in a conscious effort to create smaller distributables. In the
case of COMPILE and friends, they wouldn't be giving up much at all.
Some of the comments in
http://www.nhplace.com/kent/CL/Public-Review-PRobertson.html
seem to be particularly apt here.
Now, it seems the most obvious way to implement this sort of thing is to
have flags in the source of a full implementation that exclude different
portions of the runtime. For instance, one might specify:
./configure --no-compiler --no-reader --simple-conditions \
--sources foo.fasl bar.fasl --entry-point bar-main
... where the fasls were compiled with a full version of the same
implementation, and the resulting executable (possibly multiple files)
would jump straight to that code. Do any free implementations have this
capability, or anything like it? If not, are there any separate
implementations being maintained that only implement a sizable subset of
CL?
-- Flamebait --
Perhaps a good answer to this question would help to bridge the culture gap
and satisfy the newbies with the perennial "HOW DO I COMPILE AN EXE WITH
LISP" question. It might make lisp more suitable for lightweight,
non-serious tasks that attract hobbyists who have the time to write the
sort of neat, *little*, libraries for various things that make a language
less intimidating for newbies and pragmatists with small requirements.
After playing with Lisp for several months, the thing that still strikes me
the most about it is its monolithic nature. And it doesn't really strike me
as necessary, either. I see nothing essential to the spirit of Common Lisp
that makes the sort of runtime we have available in most implementations
necessary. I think that's a shame. It may be (and it wouldn't surprise me)
that I'm woefully underestimating the technical difficulty of putting this
sort of functionality into an implementation, but don't tar and compress me
for that.
I tend to agree with Paul Graham (as I read him) in that a language that's
good for free-time projects of little consequence is the best kind for
becoming a great language for hackers. Take that as you will.
Chris Capel
- Next message: sketerpot_at_gmail.com: "Re: CL subset?"
- Previous message: David Steuber: "Re: redundant operators in a programming language (was: C++ sucks for games)"
- Next in thread: sketerpot_at_gmail.com: "Re: CL subset?"
- Reply: sketerpot_at_gmail.com: "Re: CL subset?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|