Solving SICP
23 comments
·March 4, 2025loevborg
Wonderful report! So now we know how long it takes to solve all of the problems: 729 hrs.
SICP is hard to work through even if you're just reading but wow, the exercises are on another level! I wonder how it compares to, say, a physics or biology textbook
noelwelsh
SICP is a sprawling book. It's been rightly criticised; it is inaccessible without a strong maths and (electronic) engineering background, it's somewhat unfocused, and its code is archaic. But it blew my mind some 20 years ago when I worked through it over many train journeys. A more focused, more accessible book would be objectively better, but I think it would lose something. SICP, with its wild rambling through so many disparate topics, really did leave me feeling that I could make the computer do anything.
closeparen
Some of the SICP exercises use math and circuits as the "business domain" you are programming about, but you don't need independent knowledge of those topics to write the programs. The requirements are pretty well specified.
I barely survived Calc 3 and have never taken an engineering course. I was fine.
Marazan
I found some of the exercises in building abstractions with procedures pretty inaccessible with implicit maths knowledge necessary. From building abstractions with data onwards they become well spec'd and straightforward.
agumonkey
the expression / circuit bridge in chapter 5 is timeless imo
null
0cf8612b2e1e
Is there a modern SICP book? I tried to go through it once, but immediately got stuck because my math/physics was so rusty that I would have to spend more time researching the background than actually solving the CS puzzle
Jtsummers
SICP was ported to JS though I'm not particularly keen on the result. https://sourceacademy.org/sicpjs/
The code is convoluted, in my opinion, because it tries to hue too closely to the Scheme code in the original giving some unnatural looking JS code as a result. For example:
function member(item, x) {
return is_null(x)
? null
: item === head(x)
? x
: member(item, tail(x));
}
There are examples which have even more but that was the first one I came across clicking the TOC randomly. In Scheme it would be expressed something like this: (define (member? item set)
(cond ((null? set) #f)
((equal? item (car set)) #t)
(else (member item (cdr set)))))
While the parens cause some brains to segfault, the structure of this (how each condition ties to each result) is clearer than that JS mess.shawn_w
I'm convinced someone wrote a (bad) Scheme to JavaScript transpiler to convert the code. It looks like nothing anyone would actually write.
magpi3
How to design programs (mentioned in the article).
noelwelsh
https://cs.brown.edu/people/sk/ and search for books.
Maybe reading this will help:
https://cseducators.stackexchange.com/questions/7478/which-b...
hinkley
I'm still trying to decide of Fowler porting Refactoring to Javascript from Java is a good thing or a bad thing, but I'd kind of like to see someone port SICP to Python or maybe Elixir and see how it goes.
-__---____-ZXyw
SICP modified for Python exists (I haven't looked at it, so not vouching or commenting) https://wizardforcel.gitbooks.io/sicp-in-python/content/
ljlolel
Hate to do this but https://chatgpt.com/share/67c78ef6-2418-8000-a40a-59d5b708ba...
-__---____-ZXyw
Yes, I'm sure given 729 hours it'd come up with something useful.
wk_end
This is an interesting post in its way, but I hate how it's presented. The subject doesn't really call for this impersonation of academic rigor, since it's fundamentally an unscientific, subjective exercise - "How long did I, one particular computer scientist, take to work through this massive and occasionally open-ended task?" That's asking for an introspective essay, not a battery of tables and graphs.
But I think this is a useful critique of SICP, for those trying to teach from it or in particular for those trying to self-study it: it wasn't really designed to be done front-to-back (contrary to the nonsensical justifications given here); it's not a realistic demand of any student, or even necessarily a particularly productive use of their time unless they intended to move into compiler development. Its problem sets occasionally give the illusion that SICP itself will teach you what you need to solve these incredibly difficult problems and perform these incredible accomplishments, which is partially what's responsible for its legendary status. Not recognizing that - and it'd be hard to blame a solo learner for that - can be incredibly discouraging when one finds that they can't do things with the tools SICP has given and blame themselves for not appreciating those tools rather than SICP for asking too much and giving too little.
veqq
https://lockywolf.net/2020-10-29_scheme-story.html
Here he shows 2 reviews he gave up on, that he resorted to data because he didn't know how to put it in words.
null
fsdkfdsf
[dead]
Kudos for finishing it. I’ve gone on a similar quest with https://mk12.github.io/sicp, but I’m still on chapter 3. I keep getting distracted by new ways of improving the website rather than making progress in the book.