I have a very specific question about starting out on SICP. A few months back, I worked through roughly half the exercises in the book. I got stuck on 2.2.4 (a picture language)[1] and was unable to run any of the examples or test any of the exercises.
Is there some prerequisite library for these exercises? Or am I missing the point and these are not actually intended to be run?
I had to make do with Einstein. I also discovered afterwards you can copy and paste images directly into DrRacket and pass them round like anything else - you might (very big guess) be able to create the wave and rogers primitives this way.
Good question - when I got to that part, I couldn't get the picture language to run either and just wrote code that I compared with other online solutions. I just took a look at the MIT Press website for their SICP code:
http://mitpress.mit.edu/sicp/code/index.html
...but don't see the code needed there to draw graphics. Eli's online solution did, I believe, manage to get graphics working with a non-MIT-Scheme Scheme. But it's not necessary to have running code here to get the benefits of the exercises (unlike later in Chapter 3 and 4!).
Comments
I have a very specific question about starting out on SICP. A few months back, I worked through roughly half the exercises in the book. I got stuck on 2.2.4 (a picture language)[1] and was unable to run any of the examples or test any of the exercises.
Is there some prerequisite library for these exercises? Or am I missing the point and these are not actually intended to be run?
1. http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html...
I believe there is a language for Racket which has what you need in it, I used that when I got to the picture language bit.
Check it out here:
http://www.neilvandyke.org/racket-sicp/
This works great, with one caveat: the picture language in SICP has built-in primitive images such as "wave" and "rogers".
The DrRacket SICP package has only one primitive image, "einstein".
I had to make do with Einstein. I also discovered afterwards you can copy and paste images directly into DrRacket and pass them round like anything else - you might (very big guess) be able to create the wave and rogers primitives this way.
Good question - when I got to that part, I couldn't get the picture language to run either and just wrote code that I compared with other online solutions. I just took a look at the MIT Press website for their SICP code: http://mitpress.mit.edu/sicp/code/index.html
...but don't see the code needed there to draw graphics. Eli's online solution did, I believe, manage to get graphics working with a non-MIT-Scheme Scheme. But it's not necessary to have running code here to get the benefits of the exercises (unlike later in Chapter 3 and 4!).