
This highly accessible treatment introduces the artificial intelligenceprogramming language known as Lisp. Geared toward both experiencedprogrammers and those unfamiliar with the language, the text features a“toolkit” in each chapter. Reader-friendly explanations of common Lispprogramming and debugging tools include DESCRIBE, INSPECT, TRACE, andSTEP. Numerous examples, exercises, and diagrams.Reprint of the Benjamin Cummings Publishing Company, Redwood City,California, 1990 edition
For tooling, you can get started with just sbcl and rlwrap, both of which should be in any Linux repo. Get a REPL with `rlwrap sbcl`. Exit with `(exit)`.
The placement of parentheses is not arbitrary. The parentheses enclose expressions, and the nesting of expressions builds a tree. This tree, in effect, is your program's AST. Your C program compiles to something very similar; Lisp just makes it explicit.
"Add x y z" is exactly what it sounds like, if I said those words to you. The add function is usually +, so (+ x y z) is an expression that adds x, y and z, and the whole expression evaluates to the result. You can nest expressions however you like, so, for example, (+ x (* a b)) adds x to the result of the expression (* a b), which evaluates to the result of multiplying a by b.
Values and expressions are effectively interchangeable. Any one of +, x, or y, could be replaced by an arbitrarily complex expression (yes, the function too - you could replace it with a call to a higher order function, which would return a function that is then called over x and y).
The neat thing is, that's basically[0] all the syntax Lisp has. There are no reserved keywords. Everything works as per above, and can be redefined at will. You can change the language's if and else to work any way you want. You can redefine Lisp's reader to change the syntax of the language to absolutely anything you can imagine, and doing so is quite easy, since you're effectively already working at the AST level.
And you can do all of this in a running REPL without even needing to restart it.
If you're interested, check out Common Lisp: A Gentle Introduction to Symbolic Computation by David S. Touretzky.
[0] Macros are the other piece of the puzzle, but to understand them you would need to read up on Lisp more. Once you understand Lisp macros, the advantages of Lisp's syntax become obvious.
http://www.cs.cmu.edu/~dst/LispBook/index.html
— which, yes, is a wonderful book for a complete beginner.
It's the most beginner-friendly Common Lisp textbook but it might be worth it even for a seasoned programmer of other languages just for how nicely it explains lisp-specific concepts and constructs.
The first edition is available for free: https://www.cs.cmu.edu/~dst/LispBook/
