176 points · by matthberg · 7y ago · 97 comments
Seibel's book is good, don't get me wrong; I just don't think its the proper pairing in the sense of culinary arts putting together a plate of well paired books.
The common lisp people and the clojure people fight viciously as only siblings can; this will infuriate those in the common lisp tribe but the ideal introductory lisp book in the general sense of the language is probably not Seibel's book its probably the comedic Clojure for the Brave and True. Not aware of anything quite like that, for common lisp.
I recommend this order:
1. Practical Common Lisp
2. On Lisp (kind of a big jump, so maybe check out ANSI Common Lisp)
3. Let over Lambda
4. Lisp in Small Pieces (especially if you want to implement a Scheme or Common Lisp)
With Common Lisp the Language (Guy Steele) and ANSI Common Lisp (Paul Graham) somewhere in the mix.
These are all excellent books and must-reads for anyone interested in programming languages and/or the Lisp family.
I think my favorite Forth introduction comes at it from the other direction, though: https://github.com/nornagon/jonesforth/blob/master/jonesfort...
- Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp (1991)
- Common Lisp Recipes (2015)
Putting this here because I'm not aware of a lot of research done in/with lisp these days (only other thing I know is the quantum computer dsl)
https://old.reddit.com/r/lisp/comments/axu858/here_is_what_w...
> This our (thirdlaw.tech's) computational chemistry system Cando. Some might remember it from Lisp conferences or our previous videos. Here is a demo of going through a free energy perturbation calculation. FEP is very important in chemistry right now. https://www.youtube.com/watch?v=hZRuGt4TcD8&list=PLbl4KVdl9U...
If you have any questions I'd be happy to answer.
If you want to learn more about the programming side of our work (not so chemical), check out our other videos. They are from programming conferences: Longer talk: https://www.youtube.com/watch?v=8X69_42Mj-g&t=177s&index=3&l...
Shorter one from the LLVM meeting: https://www.youtube.com/watch?v=gYYH2zF41fc&list=PLbl4KVdl9U...
(yes, the whole system is a compiler using LLVM as the last stage to make machine code from abstract assembly. The thing I always missed in SBCL)
There are some web frameworks in there that are fairly impressive.
There is very little advertising going on. It goes a bit back to what your folks mentioned here, a bit of dejection and being condescending to other languages. Common Lisp is the only language with reasonable compile-time computing right now, and it is hard to bring that concept over to people who still think about writing software, as opposed to living with changing software for 30 years. So the Lisp community is a bit in the mindset that those who get it do so on their own, and software is distributed among those who already know they want.
The Cando chemical computation system (based on Clasp) in the video posted below/above is open source, BTW.
How does D compare, with its CTFE (Compile-Time Function Evaluation/Execution)?
Interestingly, it was originally written in Python, but the author decided to rewrite the entire thing in Common Lisp due mainly to Python's poor performance and the lack of native thread support. The result Common Lisp version is 30 times faster than the old Python one. More info can be found in the author's blog post [1].
[1] https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...
I need to get cracking on backporting the changes we made to cl-jupyter for Cando/Clasp to portable Common Lisp tho. Sigh. So little time.
https://nfsforwindows.com/home
(It's open source but uses features of a proprietary CL implementation: https://github.com/franzinc/nfs )
... really? the most advanced language (?), are we back in the 50ies again?
In Lisp you have the same language at your disposal at runtime and at compile time. In C/C++ you have the preprocessor, which is a really lousy language. And in C++ templates. Remember the "template metaprogramming" hype about 10 years ago? How far did they go? Compute some prime numbers? I mean C++ templates are a compile-time language, but they are a language that has only one type - types and no real iterations over collection types. Wait, they have no collection types. The one and only type is types.
So, "macros" in Lisp are really a new capability, and they can make code very dense. But think about the alternative - rolling out all this code with generating it at compile time from a single point of origin. That is the real maintenance nightmare. Every time you make an assumption during programming you want to contain that assumption in a single place. So that when the assumption changes later (otherwise known as "always" when other people are involved in telling you what the program is supposed to do in the end) you change a single place, and the rest of the dependent code is generated at compile time - using the full programming language you chose.
I started a web series on compile-time computing. Didn't get as far as I wished for now, but here is some: https://medium.com/@MartinCracauer/a-gentle-introduction-to-...
I actually plan to use some of the chemical code I write (for the above mentioned Cando/Clasp chemical package) to make more parts of that series.
Which would easily make decades old and still maintained Lisp implementations unmaintainable, since they contain zillions of macros themselves.
I hope the author has matured by now. Seriously, don't buy this book.
As in arts and politics, some curmudgeons are needed in every field, if not for anything else, to show that there's another way than the mainstream.
(They don't have to be perfectly right either -- it's having a strong perspective that counts, nobody is 100% right anyway).
Of course for a technical book it's the technical content that matters -- whether it's presented politely or not.
The words you're looking for are "writes poorly."
There's absolutely no rational reason for it not to be a thing.
"Politely condescending" might be a contradiction in terms, but some people just lend themselves to being treated condescendingly.
Same thing with how some people might deserve a sarcastic response -- sarcasm is not that remote from condescension.
Yeah, the sixth chapter sure bashes on Scheme a lot. :/
Scheme's simplicity is awesome if you're implementing it; it's awesome if you're learning it; it's not so awesome if you're trying to actually use it. As LoL notes, it's dumb to throw away information in conditionals. As LoL also notes, hygienic macros are toys and DEFMACRO is generally what you really want. I'll add that having only a single namespace for variables, classes, functions, types, packages & everything else means that you end up having to be extremely verbose: foo, fooClass, fooFunc, fooType, fooPackage. call/cc is incredibly cool & powerful, but also really hurts efficiency in a way that I don't think is acceptable in a production system (it's fine, of course, in a teaching language, because the experience of understanding it is really useful). dynamic-wind is broken compared to UNWIND-PROTECT.
And on & on & on.
Steele also wrote the Java spec, and he wasn't wrong when he said 'We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp,' but I don't think in 2019 anyone thinks that his involvement with Java means it is anywhere near as good, powerful or acceptable a language as Lisp.
"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." -Guy Steele
Maybe the author was immature. That's great. Let it remind you what it's like to be young and so excited about something that you'd write a book about it. This book is great.
Something that might be worth noting: two minutes of googling didn't turn up the author's age, but I recall seeing this photo on his website when I bought it some time after it was published in 2008: https://hcsw.org/contact.php
Here's a more up-to-date photo: https://hoytech.com/about
It's possible he was quite young when it was published. If that's the case, then I think the book is all the more a towering achievement. It's abrasive, and it smells a bit of 2000s forum fanboy discussions, but mature people should be able to read past the more opinionated parts and find the gems in the technical treatment.
Or, as we used to call it: "It's all about having had a few conversations with actual people in the actual world".
Also, IMO, the defmacro/g macro defined in this book would have been better defined as a reader macro than as a codewalking macro.
I thought Haskell surpassed it a long time ago already.
Doesn't need one.
> restart/condition system that Common Lisp has
Utility is questionable, but you could build one in the continuation monad.