Hacker News new | ask | show | jobs
by hackNightly 4660 days ago
Perhaps due to the increasing popularity of JavaScript and the decreasing accessibility or usage of Scheme.
8 comments

Due to the increasing popularity of casual dining and the decreasing accessibility of Danish nobility, I've rewritten Hamlet to be an Appleby's assistant manager.

The fifth act of SICP is meta-linguistic abstraction, and among Javascript's merits it is not. SICP is no more a book about Scheme than Moby Dick is a whale tale.

I admire the effort, and understand the sentiment behind the project. I just think the authors are missing the big picture of SICP. In fairness, few of us are Ablesons or Sussmans.

> Due to the increasing popularity of casual dining and the decreasing accessibility of Danish nobility, I've rewritten Hamlet to be an Appleby's assistant manager.

Replace "casual dining" with "megacorporations" and you get an actual movie made in 2000 [1]. And, of course, that example is not unique [2][3][4][5][6][7][8][9][10].

[1] http://www.imdb.com/title/tt0171359/

[2] http://www.imdb.com/title/tt0114279/

[3] http://www.imdb.com/title/tt0117509/

[4] http://www.imdb.com/title/tt0184791/

[5] http://www.imdb.com/title/tt0265713/

[6] et cetera

[7] et cetera

[8] et cetera

[9] ad nauseum

[10] ad infinitum

Thank you for the imagery. As Dane who grew up in Elsinore, it will stay with me for quite a while I am sure.
SICP uses Scheme, not Common Lisp.

Scheme is a deliberately minimalist language, which is fairly accessible and easy to write your own implementation of. In fact, in SICP, you do that, a couple of times, writing first a Scheme interpreter, then extending it in various ways like adding logic programming capabilities, then you write a virtual machine and a compiler that compiles down to that virtual machine.

JavaScript is, well, a weird and warty language. You wouldn't want to try implementing JavaScript in an introductory CS class, and it's much less amenable to language extension like the logic programming variant of Scheme you implement in SICP.

But I notice that this translation of SICP into JavaScript doesn't got that far; it only goes up through Chapter 2 of SICP.

JavaScript is rather minimalist as well. It has some warts, but they are easy to avoid.
> Scheme is a deliberately minimalist language

Ever looked at R6RS?

I'm not a big fan of R6RS, but it is still fairly minimalist. One of the good things that it did was divide the standard into a core language, and standard library built on top of the small core language. The core language eliminated many things from R5RS, but the standard library adds a lot more.

The main issues I have with R6RS are the library system (which I think is too complex, and it frustratingly adds an extra level of indentation as you need to wrap everything in one big expression), and some of the libraries in the standard library, like the I/O library, the Unicode library (which standardizes on such things as char-upcase and char-downcase, which are fairly useless in a Unicode context, without adding much that's actually useful).

R6RS is this kind of weird, awkward beast that's not sure what it's doing. It neither strips the language down to a minimal core, nor does it build up a comprehensive set of libraries containing all of the basics that people expect from standard libraries in a language these days.

Actually, Scheme is more accessible than ever before. If installing MIT Scheme and Edwin/Emacs is too difficult, now there's Racket-SICP, which allows you to program with DrRacket, a beginner-friendly graphical IDE, and actually comes with implementations of some parts of SICP that MIT Scheme omitted, like the picture language and (afaik) some concurrency primitives.

Is Scheme really decreasing in usage? Sure, in recent years there have been high-profile moves to Python at MIT and UCB, but I don't know of any hard stats on worldwide Scheme usage. Not that it matters.

SICP isn't a book about Scheme. It's a book about writing computer programs. Scheme was used because it imposes the minimum additional cognitive load. Worrying about all the warts in, e.g. Common Lisp (to say nothing about Javascript or Scala, say) would detract from the pedagogical mission of the book.
SICP did not use Scheme. SICP used a tiny subset of an early Scheme.

You can use a subset of Common Lisp and the programs in SICP would mostly look the same when written in that CL subset.

I have a surprise for you: Scheme has warts, too.

> decreasing accessibility

Scheme is super-easy to set up these days.

Step 1: Download http://racket-lang.org/

Step 2: Follow the quick start guide: http://docs.racket-lang.org/quick/

Step 3: Click "Run"

No "click through Visual Studio's project setup" phase, no "how do I open the text editor from IDLE" phase, no "open a command prompt" it's all right there.

This makes the environment and the language perfect for beginner students.

SICP uses Scheme, not Common Lisp.

Edit: Here's a list of available Scheme implementations. SICP uses MIT/GNU Scheme, which uses an Emacs-like editor.

http://groups.csail.mit.edu/mac/projects/scheme/

Thanks, you're correct.
Now if someone would only translate it to Visual Basic it would be truly accessible.
Preferably classic Visual Basic, not the .NET edition :-)
VB6 had the best write code at run-time debugger I've ever seen, it's too bad the language itself was so lacking.
VB 6 doesn't have lambdas, VB.NET does have lambdas.
Plenty of Scheme implementations work in JavaScript VMs.