Hacker News new | past | comments | ask | show | jobs | submit login
So you want to do the SICP... (uponmyshoulder.com)
100 points by pluies on March 25, 2011 | hide | past | favorite | 33 comments



I'm close the finishing the last major chunk of the book. Working with two colleagues for around two hours a week, its taken us nearly a year to get this far. Of course, we did every exercise, and lost a lot of time trying to work around incompatibilities between standard Scheme and the interesting corners of DrScheme [now DrRacket - mcons, I'm looking at you]. Now we use mit-scheme and I wish we had done so from the very beginning.

I don't think the book is perfect. I found the structure of Chapter 4, where a Scheme interpreter is built, confusing and irritating. The exercises are interspersed with the text in a way that doesn't allow you to test any of your solutions unless you read ahead to get more infrastructure. This seems deeply unREPLy to me. Once I had typed in enough of the supporting code to actually run my proposed solutions, and pulled some hair out debugging my broken code, I had some marvellous moments of epiphany. That Ahah! is what maks the book's reputation, and what makes the effort worthwhile. But it could have been better.

As a group, we're not sure where to go next.

My day job involves hacking my way around >>10e6 lines of C. Even now, I don't feel that I understand the idioms of Scheme-in-the-Large in anything like the same way. I'm not sure any book can give you that. I probably need to write some code to solve a real problem first.

So if any of you have completed [the] SICP, what did you read next that seemed to be a good continuation of your education?

c


I definitely agree that there are a few parts of the book which could be re-ordered so that you could always play with the exercises right away without reading ahead. Really good advice for someone about to start is to explore ahead before getting bogged down in the exercises for a particular section, like the metacircular interpreter and the compiler. I think the end of Chapter 2 also requires some destructive put/get functions which aren't introduced until Chapter 3.

I'm reading Christian Queinnec's Lisp in Small Pieces now, and I think it's a great next book after SICP. It picks up right away with a metacircular evaluator very similar to the first one in Chapter 4, but diverges from SICP to explore different semantics, like Lisp-1 vs Lisp-2, dynamic variables, exceptions and control flow with catch/throw and continuations. Later chapters address macros and compilers I think one to bytecode and another to C.

It's very well written and the translation from French is clear if a little bit flowery. Highly recommended, but watch out for the Scheme code from the author's site. I don't think it's been touched since the early to mid 90s and I had a rough time trying to get it to run in any "modern" Scheme. I'm just translating the code as I go to run in Racket, which is much easier than trying to figure out what a thousand line Makefile does, or re-write some strange non-hygienic macros. If someone has advice for running the LiSP code, please speak up!

http://pagesperso-systeme.lip6.fr/Christian.Queinnec/WWW/LiS...


It's remains just an aspiration of mine to do what you have done.

Something I have actually done is to faithfully work my way through this book http://www1.idc.ac.il/tecs/

There are a lot of special moments in there too.


I got almost to the end of chapter 4, I have my solutions available on github:

http://github.com/sztywny/sicp

The Scheme community wiki is far from being the best resource for looking up the answers to the exercises. Eli Bendersky has a good page with answers written in Common Lisp:

http://eli.thegreenplace.net/category/programming/lisp/sicp/

Also, if you throw "sicp exercise x.yz solution" into Google, a couple of other blogs will pop up frequently - it is best to always consult different sources, sometimes some of the posted "solutions" are a bit confused, or at least not discussed clearly enough.

After you get used to some basic FP idioms, the exercises aren't really that hard, especially if you had at least the most basic exposure to the topics the programs in the book touch (circuits, elementary higher math etc., remember it was a part of the beginning EE/CS curriculum). There are just a few common causes of confusion and problems with the exercises that are very well summarized in the paper "Why calculating is better then scheming":

http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.p...

Another thing is that when the programs in the book start to become larger, it becomes harder and harder to work with them, it's basically hundreds of functions in a single long file. Using some stronger form of modularization throughout the book would help a lot, at least from the moment they already have explained how one can achieve it (they describe message-passing etc.).


SICP will take a while if you really want to solve all the exercises and understand the meaning in each word. (It took me about a year and a half of sporadic studying, it took Eli Bendersky [1] roughly a year too).

It's a difficult journey, but it is a scenic tour of a lot of the core concepts in computer science.

[1] http://eli.thegreenplace.net/2008/04/18/sicp-conclusion/


They should do an updated version in Java, to increase the appeal.

(Just kidding, of course, but it would be a great practical joke if they announced something like that)


SICP: Enterprise Edition


It would be worth it just to watch Abelson and Sussman go all zed shaw on their ass.


As one of Sussman's students, I can confirm that he would indeed (politely but pointedly) "go all zed shaw on their ass"


One of the best qualities of SICP was its use of mathematical examples/exercises. But since it is a soft. eng. book and not a comp. sci. book, most of their intended audience probably were not mathematically mature enough to forge through it.

It'd be potentially beneficial for soft. engineers, to convey the core concepts through less sophisticated examples and exercising.

So a new edition -- still in scheme! -- is warranted IMO, though I'd never read but as a teaching tool it could be wonderful.


"it is a soft. eng. book and not a comp. sci. book" Huh?


I don't know why this is being upvoted. What does it add to the conversation?


An element of humour.


The book would double in length from source code bloat alone.


If you like the book, you will love the movie: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussma...


I'm taking it pretty slow, but I'm also posting solutions with explanations to the SICP exercises on my blog. See the ones I've done so far by starting at http://www.billthelizard.com/2009/10/sicp-challenge.html


I've been working on it (prof. Erlang programmer) via Racket. I'm only on section 2.3 and I've gone through section 1's exercises several times. You really gain an appreciation for math to controlling flow as opposed to something being "null" or matching a certain condition. It's good stuff once it starts to click. Painful, but I think it will pay off in the long run. I've only been at it part-time for 5 weeks!


There's an iPad app called iScheme, it's actually a functioning REPL. Could be a nice way to work through SICP.


Really? Cool... Havnt been following but thought Apple were rejecting REPL applications.


You just can't load code from external sources. I am not familiar with iScheme, but Pixie Scheme III is a scheme REPL and when you quit the app your work is gone... You can cut and paste into another app (notes or something that will sync with dropbox) but according to Apple's rules if you interpret code you can only run code you include yourself or that which is entered by the user.


There's ones for BASIC and Lua too, as well as JS/HTML/CSS previewers.


Highly recommend it, here are some great resources that I found from a previous HN thread: http://groups.google.com/group/hacker-news-reads-sicp/web/re...


I've seen that scheme REPL before. I used to be a programming tutor, and I'd use it to demonstrate functional programming to my tutees if we had extra time after I finished helping them with their assignments--typically by writing a function that would find the solutions to a quadratic equation with around half the usual number of tokens. (In case you forgot, there's a ± in the quadratic formula.)


I was very happy when SICP in Clojure was announced. It offered to kill 2 birds with one stone. But it has slowed down over the months http://sicpinclojure.com/?q=content/current-status


On the other hand, the subset of Scheme in SICP is pretty small, so one doesn't need to invest much in Scheme to read SICP and do the exercises. And I think a lot of the concepts covered in SICP are clearly visible in the design of Clojure (lazy streams, purely function programming and concurrency concerns) and so I think SICP alone is great at priming someone for Clojure. Then I think it would be better to approach Clojure on its own terms, with something like the Joy of Clojure, which seems to be a very nice book from what I've read of it.


This is so great. Working in the MIT REPL was such a pain in the ass. The book was written unfathomably well, but trying to get the editor to work could break the most resilient of men.


  >> Working in the MIT REPL was such a pain ...
Racket is a pleasure to work with.

    http://racket-lang.org/


Great, I wasn't aware that DrScheme was renamed DrRacket.


"The" SICP? I have never heard it called that before.


Hmm. I didn't even think about it, it just sounded like the best way to put it — "SICP" as a noun due to the fact that it's so well known.

I guess it's not that terrible of a mistake, as you were the only one to notice, but thanks for the correction. :)


He was channeling Xtranormal.


There's also an online companion version with narrated slides and 'graded' exercises.

http://icampustutor.csail.mit.edu/6.001-public/


Very nice




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: