https://sicp.sourceacademy.org/ (JS version)
https://mitpress.mit.edu/sites/default/files/sicp/index.html (1984 classic)
https://sicp.sourceacademy.org/ (JS version)
https://mitpress.mit.edu/sites/default/files/sicp/index.html (1984 classic)
The in-line editor is a bit intrusive (fills up most of my screen, unlike say eloquentjavascript.net) but it's still pretty neat to have run-able examples. Kudos to the creators.
A ton of work seems to have gone into this -- they have a meta-circular evaluator in JavaScript (and it's not that much longer than the original Scheme)!
list("sequence",
list(list("constant_declaration",
list("name", "size"), list("literal", 2)),
list("binary_operator_combination", "*",
list("literal", 5), list("name", "size"))))
https://sourceacademy.org/sicpjs/4.1.2 ("4.1.2 Metalinguistic Abstraction / Representing Components")This isn't an ideal language for doing this stuff. The Scheme version is completely transparent about what you're doing; whereas this kind of language makes you work through a thick veil of abstractions.
(This line doesn't occur in the Scheme version, but the analog would be (quote (let ((size 2)) (* size 5))). Which would you rather debug?)
Why should this book be different, though these days aimed at students who’d only operated a computer before.
Today, Scheme is still weird, but JavaScript is familiar. It's something the incoming students are at least likely to have heard of. So it makes more sense to ease them into the material with the familiar rather than drop them into something weird.
With the scheme version, you have straight-up trees to work with.
With the Javascript version, you have to learn all about parsing rules and gotchas and then you STILL wind up with trees for everything.