Pleasantly surprised to see this on HN! This is an old (and incomplete) project of mine to reformat Structure and Interpretation of Computer Programs into a browser-friendly format, with a built-in code editor and interpreter [1].
I think today, you can use Racket in its special SICP mode to get a much better experience. But maybe the HTML (Bootstrap) formatting is a little nicer to read (and with the bonus that it probably works on phones).
The interpreter was incomplete and written from scratch, as a learning project [2]. This was done in the pre-WebAssembly days, so I couldn't just recompile, say, a Scheme written in C for use in the browser.
If I recall correctly, I took the SICP source files, ran a bunch of regular expressions on them to convert the content into XML [3], and then used XSLT to generate the web pages [1]. I was really into XSLT at the time :)
Anyway, hope people find this useful! It's outdated and incomplete, and the interpreter has an odd implementation, but it was a fun project.
> This was done in the pre-WebAssembly days, so I couldn't just recompile, say, a Scheme written in C for use in the browser.
If this is a direction you (or anyone else!) would like to explore, GNU Guile has been having work done to port it to WebAssembly under the Hoot project[0].
Yeah, I went through it this weekend because I was curious about Scheme, and was surprised when it ended so suddenly! It was a good read though. Any more advanced free online Scheme tutorials you can recommend? I’d like to get to continuations, lazy evaluations, macros etc..
So you can continue to explore the rest of the book for free (without the aid of the built-in interactive interpreter). Check out Racket and its included support for the particular Scheme used by SICP: https://docs.racket-lang.org/sicp-manual/
> Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License by the MIT Press.
> Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License by the MIT Press.
>My impression of XSLT is that there were representatives from every different programming language paradigm on the XSLT standard committee, and each one of them was able to get just enough of what was special about their own paradigm into the standard to showcase it while sabotaging the others and making them all look foolish, but not enough to actually get any work done or lord forbid synergistically dovetail together into a unified whole.
>The only way I was ever able to get anything done with XLST was to use Microsoft's script extensions to drop down into JavaScript and just solve the problem with a few lines of code. And that begs the question of why am I not just solving this problem with a few lines of JavaScript code instead of inviting XSLT to the party?
In fact, our own take on AOLServer used xml namespaces for our widget libraries, but alas we got HTML 5 instead, and Web Components are still not widely adopted.
Still a nice interactive web site!! I did something similar when applets were added to Java 1.0 beta, so many years ago. I had an AI tutorial powered by applets.
You mentioned Racket. Were you at Racket Con this weekend? I attended remotely, and really enjoyed it.
Pardon the self-promotion, but speaking of Scheme/Racket you can read my newly released (last Friday) book "Practical Artificial Intelligence Development With Racket - Using Racket Scheme for implementing many short AI examples including LLMs, vector datastore, NLP, semantic web and non-AI utilities" for free online. [1]
This is brilliant. Scheme broke me back in school- I could not get my head around it. I’ve thought about trying it again now that I’ve got a better understanding of what my professors were trying to actually teach with it. And here you are with the exact book I’d forgotten the name of!
Here's Kent Pittman's :TEACH;LISP from ITS, which is a MACLISP program that teaches you how to program in MACLISP. (That's "Man And Computer Lisp" from "Project MAC", not "Macintosh Lisp".)
>You should definitely learn both if you can afford the time. They are
not redundant with one another, in spite of their superficial
syntactic similarity.
>Others divide up this space differently than I, but for most purposes,
I personally regard them as distinct langauges, not mere dialectal
variations, although plainly they are from what I would call the same
language family.
>You will probably prefer to use one or the other in the end, but they
each have things to teach you. Even if you prefer to use neither, you
will use the things you learn from these languages in your future
thinking, becuase they will give you metaphors for thinking about
things that other languages do not.
This is like catnip for people interested in the sociological and cultural aspects of programming language design:
Common Lisp: The Untold Story; Kent M. Pitman, HyperMeta Inc.
>Kent Pitman's a great guy who's done a lot of pioneering work to teach people Lisp.
>KMP wrote a Lisp program to teach MACLISP on the MIT AI Lab's ITS systems called ":TEACH;LISP", which I used to learn Lisp (but which Jerry Pournelle cited in a not-friendly light).
>KMP kindly took the time to personally teach me some LISP, by challenging me to a dual! We both ran our own LISP processes, and loaded a function called EVAL-IN-OTHER-LISP that used "core link interrupts" to send s-expressions from one LISP to another, so we could evaluate code in each other's LISP. That made it easy for him to define and call functions in my LISP, which was quite fun, but then he set my numeric output base to roman numerals! He won that dual.
Core Link Interrupts (ITS's interprocess communication mechanism, sending messages through actual core memory on a PDP-10)...
Embedded languages are the probably the biggest advantage of LISP (https://youtu.be/PEwZL3H2oKg?t=3370). Could LISP-embedded languages be the key to unlocking the full potential of LLMs?
Based on: WOOD, A. (2001). Structure and Interpretation of Computer Programs, 2nd Ed by Abelson and Sussman, with Sussman, MIT Press, 1996, ISBN 0-262-51087-1, 657pp. Journal of Functional Programming, 11(2), 253–262. doi:10.1017/s0956796801223983:
"The new material on concurrency is rather a disappointment since such a large and fundamental topic is relegated to little more than a convenient link item between lists and
streams.
...
The major omission, and it is major, is that types are never fully, or even adequately
discussed."
The entire instruction of Scheme in 6.001 was less than an hour. You only need a tiny bit and then you can focus on the concepts in the book rather than quirks of some programming language's syntax. I think that is a huge win. On what basis do you find it "intellectually dishonest"?
Based on: Forbus, K. D. (1985). Structure and interpretation of computer programs. Artificial Intelligence, 27(1), 124–127. doi:10.1016/0004-3702(85)90087:
"several important topics that students should be exposed to early are treated lightly, if at all. Its coverage of fundamental algorithms is spotty - sorting, for instance, is
not discussed at all.
Another problem inherent in this pedagogical approach is that it does not teach students many of the engineering skills necessary for developing efficient programs on 'real' computers. This can lead to a 'clean fingernails' syndrome.
where the student feels no program should be written or used unless it is utterly clean."
This is just one. I can't find the paper but Philip Wadler was the original person saying the exact phrase 'intellectually dishonest'.
I think you should judge SICP on what the authors' own intentions were, not on things they weren't trying to do. I didn't get the feeling that cleanness was emphasized or encouraged (any more than in any class). There are other classes that cover fundamental algorithms like sorting, SICP isn't about that.
You might find the authors own critique of SICP interesting:
BTW, here is a list of people who had criticized SICP. The list is full of heavy-weights:
Philip Wadler
Donald Knuth
Eric Raymond
Richard Bird
Paul Graham
Guy Steele
Robert Harper
Matthias Felleisen
Daniel Friedman
Christopher Strachey
Peter Landin
John Backus
> This is just one. I can't find the paper but Philip Wadler was the original person saying the exact phrase 'intellectually dishonest'.
https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.... - that's the only Wadler critique of SICP I'm familiar with. Is "intellectually dishonest" in there? I can't find it. In fact, he seems rather positive about the book and it's material, just not Scheme. His critique is focused on the differences between Scheme and Miranda and their applicability to teaching students.
I would think it obvious, but maybe not, that attributing your own critique to a more well-known and respected individual without citation is intellectually dishonest.
I call it a disagreement, there are many of these kinds of disagreements especially in pedagogy. Sometimes people use strong and charged language in disagreements. It is not "intellectually dishonest" (quoting you, not Wadler since you still can't back that attribution) to write a book using Scheme just because others think Miranda (at the time, or another language today) would have been a better language. It would only have been intellectually dishonest if they knowingly chose Scheme to create an inferior experience (to what purpose?).
And I still contend that you are an intellectually dishonest person until you can properly attribute that quote to Wadler, or concede that you were wrong and made a false claim.
The criticism in my previous comment backed by a valid and searchable source: "SICP does not adequately teach the fundamentals of programming." is huuge for a book claiming to the best in the field. It's not a matter of 'pedagogical disagreement'. What do you say in this regard?
Yes, unfortunately I can't find the paper and I even enlisted GPT4 to help me search, so it is possible that some other reviewer may have said that (and I may have read another review by Wadler before or after this review); So while Wadler may not have said that, he has plenty of beef with SICP in the paper in your comment which essentially boils down to implying intellectual dishonesty. If not, then you need to improve your reading comprehension.
I understand that you may have invested a lot of time and effort in SICP and Wadler's assessment of it (based on the paper you provided!) hurt your fragile ego, hence the rude attack on my intellectual integrity, but regardless of whether Wadler said the particular phrase "intellectually dishonest" or not, the implication of his complaints I listed in my previous comment (based on the paper you provided!) amounts to almost to expanded version of saying the same thing.
Also, a note on downvotes: the agreement of majority (shown via upvotes) is no guaranteed standard for quality or veracity of a comment/opinion and I couldn't care less about the "karma points"; my comments are fueled by intellectual integrity and curiosity, and that inevitably means some people might disagree with me. Just because you disagree does not mean I am wrong and you are right.
42 comments
[ 3.2 ms ] story [ 92.7 ms ] threadI think today, you can use Racket in its special SICP mode to get a much better experience. But maybe the HTML (Bootstrap) formatting is a little nicer to read (and with the bonus that it probably works on phones).
The interpreter was incomplete and written from scratch, as a learning project [2]. This was done in the pre-WebAssembly days, so I couldn't just recompile, say, a Scheme written in C for use in the browser.
If I recall correctly, I took the SICP source files, ran a bunch of regular expressions on them to convert the content into XML [3], and then used XSLT to generate the web pages [1]. I was really into XSLT at the time :)
Anyway, hope people find this useful! It's outdated and incomplete, and the interpreter has an odd implementation, but it was a fun project.
Source code links:
[1] HTML generator: https://github.com/jaredkrinke/learn-scheme
[2] Interpreter: https://github.com/jaredkrinke/jslisp
[3] SICP-to-XML converter: https://github.com/jaredkrinke/sicp-reformatter
If this is a direction you (or anyone else!) would like to explore, GNU Guile has been having work done to port it to WebAssembly under the Hoot project[0].
[0] https://gitlab.com/spritely/guile-hoot
Racket with Wasm-PB Chunk, https://github.com/adamperlin/racket
Videos should be posted here shortly, https://www.youtube.com/@racketlang/videos
https://con.racket-lang.org/
Another option in browser land is lips[0], which exclusively targets a js backend.
[0] https://lips.js.org
So you can continue to explore the rest of the book for free (without the aid of the built-in interactive interpreter). Check out Racket and its included support for the particular Scheme used by SICP: https://docs.racket-lang.org/sicp-manual/
http://xuanji.appspot.com/isicp/
Edit: wow, it even predates my attempt: https://news.ycombinator.com/item?id=4860370
from https://mitp-content-server.mit.edu/books/content/sectbyfn/b...
https://mitp-content-server.mit.edu/books/content/sectbyfn/b...
> Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License by the MIT Press.
We all have embarasing skeletons in our closets, and that's one of mine, too.
https://news.ycombinator.com/item?id=33728303
>My impression of XSLT is that there were representatives from every different programming language paradigm on the XSLT standard committee, and each one of them was able to get just enough of what was special about their own paradigm into the standard to showcase it while sabotaging the others and making them all look foolish, but not enough to actually get any work done or lord forbid synergistically dovetail together into a unified whole.
>The only way I was ever able to get anything done with XLST was to use Microsoft's script extensions to drop down into JavaScript and just solve the problem with a few lines of code. And that begs the question of why am I not just solving this problem with a few lines of JavaScript code instead of inviting XSLT to the party?
XPath was a joy to use, and I thought XHTML made more sense than HTML. But I was naive to think the “more logical” technology would take over!
That said, it's a lot like that old joke about regular expressions, "now you have two problems."
In fact, our own take on AOLServer used xml namespaces for our widget libraries, but alas we got HTML 5 instead, and Web Components are still not widely adopted.
You mentioned Racket. Were you at Racket Con this weekend? I attended remotely, and really enjoyed it.
Pardon the self-promotion, but speaking of Scheme/Racket you can read my newly released (last Friday) book "Practical Artificial Intelligence Development With Racket - Using Racket Scheme for implementing many short AI examples including LLMs, vector datastore, NLP, semantic web and non-AI utilities" for free online. [1]
[1] https://leanpub.com/racket-ai/read
EDIT: my book is only 80% done. Example programs: https://github.com/mark-watson/Racket-AI-book-code
XSLT was my first Lisp ;-)
https://github.com/PDP-10/its/tree/master/src/teach
https://en.wikipedia.org/wiki/Incompatible_Timesharing_Syste...
https://en.wikipedia.org/wiki/Maclisp
https://en.wikipedia.org/wiki/MIT_Computer_Science_and_Artif...
Scheme or Lisp? Kent M Pitman explains the deep philosophical differences:
https://www.reddit.com/r/programming/comments/6fa5r/scheme_o...
https://groups.google.com/g/comp.lang.lisp/c/TEk4O4-zsA8/m/H...
>You should definitely learn both if you can afford the time. They are not redundant with one another, in spite of their superficial syntactic similarity.
>Others divide up this space differently than I, but for most purposes, I personally regard them as distinct langauges, not mere dialectal variations, although plainly they are from what I would call the same language family.
>You will probably prefer to use one or the other in the end, but they each have things to teach you. Even if you prefer to use neither, you will use the things you learn from these languages in your future thinking, becuase they will give you metaphors for thinking about things that other languages do not.
This is like catnip for people interested in the sociological and cultural aspects of programming language design:
Common Lisp: The Untold Story; Kent M. Pitman, HyperMeta Inc.
https://www.nhplace.com/kent/Papers/cl-untold-story.html
Here's a description of :TEACH;LISP that I posted to reddit 11 years ago:
https://www.reddit.com/r/programming/comments/t4rre/comment/...
>xardox 11 yr. ago
>Kent Pitman's a great guy who's done a lot of pioneering work to teach people Lisp.
>KMP wrote a Lisp program to teach MACLISP on the MIT AI Lab's ITS systems called ":TEACH;LISP", which I used to learn Lisp (but which Jerry Pournelle cited in a not-friendly light).
>KMP kindly took the time to personally teach me some LISP, by challenging me to a dual! We both ran our own LISP processes, and loaded a function called EVAL-IN-OTHER-LISP that used "core link interrupts" to send s-expressions from one LISP to another, so we could evaluate code in each other's LISP. That made it easy for him to define and call functions in my LISP, which was quite fun, but then he set my numeric output base to roman numerals! He won that dual.
Core Link Interrupts (ITS's interprocess communication mechanism, sending messages through actual core memory on a PDP-10)...
"The new material on concurrency is rather a disappointment since such a large and fundamental topic is relegated to little more than a convenient link item between lists and streams.
...
The major omission, and it is major, is that types are never fully, or even adequately discussed."
There's more.
"several important topics that students should be exposed to early are treated lightly, if at all. Its coverage of fundamental algorithms is spotty - sorting, for instance, is not discussed at all.
Another problem inherent in this pedagogical approach is that it does not teach students many of the engineering skills necessary for developing efficient programs on 'real' computers. This can lead to a 'clean fingernails' syndrome. where the student feels no program should be written or used unless it is utterly clean."
This is just one. I can't find the paper but Philip Wadler was the original person saying the exact phrase 'intellectually dishonest'.
You might find the authors own critique of SICP interesting:
https://news.ycombinator.com/item?id=34657535
BTW, here is a list of people who had criticized SICP. The list is full of heavy-weights:
https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.... - that's the only Wadler critique of SICP I'm familiar with. Is "intellectually dishonest" in there? I can't find it. In fact, he seems rather positive about the book and it's material, just not Scheme. His critique is focused on the differences between Scheme and Miranda and their applicability to teaching students.
I would think it obvious, but maybe not, that attributing your own critique to a more well-known and respected individual without citation is intellectually dishonest.
-"SICP is a brilliant book, but it is also a dangerous one. It is dangerous because it teaches students to scheme instead of to calculate."
- "SICP is a book about Scheme, not about programming."
- "SICP's emphasis on the 'scheming' approach to programming is a mistake."
- "SICP does not adequately teach the fundamentals of programming."
Is that what you call intellectually honest?
And I still contend that you are an intellectually dishonest person until you can properly attribute that quote to Wadler, or concede that you were wrong and made a false claim.
Yes, unfortunately I can't find the paper and I even enlisted GPT4 to help me search, so it is possible that some other reviewer may have said that (and I may have read another review by Wadler before or after this review); So while Wadler may not have said that, he has plenty of beef with SICP in the paper in your comment which essentially boils down to implying intellectual dishonesty. If not, then you need to improve your reading comprehension.
I understand that you may have invested a lot of time and effort in SICP and Wadler's assessment of it (based on the paper you provided!) hurt your fragile ego, hence the rude attack on my intellectual integrity, but regardless of whether Wadler said the particular phrase "intellectually dishonest" or not, the implication of his complaints I listed in my previous comment (based on the paper you provided!) amounts to almost to expanded version of saying the same thing.
Also, a note on downvotes: the agreement of majority (shown via upvotes) is no guaranteed standard for quality or veracity of a comment/opinion and I couldn't care less about the "karma points"; my comments are fueled by intellectual integrity and curiosity, and that inevitably means some people might disagree with me. Just because you disagree does not mean I am wrong and you are right.