Home > Lisp, Scheme > My first Lisp books

My first Lisp books

Languages of Lisp family have several freely available books to learn language from. Some of them so good that they become a classical texts of computer science. But beginner doesn’t have a clue which book to read first. Here I will present my own opinion.

First book I’ve read was “How to design programs”, freely available here. This book was recommended as “introduction to programming and computing”, so I decided it will be simple enough for me. Since this book is written by same people who develop excellent DrScheme implementation of Scheme, and DrScheme was my first implementation, I thought that book will be a good companion for uisng DrScheme. Those expectations have proved to be true.

This book is about programming in general, and aimed for beginners who never programmed before. It consists of chapters, each one is most advanced then previous. First 2 chapters are organized in following way: first, some theory, then some language syntax, then examples. Chapters starting from 3 start from some problem description and shows that solution is impossible without some new syntax, then new syntax is introduced, after that a lot of excersizes are provided, and finally some “design recipe” is given, which generalizes whole experience learned in chapter. This book focuses on algorithms and program design, showing abstraction, recirsion, templating. Most examples are from logical/math area. Only datatypes involved are boolean, symbol, function, list and vector.

This book doesn’t explain Scheme library functions, re-implementing them instead in order to teach writing your own programs. This book doesn’t cover some “technological” areas such a s string processing, I/O, macroses, and other advanced stuff.

Finally, I whould recommend this book for beginners, and for advanced programmers in spare time. It’s great for teaching very basics of language, ideas of computer science and good program design. But for people who have experience in non-Lisp languages and want to start by making something practical this book is too long and very math/logic oriented.

Second book was “Teach yourself Scheme in fixnum days”. Small and informative, it was a very thing I needed after “HtDP”. It covered large previously unknown areas of Scheme, especially library functions. However, this book lacks good descriptions, so many things are left unclear to me. However, I’ve become aware what they do exist. Finally, I recommend this book for people who know some other non-Lisp languages and want to get quick impression on Scheme.

Now I’m reading “Common Lisp: a gentle introduction to symbolic computation”. It’s about Common Lisp, not Scheme, however it’s very useful for Scheme people. It’s simple, and, very important, about language, not programming in general. Starting with basic explanation on what is function and how functions are composed from other functions, it goes to explanation of lists as cons sells, then goes to eval notation. In the beginning, exercizes are small, fast and funny. Next chapters describe conditions, library functions which operate on lists, variables and scope. Internals of list-processing functions are not explained, because that requires recursion, which is explained much later.

Finally, I believe that approach of “CL: gentle introduction” is best from all three. It’s much more funny for me to play with composing my functions from standard functions, then to start from designing recursive functions. Playing with available functions makes user feel himself more powerful. Yes, lists are naturally lead to recursion, but I believe that simple list manipulation should be done using standard functions, and their recursive internals could be explained later. Language essentials explained in “HtDP” are very small, but Scheme is not that minimalistic! However, generic ideas about program design and algorithms are very good in “HtDP”, and reading this book was very good to me.

Programming uses both your memory and mind. Authors of “HtDP” focus on mind. If you want challenges for your mind without having to remember a lots of things, then “HtDP” is for you. Authors of “CL: gentle introduction” make a good balance. If you are lazy and use memory so mind could rest, then “CL: gentle introduction” is for you.

However, I still believe that both those books are not ideal. I’m still looking for perfect Lisp book. Probably, “Little Schemer” is one I’m looking for. But it’s not free.

Categories: Lisp, Scheme
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: