Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Eloquent JavaScript

Name: Anonymous 2011-07-25 5:52

Name: Anonymous 2011-07-25 7:34

How dare you compare a legendary artifact explaining the essence of programming with a pathetic JavaScript tutorial?

Name: Anonymous 2011-07-25 9:12

Thanks for this

Name: Anonymous 2011-07-25 9:25

It's a lot more concise then SICP. Lisp programmers could learn something about writing books.

Name: Anonymous 2011-07-25 9:33

>>4
SICP has nothing to do with Lisp, idiot.
IHBT.

Name: Anonymous 2011-07-25 9:53

be sure and get a standalone Javascript compiler so you dont have to fool with browser I/O
http://www.jsdb.org/

Name: Anonymous 2011-07-25 10:27

>>5
Are you fucking retarded.

Name: Anonymous 2011-07-25 10:29

>>7
I don't know whether >>5 is, but you are.

Name: Anonymous 2011-07-25 10:35

>>7
I guess TAoCP is really about MIX assembly, after all.

Name: Anonymous 2011-07-25 10:42

>>9
MIX assembly is only discussed in some part of TAoCP. However, Lisp is used all throughout SICP.

Name: Anonymous 2011-07-25 10:54

It looks pretty crappy.

Starting with with imperative programming sucks, see SICP lecture 5A for reasons.
It mixes concepts with irrelevant implementation details.
Why should students care about IEEE-754? Who gives a shit that you can use \n to get a newline and \t to get a tab in a string (and where are the rest of the escapes?). Does one really have to know how strings are ordered in Javascript? Perhaps the problem is the uncomfotable split between ``introduction to the JavaScript programming language and programming in general''.
That's just skimming Chapter 2.

I'm no teacher, but the writer obviously isn't either. He's just a shithead that finds it necessary to assault you with XKCD ( http://eloquentjavascript.net/chapter10.html#key6 ).

Name: Anonymous 2011-07-25 11:13

If you understand French and want a good laugh, read http://www.siteduzero.com/tutoriel-3-10601-.html
It tries to teach both Java and programming at the same time.
Exercise to the reader: count the smilies.

Name: Anonymous 2011-07-25 11:18

JavaScript has Gotos?
When there is a loop sitting inside another loop, a break or continue statement will affect only the inner loop. Sometimes you want to jump out of the outer loop. To be able to refer to a specific loop, loop statements can be labelled. A label is a name (any valid variable name will do), followed by a colon (:).

outer: for (var sideA = 1; sideA < 10; sideA++) {
  inner: for (var sideB = 1; sideB < 10; sideB++) {
    var hypotenuse = Math.sqrt(sideA * sideA + sideB * sideB);
    if (hypotenuse % 1 == 0) {
      print("A right triangle with straight sides of length ",
            sideA, " and ", sideB, " has a hypotenuse of ",
            hypotenuse, ".");
      break outer;
    }
  }
}

Name: Anonymous 2011-07-25 11:41

>>11
He's just a shithead that finds it necessary to assault you with XKCD ( http://eloquentjavascript.net/chapter10.html#key6 ).
What the fuck, what has the noble art of programming become.

>>12
That's the standard ``learn how 2 hax'' tutorial.

>>13
It's a reserved word, but it has no goto. You can use the magical return statement and procedures for some cases, but don't do it.

Name: Anonymous 2011-07-25 12:39

>>12
       case 1: System.out.println("Ce nombre est tout petit");
         break;
 
       case 2: System.out.println("Ce nombre est tout petit");
         break;
 
       case 3: System.out.println("Ce nombre est un peu plus grand");
         break;
 
       case 4: System.out.println("Ce nombre est un peu plus grand");
         break;
What a fucking idiot.

Name: Anonymous 2011-07-25 15:20

whoa, i did not know object.watch existed..

Don't change these.
Name: Email:
Entire Thread Thread List