created: 14 Mar 2009; modified: 17 Sep 2017; status: in progress; confidence: log; importance: 3
The Structure and Interpretation of Computer Programs. What can be said about it that hasn’t been said a thousand times before? It is perhaps the single greatest computer science textbook, and surely one of the preeminent Lisp or functional programming textbooks. It is renowned for its imaginative exercises and mind-blowing techniques.
So it’s pretty good.
Best of all, it’s freely available and people are working through SICP all the time. It’s tailor-made for autodidacts!
There’s an embarrassment of riches for the prospective SICP student.
- Some time ago Hacker News got up its gumption and collectively started doing SICP. Their wiki is an excellent one-stop shop for SICP links; for example, most of the following links are redundant with their link directory. They also maintain moderately active mailing list and IRC channels
- With the book, one can watch the actual lectures of the MIT course taught by Abelson & Sussman. These too are free for the download and CC-licensed.
- One particularly nice MIT service is allowing public access to their
online tutor, which is basically a web interface to the slideshows & text, as well as a forms-based interface to the problem sets – for example, a true-false question like
(define 6 2)is a legal Scheme expression
what doesevaluate to. Useful in conjunction with the larger questions that the textbook provides for checking on how well you understand the details1.
(+ -3 -5)
- One needs a Scheme environment. One of the best, and very well suited for SICP, is Dr. Scheme or PLT Scheme (as it’s now called). It is Free, and available in a Linux distro near you.
- Perhaps one isn’t using Scheme? Your solutions may not be obviously correct. You can double-check yourself by looking at solutions in other languages; another wiki with solutions is Ivan Veselov’s SICP wiki.
- A blogger named Lispy is occasionally working through SICP.
Finally, companions on the SICP are always good. I can recommend the blogging journey of Eli Bendersky, in which he documented working through the entirety of SICP. It’s an impressive achievement, and one I look to as a model.
I’m going to try to work through SICP in both Haskell and Scheme. The 2 languages represent the premier languages of functional programming, embodying one-half of the divide between dynamic/runtime typechecking and static/compiletime typechecking.
While I do it, I, like Eli, am going to write my experiences up. This serves many purposes - it encourages me to do it because I will have tangible products; it will further my experience in writing Markdown and exercise Gitit functionality (ie. be a sort of
So! That’s the introduction. On to Chapter 1!
Although caution can be warranted. One question asks what
(+)evaluates to. In Haskell I know it’d evaluate to
(+), and I suspect it’d be an error in Scheme – which it is in Dr. Scheme – but the accepted answer is 0! Common Lisp apparently also has this unprincipled hack of quietly implementing monoidal behavior.↩