Structure and Interpretation of Computer Programs (SuperCollider Edition)

Thinking a little about the beginner user who wants to have a little more basic computer science knowledge, I saw someone rewrote the classic “Structure and Interpretation of Computer Programs” with examples in JavaScript (??).

Structure and Interpretation of Computer Programs
https://web.mit.edu/6.001/6.037/sicp.pdf

Structure and Interpretation of Computer Programs (JavaScript Edition)
Source Academy

https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CABEA24090

It’s a different book than any tutorial; it’s fun and gives a deeper understanding of fundamental concepts.

Would it make sense to have a project where people contributed translating the scheme or the javascript examples to supercollider? Ssuper easy for an intermediate supercollider user, especially from javascript to supercollider. Something as simple as a repository in GitHub or similar, etc, just for the code examples.

It would be excellent material. At least, I would find it extraordinary if I were starting now. Or maybe reading the original would be better, but I’m thinking about the diversity of people starting programming with SC as their first language today.

Just an idea.

–– “It might be engineering or it might be art, but we’ll actually see that computer so-called science actually has a lot in common with magic.”

EDIT: This doesn’t cover everything one needs to know to use SC. In any case, clearer and more instructive materials on the audio and sclang/scsynth design side would also be welcome.

5 Likes

Also found this one (python):

Wow, this is a monumental undertaking! I wish you the best of luck.

Should you produce any code, please do share! I think it’d be an amazing test case for Hadron.

\L

This could work if it received contributions from several people, hence the idea of a repository.

Yes. I found it curious, since Scheme apparently a very different language from JavaScript. I imagine this influenced the way JavaScript code was written, probably for the better.

What do Lisp [including the Lisp dialect Scheme] and JavaScript have in common? The ability to abstract a computation … for later execution as a function; the ability to embed references to such functions within data structures; the ability to invoke functions on arguments; the ability to draw a distinction (conditional execution); a convenient universal data structure; completely automatic storage management for that data …; a large set of useful functions for operating on that universal data structure; and standard strategies for using the universal data structure to represent more specialized data structures (xv).

It made me think if another outstanding book like Richard Bird and Philip Wadler’s Introduction to Functional Programming would even be possible. Probably not, I wonder.

1 Like

wow what a great idea. Would be quite fun to (try!) to contribute - please spin up a repo and keep us posted!!!

1 Like

Let’s see if we achieve a critical mass. ))) Please people, say what you think. Is it good, or a waste of time, etc?

This is good enough for the readers, but it is not easy to say that it is always good for the contributors…

1 Like

Yes, I thought about it because I guessed the “javascript edition” would be much closer to rewrite than scheme. Peh ople with deeper JS knowledge can say how trivial or not this would be.

To my knowledge, it would be much simpler.

For fun, when I was learning Haskell, I tried translating from scheme to haskell, and that was something else, good to learn, but it required a bit of work.

Something like this is very different from the original scheme code:

mulOddSquares :: [Integer] -> Integer
mulOddSquares = product . fmap square . filter odd

sumOddFibs :: Integer -> Integer
sumOddFibs n = sum . filter odd . fmap fib $ [1..n]

But take a look at the javascript examples and see how it would translate to SC. Much closer.

Or MAYBE, students should just read the original scheme book, as “god wanted it to be” ))

You people tell me.

this is a really fun idea. Count me in

1 Like