8 ms·
A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the fu
by KeitIG 9y ago
A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the future implication it "could" have in the future in a really humorous way. A few years old but still relevant.
You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure.
[0] https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- steveklabnik 9y agoAlso relevant: callahad a few weeks ago: https://twitter.com/nybblr/status/923569208935493632 https://twitter.com/nybblr/status/923569208935493632 Netscape navigator on DOS in Firefox via WebAssembly.
- indescions_2017 9y agoOr how about a live coding environment for a Atari VCS (1200) emulator ;) http://8bitworkshop.com/?platform=vcs&file=examples%2Fhello http://8bitworkshop.com/?platform=vcs&file=examples%2Fhello
- sp332 9y agoAnd for a somewhat more practical but at the same time more exotic example, the Internet Archive has a ton of old minicomputers and arcade games running in MESS/MAME, each compiled to webasm. One click and you can boot anything and play it in your browser. https://archive.org/details/softwarelibrary https://archive.org/details/softwarelibrary https://archive.org/donate/ https://archive.org/donate/
- ricw 9y agoThis is amazing. If only it would also work in my phone. Probably for the best to stop me “wasting” time ;).
- Ajedi32 9y agoAre you sure that's actually using WASM? It sounds to me like it's currently using ASM.js compiled via Emscripten. (Though in theory there's no reason why it _couldn't_ be WASM, since Emscripten supports WASM as a compiler target.)
- sp332 9y agoI thought they switched over back in July. https://twitter.com/textfiles/status/884084207688892416 https://twitter.com/textfiles/status/884084207688892416
- vesinisa 9y agoThat is gorgeous. I just booted Win 3.1 to Minesweeper in less than a minute on my phone's browser. Too bad makers of the original Minesweeper did not think to build touch input support.
- fny 9y agoI'm more excited about the prospects of running V8 inside ChakraCore inside Quantum.
- tomxor 9y agoI'm more exited about the prospect of running all of FF or Chromium inside of Edge so I can cut my workload down by 50%
- greenhouse_gas 9y agoThere's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If WebAssembly takes off, I hope that one we'll have more than three browser engines around.
- detaro 9y agoWhat do you base the assumption on that Javascript is the critical piece of complexity here? (it might very well be, but it's not obvious to me) At least some of the JS engines are used in non-browser projects (V8 and Microsofts), which at least superficially would suggest you could write a new browser engine and tie it to one of those existing JS interpreters. WebAssembly will gain interfaces to the DOM as well, so the complexity of that interaction will remain.
- skocznymroczny 9y agoHow about Servo?
- flanbiscuit 9y agoyeah, wasn't this (or related to it) at the top of HN just yesterday? https://news.ycombinator.com/item?id=15686653 https://news.ycombinator.com/item?id=15686653
- mastax 9y agoServo doesn't render major websites properly (last I checked). Their UI is placeholder. Their Network/Caching layer is placeholder. There's no updates, configuration, add-ons, internationalization. Servo is not meant to be a real browser. That's not a bad thing, but I don't think you can use it as an example of a browser built quickly by a small team.
- fasquoika 9y agoIIRC Servo uses quite a bit of Firefox code Edit: Looking at the project it seems like it uses SpiderMonkey, but is otherwise new code
- md224 9y agoMy CS background is a bit weak... is the hypothetical Metal architecture he describes supposed to be satire or actually a good idea?
- jayd16 9y agoMostly satire because the math doesn't really work out in such a way.
- Ajedi32 9y agoIt doesn't? How so? I was under the performance savings calculations he used were at least plausible. (Though obviously just a back-of-the-napkin estimate.)
- __s 9y agoImplement a WASM JIT in kernelspace & you don't have to have a userspace while still having hot code hopefully optimized to remove bounds checking. Now all your programs are WASM modules & we can replace your CPU with some random architecture that doesn't have to care about supporting more than ring0. Oh why not implement a nearly-WASM CPU? Probably just change branches to GOTO. Now the only program people care about, their browser, can have a dead simple JIT for this architecture, with WASM-in-the-browser being nearly as fast as any other program
- ninkendo 9y agoThere’s prior art for this too, Microsoft started a research project called Singularity that was essentially a kernel that only executed .NET bytecode, and had similar advantages (everything in ring0, no syscall overhead, etc.) It died pretty unceremoniously though.
- steveklabnik 9y agoWe had Joe Duffey talk about it at RustConf this year! https://www.youtube.com/watch?v=CuD7SCqHB7k https://www.youtube.com/watch?v=CuD7SCqHB7k
- krapp 9y ago>You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure. I actually do. I want all code ever written and every environment it was ever written for to have a URL that will let me run it in the browser. Everyone else seems to want the web to go back to being whitepapers but I want actual cyberspace already!