citizen428.blog()

Try to learn something about everything

Review: Land of Lisp

Disclaimer: The awesome folks at No Starch Press were nice enough to provide me with a free copy of the book reviewed here, but what I’m about to write has not been influenced by this. I just wanted to get this out of the way…

Ever since I first learned about it, I was eagerly awaiting the release of Land of Lisp. If you have never heard about the book before, have a look at this promotional cartoon music video. Yes, that’s right, this book comes with its very own promotional cartoon music video!

Your reaction to this video is actually a pretty good indicator on wether or not you are likely to enjoy this book. If you can’t take the cartoons and strange humor, “Land of Lisp” will probably not be for you. If you do however, you’ll be relieved that the book is at least as awesome as the video and probably even more.

People believing that Lisp has been dead since the AI winter may be surprised by the release of new book on the language in 2010. They may however have missed the release of Peter Seibel’s Practical Common Lisp in 2005, which managed to expose the language to a wider audience again, a feat I think “LoL” might achieve too.

For me the best part about Conrad Barski‘s book is its very readable and entertaining style, combined with cartoons and the use of small games as demonstrations of the techniques introduced in the book. I think this is what makes “LoL” really stand out from the other Lisp books: it’s neither as academic as most of the texts focussed on Scheme (with The Little Schemer being an obvious exception), nor is it as dry as Seibel’s book (which otherwise is a pretty good read) or as dated as Paul Graham’s On Lisp which was written while Common Lisp was still in the process of being standardized. For many people “Land of Lisp” may very well be there first contact with the language, and I think with its funny and easy to follow style it may get quite a few people hooked.

The book is structured in 4 main parts, the first of which – called “Lisp Is Power” – serves as a general introduction to the language, explaing the basic syntax and so on. The second part (“Lisp Is Symmetry”) introduces the reader to flow control, data structures, input and output, lambda expressions and more. In the process you’ll write the first part of a game engine for text based games, a great little version of Hunt the Wumpus called “Grand Theft Wumpus” and “Orc Battle”, a small strategy game played in the REPL. The third part (“Lisp Is Hacking”) introduces us to the powerful and sometimes disputed “format” and “loop” commands, as well as streams. Game-wise you’ll encounter a little simulation of an evolving world as well as “Attack of the Robots”, a retro game where your aim is to get rid of some robots by making them collide with each other. The last part (“Lisp Is Science”) introduces functional programming techniques, macros, DSLs and laziness. Besides finishing the text adventure started in an earlier chapter, you’ll also write “Dice Of Doom”, a Dice Wars clone that’s the most complex program of the whole book. Last but not least there’s an epilogue, where the author gives a brief overview of several important topics that got little or no exposure up to that point, like CLOS or the condition system.

As a final summary I’d say that “Land of Lisp” is a truly great achievement. It’s fun to read and does a good job of introducing the reader to the most important concepts of Lisp, by giving a taste of the language’s power, without being overwhelming. For more experienced Lispers this might make the book significantly less interesting, since some really nifty things only get mentioned in the epilogue. If you are among them, Seibel’s book is probably what you want to read (if you haven’t already, which would be surprising). I’d also advise you to not get too excited about the “game development” part of the book, except for the last one all the games are rather minimal and simple, so don’t expect writing 3d shooters or anything like that. They are however awesome examples of the concepts introduced in the individual chapters and way more fun than the contrived examples one finds in way too many programming books. For new Lispers or people who need to brush up on their Common Lisp skills (e.g. when migrating from some other Lisp) this comes highly recommend, but even more senior Lispers might want to get a copy, even if it’s only for the odd cartoons.

Comments