Common Lisp Books
lisp-lang.orgI really liked "Common LISP: A Gentle Introduction to Symbolic Computation", from David S. Touretzky. I think it could have been mentioned. Unlike Practical Common Lisp, it has exercises and extensive sections in each chapter just on tools (such as dribble, trace, describe, step, et cetera).
Moreover, I was expecting to see "Paradigms of Artificial Intelligence Programming", from Peter Norvig. I have not fully read it, but it seems to be an awesome book. Not just to learn Lisp but a good book in general, since the code is beautifully designed. Despite the title, AI (GOFAI, actually) is just the domain, the lisp techniques and code approach can be applied to other areas.
This Reddit's post presents another list that might be an interesting complement to the one we are discussing here: https://www.reddit.com/r/Common_Lisp/comments/ddcoar/selecti...
I'd second Gentle Introduction, but only if the reader is willing to actual do all the excersizes in the book. It moves slow and covers less material than other books mentioned, but I found the slow pace and practiced repetion really help the language click for me.
What I found really useful was to work through the excersizes in a proper SLIME setup in Emacs with paredit. Since the excersizes were easy enough I could instead focus on learning to use a proper development setup for working with Lisp.
Norvig's PAIP is available to read online: https://github.com/norvig/paip-lisp
I've helped on the ongoing work of ebook cleanup.
Quite a random selection for such an official looking URL; what about e.g. "Common Lisp - The Language" (https://www.amazon.com/-/de/dp/1555580416) or e.g. "Object-oriented programming in Common LISP" (https://www.amazon.com/-/de/dp/0201175894)? However, the reference to "Principles of Biomedical Informatics" was useful; looks like a very interesting book; another important CL application book not on the list, is of course "Paradigms of Artificial Intelligence Programming" (https://www.amazon.com/-/de/dp/1558601910).
CLtL2 ( https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html ) is freely available, PAIP ( https://github.com/norvig/paip-lisp ) also .
On the off-chance that someone reading this is also interested in algorithmic composition: https://michael-edwards.org/sc/index.html https://michael-edwards.org/sc/liner.html “slippery chicken is an open-source Common Lisp environment for declarative or generative algorithmic composition building on CLM, CMN, CM, MusicXML and Lilypond for score, sound file, and/or MIDI file outputs and the integration of these into closely aligned hybrid acoustic-electronic pieces of music.” …made by (the extremely awesome) Michael Edwards: https://michael-edwards.org/
This list is not very fresh or exhaustive; for instance, does not contain two recent Apress books, which are Vsevolod Domkin's Programming Algorithms in Lisp and Michał "phoe" Herda's The Common Lisp Condition System.
(Disclosure: I was the technical reviewer for the former and I wrote the latter.)
Looks like someone else mentioned PAIP. I’d add “The Art of the Metaobject Protocol” as well.
More people should really read this book. Its great that functional programing is on the rise, but the shitty object systems of C++ and Java have poisoned OOP in most people's mind. CLOS is an awesome object system and TAOTMP really highlights what you can do with a good object system.
Functional programing is still awesome, but for high-level work I think the multiparadigm languages like Scala, Swift, and CL are the way to go.
Graham's "On Lisp" was the only CL book I read from start to finish. Thanks Paul, it was one of the eye-openers I still think about from time to time.
This is awesome. I had an introductory lisp course in college and couldn’t make heads or tails of it. To this day it’s the only programming language I’ve tried and been unable to understand (“I could just never grok lisp - it’s incompatible with my brain”). Given a few introductory, free texts, I might be well on my way to remedy that :)
It's not a Common Lisp book, but I'd highly recommend The Little Schemer if you're looking to grok lisp.
The little schemer is great, especially in understanding recursion and tail call optimization (pass an accumulator to track the result as a parameter). However I was never able to understand the chapter that builds the y combinator (and I actually was never able to understand that concept)...
If it helps, I'm rather fond of this explanation: https://mvanier.livejournal.com/2897.html
Especially this part, from toward the beginning:
> Before I get into the details of what Y actually is, I'd like to address the question of why you, as a programmer, should bother to learn about it. To be honest, there aren't a lot of good nuts-and-bolts practical reasons for learning about Y. Even though it does have a few practical applications, for the most part it's mainly of interest to computer language theorists.
The article goes on to explain why you should learn it, anyway, but, still, it's not like monads and Haskell. Despite the concept's intellectual cachet, you don't need to understand it to be an effective lisper. That said, this opinion is mine and mine alone, and stands in direct contradiction to the sentiment expressed in the following paragraph.
Thanks for the link I'll take a look. I agree that you don't need to understand y to be an effective lisper. I have used lisp and various other functional languages over the years in various projects and there wasn't a use case for y combinator...
Its official use case is hacking recursion into a language that doesn't support recursion, but does have first-class functions. To the best of my knowledge, the only language that fits this description is the lambda calculus itself.
There is a paper, Y in Practical Programs ( https://blog.klipse.tech/assets/y-in-practical-programs.pdf) that presents some interesting things you can layer on top of the technique. I'll leave it up to others to debate whether doing so is genuinely practical, or more of a game of functional code golf.
It took me a couple of years and several attempts to really get there. Don't give up! ;-)
If you want to keep learning about great Common Lisp books, I recommend following Rainer Joswig or Zach Beane on Twitter.
Rainer Joswig also has great answers on Stack Overflow.
I think Peter Seibels and Edmung Weitz' books are both fantastic books with a comprehensive and modern view. Can't recommend them enough.
Another overview of some Lisp books:
Good list. I think that I own all published Common Lisp books, and most Prolog and Smalltalk books. I prefer reading books to excess time browsing the web and social media. Including non-technical books, I would be embarrassed to admit how much time I spend reading every week.
A self plug: you can get free PDF/ePub/Kindle versions of my Common Lisp book on my personal web site (https://markwatson.com)
Why do I need to know lisp in 2021? Any practical real use besides being used as example in books about computation?
Speaking purely for myself, I like lisp because I find it embodies a certain pure joy of hacking that I don't find to be quite as present in other more popular languages that I use.
If you are using a language that supports live editing for example and thus reveals the archaic nature of edit compile test cycle of unproductive programming; you probably need not learn Lisp. This is just one property and there are many more but one which is immediately evident.
Whats the best stack for building a website or webapp in CL these days? Is it worth it?
I'd say it's worth it to the mid or long term, so you'd benefit from CL's strengths and advantages. It's more difficult than mainstream languages to start a web app only because there are less material, project templates or full blown frameworks to get started, so you better know the web already. In addition to the awesome-cl list of libraries, I recommend to check out the Cookbook https://lispcookbook.github.io/cl-cookbook/web.html to grok the different parts of a lisp (web) app.
And, shameless plugs: a web project skeleton: https://github.com/vindarel/cl-cookieweb (very new), a demo of hot reloading a running web app (locally or deployed): https://github.com/vindarel/lisp-web-live-reload-example
Hunchentoot is the most popular as a server (and I suspect most people wrap their deployment with either nginx or apache) though two frameworks listed on https://github.com/CodyReichert/awesome-cl#web-frameworks worth checking out depending on your preferences are Radiance and Lucerne. Link also has other related web stuff; like many things it's hard to say something is the "best" in its class, there are just options and some are more popular. On the front-end there are a few projects floating around that look to be aimed at replicating some of the concepts and workflows from the ClojureScript world for SPAs but I don't think any of them are really ready.
I'm not sure it's worth it unless you just want to write CL almost exclusively. It's cool though to have more variation on different deployment (or even "do it in production") workflows available to fit your tastes, from something like PHP's/CGI's copy/edit files loaded each request, to a more conservative shutdown-deploy-restart cycle, to connecting via SSH and then inspecting/debugging/editing the live program through a forwarded REPL socket in your favorite editor just as if you were doing it locally.
Hunchentoot as your server, there really is nothing like a unified framework.
How can I learn enough Lisp to understand Emacs well?
I asked this question myself on hn a couple of months ago, as the Chassell Elisp Introduction just wasn't working for me. Someone suggested learning CL via Seibel's Practical Common Lisp [1] and then just refering to the Elisp docs, which is a bit of a round-the-houses approach, but I'm now half way through the Seibel and really enjoying it. Pitched at just the right level for me.
I guess this would be good for you considering your objectives:"An Introduction to Programming in Emacs Lisp". It is available for free here [1].
This is a great resource (Learning Emacs Lisp by System Crafters) https://www.youtube.com/playlist?list=PLEoMzSkcN8oPQtn7FQEF3...
This is how I'm traveling that journey:
I started with a simple .org file. Whenever I encountered a problem, a question, or a confusing topic, I would simply add a todo heading.
Over time, I slowly learned Org-mode, then Babel, then transitioned to Org-Roam. I learned enough of Emacs Lisp, then learned Clojure, then tried other Lisps like Fennel. Today, I'm comfortably writing my own little elisp packages, sharing tips with my colleagues, chasing performance bottlenecks, and still learning.
Just start with a simple todo list.
Emacs includes a book, or maybe it's in the list of installable packages called An Introduction to Programming in Emacs Lisp (I think the package is called 'eintr') that does a pretty good job as an introductory lisp programing text and then gets deeper into the internal functions of Emacs.
By the later part of it I felt like I had a decent handle on Emacs Lisp and could read the code for packages I was interested in reasonably well.
Emacs as of quite a while has included the contents of this book in the Info system under "Emacs Lisp Intro"
www.t3x.org