Live data from Hacker News

SICP translated to JavaScript

comp.nus.edu.sg

91–100 of 116 posts

Re: SICP translated to JavaScript

#94
post #81

Earlier quoted context omitted.

> Look on github for how many people write shell scripts in ruby because they don't know how bash works. You can find the same over-syntax'd-programming-environment-as-shell-script with node too. We're the exceptions. They can't handle the truth. As someone who has done this (and who currently works in C), I will say only that shell scripts translated to Ruby can be a lot easier to read and maintain than those writte…

You found the one exception. There's a fuzzy line when dealing with shell scripts. If you're just iterating over a directory and checking some files, that's great shell script territory. If you're making a launcher script for another program to set the environment, check directories, fix permissions, and run pre-flight checks, that's great for shell script. But, sometimes we end up with feature creep. You start out w…

Except if by portability you include non-unix systems. Then you're probably better off with Perl (for example) again.

Re: SICP translated to JavaScript

#95

Earlier quoted context omitted.

Perhaps due to the increasing popularity of JavaScript and the decreasing accessibility or usage of Scheme.

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…

> 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

Re: SICP translated to JavaScript

#96
post #75
post #70

Earlier quoted context omitted.

Yeah, I'm with you on this. Aesthetically, I'm in the "ugh, Javascript" camp. But practically, I recognize that I should just get over this. For web stuff, I fully expect that I'll be writing everything in JS in a few years.

Considering it doesn't even support multiple core processors, and processors are only coming out with more and more cores, I doubt it. This is assuming you are actually doing something that requires performance. Check out Elixir or Go if you want something new that actually makes technical sense.

Sorry, by "web stuff" I meant the client side plus the first tier of stuff. I agree that for serious computation I want something else. Thanks for the tip on Elixir, though; that looks appealing.

Re: SICP translated to JavaScript

#97
post #46
post #38

Earlier quoted context omitted.

I know HOP. It depresses me how much of HOP is irrelevant in Python because they have proper iterators. And how few Perl programmers realize that these days the lack is a major omission in the language.

I'm a longtime perl user, and I don't know where my blind spots are. Are there any particular resources you would recommend for someone like me to get going quickly with python? In particular ones that specifically address the type of blind spot you mention?

I wrote a tutorial a while ago exactly for this purpose:

http://www.stavros.io/tutorials/python/

Re: SICP translated to JavaScript

#100
post #43

Earlier quoted context omitted.

Maybe not everything, but to explain the concepts behind SICP, why not.

As others have pointed out, chapters 4 and 5 are as wonderful and rich as they are because Scheme is homoiconic which makes writing Scheme interpreters and compilers in Scheme very easy -- no need for hairy lexing and parsing steps. Since (IMHO) these chapters are the best introduction to the study of programming languages and their implementation, it would be a real shame to discard them simply because JavaScript is…

and that metacircular evaluator is probably my favorite part of the (original) book right now...

"It's as if -- as if the key to the treasure is the treasure!"

i think the (new) book is valuable in that it might reach some people who have some mental block about just wanting to know what they "need" to know and think that all they need to know is javascript, but for those who just like learning? start scheming. it's freakin' awesome.

Post reply on HN