Archive for the 'sicp' Category

Reading Structure and Interpretation of Computer Programs

2016-02-14

A friend has started a «Structure and Interpretation of Computer Programs» (SICP) study group, and I’m lucky enough to be a member.

SICP is infamous in the Computer Science world; known as “The Wizard Book”, the New Hacker’s Dictionary describes it as “One of the bibles of the LISP/Scheme world”. Like many bibles: there’s more than one; it’s big and heavy; only about half of what’s in it is true.

cover

SICP is one of my favourite books (possibly my all time favourite book), I’ve “read” it a couple of times. Probably never all the way to the end, and I’ve certainly never really got to grips with the harder material. It’s too easy to skim over convince yourself that you understand.

A study group gives the opportunity to get to grips with the exercises and provides a bit of peer pressure and hopefully more than a bit of peer support.

First lesson: Installing scheme

Short version: Installing things is still hard.

You can install CHICKEN scheme on Ubuntu with sudo apt-get install chicken-bin, but you don’t get readline, so up-arrow doesn’t work. Not friendly.

To get readline to work you have to install the readline extension for chicken. No, not with a Debian package, but with chicken’s own package installer: chicken-install. Ok.

chicken-install readline

Of course, that doesn’t actually make readline work. To make readline work, you have to add 3 secret lines to your .csirc file, documented in the “Beware of the Leopard” section of the chicken readline documentation:

In your .csirc

(use readline)
(current-input-port (make-readline-port))
(install-history-file #f "/.csi.history")

I weep.