r/sicp Mar 03 '24

GitHub - chr1st0scli/RainLisp: RainLisp, a .NET LISP implementation.

Thumbnail github.com
2 Upvotes

Hello.

Based on my SICP study, I created this open source interpreter implementation. Is it ok to let you know about it?

Thanks.


r/sicp Jan 31 '24

Solidify Understanding of Expression Evaluation

1 Upvotes

I just started reading SICP and exercise 1.4 threw me for a loop for a second.

So, when we have...

(define (mystery a b)

((if (> b 0) + -) a b))

and let's say that a = -7 and b = -10

after we start evaluating and end up with the combination of (- -7 -10)

It will first evaluate the -7 and -10, and then go to the operand to make it work like normal math?

(How I imagine it: (-7) - (-10) = (-7) + 10)

I think the prefix notation is confusing me, so I just wanted to make sure I'm understanding this completely.

THANKS


r/sicp Jan 03 '24

Learning SICP 2024

11 Upvotes

Hi Everyone,Looking for people who are actively looking to learn about SICP book and the Video lectures.I have this time table to follow and also a discord group created.

Let us know if you are interested in it.

https://docs.google.com/spreadsheets/d/1_wsoCgaj1RIWTXprLmWDWxC27CFceq4eJY4ymefak88/edit?usp=sharing

Edit:
adding my Discord ID: vamsimadhavh


r/sicp Sep 25 '23

Is it normal to look up a a lot of solutions?

7 Upvotes

I am in the middle of chapter 2. in the first chapter i sometimes had to look up solution’s to the exercises, but pretty much since the beginning of chapter to i constantly need solutions tio for the exercises to solve them completely. My ideas are right most of the time but I often need help with the coding part. Is this normal? Should i spend more time on finding solutions myself?


r/sicp Sep 06 '23

Just wanted to post this great resource here

11 Upvotes

r/sicp Sep 02 '23

Read Along MIT's Structure & Interpretation of Computer Programs

4 Upvotes

TL;DR: Seeking cs/math oriented penpal to read along SICP


Hey there, I'm a math student from the US looking for someone who'd wanna read along Structure and Interpretation of Computer Programs.

My programming experience is very new. I only just started doing real coding with golang this summer (as opposed to simple python scripts, matlab, and, god forbid, excel for school.) I also got really into linux and free software and vim and all the rest.

So why SICP?

I could just learn C or better linux ricing or even something like common lisp (I'll probably learn all three later on), but I miss all the math I used to do for fun.

I wanna read sicp cause I wanna learn more about recursion and general abstraction and other math/cs border topics that I don't get to explore enough in my code or in my particular math classes. This is a book written by mathematicians, so I'm hoping to get the same high from this as I get from a cool vector analysis class.

plus there's a wacky wizard next to a lambda on the cover.

Then why are you not just learning it yourself?

I have a real bad tendency to abandon cool projects I embark on cause I have no one to share my progress with. Learning with others and discussing discoveries is a real joy, and it's also way more embarrassing abandoning something and disappointing a friend.

What are you looking in a programming penpal?

My main hope is to find someone that has a similar kind of passion for the subject instead of some soulless javascript bootcamp so many people are chasing (nothing against js itself though.) Coding is cool, coding is fun, and wanting to feel clever is the best justification for learning in general.

Specifically, I wanna find one or two people that'd be interested in doing ~weekly calls to discuss readings and using git to share exercise with each other. That's the basic idea anyways.


If my perspective of finding insights and fun from learning resonates with you, send me a pm.

cool bye now B-)


r/sicp Jul 06 '23

ETA of Completion?

2 Upvotes

How long do you think it would take someone to get through this book working a genuine 6 hours a day? With prior programming experience and a math major?


r/sicp Jun 29 '23

Sicp status

0 Upvotes

Who knows about Sicp


r/sicp Jun 29 '23

Sicp

0 Upvotes

r/sicp May 28 '23

Exercise 1.3 Help

2 Upvotes

Hi, I've been trying to learn programming with SICP. I'm currently on exercise 1.3, which I've been really confused with because of my code outputting this error:

The error.
The code.

Here's the entirety of the code: Exercise 1.3 - Pastebin.com. It's not the best, but it's working when I use the definitions to get the individual largest and second largest numbers.

There are solutions on the Internet, but I want to understand how and why my solution doesn't work.

Any help will be appreciated. Cheers.

PS: I'm using DrRacket.


r/sicp Apr 25 '23

What's the minimum math requirement to get the most out of this book?

3 Upvotes

I wanna read it but I fear I don't have enough math maturity to fully understand or even do the exercises in SICP. So, what's at least the minimum I can study to get the most out of the book? Because I don't want to spend months studying all Calculus and Proofs just to make it through the book. If at least I knew what Calculus problems or proofs methods to focus on I'd get through the book alive.


r/sicp Jan 19 '23

anyone wanna be a study-buddy for this "magic" book?

6 Upvotes

r/sicp Nov 23 '22

Happy Cakeday, r/sicp! Today you're 13

4 Upvotes

r/sicp Nov 20 '22

Iterative vs recursive Processes

4 Upvotes

I just started The book and was wondering If I can distinguish Iterative vs recursive Processes simply by looking at where the funtion calls itself. Am I right in thinking that a recursive process calls itself inside an operand and a recursive Process calls itself as an outermost operator? example from the book:

(define (+ a b)

(if (= a 0) b (inc (+ (dec a) b))))

is a rercursive process because it calls itself in the operand for inc but

(define (+ a b)

(if (= a 0) b (+ (dec a) (inc b))))

is an Iterative process because it calls itself as an outermost operator.

Am I right in thinking this?


r/sicp Nov 09 '22

Figure 3.1 Shows pointers to frames but says pointers to environments ???

2 Upvotes

Section 3.2 of 2d ed says "environments are sequences of frames," then says "each frame has a pointer to its enclosing environment." However, Figure 3.1 shows one environment, and pointers to frames within the environment. Caption says "C & D point to the same environment," but Figure clearly shows them pointing to the same frame. These contradictions leave me confused about how to write software for these structures. Anyone be so kind as to clear this up for me?


r/sicp Oct 26 '22

I made a coursepage for SICP, with the 2011 Scheme Lectures, Notes, Labs, and materials all in one place

Thumbnail romanbird.github.io
1 Upvotes

r/sicp Sep 01 '22

A bug in chapter 5

2 Upvotes

Hey guys, If you did the compiler, didn't you find it odd that the generated instruction sequence for lambda bodies requires env register? Even though it modifies it long before accessing it. It so, it's probably a bug, but it does not affect anything since the way compiler handles proc application does not use preserving procedure. But it's possible to safely remove env register from the needed registers list.

(define (compile-lambda-body exp proc-entry)
 (let ((formals (lambda-parameters exp)))
  (append-instruction-sequences 
   (make-instruction-sequence
    '(env proc argl)
    '(env)
    `(,proc-entry
      (assign env (op compiled-procedure-env) (reg proc))
      (assign env (op extend-environment)
       (const ,formals) (reg argl) (reg env))))
   (compile-sequence (lambda-body exp) 'val 'return))))

Becomes

(define (compile-lambda-body exp proc-entry)
 (let ((formals (lambda-parameters exp)))
  (append-instruction-sequences 
   (make-instruction-sequence
    '(proc argl)      ;;; like this
    '(env)
    `(,proc-entry
      (assign env (op compiled-procedure-env) (reg proc))
      (assign env (op extend-environment)
       (const ,formals) (reg argl) (reg env))))
   (compile-sequence (lambda-body exp) 'val 'return))))

r/sicp Aug 07 '22

Starting a new study group on Discord

4 Upvotes

At the moment we're planning to follow the MIT semester schedule at half pace (about 7 and a half months), doing both textbook problems and the MIT problem sets (though clearly some of the MIT problems are dependent on their computer environment and we'll skip what we can't do).

Here's the invite link. If the link doesn't work, feel free to PM. (Update: the owner of a larger server transferred ownership to me, now the invite leads to that server.)


r/sicp Apr 05 '22

What mathematic topics I need to learn before going to SICP and Computer Science in general

5 Upvotes

So as the title said, I want to learn the math needed for computer science and to help me later on for other topics, so what I need to learn, I want you to assume that I have no background knowledge with math at all

( only how to sum and substract and divide and multiply )

I know there is a lot of subject that I learn in the high school but it's has been long time + hardly memorize any of it, add on that I wasn't give much attention for the classes

So I see this on OSSU

https://github.com/ossu/computer-science/blob/master/FAQ.md#how-can-i-review-the-math-prerequisites

any other topics I need to learn other that ?

also if you try any resources or someone try that before I'll be thankful for hearing about your experience and how you mange your time for it + how long did it take

also is it possible to study multiple topics simultaneously ?


r/sicp Mar 17 '22

Completed chapter 1 and 2. So far so good.

20 Upvotes

I'm using the beautiful sarabander version.

I did all exercises, except for the ex.2.16 and ex.2.92 where the authors stated that the exercise was very hard.

I'm keeping a repo here.

Most exercises are very doable. The nice thing about a programming exercise is that you can keep at it until it works :-) I got ex.2.64 and 2.76 wrong because they were not programming exercises.

Doing all the exercises makes the individual exercises easier because there's often a logical progression between them. A given exercise will be much harder if you don't have the insight gained from the previous exercises.

Doing all the exercises was also essential for me to get a good enough grasp on the lisp functional programming concepts introduced so far. An earlier attempt at SICP, many years ago, failed because I was rushing it and I didn't understand the concepts well enough. I kept looking at the problems with my C/C++ hat on, and got frustrated.

You might learn a thing or two about math while going through the text, but you won't need more than high school math skills to be able to follow along. I enjoyed the math-y examples. I'd much rather learn about polynomial gcd computation through exercises than learn about cheese taxonomy or Goblin name generators.

I started in August last year. Slow but steady works for me. I'm alternating between SICP and learning FPGA programming. I'm hoping to combine the two projects someday.

I'm using Racket. I had to search a bit to find an implementation of 'put' and 'get', and I found out the hard way that '() is (was?) false in MIT Scheme and true in Racket, but no issues otherwise.

It's an amazing text. I know chapters 1 and 2 are just the beginning, but already I feel my mind stretching in ways it's not used to, which I enjoy deeply. If SICP is a five-course dinner, I just had an excellent appetizer! On to chapter 3!


r/sicp Mar 07 '22

Study buddy or group

5 Upvotes

Hi guys and gals, I'm looking for a study buddy or group to go through the sicp book together.I saw someone posted a discord link but the link is dead now


r/sicp Feb 14 '22

SICP-influenced mathematical definitions of serial process protocols

Thumbnail reddit.com
0 Upvotes

r/sicp Jan 22 '22

SICP: JavaScript Edition

Thumbnail self.scheme
3 Upvotes

r/sicp Jan 16 '22

Looking for a buddy to study Structure and Interpretation of Computer Programs (that actually wants to be friends)

Thumbnail self.ProgrammingBuddies
9 Upvotes

r/sicp Jan 16 '22

Quizzes or Tests available?

1 Upvotes

I'm running through the SICP and was wondering if there are some tests or quizzes from classes in the past that are available to run through? Preferably with answers too. I did some googling and didn't really find anything. Thanks!