Paul Graham Makes "On Lisp" Available Online 26
entrox writes: "Paul Graham made his infamous book On Lisp available as PostScript on the web. The book is out of print and the queues for used copies on Amazon are pretty big, so this comes as a godsent for every Lisp programmer and people who would like to take a look at some neat features of Lisp. What sets this book apart is that it doesn't focus on things you could do in other languages, but rather on more extravagant techniques like making the language suit your application and not the other way around."
Cool! (Score:1)
I wonder... would this be my 21st or 22nd language learned?
Don't knock it (Score:3, Interesting)
This sort of technology was ignored back then as nobody thought they needed it, and totally forgotten about. Trust me, Lisp is more than just a historical curiosity!
A Great Book on a Great Language (Score:3, Informative)
If your only exposure to Lisp has been a one-semester course that covered Scheme, you don't know Common Lisp. Try it before you judge it. Open-source versions are CMUCL [cons.org] for most Unix/Linux platforms and OpenMCL [clozure.com] for Linux/PPC and Darwin/MacOSX. The full language spec and reference is online [xanalys.com].
Now if somebody would just write as good a book for CLOS [cmu.edu]...
Macro LISP? Oh God. (Score:2)
Re:Macro LISP? Oh God. (Score:1, Informative)
Lisp macros are an entirely different beast than the text substitution C style stuff you're probably thinking of. Most of the lisp operators are really macros.
As for readability, look at the indentation and let your editor keep track of both the parens and the indentation. If you do that, and don't have problems with prefix notation, it's extremely readable.
Re:Macro LISP? Oh God. (Score:2)
Re:Macro LISP? Oh God. (Score:2)
Re:A Great Book on a Great Language (Score:2, Informative)
You might want to try SBCL [sourceforge.net] instead of CMUCL. It's a fork of CMUCL, with the major advantage being that compiling from scratch works without major tweaking.
Re:A Great Book on a Great Language (Score:2)
Try Sonya Keene's book: Object Oriented Programming in Common Lisp [amazon.com]. It's a VERY good resource for CLOS programming.
Lisp macros are a hack (Score:1)
Re:Lisp macros are a hack (Score:1)
This is a great day (Score:2)
I would much prefer a paper version myself, but at least making it available makes a lot of sense. I hope various lisp-vendors (Franz, Xanalys) sponsor him somewhat to avoid the losses...
Re:is this book low quality? (Score:1)
Secondly, the book with the "lie" you mention is "ANSI COMMON LISP"- a different book to the one being discussed here. ('On Lisp' came first).
Thirdly- "Ansi Common Lisp" is my favourite computer book ever and in my opinion is very good for learing lisp.
Fourthly- given the abusive nature of your "friend" I feel it is only fair to nitpick and point out that the supplied C file won't compile- that is unless
graspee
Re:is this book low quality? (Score:2, Interesting)
As you point out yourself, you cannot store the result of addn(2) and expect it to work later (for example, if you called addn(3), the stored version of addn(2) would become addn(3).
You then propose to make up a closure in C by using a struct. For example,
struct addn_closure {
int (*f)(int x, int y);
int x;
};
Then instead of doing
(addn(2))(3)
you would have to do
struct addn_closure *f = addn(2);
f->f(f->y, 3);
This is nothing like doing
int (*f)(int) = addn(2);
f(3);
It doesn't count as a function unless you can call it like a function.
You cannot write the function addn() in C so that it is
- reasonably free of side effects, and
- works using normal C function calling.
Note: gcc provides a downward function passing facility that lets you do something like this (using "trampolines") That is not standard C, and it doesn't let you write a function that returns a function.
To be fair, old versions of lisp couldn't do this very well either. It wasn't until around 1977 that lisps with lexical closures started appearing. Of course it wasn't until about 1985 that optimizing C compilers started producing correct code
Sorry (Score:1)
Emacs actually
Ignore the sig, it is an artifact from my days of
VI zealotery, and is now dried in the concrete.
I hate it, the same way I hate the disco tatoos from my yout
Lisp, Arc, Cross-platform/implementation libraries (Score:1)
Hell, I would settle for just a GUI toolkit!
The "CLIM" (the standard Lisp gui toolkit) has a free implementation, but it is unfinished.
Garnet [cmu.edu], has been abandoned by CMU (the developers).
XIT [uni-stuttgart.de] hasn't been modified in 6 years.
Winterp [cybertribe.com] is its own mini-Lisp and is Unix-specific.
Why out of print.. (Score:2)