text
stringlengths
0
1.36k
• Functionality of Flow type and its capabilities for adding types to codebases
• Usage of Flow at Stripe and benefits of having typed definitions for third-party libraries
• Discussion on the effectiveness of types for safety and speed
• Introduction to lesser-known JS Standards: Abstract Blob Store and Abstract Chunk Store
• Explanation of the Dat Project as a toolchain for open scientists to share data and manipulate it
• Comparison between Abstract Blob Store and IndexDB, including persistence and async functionality
• Mention of the LevelUP ecosystem and its role in building abstract standards
• IPFS Abstract Blob Store
• Dat Project
• LevelUP and abstract LevelDOWN stores
• Flow-typed repository for type definitions
• Offline Camp community and events
• JSConf EU conference dates
• Recommendations for Vietnamese noodle places in Berlin (Monsieur Vuong) and dumpling places with Trips of Beef
• Alex Sexton plans to attend JSConf EU with his child.
• Rachel White recommends Data Sketches project for data visualization using D3 and other tools.
• Discussion of visualizing data through interactive means using D3 and its benefits.
• Upcoming conferences mentioned: OpenVis Conf, CSV Conf, and JSConf EU.
**Mikeal Rogers:** Hey, everybody! Welcome to JS Party, where it's a party every week with JavaScript. God, I love that intro music! I was just banging my head like Night at the Roxbury. It was great. So I'm here with Alex Sexton, say hello...
**Alex Sexton:** Hi, everybody. It's me.
**Mikeal Rogers:** And Rachel White, say hello...
**Rachel White:** Hello!
**Mikeal Rogers:** Awesome! Today we're gonna talk about some cool stuff that's going on with JavaScript. We're gonna dig into WebAssembly, we're gonna talk a bit about Stanford and the changing university landscape for learning programming languages and how JavaScript fits in. We're gonna get into some lesser known JS...
WebAssembly... Alex, tell me what this is.
**Alex Sexton:** WebAssembly is kind of a grandchild of the ASM stuff that was coming out a while ago, so for a while everyone was like, "Hey, you can only write JavaScript in the browser." That was cool, people would do things like write CoffeeScript that compiled to JavaScript, or things like that, and then there's t...
So WebAssembly is people saying, "Hey, that's cool", and we all agree that that was cool, but that's a little silly at this point that it's JavaScript. We could kill some of the unnecessary parts that people enjoy writing, since it's just Assembly, and we can add in a lot more primitives that are nice to have, but stil...
So as an approximation of the old JavaScript Assembly stuff, asm.js and stuff, but now with its own actual subset of instructions and things like that (or superset of instructions). It's not in browsers and it may not take off etc., but it seems to have pretty good traction compared to any other project that was simila...
**Rachel White:** If this all really happens and people start adopting it, what kind of developer would it affect the most for adoption?
**Alex Sexton:** \[03:47\] Definitely game developers will probably switch over to this. If you think about how Canvas works, or WebGL or something like that, it's like the DOM and JavaScript and all that kind of stuff provides this web API that is very good for making websites, but once you break out of that, you can ...
People who are already exiting the stack to do things may find that they can write in a language or in a platform that can compile to Assembly, rather than in a JavaScript environment; there may already be great tooling around doing those things. So the nice thing is that you can have parts of your code that are WebAss...
**Rachel White:** Oh, that's pretty rad. I like that it's giving people more options to create more things. I saw that one of the other things that we have to talk about is getting started with WebAssembly in Node.js... I guess we could just talk about that next. Aside from getting started with it in Node.js, are there...
**Mikeal Rogers:** Well, even in Node it's actually behind the flag right now. The first thing in this article about getting started it's like, "Run Node with this crazy flag that exposes WebAssembly." I think it's still a bit of a moving target in terms of the implementations that exist right now... Alex, do you know ...
**Alex Sexton:** I don't actually know... I've never run any WebAssembly; maybe that makes me a bad spokesperson for it, but...
**Mikeal Rogers:** My guess is that you have to run it with a flag. Usually, Chrome doesn't turn on non-default features in V8.
**Alex Sexton:** Correct.
**Mikeal Rogers:** ...so you probably have to run it with some kind of flag to really play with it today. One of the announcements that they've just put out on their list is that they feel that the current spec is ready for all the browsers to implement and actually expose. So that' like a sign from the spec community ...
**Alex Sexton:** Yeah. It's a pretty weird thing... Google has tried this on its own before with NaCl and PNaCl and all that stuff, just like sandboxing C code, or whatever. This is different than that because there is a compile target and stuff like that, but kind of the platforms that currently use things like this a...
I'd be very interested to see the benefit over -- I'm sure they have some benchmarks, I haven't seen... But just like "Here's an asm compiled thing... WebAssembly vs Assembly.js" - how much do the primitives and stuff that are added to this stack help? And I don't know what the fallback story is... Do you compile to as...
**Mikeal Rogers:** \[08:23\] Yeah, I think that we should back up a little bit and explain asm.js a little bit more.
**Alex Sexton:** Sure.
**Mikeal Rogers:** There's some other history here, too... I think that we can also explain this in the context of Brendan Eich's concerns with WebAssembly. He's a WebAssembly fan, but he has some concerns about it. For a long time, people have tried to put other VMs in the browser, and for a long time people thought t...
So you run into this problem when you add another VM where it's like "How do you garbage collect these things that might be touching the same DOM between these different languages? How do you effectively share memory or share objects between them and count them properly?"
A lot of the NaCl stuff that you were talking about and some of the other kind of native sandboxing work that's happened has been, "Here's a separate interpreter, and we'll try to run it beside JavaScript." They also tried with Dart, which was a colossal failure.
**Alex Sexton:** Sure.
**Mikeal Rogers:** Essentially, all of that has never really worked because you just can't really share them effectively. So what asm.js really was... A group of people - primarily people at Mozilla - trying to prove that "You know what, if we take a subset of JavaScript, valid JavaScript that we'll interpret, but we s...
**Alex Sexton:** Right. But there are a lot of V8 people that disagree with that pretty heavily.
**Mikeal Rogers:** Right, so there are V8 people that disagree with that approach, but what they essentially did was that they made their interpreter really fast for all of the use cases, including that very small subset.
**Alex Sexton:** Right, they just didn't need the comment; they were just like, "Why don't we just always make those fast and detect them?"
**Mikeal Rogers:** Right, yeah. That was why you started to see asm.js benchmarks from V8, even though V8 wasn't "supporting" asm.js, because asm.js is just a subset of JavaScript. So WebAssembly is trying to go a little bit farther. It's saying "There was a limit to what we could do with asm.js, so why don't we come u...
**Alex Sexton:** Right. I did some digging just now while you were talking, and the suggestion is that you can ship asm implementation and then also ship asm.js fallback. So if your browser doesn't support WebAssembly, then you can fall back to asm.js. And if your browser doesn't support asm.js, it will just fall back ...
Then also I dug up the flag... It's only in Chrome Canary, not the other things, and flags enable WebAssembly in Firefox Nightly - it's in the About/Config - and then there are only preview versions of Microsoft Edge, and Safari has their "We think we'll support it in the future" type status page, but no one's ever see...
**Mikeal Rogers:** \[12:04\] Right. Coming back to Brendan's concerns... He's pulling a lot on the history of JavaScript here and on the history of people trying to compete with JavaScript. There have been many groups and different browser vendors and VM implementers that have decided at some point that they just don't...
There are a million reasons to get mad at JavaScript and table flip, but at the end of the day it is the language of the web, and we need to continue to make sure that it's fast and that it is the reference point for the web.
His concern with WebAssembly is that if it gets entrenched enough, he worries that vendors will start to view JavaScript as just another language that compiles to run in the WebAssembly VM, and that is a recipe for basically degradation in performance.
**Alex Sexton:** Yeah. If every major website isn't using JavaScript, then it will be deprioritized as something that people improve and make better, or whatever... For sure.
**Mikeal Rogers:** We are so far away from that, though...
**Alex Sexton:** Yeah.
**Mikeal Rogers:** I think this also opens up the possibility of a lot of people creating a lot of different languages that compile down to WebAssembly that then run in the browser. That is all true, but the performance of those languages is not going to be as good as JavaScript. A lot of what the JavaScript VM does is...
**Alex Sexton:** Yeah, for a hot second.
**Mikeal Rogers:** Right. Well, I mean... Yeah, I struggle to even see a future where that's viable for an alternative... Like if you want to run Ruby on top of WebAssembly. I definitely see it for, like you were saying, WebGL and Canvas, and people who want these lower-level abstractions for, say, doing math. They're ...