This is a read-only archive!

Even more Lisp

Having read and re-read Practical Common Lisp probably four or five times at this point if you add it all up, and having skimmed Graham's On Lisp enough to realize I need to come back to it later, I decided to move on to Structure and Interpreation of Computer Programs, which is a book available free online.

Side note: It's so wonderfully delicious that so many amazing books are available free online, isn't it? I'm almost in disbelief sometimes at how amazing that is. Such knowledge and secrets, not only easily accessible, but easily accessible for free. As I did with PCL, I'll probably end up buying one or both of the other books I mentioned above just because I like to have a hard copy of things to read in bed, but in the meantime the online version is great.

If that wasn't enough, you can also download (for free) videos of lectures covering this material, given by two guys who authored SICP. I'm only up to lecture 2b, but it's proving very informative to say the least.

SICP is a book apparently used in CS classes at MIT, and it deals with abstractions, the different kinds, and particularly functions and procedures as first-class objects and functional programming. The language used throughout is Scheme, which is different enough from Common Lisp to trip me up already. Although not being all that comfortable with CL at this point maybe also be a blessing, because if it turns out I like Scheme more I can make the switch without having to break any ingrained habits.

I've been watching the lectures and translating the Scheme they give as examples into CL as I watch, as a means of trying to familiarize myself with both languages. A while back I read about the Lisp1 vs. Lisp2 distinction but didn't pay it much mind. Then I read about it again on a Lisp mailing list last week, but didn't pay it any mind. Well today in the course of my Scheme -> CL translations, in a very roundabout manner, this distinction bit me and caused me no end of trouble. Which is funny because I still never saw it coming, even having read about it in two different places and two different context. But now at least I can say understand the distinction in a very tangible way. Just goes to show the only real way to learn a language is by writing code in it.

(You can read much more about Lisp1 vs. Lisp2 here. For those who don't want to read, and for my own future reference: Lisp1 vs. Lisp2 refers to whether there's a single namespace for functions and variables, or two separate namespaces for those things. Scheme has one namespace, CL standardized on two. This results in CL being much more verbose when calling lambdas and passing them around between functions, but also arguably results in CL being more suited to using macros without having to worry about name collisions. That's my probably limited understanding at this point. )

November 29, 2007 @ 4:58 PM PST
Cateogory: Programming
Tags: PCL, Lisp, Books

4 Comments

numerodix
Quoth numerodix on November 29, 2007 @ 10:44 PM PST

Aaaah, the classic MIT course. Makes me nostalgic watching those old lectures from the 80s. Very interesting course.

Christopher Giroir
Quoth Christopher Giroir on November 30, 2007 @ 2:26 AM PST

I love those lectures. I'm up to 6. I've been watching them slowly ever since taking the course at UMass that uses that book. My teacher sucked, but the material stuck with me. They do some pretty cool stuff in that book and really make you think about how scheme (CL) and other languages behave.

Thanks for the link to the function/value paper :)

Brian
Quoth Brian on November 30, 2007 @ 12:13 PM PST

You're welcome for the link.

I love when he fires up a computer on some 80x20-character terminal (if even 80) with dim green font on a black background and runs commands in Edwin that seem to take forever to finish.

Christopher Giroir
Quoth Christopher Giroir on December 01, 2007 @ 12:29 PM PST

I totally agree :) He hasn't done it recently in lectures 5-6 :-(