Live data from Hacker News

The Birth and Death of JavaScript [video]

destroyallsoftware.com

121–130 of 236 posts

Re: The Birth and Death of JavaScript [video]

#121

> xs = ['10', '10', '10'] > xs.map(parseInt) [10, NaN, 2] Javascript is beautiful.

  var xs = ['10', '10', '10'];
  xs.map(function (str) {
    return parseInt(str, 10);
  });
  
  > [10, 10, 10]
Fixed that for you. Why?

  map callback params: (value, index, originalArray)
  parseInt params: (string, radix)
Your code is passing the map array index to parseInt's radix.

Re: The Birth and Death of JavaScript [video]

#122

He says several times that JavaScript succeeded in spite of being a bad language because it was the only choice. How come we're not all writing Java applets or Flash apps?

because there a lot of bad programmers use it to write a lot of page effects, like alert("log in required"), not apps.

Re: The Birth and Death of JavaScript [video]

#123

For those unfamiliar, Gary Bernhardt is the same guy who did the famous "Wat" talk on JavaScript: https://www.destroyallsoftware.com/talks/wat

The video seems to be down now? Anyone have a mirror?

edit: nevermind, I clicked the download link. But I'm still wondering why the video's unplayable on the site.

Re: The Birth and Death of JavaScript [video]

#124
Where did you get the footage of Epic Citadel used in the talk?

http://unrealengine.com/html5 seems to have been purged from the internet (possibly due to this year's UE4 announcements?) and I can't find any mirrors anywhere.

Which is a shame, because that demo was how I used to prove to people that asm.js and the like were a Real Thing.

Re: The Birth and Death of JavaScript [video]

#125

Where did you get the footage of Epic Citadel used in the talk? http://unrealengine.com/html5 seems to have been purged from the internet (possibly due to this year's UE4 announcements?) and I can't find any mirrors anywhere. Which is a shame, because that demo was how I used to prove to people that asm.js and the like were a Real Thing.

https://web.archive.org/web/*/https://www.unrealengine.com/h...

Re: The Birth and Death of JavaScript [video]

#126

First, I very much love the material of the talk, and the idea of Metal. It's fascinating, really makes me think about the future. However, I also want to rave a bit about his presentation in general! That was very nicely delivered, for many reasons. His commitment to the story, of programming from the perspective in 2035, was excellent and in many cases subtle. His deadpan delivery really added to the humor; the fac…

Also, Java-YavaScript

Re: The Birth and Death of JavaScript [video]

#127
post #108

Earlier quoted context omitted.

Brendan Eich covered this subject at O'Reilly Fluent conference in 2012: http://youtu.be/Rj49rmc01Hs?t=5m7s

If by cover you mean he essentially shrugs and says "it was the 90s" and moves on to ES6.

Which seems a pretty appropriate reaction, no? :-)

Re: The Birth and Death of JavaScript [video]

#128
It's been kind of fun watching JS developers reinventing good chunks of computer science and operating systems research while developing node.

This talk has convinced me that their next step will be attempting to reinvent computer engineering itself.

It's a pretty cool time to be alive.

Re: The Birth and Death of JavaScript [video]

#129
post #21
post #4

I'm missing some obvious joke...but why is he pronouncing it yava-script.

He's in character of it being 2035 and the pronunciation was lost/changed.

I think you're probably right -- he almost slips up at one point, but corrects himself before pronouncing the "va".

Re: The Birth and Death of JavaScript [video]

#130
post #117
post #112

Earlier quoted context omitted.

Seems he took the Wat talk a little personally, but I'm not sure why he defends {} + [] by saying the first { is a statement... wat?

It's automating semicolon insertion. The browser translates {} + [] into {}; + [], so + [] === 0 too. {}; is undefined.

Being pedantic: it's NOT semicolon insertion. Your actual point is correct, the {} is an empty block statement, and the +[] is a separate expression statement. It's equivalent to "{} 0".

However, semicolon insertion is only triggered when there's a newline at a position where there would otherwise be a syntax error. Here, neither is the case: blocks don't have to be terminated by semicolon (so no syntax error), and there's no newline in the source code!

Post reply on HN