
Lisp in Small Pieces: Table of Contents and Code - _qc3o
http://pagesperso-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
======
caisah
"This is an excellent book on Lisp implementation. You'll get a lot out of it,
whether you are interested in writing compilers and interpreters (for Lisp or
any language) or whether you just want to see how Lisp works. It is the modern
day successor to Allen's "Anatomy of Lisp"." Peter Norvig

------
mrfabbri
Another interesting book on implementing Lisp (from a C perspective) is
[http://www.buildyourownlisp.com/](http://www.buildyourownlisp.com/).

Also, Lithp from fogus
[http://fogus.me/fun/lithp/](http://fogus.me/fun/lithp/) is a nice and brief
exploration of implementing Lisp in Python and good example of literate
programming.

~~~
agumonkey
Another interesting lisp is Maru
[http://www.reddit.com/r/programming/comments/157xdz/maru_is_...](http://www.reddit.com/r/programming/comments/157xdz/maru_is_a_symbolic_expression_evaluator_that_can/)

from I. Piumarta (Inria, VPRI), sophisticated yet beautiful C code.

~~~
mrfabbri
1750 lines of fascinating C [encompassing an garbage collector and user-level
implementations of user-defined types and structures, single-dispatch object-
oriented "messaging", and generic "multimethods"]

------
kovrik
Could someone give an advice on how to grok Lisp, please?

I write Clojure code, read Lisp books, articles etc.

But I don't feel 'magic' yet.

How did you get 'addicted' to Lisps?

~~~
malisper
The one feature that really differentiates Lisp from other languages is its
macro system. Macros allow you to give arbitrary semantic meaning to an
expression. The expression (a b c) could quite literally do anything. It could
set the value of b to the value of c (setf), it could call the procedure named
by c with the value of b and store that value back into b, or define a class
called b which has a local variable called c. Macros allow programmers to
build arbitrarily complex DSLs all within Lisp.

A couple examples of some really great macros are those in _PAIP_ [0]. In
particular, look at the defrule macro[1][2] for a version of mycin[3]. The
macro defrule is a DSL for creating rules about how to diagnose different
bacteria. Also look at the rule macro[4][5] for defining DCGs[6], a way to
parse natural language.

A great way to learn more about macros is through reading _On Lisp_ [7], in
which Paul Graham explores some of the really crazy things that are possible
with macros, including implementing continuations[8], creating a DSL for
ATNs[9] (another way to parse natural language), and even implementing an
object system.

[0] [http://norvig.com/paip.html](http://norvig.com/paip.html)

[1] [http://norvig.com/paip/mycin-r.lisp](http://norvig.com/paip/mycin-r.lisp)

[2] [http://norvig.com/paip/mycin.lisp](http://norvig.com/paip/mycin.lisp)

[3] [http://en.wikipedia.org/wiki/Mycin](http://en.wikipedia.org/wiki/Mycin)

[4] [http://norvig.com/paip/grammar.lisp](http://norvig.com/paip/grammar.lisp)

[5]
[http://norvig.com/paip/unifgram.lisp](http://norvig.com/paip/unifgram.lisp)

[6]
[http://en.wikipedia.org/wiki/Definite_clause_grammar](http://en.wikipedia.org/wiki/Definite_clause_grammar)

[7]
[http://www.paulgraham.com/onlisp.html](http://www.paulgraham.com/onlisp.html)

[8]
[http://en.wikipedia.org/wiki/Continuation](http://en.wikipedia.org/wiki/Continuation)

[9]
[http://en.wikipedia.org/wiki/Augmented_transition_network](http://en.wikipedia.org/wiki/Augmented_transition_network)

~~~
klibertp
> The one feature that really differentiates Lisp from other languages is its
> macro system.

That's not exactly true. There are many languages, both old and new, which
provide macro systems comparable to defmacro and/or syntax-rules. Dylan,
Nimrod, Julia and Elixir come to mind.

I personally don't think there's one feature which makes lisps this great.
It's really the whole experience, from syntax to repls to tools and so on.

~~~
pmoriarty
The counterargument has been that while other languages may provide powerful
macro systems, they're not as easy to use, nor are they homoiconic.

~~~
klibertp
That's not quite true either. Julia, Prolog, Io are homoiconic, for example.
Ease of use is subjective, but most AST based macro systems work in the same
way defmacro does, using quote and unquote. Then there's Scheme and syntax-
rules, which are (arguably) even easier to get right (not necessarily to use)
and which don't even need homoiconicity.

------
mahmud
Off-topic:

I know this is a long stretch, but if any of you bought a used copy of LiSP
from someone in Virginia, USA, please can you check if your copy has a
telephone number hand written on inside of the right cover? It's the only
contact I had to my step-father and I have not heard from him since. We
haven't been in touch since my mother's passing.

~~~
aidenn0
It might be worth also asking on the newsgroup c.l.l and the irc channel #lisp
on freenode.

~~~
paines
and reddit !

------
macmac
The title appears to indicate that the book would be available for download
(free), but this does not appear to be the case. Am I overinterpreting or
missing something?

~~~
lisper
No. The linked page is essentially an advertisement. (But the book is well
worth buying.)

~~~
easytiger
Yea, an article reviewing the book might be appropriate but this isn't,
especially since it is £66. And no prelude to prerequisite skills is
discussed.

 _edit_ Google helped me find the front matter:
[http://assets.cambridge.org/97805215/45662/frontmatter/97805...](http://assets.cambridge.org/97805215/45662/frontmatter/9780521545662_frontmatter.pdf)

