50 comments

[ 2.5 ms ] story [ 26.9 ms ] thread
(comment deleted)
(comment deleted)
If you want to work through SICP, you can use MIT Scheme, but another option is to use Racket or DrRacket, with this add-on package: https://docs.racket-lang.org/sicp-manual/
Awesome!

I was just about to ask just that question?

Thank you, SM

I think we should only be recommending MIT Scheme. Everything else has got too much going on and can become distracting, for the purposes of education.
I don't think it is necessary to avoid Racket since "The language #lang sicp provides you with a version of R5RS (the fifth revision of Scheme) changed slightly in order for programs in SICP to run as is." DrScheme is great for this and probably the easiest way to start.
Everything you can do with Scheme you can also do with Snap! with a visual blocks programming user interface. Closures, continuations, macros, metaprogramming, all described in Brian Harvey's curriculum, the Beauty and Joy of Computing:

https://bjc.berkeley.edu/team/snap/

Snap!Con 2025 - Brian Harvey - ACM Karlstrom Award Address

https://www.youtube.com/watch?v=pDK2PE_pkqQ

"Snap! is Scheme disguised as Scratch" -Brian Harvey

https://forum.snap.berkeley.edu/t/hygienic-macros/3258/6

>I admit that my slogan "Snap! is Scheme disguised as Scratch" would sort of push in the direction of hygienic macros. But historically we built Snap! more with the idea of Logo disguised as Scratch. It was just when we added lambda that we started thinking more in Scheme terms.

I second the recommmendation, for these two systems with a caveat. MIT Scheme has not been made to run on Apple Silicon, though with a few tricks, the amd64 version is usable on a modern Mac (this will presumably go away once Apple takes away Rosetta2). Racket might therefore be a better choice.

It is possible to use pretty much any decent Scheme system with SICP, but the language has changed since even the Second Edition, so I don't recommend it. That said, once you are working on your own projects, nothing stops you from using a different system, even though you might have to RTFM to see modern equivalents to ancient idioms.

I used to use Mac Common Lisp, which was a glorious development environment that compiled to 68k, on PowerPC Macs, using SpeedDoubler, which jitted 68k code to PPC code. Rosetta wasn't a thing at the time so Connectix (who made the famous QuickCam) filled the gap.

https://en.wikipedia.org/wiki/Connectix

>Connectix Corporation was a software and hardware company that released innovative products that were either made obsolete as Apple Computer incorporated the ideas into system software, or were sold to other companies once they became popular. It was formed in October 1988 by Jon Garber; the dominant board members and co-founders were Garber, Bonnie Fought (the two were later married), and close friend Roy McDonald. McDonald was still Chief Executive Officer and president when Connectix finally closed in August 2003.

SpeedDoubler and RAMDoubler were great, and actually kinda delivered on their promises, but at the time what I really needed during the reign of System 7 was BootDouble, that made every other reboot instantaneous.

I tried SICP straight from the book once, but I think the lectures are much better and the book acts as a supplemental reference.
Thank you! Will try it like this.
That is indeed how University learning used to work, for about 1000 years
It's *supposed* to work.

In reality you get lectures from individuals that became professors because they are great at politics/research but not at teaching (very different skill).

If you even get them and not their 25 year old assistants.

And this is apparently super common even in ivy league universities as Youtube lessons have shown me over and over.

Sussman and Abelson are great at teaching.
I'm sure they are, just against the generalization that in class is always strictly necessary as not everyone is Sussman.
This is why it's so awesome watching David Malan teach Harvard CS50 (free YouTube videos). His presence, knowledge and overall enthusiasm for the topic are outstanding. If more of my college courses had that level, I'd have been far more engaged. When I look back, I realize that I paid a TON of money to have some professors basically "phone it in", yet expect me to basically teach myself their subject of expertise. "Build a compiler". Yes, I can (and did) learn that from a book. I imagine if I had someone truly engaging the room during those sessions, I'd have come away with FAR more appreciation. That could have even led to a different career path.
> And this is apparently super common even in ivy league universities as Youtube lessons have shown me over and over.

I think you have the “even” backwards. Elite research first universities have this problem more than teaching-first, low research output programs.

All that, and it’s still better than just reading the book on your own. :P

Be thankful when you get the 25 year old PhD students & post-docs. They care more about teaching and remember learning the material recently and are more willing to talk & help you.

I've attended courses from some of the best researchers on the planet (like Graetzel at EPFL) and you did yourself a favor if you skipped the confused ramblings and just studied on the books.

Plenty of courses taught by brilliant individuals that were just bad at teaching or borderline not prepared.

Some courses (like biochemistry) were effectively useless as de facto you had to memorize 600 pages of Lehninger's book anyway. There's nothing to understand in the Krebs cycle.

I also vividly remember exams like advanced algebra were the professor genuinely did nothing but rewrite canned content on a board and could not really shed light on anything, you were on your own.

interesting approach to SICP.
I don't understand this comment. They wrote SICP.
Cannot recommend these enough. Watch the first one and you'll be hooked
These sound a little better than I remember. I wonder if the sound was cleaned up?
Should I do the JS or Scheme SICP
Scheme. Javascript is a fine language, but it is not the right tool for this job.
I have both books. Scheme for sure! Env setup can be a bit of an issue but it is doable. Regarding it, I remember having some weird issues with MIT Scheme on a modern computer, but Racket/DrRacket works well.
I'll add another recommendation for Scheme. The concepts in SICP map very well into Scheme, whereas I can only imagine them being awkward and non-idiomatic in JS. There's lots of passing around first class functions and use of recursion.

One of the two professors (Dr. Sussman) that give the lectures in this series is a co-creator of Scheme.

> I can only imagine them being awkward and non-idiomatic in JS

You don't have to imagine, you can look at the code used in the JS version and it goes through some fun contortions to get around the fact that JS is not expression oriented (like Scheme). This is from page 35 (PDF: https://sicp.sourceacademy.org/sicpjs.pdf):

  function count_change(amount) {
    return cc(amount, 5);
  }
  function cc(amount, kinds_of_coins) {
    return amount === 0
           ? 1
           : amount < 0 || kinds_of_coins === 0
           ? 0
           : cc(amount, kinds_of_coins - 1)
             +
             cc(amount - first_denomination(kinds_of_coins),
                kinds_of_coins);
  }
  function first_denomination(kinds_of_coins) {
    return kinds_of_coins === 1 ? 1
           : kinds_of_coins === 2 ? 5
           : kinds_of_coins === 3 ? 10
           : kinds_of_coins === 4 ? 25
           : kinds_of_coins === 5 ? 50
           : 0;
}

That certainly works, but it's awkward. Here's the Scheme code from the 2nd edition of SICP:

  (define (count-change amount) (cc amount 5))
  (define (cc amount kinds-of-coins)
    (cond ((= amount 0) 1)
          ((or (< amount 0) (= kinds-of-coins 0)) 0)
          (else (+ (cc amount
                       (- kinds-of-coins 1))
                   (cc (- amount
                          (first-denomination
                           kinds-of-coins))
                       kinds-of-coins)))))
  (define (first-denomination kinds-of-coins)
    (cond ((= kinds-of-coins 1) 1)
          ((= kinds-of-coins 2) 5)
          ((= kinds-of-coins 3) 10)
          ((= kinds-of-coins 4) 25)
          ((= kinds-of-coins 5) 50)))
The JS code has to use the ternary ?: to get around the fact that it does not have a good equivalent to `cond`. You can see that they've gone through a very literal translation of Scheme to JS that results in very unidiomatic JS code.
The JS version of the book (I still bought it when it came out) is just weird. It has you writing JS in a non-idiomatic way that you'd never see (nor should you be the person introducing) in the industry. SICP teaches a very LISP-y way of thinking through problems. It's not that you CAN'T apply these tactics in other languages... they're just far more "at home" in Scheme/DrRacket/heck... even Clojure.
Part of the point of SICP is to be generic about its programming principles. The core principles and concepts are independent of any particular programming language (so long as it has first class functions, and probably a few other common features). Since Scheme has virtually no syntax it was an ideal language for Ableson & Sussman’s course. It’s notable that SICP spends hardly any time teaching the language.

I’ve never understood, therefore, the motivation behind trying to “translate” SICP into a language like JS (or Python, etc.) It over emphasizes the importance of the preferred language in a way that very obviously undermines the book.

The point being: if you’re gonna do SICP do it in Scheme. You’ll get more out of it.

The thing about Scheme is that learning the syntax takes 10 minutes and then you can just focus on computation.
The audio is so bad on these lectures.

Is there any way to clean them up?

This is how I learned lisp. I then went on to learn Clojure and built a career around it.
Fantastic. How did you learn Clojure? I'm a bit of a fan.
What could someone interested in systems programming gain from this?
these talks distill out the core questions of topics like mutability and state management and abstraction. almost uniquely so. so I consider them deeply relevant to systems programming in as much that its primarily concerned with..state management and abstraction.

unless you mean 'systems programming' as just 'the crap one does to try to glue together all the grotty pre-existing systems' and 'developing a good sense of taste about 3rd party libraries', in which case no, its not really very relevant.

although even here there is insight, I watched a video of Sussman describing why they were putting down SICP and demanding that MIT develop new introductory courses. he was so graceful and considered, putting his polished jewels away. the time when we could reasonably be expected to see across and through all the layers of abstraction was over.

addendum: actually I think the case for SICP in systems programming is stronger than that. There are several places in the material where the gap between 'high level programming' and 'construction of machines using gates' is thoroughly walked through and evaporated. maybe some of of the other similar treatments for logic programming and continuous analysis won't strike as deep, but that part should really be required reading.
All of the lectures? I did SICP as a freshman in 2005 but not all of it and have never watched these lectures save for the one where Abelson wears a fez and jokes about Kabbalah at the beginning.
sorry, I meant for a systems programmer the parts where there is a kind of dual correspondence developed between statements in a language and transistors on a board I think would probably open some mental doors for a systems programmer.

but I haven't gone through the video lectures or even all of SICP. but those that I did have had a lasting impact. particularly the erasure of the declarative/procedural dichotomy..thats been a very useful tool

(comment deleted)
Every programmer should learn LISP. or at least give an earnest attempt to study it. The vast majority of applied programmers only know how to think like C programmers (procedural). LISP is a “beautiful” language in that it is about concepts, not hardware. Totally changed my brain when I worked on a graduate project for a few years at my Alma mater in 1990.
I worked through these videos and the full book. Via news groups I organized an in-person study group. What a blast and a big unlock for me. The study group started having attrition about halfway through the book.
You don't have to do the exercises or follow along with the book. No matter if you are new to the field or have decades of experience: almost everyone would benefit from watching these videos if they haven't already (or done an SICP course).
Reading SICP was some of the best advice I got from /g/