Questions tagged [sicp]

SICP is the book Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman and published by the MIT Press.

Quoting the wikipedia page:

Structure and Interpretation of Computer Programs (SICP) is a textbook published in 1984 about general computer programming concepts from MIT Press written by Massachusetts Institute of Technology (MIT) professors Harold Abelson and Gerald Jay Sussman, with Julie Sussman. It was formerly used as the textbook of MIT introductory programming class and at other schools.

Using a dialect of the Lisp programming language known as Scheme, the book explains core computer science concepts, including abstraction, recursion, interpreters and metalinguistic abstraction, and teaches modular programming.

The book is available online, with accompanying video lectures.

660 questions
103
votes
4 answers

What are the actual differences between Scheme and Common Lisp? (Or any other two dialects of Lisp)

Note: I am not asking which to learn, which is better, or anything like that. I picked up the free version of SICP because I felt it would be nice to read (I've heard good stuff about it, and I'm interested in that sort of side of programming). I…
PrettyPrincessKitty FS
  • 6,117
  • 5
  • 36
  • 51
81
votes
6 answers

What's the explanation for Exercise 1.6 in SICP?

I'm just beginning to work through SICP (on my own; this isn't for a class), and I've been struggling with Exercise 1.6 for a couple of days and I just can't seem to figure it out. This is the one where Alyssa re-defines if in terms of cond, like…
Alex Basson
  • 10,967
  • 6
  • 29
  • 44
74
votes
8 answers

What is the best Scheme implementation for working through SICP?

I have been using PLT Scheme, but it has some issues. Does anyone know of a better implementation for working through SICP?
Joel McCracken
  • 2,275
  • 3
  • 17
  • 11
51
votes
5 answers

Can I use Common Lisp for SICP or is Scheme the only option?

Also, even if I can use Common Lisp, should I? Is Scheme better?
akway
  • 1,738
  • 4
  • 21
  • 20
36
votes
6 answers

No idea how to solve SICP exercise 1.11

Exercise 1.11: A function f is defined by the rule that f(n) = n if n < 3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n > 3. Write a procedure that computes f by means of a recursive process. Write a procedure that computes f by means of an…
Javier
  • 4,552
  • 7
  • 36
  • 46
35
votes
3 answers

Which lang packet is proper for SICP in Dr.Racket?

I'm trying with SICP and I got some code. So I started with: #lang scheme (word 'comp 'uter) Returned error: Function (word) undefined. Even if I tried to copy this into IDE(Run): (define word? (let ((number? number?) (symbol? symbol?) …
user2871676
34
votes
5 answers

Is there an equivalent to Lisp's "runtime" primitive in Scheme?

According to SICP section 1.2.6, exercise 1.22: Most Lisp implementations include a primitive called runtime that returns an integer that specifies the amount of time the system has been running (measured, for example, in microseconds). I'm using…
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
33
votes
18 answers

Which language would you use for the self-study of SICP?

I've caught the bug to learn functional programming for real. So my next self-study project is to work through the Structure and Interpretation of Computer Programs. Unfortunately, I've never learned Lisp, as I was not a CS major in college. While…
Alan
  • 7,066
  • 5
  • 30
  • 38
32
votes
3 answers

Dr Racket problems with SICP

I'm working through SICP. Currently, in the first chapter, I'm having problems getting Racket to let me redefine "primitives". For instance, I was under the impression that I should be able to arbitrarily do (define + 5) and that would be fine, or…
afkbowflexin
  • 4,029
  • 2
  • 37
  • 61
30
votes
4 answers

Null value in Mit-Scheme?

Can anyone tell me what is the null value representation in mit-scheme? In the SICP book, it should be "nil" but it doesn't work. Thanks.
Khue Vu
  • 3,112
  • 4
  • 37
  • 40
25
votes
5 answers

What does “Data is just dumb code, and code is just smart data” mean?

I just came across an idea in The Structure And Interpretation of Computer Programs: Data is just dumb code, and code is just smart data I fail to understand what it means. Can some one help me to understand it better?
Dhanapal
  • 14,239
  • 35
  • 115
  • 142
24
votes
17 answers

SICP Exercise 1.3 request for comments

I'm trying to learn scheme via SICP. Exercise 1.3 reads as follow: Define a procedure that takes three numbers as arguments and returns the sum of the squares of the two larger numbers. Please comment on how I can improve my solution. (define (big x…
ashitaka
  • 3,928
  • 7
  • 38
  • 43
23
votes
3 answers

Confused on Miller-Rabin

As an exercise for myself, I'm implementing the Miller-Rabin test. (Working through SICP). I understand Fermat's little theorem and was able to successfully implement that. The part that I'm getting tripped up on in the Miller-Rabin test is this "1…
afkbowflexin
  • 4,029
  • 2
  • 37
  • 61
22
votes
4 answers

is SICP still recommended?

I have some experience with python, I asked for a new language, and said that i am having a hard time implementing what I have learned. they suggested I learn SICP. Saying it uses a great language and teaches great programming fundamentals. But I…
charliePH
  • 371
  • 1
  • 3
  • 5
21
votes
3 answers

SICP example: Counting change, cannot understand

I am a beginner following SICP course on MIT OpenCourseWare using both the video lectures and the book available online. Yesterday I came across an example, which ask if we can write a procedure to compute the number of ways to change any given…
nonameable
  • 426
  • 3
  • 11
1
2 3
43 44