[EMAIL PROTECTED] wrote:
Lisp/Scheme just seems like fun. I'm not sure why Lisp encourages
this attitude you're talking about. Why didn't C or Fortran or C++
create the same attitude?
Here I disagree wholeheartedly. C hackers were having a *blast*. But
they were having a blast *doing things* rather than *playing with language*.
What in God's name could you want to know about Lisp that isn't in
SICP, Lisp in Small Pieces or the numerous other Lisp books floating
around? Are you trying to build another Lisp Machines company or something?
Some of it is buried in Lisp in Small Pieces, which is great through
about the first part of Chapter 4 and then starts burying things behind
an "object system" for no apparently good reason. SICP is woefully
inadequate concerning anything about continuations or macros. I'm
digging through PAIP right now.
Of course, finding such a simple implementation to look at is amazingly
difficult (I have found one, details at bottom). The moment such a
simple implementation springs into existence, it starts accreting
features. Without source repositories, you can't unwind the later
optimizations.
What are you talking about? Scheme/Lisp implementations are a dime a dozen.
....especially incomplete unoptimized ones like mine. :)
Agreed, *broken* Scheme/Lisp implementation are a dime a dozen. How
does quoting work? How about dotted pairs? How about quasiquoting?
Macros? Tail recursion via continuations? Lexical closures? *Correct*
implementations that are a reasonable number of lines are rare.
Practically every serious CS person understands parsing/lexing, stacks,
heaps, and linking. Why? Because there are hundreds of examples of
simple compilers that you can tear apart, look at, experiment, and put
back together. Those examples are *complete*--they cover inputting
source files the whole way through binary executables.
For example, *every single compilers course and book* covers parsing and
lexing. The Lisp folks simply bypass that section of understanding by
snarfing it from the underlying environment. It's *beneath* them to
cover something so terribly mundane. Well, excuse me, but then people
are going to turn to the course or book that *does* explain that. You
can't just cover what you *want*; you have to cover what the student
*needs*. Similar things hold for continuations or macros--"Well, those
are too hard so were just going to use those from the implementation
Lisp". ARGGGGHHHH!
What do you mean by "best"? I'm curious what your objectives are.
Is it too early to invest? :)
"Best", in this case, means a small number of lines combined with a
straightforward implementation that covers all of the essential features
--closures, continuations, tail recursion, macros (I'll allow simple
macros rather than hygienic). Performance and conformance are irrelevant.
My goal was to find something under 1000 lines *in something other than
Lisp*--I have been unable to find that. Given the number of "Oh, I sat
down an implemented this in one day." or "Oh, a couple of hours should
do it." I expected this to be straightforward.
It's "straightforward" until you poke at things. Suddenly, it's "Well,
I didn't really get around to implementing those nasty continuations or
macros or translating it to a language other than Lisp."
This is my experience with functional programmers, in general.
Functional programmers implement the easy 80% and stop at the first sign
of pain while the C folks roll up their sleeves and painfully dig their
way to 90%+.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg