16 ms·
The Birth and Death of JavaScript [video]
- yoamro 12y agoI absolutely loved this.
- cjbprime 12y agoFor context, this was one of the most enjoyed talks at PyCon this year.
- TazeTSchnitzel 12y agoJavaScript at PyCon?
- SSLy 12y agoWell, you need JS for the client side even if you use python for server one (eg. flask or django)
- wiredfool 12y agoYep. It was on the schedule.
- chris_mahan 12y agoI think you'll find that the python ecosystem is very large and varied.
- clebio 12y agoapropos, Bokeh.
- cbhl 12y agoI was fortunate enough to get to see this at CUSEC (the Canadian University Software Engineering Conference) and would similarly agree that this was one of the most enjoyed talks there, too.
- mgr86 12y agoI'm missing some obvious joke...but why is he pronouncing it yava-script.
- bttf 12y agoAsk a Hispanic friend.
- mgr86 12y agogotcha.
- nkozyra 12y agoRather, ask a Scandinavian friend.
- JacksonGariety 12y agoMy scandinavian friends call it yay-va-script.
- Hansi 12y agoI'm Icelandic and we use yava-script, I find it hard to figure out how yay-va sounds.
- JacksonGariety 12y agoYAY as opposed to nay VUH as in vagina SCRIPT pronounced normally
- aaronem 12y agoPerhaps it would help to see that pronunciation rendered in IPA for English [0]: /ˈiːeɪ.və.ˌskrɪpt/ Note particularly the italicized phoneme (eɪ), which corresponds to the "long A" sound in English, e.g., the 'a' in 'face'. I'm unfamiliar with the Icelandic language, but according to the English equivalents listed on Wikipedia's page on IPA for Icelandic [1], the corresponding phoneme in that language appears to be ei. [0]: http://en.wikipedia.org/wiki/Help:IPA_for_English http://en.wikipedia.org/wiki/Help:IPA_for_English [1]: http://en.wikipedia.org/wiki/Help:IPA_for_Icelandic http://en.wikipedia.org/wiki/Help:IPA_for_Icelandic
- dsparry 12y agoVery impressive to have been recorded "April 2014" and released "April 2013." Seriously, though, great presentation.
- icameron 12y agoAgreed! I too was wondering isn't the discovery of time travel the bigger story here? /s
- saraid216 12y agoNo, at the end of the day, the discovery of time travel ended up being a really trivial achievement because of paradox. Now, the scientific knowledge we picked up en route was monumental, but that's something else.
- camus2 12y agonice nice,ultimatly languages dont die,unless they are closed source and used for a single purpose ( AS3 ). In 2035,people will still be writing Javascript. I wonder what the language will look like though. Will it get type hinting like PHP? or type coercion? will it enforce strict encapsulation and message passing like Ruby ? will I be able to create adhoc functions just by implementing call/apply on an object? or subclass Array? Anyway , i guess we'll still be writing a lot of ES5 in the 5 years to come.
- scotth 12y agoAdhoc functions can be written using ES6 Proxy [1]. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- testrun 12y agoAS3 is not dead, and it is now open source
- _random_ 12y agoI think there is a good time that an alpha-version of ES6 will be tentatively rolled out by 2035, 2036 latest.
- adamman 12y ago"It's not pro- or anti-JavaScript;" OK
- nkozyra 12y agoDid you watch it?
- igravious 12y agoStellar stuff. Hugely enjoyable. Very interesting thought experiment. I won't spoil it for any of you, just go and watch! Mr. Bernhardt, you have outdone yourself sir :)
- nkozyra 12y agoExtraordinarily entertaining and well presented.
- jliechti1 12y agoFor those unfamiliar, Gary Bernhardt is the same guy who did the famous "Wat" talk on JavaScript: https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- Yhippa 12y agoThat was really funny. First time I've laughed all day. Thanks for sharing.
- fuzzythinker 12y agoFunniest tech video I've seen! Actually maybe even minus the "tech".
- vor_ 12y agoClassic video, though it's wrong at times. For instance, the audience member who corrected him was right.
- robert-boehnke 12y agocouldn't quite make it out, what did he correct?
- vor_ 12y agoThe second JavaScript example, when he told someone in the audience, "No, that's just an object." It was a string.
- gary_bernhardt 12y agoI knew that it was a string. If you listen closely, you'll hear that he asked "is that an array of object?" He probably asked that because it's in square brackets. I said "No, it's just an object". I've probably seen twenty people call this "wrong", which frustrates me. It's not wrong. It was a stringified object! I didn't say "stringified" because it wasn't relevant to the question of whether the object was in an array! There are other things in Wat that are genuinely wrong, though, like the fencepost error about "16 commas", which mistake will haunt me forever.
- inglor 12y agoThis is actually not a bad lecture. Very interesting, a nice idea and surprising.
- base698 12y agoI wish some of those talks were available for purchase on their own and not in the season packets. Definitely a few I'd buy since I liked this talk and the demo on the site. Guy has good vim skills for sure.
- clebio 12y agoThe pricing model used to be different -- $8/mo. He changed it when he stopped producing the series. I agree the current pricing doesn't make sense. I feel slighted for having subscribed for several months, but would now have to pay _more_ for content that I used to have access to. Ach, schade. That said, the material was compelling enough to buy at the time!
- granttimmerman 12y ago> xs = ['10', '10', '10'] > xs.map(parseInt) [10, NaN, 2] Javascript is beautiful.
- TazeTSchnitzel 12y agoIt's due to parseInt having an optional second parameter, the radix, and map passing the index as the second paramater, hence: xs = [ parseInt('10', 0), parseInt('10', 1), parseInt('10', 2) ]
- jisaacks 12y agoAnd since 0 is falsy we get 10 for base 0.
- TazeTSchnitzel 12y agoWhich is odd. I wonder why they checked for falsiness and not the argument being undefined.
- kevincennis 12y agoIt's not exactly checking for falsy values. Although all falsy values will lead to a radix of 10 being applied. parseInt internally uses the ToInt32 abstract operation on the radix parameter. Once it has that value, it explicitly looks to see if the value is 0. If it is, it uses a radix of 10. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-parseint-string-radix https://people.mozilla.org/~jorendorff/es6-draft.html#sec-pa... Edit: I hope that doesn't come off as pedantic. My point wasn't to disagree as much as it was to just add some further explanation.
- meowface 12y agoThis is HN, there's no such thing as being pedantic. :)
- Thirdegree 12y ago
- jerf 12y agoIt's not far off my predictions: https://news.ycombinator.com/item?id=6923758 https://news.ycombinator.com/item?id=6923758 Though I'm far less funny about it.
- steveklabnik 12y agoConsider the relationship between Chromebooks and METAL. (I'm typing this from my Pixel...)
- cbhl 12y agoBernhardt later tweeted: "I gave The Birth & Death of JavaScript seven times and no one ever asked why METAL wasn't written in Rust." https://twitter.com/garybernhardt/status/456875300580651009 https://twitter.com/garybernhardt/status/456875300580651009
- EdSharkey 12y agoIt was assumed because that was/will be a foregone conclusion.
- joelangeway 12y agoHe 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?
- cbhl 12y agoWell, about ten or fifteen years ago, "we all were" would have been the answer. Except that back then, there were multiple choices -- plug-ins meant you could choose Java, or Flash, or ActiveX (Visual Basic 6, anyone?), or VRML for that matter. The number of security issues that plug-ins have had in the last two decades makes most of them non-starters nowadays, although there are still plenty of sites that use them extensively (say, Childrens' game websites like Neopets and Nick Jr.'s website) depending on the target audience.
- Carioca 12y agoAlso, apparently internet banking and ecommerce in South Korea relies heavily on ActiveX http://www.washingtonpost.com/world/asia_pacific/due-to-security-law-south-korea-is-stuck-with-internet-explorer-for-online-shopping/2013/11/03/ffd2528a-3eff-11e3-b028-de922d7a3f47_story.html http://www.washingtonpost.com/world/asia_pacific/due-to-secu...
- bsder 12y agoBecause Java, Flash, etc. couldn't easily manipulate the DOM. Javascript won for this reason.
- solomatov 12y agoDOM in that time wasn't that fancy it is now. The real reason is security.
- TazeTSchnitzel 12y agoThere were other advantages. To write JS you just need a text editor, and it's easy to pick up. To write Flash requires spending several hundred dollars. To write Java requires the JDK and to learn Java.
- Fasebook 12y ago"I get back to the DOM"
- vorg 12y agoI suspect Nashorn, the just released edition of JavaScript for the JVM, will be heavily promoted by Oracle and become heavily used for quick and dirties manipulating and testing Java classes, putting a dent into use of Groovy and Xtend in Java shops. After all, people who learn and work in Java will want to learn JavaScript for the same sort of reasons.
- tinco 12y agoThe reason why metal doesn't exist now is because you can't turn the memory protection stuff off in modern CPU's. For some weird reason (I'm not an OS/CPU developer) switching to long mode on an x86 cpu also turns on the mmu stuff. You just can't have one without the other. There's a whole bunch of research done on VM software managed operating systems, back when the VM's started becoming really good. Microsoft's Singularity OS was the hippest I think.[0] Perhaps that ARM cpu's don't have this restriction, and we will benefit from ARM's upmarch sometime? [0] http://research.microsoft.com/en-us/projects/singularity/ http://research.microsoft.com/en-us/projects/singularity/
- gary_bernhardt 12y agoI didn't want to go into this level of detail in the talk, but... I think you still want the MMU enabled, just not used for process isolation. With virtual memory totally disabled, a 1 GB malloc takes 1 GB physical memory even if it's not touched, you can't have swap at all, memory fragmentation kills you dead, etc. It still has a lot of utility outside of isolation. I don't have a good sense of how the performance cost of hardware isolation breaks down into {virtual memory enabled,TLB thrashing,protection ring switching}. That's one of the reasons that I reduced the speed-up from "25-33%" in the MSR paper down to 20% in METAL. Maybe the speed-up would be less than that if virtual memory were still enabled. Unfortunately, that distinction may have been blurred in the talk. That is, I may have implied that METAL would turn the MMU off entirely. If so, it was an oversight. I've done the talk end-to-end at least fifty times, which is how I smooth my execution out. Occasionally it can "smooth" the ideas out a bit too, leading to small inaccuracies. It's sort of like playing the telephone game with yourself (which is a very strange experience). The MSR paper that I quote came from the Singularity team, so your reference is right on. Reading "Deconstructing Process Isolation" in fall of 2012 was probably the germ of the core narrative of the talk.
- nteon 12y agoOn linux, system calls don't result in a TLB flush - kernel data structures and code are in a different portion of the virtual address space (starting from the top of VM memory, if I remember right) that is tagged as not being available from ring 3. So system calls are quite fast. EDIT: Kernel memory begins at PAGE_OFFSET, see here: https://www.kernel.org/doc/gorman/html/understand/understand007.html https://www.kernel.org/doc/gorman/html/understand/understand... Kernel memory lacks the flag _PAGE_USER so that it isn't accessible from userspace: https://www.kernel.org/doc/gorman/html/understand/understand006.html#toc19 https://www.kernel.org/doc/gorman/html/understand/understand...
- vanderZwan 12y agoI guess this is in a way a response to Bret Victor's "The Future of Programming"? https://vimeo.com/71278954 https://vimeo.com/71278954
- gary_bernhardt 12y agoIt is in a sense. I had an early form of the idea that became this talk in the spring or early summer of 2013. Bret's talk (which I loved!) was released shortly after. That made me think "I have to do this future talk now in case the past/future conceit gets beaten into the ground."
- exodust 12y agoThanks for link. Liked the 70s vibe and humour. From about 14:40 he gets animated, basically conducting! Would love to know a programmer's explanation for the function or purpose of arm waving and hand signals in a presentation. Not knocking, just curious!
- guard-of-terra 12y agoWell, he just tries to reinforce that we have two symmetrical interconnected systems and yet they have to figure out how to talk to each other. What he has on the screen.
- lelandbatey 12y agoFirst, 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 fact that he didn't even smile during any of the moments when the audience was laughing just made it all the more engaging. Fantastic talk, I totally loved it!
- madeofpalk 12y agoAlso, Java-YavaScript
- peedy 12y agoMany people from Europe do that. It does sound cooler.
- robocaptain 12y agoIt sounds so natural that I immediately started thinking I had actually been saying it wrong all these years.
- madeofpalk 12y agoI think I'm going to adopt this new pronounciation.
- ricket 12y agopronunciation* (it's one of few weird words that change spelling when you add a suffix, such as fridge/refrigerator)
- IgorPartola 12y agoThis is actually how you say it in Russian. Try Google Translate.
- spyder 12y agoLooks like Erlang is already getting one step closer to the metal: http://erlangonxen.org/ http://erlangonxen.org/ http://kerlnel.org/ http://kerlnel.org/ Also there is another project that can be related to that goal: "Our aim is to remove the bloated layer that sits between hardware and the running application, such as CouchDB or Node.js" http://www.returninfinity.com/ http://www.returninfinity.com/
- pookiepookie 12y agoI'm not sure I understand the claims toward the end of the talk about there no longer being binaries and debuggers and linkers, etc. with METAL. I mean, instead of machine code "binaries", don't we now have asm blobs instead? What happens when I need to debug some opaque asm blob that I don't have the source to? Wouldn't I use something not so unlike gdb? Or what happens when one asm blob wants to reuse code from another asm blob -- won't there have to be something fairly analogous to a linker to match them up and put names from both into the VM's namespace?
- deleted 12y ago[deleted]
- ika 12y agoI always enjoy Gary's tasks
- jongalloway2 12y agoCoincidentally, I just released a podcast interview with Gary right after he gave this talk at NDC London in December 2013: http://herdingcode.com/herding-code-189-gary-bernhardt-on-the-birth-and-death-of-javascript/ http://herdingcode.com/herding-code-189-gary-bernhardt-on-th... It's an 18 minute interview, and the show notes are detailed and timestamped. I especially liked the references to the Singularity project.
- slashnull 12y agoha-zum yavascript
- Sivart13 12y agoWhere did you get the footage of Epic Citadel used in the talk? http://unrealengine.com/html5 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.
- sefjklsffsdfjkl 12y agohttps://web.archive.org/web/*/https://www.unrealengine.com/html5 https://web.archive.org/web/*/https://www.unrealengine.com/h...
- Sivart13 12y agoNot Sure If Serious, but this doesn't work at all in any browser I've tried it in. I don't think archive.org especially knows how to mirror a giant weird experimental single page app.
- angersock 12y agoIt'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.
- jokoon 12y agoI want a C interpreter
- ahoge 12y agohttp://en.wikipedia.org/wiki/CINT http://en.wikipedia.org/wiki/CINT
- jokoon 12y agowhy not put that in browsers ?
- Yorrrick 12y agoTo make a complete platform, you also need APIs, so there's more to it than just picking a language. You also need to figure out how to sandbox it; CINT appears to give programmers access to unrestricted pointers. You also want to get multiple browser vendors to agree, so some kind of specification is desired; CINT targets its own unstandardized subset of C. And you ideally want it to go fast, but CINT appears to be pretty slow: http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=cint http://benchmarksgame.alioth.debian.org/u32/compare.php?lang... So there'd be some work to do. You could also compile the code, but complete C compilers are not fast, in browser terms.
- mattgreenrocks 12y agoLLVM ships with lli, which can interpret LLVM bitcode generated by clang, a C compiler.
- deleted 12y ago[deleted]
- Kiro 12y agoA bit OT but what is the problem with omitting function arguments?
- wcummings 12y agoThey'll have the value undefined which will do god knows what after some implicit type coercion
- GeneralMayhem 12y agoNot necessarily anything as such, but it's the sort of thing that can easily lead to bugs if you don't know what you're doing. It's the only way to overload a function with multiple signatures, though, so most libraries and frameworks make heavy use of it.
- h1karu 12y agosomebody tell this to the node.js crowd
- _random_ 12y agoCan so many lemmings be wrong?
- alexandercrohde 12y agoI guess I don't really get the point here. This video walks a line between comedy and fact where I'm not really satisfied in either. I can't always tell what's a joke, does he actually believe people would write software to compile to ASM instead of javascript because there are a few WTFs on js's "hashmaps." Much likely a newer version will come out before 2035? Or was that a joke? I also feel like poking fun at "yavascript" at a python conference is cheap and plays to an audience's basest desires. Really I see a mixture of the following: - Predictions about the future, some of which are just cleary jokes (e.g. 5 year war) - Insulting javascript preferring clojure - Talking about weird shit you could, but never would do with ASM js - Talking about a library that allegedly runs native code 4% faster in some benchmarks, with a simplistic explanation about overhead from ring0 to ring3 overhead.
- jr06 12y agoVideo tl;dw: Gary Bernhardt (rightly) says that JavaScript is shit (with some other insights). HN comments tl;dr: 50%: "Waahhh, JavaScript is awesome and Node.js is wonderful, shut up Gary Bernhardt." 25%: Smug twats talking about how they're too busy changing the world with JavaScript to even bother to comment. 25%: Pedants and know-it-alls having sub-debates within sub-debates. Pretty standard turnout. See you tomorrow.
- pekk 12y agoThanks for the summary, but I didn't exactly see that he was saying JavaScript is shit so much as that it was imperfect (10 days, etc.) but that didn't even matter.
- atmosx 12y agoI have a question, because this video confused me. I don't have background to follow through all the assertions Gary Bernhardt did, but I'll try to watch it again, since it was fun. I want to become a full stack developer. I can program and write tests in ruby, I can write applications using Sinatra and now I am learning rails. I bought a book to start learning JavaScript because it's the most popular language and basically will allow me to write modern applications. After I'm done with JS I'll probably jump into something else (rust, go, C, C++, Java, whatever helps do the staff I want). But watching this video, I'm confused: I avoided CoffeScript because I read in their documentation that in order to debug the code you have to actually know JavaScript so I figured that the best thing to do is learn JS and then use an abstraction (i.e. Coffescript) and tools like AngularJS and Node.js... Is my approach wrong? :-/
- tragic 12y agoYou can get around it to some extend with source maps and so on - just make sure you're generating them with whatever build process you use. In practice, however, all that lovely Coffeescript syntax can easily trip you up; often something will compile successfully, but not to the 'right' Javascript. I wouldn't recommend CS until you get your head around the fundamentals of JS. In particular, CS does some very 'clever' things with the Javascript this object; I have certainly lost my scope at unexpected points in CS programs (often in loops). When you're optimising code, furthermore, you definitely need a strong sense of what JS code you'll get out the other end. I'd recommend Reginald Braithwaite's Javascript Allonge as an overview of JS semantics - the material on scopes and environments is very useful, given that JS behaviour on that score is ... idiosyncratic. https://leanpub.com/javascript-allonge/read https://leanpub.com/javascript-allonge/read
- leichtgewicht 12y agoI like that he mentions "integer". It is still very incredible how JavaScript can work well without a integer construct. Or threads and shared memory. Or bells and whistles.
- JoeAltmaier 12y agoYes as a high-level scripting language it has many uses. You're never gonna write a kernel in it admittedly.
- _random_ 12y ago"JavaScript can work well" - depends on what is understood by 'well'. Some craftsmen are capable of building cars from junk.
- pekk 12y agoAnd it would work better with integers. Or are we claiming now it was a good decision to force all numbers to be floats because look how awesome node is?
- oberhamsi 12y agomodern browsers support webworkers so you get "threads" but still no shared memory.