Live data from Hacker News

Wat

destroyallsoftware.com

51–60 of 103 posts

Re: Wat

#51

Guess I'm not a hacker? It's like watching a rerun I've seen twice over with the laugh track turned up to 11 (just to clarify, someone said it was a repost but I haven't seen it before).

There's no laugh track; that's the audience.

[deleted]

Re: Wat

#52
post #11
post #3

This is incredibly funny, but does anyone know why the interpreter makes such bizarre decisions? Why wouldn't it be preferable to just throw up errors?

The Ruby stuff apparently isn't bizarre. From what I've read, Ruby creates variables as it encounters an assignment to them when parsing the code. So, when you have a = a in your code, Ruby creates the variable a before it ever tries to actually execute the assignment. If later, when it has finished parsing everything, and starts executing, that statement fails because b is not defined, you still end up with variable…

[deleted]

Re: Wat

#53

Earlier quoted context omitted.

It's Keynote. I recorded those sessions as screencasts, then sliced them into tiny pieces so I can advance them perfectly with my talking. There are 37 slides in that four-minute talk. In some cases, the slices are only two or three frames long.

Ah that makes sense, thank you. I may steal that idea for future talks with R. Though, just embedding a shell in a slide deck would be very nice.

I like the sliced screencasts because they're so repeatable. I practice my talks a lot, and I can get the timing down perfectly because it's always the same. Highly recommended. :)

Re: Wat

#54

Guess I'm not a hacker? It's like watching a rerun I've seen twice over with the laugh track turned up to 11 (just to clarify, someone said it was a repost but I haven't seen it before).

Yeah count me in the "not a hacker, I guess" crowd, this stuff isn't very funny.

Re: Wat

#55

Wow, this title suffers from some serious editorializing. What's next, "10 ways to know if you are a hacker? (cracked.com)"

I feel like we've been suffering extra-much from this effect lately...

Re: Wat

#56

Wow, I laughed so hard I cried! This is hilarious...

wow, you must be the best hacker ever congrats

I understand the downvotes since this is HN and you people don't like useless comments here. But I simply thought it was very funny. No need to be mean here.

Re: Wat

#57
post #47

Earlier quoted context omitted.

This appears to be a peculiarity of the REPL implementations, not a difference between V8 and JSC. d8 (and the Chrome console) behaves the same way as jsc, while you can make d8 and jsc behave the same as the node REPL by wrapping each statement in parentheses: d8> ([] + []) d8> ([] + {}) [object Object] d8> ({} + []) [object Object] d8> ({} + {}) [object Object][object Object] So I believe this is merely erroneous b…

No, it's more subtle than that. By wrapping in parenthesis, you're making it an expression. When you just say "{}+[]" in e.g. Chrome, the first {} is parsed as a block. So what you see printed is the result of "+[]", which is 0. This is why {}+[] is not equal to {}+[] without parens. This may also be why Node gives different results; I'm not sure. I didn't mention any of this in the talk (it would've killed the flow…

I understand why it happens. I'm saying that what you're pointing out is not in the nature of JavaScript, it's in the REPL. It's just wrong; there is no other situation where that code would evaluate that way. node is behaving "properly", showing you what value you can expect if you, say, assign that expression to a variable.

I guess it's an amusing bit of sleight-of-hand, but using it to mock JavaScript seems, I don't know, tasteless. Doesn't it have enough problems without inventing more?

Re: Wat

#58
post #57

Earlier quoted context omitted.

No, it's more subtle than that. By wrapping in parenthesis, you're making it an expression. When you just say "{}+[]" in e.g. Chrome, the first {} is parsed as a block. So what you see printed is the result of "+[]", which is 0. This is why {}+[] is not equal to {}+[] without parens. This may also be why Node gives different results; I'm not sure. I didn't mention any of this in the talk (it would've killed the flow…

I understand why it happens. I'm saying that what you're pointing out is not in the nature of JavaScript, it's in the REPL. It's just wrong ; there is no other situation where that code would evaluate that way. node is behaving "properly", showing you what value you can expect if you, say, assign that expression to a variable. I guess it's an amusing bit of sleight-of-hand, but using it to mock JavaScript seems, I do…

It's a joke. Relax.

Re: Wat

#59
What's the "correct" ("less funny"?) result of

   Array(16).join("wat" - 1) + " Batman!"
?

Empty strings separated with NaNs look perfectly logical to me (I'm a JS guy though, so, well, bear with me).

Re: Wat

#60

What's the "correct" ("less funny"?) result of Array(16).join("wat" - 1) + " Batman!" ? Empty strings separated with NaN s look perfectly logical to me (I'm a JS guy though, so, well, bear with me).

A TypeError.
Post reply on HN