Webassembly will change the software industry as we know it.
56 comments · 97% upvoted · source · other discussions
56 comments · 97% upvoted · source · other discussions
Finally, my dream of being able to Haskal while I Go in JS.
Public service announcement
WASM made by Mozilla, so it's the only moral choice for executing useful stuff on your browser.
It gives you fearless sandboxing, zero-cost integers, minimal runtime, efficient Rust bindings, and zero-cost stack allocation.
Also, our glorious commander Klabnik is going to be involved, so we will have new Breakthroughs every day!!
Webass is the greatest equalizer. All computers will be equally slow
/unjerk
Can't jerk. Webassembly is the only hope to end up this horrible state of Js everywhere and "full stack" bootcampers ruling the world.
Lol imagine your surprise tekknojihadi when you realise that most new code running as webassembly tomorrow is still AOT'd Teh Script or the Microsoft heresy thing.
Can jerk. Webassembly is pretty much the same as js, only stored in intermediate representation. You still need an interpreter/jit compiler to be able to execute it, and full stack bootcampers are reinventing electron for wasm as we speak (as in this example)
Jesus no. Literally all of your words after the first two are factually wrong.
Yeah, I didn't realise wasm is now a part of X86 ISA and CPUs can execute it natively
Careful what you joke about http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0801g/hko1477562192868.html
X86 is dead in the water and Risc V will just be an intermediate microarchitecture to run webassembly macrocode on
Risc V
You misspelled "Mill architecture" for some reason.
Can jerk. Webassembly is pretty much the same as js, only stored in intermediate representation.
yeah man, 64-bit-aligned stack machines that move integers around on linear memory are the essence of javascript
64-bit-aligned stack machines that move integers around on linear memory are the essence of javascript
Moving integers around linear memory is the essence of any computer program.
I was trying to say browsers use mostly the same execution engine for wasm as for JS (e.g. JavaScriptCore translates wasm into B3 JIT IR), so I don't see the benefit of wasm over JS or java applets in this regard
Moving integers around linear memory is the essence of any computer program.
Especially Javascript, which is ALL about integers, at a webscale level.
Can jerk. Webassembly is pretty much the same as js, only stored in intermediate representation.
Does WASM have a built in GC and the same level of control over JavaScript's interaction with the browser UI?
You still need an interpreter/jit compiler to be able to execute it,
JIT itself means nothing here. IR is a common level of abstraction in many compilers.
What you apparently fail to see is a lack of overhead commonly associated with any scripting language, JIT or otherwise.
There is no object model in WASM - only a primitive operation.
and full stack bootcampers are reinventing electron for wasm as we speak (as in this example)
And how is this supposed to invalidate in any real way the benefit of WASM itself?
There is no object model in WASM - only a primitive operation.
Okay, but is there an object model in JS translated to IR?
JIT itself means nothing here. IR is a common level of abstraction in many compilers.
What optimisations can be applied to wasm code that cannot be applied to JS?
Does WASM have a built in GC and the same level of control over JavaScript's interaction with the browser UI?
I admit my sentence was poorly worded. WASM might give programmer better control than JS, but in the end you still need to integrate something as monstrous as a JS execution engine to be able to embed it in your application (compared to e.g. luajit).
What optimisations can be applied to wasm code that cannot be applied to JS?
/uj
Oh my god.
Javascript = high-level garbage collected language with automatic type coercion at runtime
WASM = low-level specification for a stack machine that operates on (mostly) 64-bit integers on linear memory. No long jumps allowed, code can be divided in functions.
Correctamundo?
This should answer the "What optimisations can be applied to wasm code that cannot be applied to JS" question by itself.
still need to integrate something as monstrous as a JS execution engine to be able to embed it in your application (compared to e.g. luajit)
Huh? Why?
Cool but is WASM as blazingly fast as v8 node.js? V8 means fast, big engine, fast. vroooom. vrooom
V8 means fast, big engine, fast. vroooom. vrooom
what if I tell you that's a V6, but with turbo and water charge cooling?
V8
um excuse me what the fuck https://en.wikipedia.org/wiki/V8_engine
stick to your computer programs, you nerd.
ima go blast some 2000s era hip hop rap and get all the honeys. peace. gonna STEP ON THAT GAS, and get the girls yall.
honestly I think the biggest chick magnet my hot rod has is a node.js sticker. css3 sticker. html5 sticker. the ladies know i code awesoome full stack MEAN ass web apps and I got a hot ride to prove i got all the money, dog.
suck it nerd.
honestly I think the biggest chick magnet my hot rod has is a node.js sticker. css3 sticker. html5 sticker. the ladies know i code awesoome full stack MEAN ass web apps and I got a hot ride to prove i got all the money, dog.
Good idea -- i have a "Common Lisp" sticker on my helicopter, it gives me discounts with the colombian drug lords.
(mostly) 64-bit integers
/uj 32 and 64 bit ints and floats, with a bias towards 32 bit integers because the address space is 32 bit.
because the address space is 32 bit.
yeah, a limitation. 32-bit = 4GB adressable = only one Electron text editor!!
There is no object model in WASM - only a primitive operation.
Okay, but is there an object model in JS translated to IR?
Not in this context. If you were thinking WASM has built in support for, example, some IR operation to handle class method calls, you're wrong.
It more closely resembles actual assembly language than it does the JVM or CIL.
JIT itself means nothing here. IR is a common level of abstraction in many compilers.
What optimisations can be applied to wasm code that cannot be applied to JS?
Any kind of optimization which could cause a problem for a garbage collector, but would be safe in a non-GC language.
Another would be compile time byte ordering of linear data structures, simply due to a nature of how well C maps to the WASM (at least, over a JVM)
Does WASM have a built in GC and the same level of control over JavaScript's interaction with the browser UI?
I admit my sentence was poorly worded. WASM might give programmer better control than JS, but in the end you still need to integrate something as monstrous as a JS execution engine to be able to embed it in your application (compared to e.g. luajit).
Apart from browser UI, you don't. And that will trivially be amended.
[deleted]
As time goes on various things like this will be moved away from JS and into pure WASM, just requires some patience.
It would have been true if the original browsers had a VM the DOM apis
/uj
forget the awful DOM, writing to a framebuffer is right down the corner. DOM never ever made sense for UIs.
[deleted]
ORACLE CRAP BAD
[deleted]
Not saying its bad. But we have already been there, and its no panacea.
/uj
Go and read the JVM bytecode spec and now read the WASM opcode spec, and come back to us with your findings.
Webassembly will change the software industry as we know it.
I agree. But for good or for bad, and depending on who the victims are gonna be. But I think for the bad.
But I think for the bad.
What's bad about downloading and automatically running binary blobs using the interpreter for a language designed in a couple of weeks?
In the long run, I prophecy that it will be possible to WebAssemble without any Jabbascript whatsoever.
We're screwed either way so... why not at least save a bit of electricity? 🤷♂️
/uj
this has been available for quite a while ago. see cheerp for example. Zero js bullshit.
It's software Jim, but not as we know it.
All hail the new JVM in the browser!
[deleted] 35 points · Jan 2019
But this one isn't created by an evil corporation! Instead, it's made with ❤︎ by your friendly neighborhood code-slingers.
[deleted] 22 points · Jan 2019
FTFY
username223 14 points · Jan 2019 · line-oriented programmer
How many hav we been through now? Java, Silverlight, Flash, ... I'm sure I've forgotten at least one.
KMIAL_reloaded 15 points · Jan 2019
How dare you forget ActiveX!
aebkop 3 points · Jan 2019
But that's still used
[deleted] 8 points · Jan 2019
Ruby on Fails