text
stringlengths
0
1.36k
\[56:15\] It's very cool that we now have all the major browsers on board, so there's almost no reason to not start exploring this space, because they all have it, so we might as well start seeing what we can do with it.
**Alex Sexton:** Yeah I heard it's written in C; the official implementation is C, not C++. Yeah, I think we're already past the point of "View source" being super useful.
**Mikeal Rogers:** \[laughs\] Yeah... I think that I do want line numbers; I like having line numbers, and pulling those up in an inspector and looking at the source, but yeah... Literally clicking "View source" and sorting through the million lines of code in an average application today is slightly less useful.
**Alex Sexton:** Of minified code, right?
**Mikeal Rogers:** Yeah, I forgot... \[laughs\]
**Alex Sexton:** I think we're already doing so much compilation that the compilation "View source" argument is already mute. We just need better WASM decompilers. In the same way we can pretty-print the minified code of a Webpack-compiled React application that was also transpiled with Babel and somewhat backwards fig...
I think the fact that we do this more is only because we used to do it a lot, and I don't think it's a bad thing that we do decompilation to figure out how things work. There's still no fundamental thing that makes that illegal on the web, even with WASM; it's just that we need new tooling. There's no reason DevTools c...
So I'm not sold on the idea that we're gonna break the web by having compilation targets, but I'm also not necessarily sold that at any given time more than a small chunk of people will be wanting to write in C.
**Kyle Simpson:** Well, maybe not C, but I think there's probably a pretty significant chunk of people in the Node ecosystem that have at least considered writing parts of their Node applications in Go, for example; that seems kind of a natural bridge, and many high-profile companies have moved there.
**Alex Sexton:** They have that option.
**Kyle Simpson:** They have that option of course now, but I'm saying they could have the option of not even moving outside of the Node ecosystem. If V8 supports WASM and Node supports that, you might potentially see people writing Node applications with very little JavaScript.
**Mikeal Rogers:** I don't think I've ever seen it with Node. I've seen it with Rust a bunch, though.
**Alex Sexton:** Yeah, but why wouldn't -- I guess on the server people already have the option to do whatever they want. They can just write their whole application in Go, with a Go server. We already see this choice being made by people, and people still choose to write in modern JavaScript. I'm not saying there won'...
**Kyle Simpson:** \[01:00:14.04\] Speaking of JavaScript the language progressing, I did find it interesting that just apparently at the most recent TC39 meeting we saw another -- and I say "another" because I keep track of where proposals are, and this is at least the second or third one that made it all the way to st...
In some respects, that's a shame, because I was kind of looking forward to that and I was excited about it, but in other respects I think what's good - Brendan Eich described this a couple years back when he first talked about WebAssembly, that it could sort of be a pressure release valve on the tension of wanting to p...
**Alex Sexton:** Yeah... I think it's silly to think that JavaScript was going to be the best way to do things whenever SIMD was -- like, simultaneous operations on a CPU is like not the level that I think most people wanna be building websites in. If your website needs that, then it's likely that there's a better choi...
The Brian LaRues of the world who are very against adding anything I think will also appreciate it... Because there definitely is pressure. "We can't do X and Y and Z that everybody can. How come we can't hit the right frames per second, and all the other things can?" Well, those are built to do those types of operatio...
**Mikeal Rogers:** One interesting little thing I find in here is that if you look at the benchmarks, the WASM implementation is doing really well, but the native module in Node.js is actually still quite a bit faster.
**Alex Sexton:** Of course.
**Mikeal Rogers:** Then what's going on at WASM? That's kind of interesting. There may still be a really good place for some of these primitives to make their way all the way up in to JavaScript so that we can do some pure JavaScript stuff; you get some more performance without crossing that barrier between...
**Alex Sexton:** WASM is still pretty early though.
**Mikeal Rogers:** Yeah, that's true.
**Kyle Simpson:** One of the things that surprised me, didn't get a lot of fanfare and hasn't even been talked about much, but reading the release notes for ES2017, they just sort of slipped in that final bullet point that they added Atomics and Shared Memory, which is essentially threaded programming - a very light ve...
**Mikeal Rogers:** \[01:04:24.20\] I would not compare this to threaded programming the way that most people understand threaded programming. It's much closer to the message passing structures that you might find in Go and things like that, to be honest.
**Kyle Simpson:** Well, they literally do have mutexes. The Atomics thing is "block on a read until it's alright" Now, I know that's CSPish, like Go, but it literally is "Hey, I don't know whether or not I'm the first one to read, so block on it." And I don't know whether the intention is that's the only API, they just...
**Alex Sexton:** Yeah... I don't know. I think it's actually pretty important even in the JavaScript world to be able to share memory between workers though. You could be completely in JavaScript and still want that, and still have that be a very good performance increase, that isn't super CE, other than the fact that ...
**Mikeal Rogers:** And on that note, let's get into our picks. Alex, what's your pick this week?
**Alex Sexton:** My pick this week is Blake2b-WASM.
**Mikeal Rogers:** Oh, no... \[laughs\] We totally mess this up, man.
**Alex Sexton:** Was that your pick, too?
**Mikeal Rogers:** \[laughs\] If you need to think of one, we can go to Kyle.
**Alex Sexton:** Yeah, I'd like to hear what Kyle has to say.
**Kyle Simpson:** Well, I have to pick this week the Fluent Web Conference, coming up on 19th-21th June, out in San Jose. I am, as I said earlier in the episode, co-chairing this conference, and it is not too late to get in. We have plenty of seats open at the conference, we also have seats open in our training worksho...
**Mikeal Rogers:** \[01:06:52.18\] Alright. For my pick, you know, I've done a lot of bread-based picks on here for my bread-making; as a result of doing that for several years, I'm a bit overweight, my cholesterol is terrible, so I made some pretty huge dietary changes. I'm on a keto diet, and the one product that's j...
**Alex Sexton:** That was an interesting pick. My pick is not a dietary supplement this week... It's Preact.js. We've talked a lot about React, and I reach for Preact occasionally, especially for a third-party type thing. If you're used to React and you really don't need very much of it -- it's definitely not API-compa...
There are a few other 3k-5k implementations of React and you can kind of probably find some comparison charts and things that people like about the different ones, but Preact is a good choice; the other ones are fine, too.
I find that a lot of people pull for React and the only thing they want is a render function and the change event to work the way that other things work, and then the other 39k is just relatively unused... So Preact.js.
**Mikeal Rogers:** Nice.
**Alex Sexton:** There's a good talk from JSConf EU, "Into the void 0", by Jason Miller.
**Mikeal Rogers:** Sweet! Alright, on that note, that will take us out. Thanks everybody for listening, and goodbye.
**Alex Sexton:** Bye, everyone. Thanks, Kyle!
**Kyle Simpson:** Yeah, thanks a lot for having me, guys. I appreciate it.
• History of ES modules
• Dojo and its early module system
• ServerJS community and Narwhal's synchronous module pattern
• CommonJS spec and its influence on NodeJS module system
• AMD spec and its attempt to address limitations of NodeJS module system
• Browserify and bundling of modules in web applications
• Asynchronous loading vs bundling for web applications
• The CommonJS community and ServerJS had issues defining a standard for promises, resulting in multiple specs
• ES modules were influenced by Python's module system, which included features like import * from module, causing issues with scope and namespace collisions
• The spec was revised to use new syntax and address the issues of the previous version, but it remained in a "weird state" before the implementation of new processes at TC39
• ES modules were finalized before many implementations existed, leading to concerns about compatibility with Node.js
• John-David Dalton got involved in addressing edge cases and gotchas in implementing ES modules in Node.js, particularly related to the .mjs extension and transpilation issues
• Discussion of ESM (ECMAScript Modules) parse detection and the introduction of new file extensions
• Proposal for "Unambiguous JavaScript Grammar" to determine ESM files by import or export statements
• Concerns about unintentionally changing parse goals when refactoring code with implicit strict mode
• Overview of current status of ESM implementations in browsers (Edge, Firefox, Chrome, Safari)
• Mention of the loader spec and its relationship to SystemJS