Live data from Hacker News

Beautiful Online SICP

sarabander.github.io

51–60 of 82 posts

Re: Beautiful Online SICP

#51
My biggest issue with SICP was the lack of available unit tests for the exercises. I'd often "get it wrong" and have no recourse but to read a solution to see that I'd failed to account for some aspect of the problem.

Without an easily verifiable way to test your solutions as you go I think these kinds of books really do themselves a disservice as you lose the ability to struggle and think hard about the problem if you can't immediately solve it.

Re: Beautiful Online SICP

#52
post #41

Earlier quoted context omitted.

I read the book for the first time later in my career and for me the chapter 4 about metacircular evaluator combined with the video lectures was and still is mind blowing. When I was a freshman I was learning to do for loops with Java when SICP teaches how to create your own programming language...

The insight that "code is data" and should be viewed as such is very well treated by lots of literature/languages. Tons of languages support "eval" and building an AST is really not that difficult. I think SICP might be a popular entrypoint to interpreters but probably not the best.

Perl supports eval like lots of languages because data CAN be code. It's only in homoiconic languages like Common Lisp, Scheme, Racket, Clojure, and Rebol/Red that code IS data. Just because you have EVAL doesn't make it a 1:1 relationship and that makes a big difference. If your code/data is just a big AST, then macros are trivial and that prompts you to write DSLs...etc.

Re: Beautiful Online SICP

#53
post #42

Earlier quoted context omitted.

It's a lisp dialect form the MIT called scheme. You can find more information here: https://www.gnu.org/software/mit-scheme/

I guess racket is where the development continues for the scheme language. http://racket-lang.org/

There are a few: Gambit, Chicken-Scheme, Chez-Scheme, and Racket. Racket is starting to purposely diverge though like Pharo is to Smalltalk.

Re: Beautiful Online SICP

#55
post #42

Earlier quoted context omitted.

It's a lisp dialect form the MIT called scheme. You can find more information here: https://www.gnu.org/software/mit-scheme/

I guess racket is where the development continues for the scheme language. http://racket-lang.org/

You also have GNU Guile, if you for whatever reason prefer the GNU stack.

https://www.gnu.org/software/guile/

Re: Beautiful Online SICP

#56

Earlier quoted context omitted.

The insight that "code is data" and should be viewed as such is very well treated by lots of literature/languages. Tons of languages support "eval" and building an AST is really not that difficult. I think SICP might be a popular entrypoint to interpreters but probably not the best.

Perl supports eval like lots of languages because data CAN be code. It's only in homoiconic languages like Common Lisp, Scheme, Racket, Clojure, and Rebol/Red that code IS data. Just because you have EVAL doesn't make it a 1:1 relationship and that makes a big difference. If your code/data is just a big AST, then macros are trivial and that prompts you to write DSLs...etc.

It's also the concept of the reader which differentiates lisps from languages which attempt the same thing with eval.

Re: Beautiful Online SICP

#57
post #28

Earlier quoted context omitted.

First of all, it's an introductory text that provides a practical whirlwind tour of introductory computer science. Second starts from a straightforward place (when the first edition was written it was quite reasonable to assume that a student arriving at university, even MIT, might never have programmed a computer before) and after one lecture on the scheme language, dives in to practical details. Third, unlike, say,…

Right I always wondered if my opinion of it stemmed from the fact that I read it relatively late in my career. Never having fresh eyes on it, I suppose it's easy to take things like syntax and such for granted. That said, is Scheme really a good language for "not getting hung up on syntax?" It has an admittedly simple grammar but I can't help but feel that with the prevalence of ALGOL style languages, an intro studen…

I used Scheme a lot in the past and currently help people get up to speed on JavaScript. I definitely think the IIFE syntax makes more sense in Scheme, and higher order functions are a lot easier when you end a block with ))) instead of )}; }) )};

Re: Beautiful Online SICP

#59
post #28

Earlier quoted context omitted.

First of all, it's an introductory text that provides a practical whirlwind tour of introductory computer science. Second starts from a straightforward place (when the first edition was written it was quite reasonable to assume that a student arriving at university, even MIT, might never have programmed a computer before) and after one lecture on the scheme language, dives in to practical details. Third, unlike, say,…

Right I always wondered if my opinion of it stemmed from the fact that I read it relatively late in my career. Never having fresh eyes on it, I suppose it's easy to take things like syntax and such for granted. That said, is Scheme really a good language for "not getting hung up on syntax?" It has an admittedly simple grammar but I can't help but feel that with the prevalence of ALGOL style languages, an intro studen…

It's funny you contrast it with ALGOL since ALGOL was explicitly cited as one of the predecessor languages used when designing Scheme (the other being Lisp) as Scheme is a block-structured language with lexical scope. And the programming style of SICP is procedural, not a functional or logic approach.

Remember the kids for whom this course was designed were going to be doing circuit design concurrently or the following semester. So the point was to learn composition, abstraction, modularity, algorithms etc, not syntax.

And Sussman was not the only one who used scheme to do a lot of engineering computation as well.

I have never considered Lisp syntax exotic. In any case, remember SICP was the text for a fundamental CS and Engineering class, not a programming class.

Re: Beautiful Online SICP

#60

Unpopular opinion but having read this book, I think it's a "good" text that is a bit blown out of proportion in terms of how good it is. I'm curious for people that endorse to such a magnanimous degree what other literature they've read and what aspects of SICP in particular they find so superior.

Reading the book isn't really good enough. The lessons are tucked into the well thought-out exercises, which is a feature that isn't found an many other texts.

The book was written a long time ago, yet they described MapReduce, and the industry took over 30 years to finally see the light. They described functional programming, and similarly, the industry took forever to catch up, though sadly FP is mostly being done very wrong.

In this day and age of "get a job at CompanyX with 2 months of study," I'd argue that this book is even more valuable. It is an introductory text (where nearly every intro text is water-down; online isn't worth speaking on) that teaches the implementation details of common data structures, along with many clever approaches and tricks, all written and explained without being overly abstruse. Sure current resources may teach you to set up RoR and plug in flavor-of-the-day javascript, but those who built the meta-circular evaluator rightfully roll their eyes at yet another JS... evaluator.

Post reply on HN