Most active commenters
  • alabhyajindal(3)

←back to thread

460 points pieterr | 20 comments | | HN request time: 1.692s | source | bottom
1. alabhyajindal ◴[] No.42158703[source]
I really wanted to like SICP but Lisp throws me off. I love Haskell and Standard ML however! Did others have a similar experience? Might be interesting to read a book similar in spirit to SICP but using a different language as a vehicle (No, I don't want to do SICP in JavaScript).
replies(10): >>42158751 #>>42158826 #>>42159255 #>>42159370 #>>42160603 #>>42160635 #>>42160830 #>>42161196 #>>42162892 #>>42165123 #
2. horeszko ◴[] No.42158751[source]
I think there is a Python version if that floats your boat
3. rustybolt ◴[] No.42158826[source]
I really wanted to like SICP and I probably would have if I read it 15 years ago. I started reading it last month and I found it to be too broad. It covers too much interesting mathematical principles and then jumps to the next one right when it starts to get interesting. In other words, it's too shallow.

It probably doesn't help that I've seen many courses/documents that are (in hindsight) derivatives from SICP, so I have the nagging thought "not this again" when a topic is introduced in SICP.

replies(1): >>42159553 #
4. hluska ◴[] No.42159255[source]
I can identify with that - Lisp throws me off (because I’m not smart enough). But I ended up forcing myself to work through it and learned a tremendous amount because I’m not smart enough to work with a lisp. It felt like I spent so much time just reading through the code that I ended up learning more than I would in a language I’m comfortable with.

There is a Python version of SICP. I have never worked through it or even given it more than a cursory scan so this is not an endorsement more just a link to prove it exists:

https://wizardforcel.gitbooks.io/sicp-in-python/content/0.ht...

5. linguae ◴[] No.42159370[source]
You might be interested in a 1987 article titled "A Critique of Abelson and Sussman or Why Calculating is Better than Scheming" (https://dl.acm.org/doi/10.1145/24697.24706), where the author advocates the use of KRC or Miranda as alternatives to Scheme. I don't know much about KRC, but Miranda is a statically-typed functional programming language that influenced Haskell.
6. cess11 ◴[] No.42159553[source]
It's written for engineers, they already know the math, but they don't know how to design and implement virtual machines, objects, compilers and whatnot that it shows how to do.
7. 2c2c2c ◴[] No.42160603[source]
i thought berkeley was using a modified version of the book using python a few years back
8. dokyun ◴[] No.42160635[source]
SICP isn't a book about Lisp, however it uses some of Lisp's unique properties to demonstrate important concepts that other languages can't easily replicate. A book that's meant to be similar to SICP that doesn't use Scheme or Lisp would not be anything like SICP, or at least not teach the same things. Haskell and ML are in my experience much harder to understand than Scheme, so I'm wondering what your difficulty is?
replies(2): >>42160673 #>>42164320 #
9. ok123456 ◴[] No.42160673[source]
There's a SICP edition done in Javascript.
replies(1): >>42160850 #
10. kccqzy ◴[] No.42160830[source]
I don't understand why Lisp throws you off. I only read SICP after I became proficient in Haskell and it is just fine.
replies(1): >>42164329 #
11. dokyun ◴[] No.42160850{3}[source]
Have you looked at it? It's an abomination. The point of SICP isn't Scheme or the syntax of Scheme, but what it represents. Whoever made the Javascript rewrite didn't understand that. You can't write a metacircular interpreter in Javascript, because Javascript is not homoiconic.
replies(2): >>42161431 #>>42162117 #
12. whimsicalism ◴[] No.42161196[source]
yes, i like ML (well.. ocaml) and bounced off SICP for the same reason. It was actually SICM that made me come back and stick with it, the ideas were just too interesting (whereas for SICP it was a lot of ideas I was already familiar with)
13. shawn_w ◴[] No.42161431{4}[source]
I'm pretty sure someone wrote a very basic, very literal scheme to JavaScript transpiler and just ran the book's code through it. The results look nothing like what any normal person would write.
14. wruza ◴[] No.42162117{4}[source]
You can't write a metacircular interpreter in Javascript, because Javascript is not homoiconic.

Is that a downside? I never wrote or used metacurcular interpreter in my life and still don’t know why I had to read about it. Is it an interesting implementation technique of lisp? Yes. Does anyone really need that?

You can rip off that part and everything that follows and that will be enough for a regular programmer. No one itt needs to know how to design metacircular interpreter on register machines.

replies(1): >>42166842 #
15. bez00m ◴[] No.42162892[source]
"Functional Programming in Scala" aka "Red Book of Scala" is a the one that IMO teaches to think the same way as SICP, while using a typed language. The books stand next to each other on my bookshelf, definitely worth reading.
16. alabhyajindal ◴[] No.42164320[source]
I don't have a difficulty writing Lisp. It's just not my style. I don't like S-expressions. I understand this is not too big an issue and it's very likely I'll get more comfortable with it given enough time. It hasn't happened yet.
17. alabhyajindal ◴[] No.42164329[source]
I'm not comfortable writing S-expressions. It feels very weird to me. I understand this is not a major issue. I'm hoping I stick with the book the next time I pick it up!
replies(1): >>42165698 #
18. mkleczek ◴[] No.42165123[source]
"Concepts, Techniques, and Models of Computer Programming" by Peter Van Roy and Seif Haridi is my favourite.
19. kccqzy ◴[] No.42165698{3}[source]
You should try out structured editing. For example paredit in emacs. And you really only need to understand slurp and barf. It really makes writing S-expressions no longer a chore. No more need to manually count parentheses. The parentheses are balanced by construction.
20. shawn_w ◴[] No.42166842{5}[source]
It allows the book to skip things like lexing and parsing and instead go straight to its main course: transforming, executing and compiling syntax trees.