5 ms·
For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications b
by dalbasal 9y ago
For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications be possible that aren't now in JS only world? What are they?
- pjmlp 9y agoExpect every language out there to have a WebAssembly implementation, including Flash.
- tonyg 9y agoUntil wasm supports proper tail calls, only the ones with uninteresting control structures.
- simias 9y agoCouldn't the compiler take care of optimizing those when necessary? After all I don't know of any "real" assembly with tail call support...
- panic 9y agoMost assembly languages have a "jump" instruction, though -- wasm supports only structured control flow.
- pjmlp 9y agoIt has br and loop, good enough.
- int_19h 9y agoI don't think it's sufficient for full-fledged generalized tail call elimination. You can certainly optimize a self-recursive call down to a loop, but consider a case where a function accepts another function as a pointer, and invokes that pointer in a tail call position, for example (i.e. anything written in continuation-passing style).
- Nullabillity 9y agoJMP is the original TCO.
- deleted 9y ago[deleted]
- pjmlp 9y agoTails calls can be easily replaceable by br or loop instructions, nothing special for anyone with compiler design knowledge.
- tonyg 9y agoThat's true as far as it goes - but wasm lacks general "goto" instructions (across procedures), and loops only work for self-tail-calls. There's an expressiveness gap between languages with and without proper tail calls. (Unless you're willing to accept the unsafe-for-space solution.)
- pjmlp 9y agoI think it would still be possible to implement Scheme with the current specification, which is on my snowy weekends to do list for the upcoming Winter. How far I would get before losing interest or facing those issues, I don't know.
- steveklabnik 9y agoThere is a proposal, though it's taken some work due to ABI issues. My understanding is that it's fairly close though.
- tonyg 9y agoI'm really looking forward to it. For others who are curious about it, here it is: https://github.com/WebAssembly/tail-call/blob/master/proposals/tail-call/Overview.md https://github.com/WebAssembly/tail-call/blob/master/proposa...
- underwater 9y agoIs there really demand for the resurgence of Flash? In its final years it was used to provide capabilities that the browser couldn't, like video playback. Web Assembly will not provide that same advantage.
- bitL 9y agoThere is still nothing better for (online cartoon) animation.
- pjmlp 9y agoLots of nice games to keep alive. Video playback can be done via WebGL shaders, just like rendering video on the good old days with SIMD. And most important, why not? Someone will eventually do it, there are already JVM and CLR ongoing ports.
- afarrell 9y agoThere is even an ActionScript to Javascript __piler https://as3js.org/ https://as3js.org/
- gsnedders 9y agoActionScript is really the easy part of making a Flash player: the hard part is being bug-compatible with almost every version of Flash ever shipped (the Adobe implementation has lots of branches depending on version of Flash that created the file!). That, as far as I'm aware, is why Shumway died.
- vanderZwan 9y agoArchival purposes of old flash videos? It would be sad if it would become impossible to watch those old pieces of Internet culture unless someone had exported them to an mp4 video file. Same with games, for which there isn't even an alternative format to save them in.
- baq 9y agogive me qt over js+css any time.
- flohofwoe 9y agoMost exciting for me is really that this opens up the web for true cross-platform development. The same code runs natively on iOS, Android, Raspi, Linux, Windows, Mac etc with the smallest possible footprint and highest performance, and at the same time I can take the exactly same code (minus a few hundred lines platform-specific stuff) and have it run in the browser at near-native speed, without installation, code-signing, walled-garden app stores, 'smart-screen' scare dialogs, etc... You just compile, upload and share the URL. Like in the old days ;)
- dalbasal 9y agoDo you mean that WebAssembly will be more consistently implemented or that the web will become a generally a more viable platform?
- marcosdumay 9y agoImagine something like the Java VM, available without the need of 3rd party installations, that interfaces actual HTML (instead of being locked down into a frame), and has no limitation on language support. That's the plan. That "interfaces actual HTML" thing isn't available yet, but you can already hack around it.
- bobajeff 9y agoI'm excited for all of the ports of C++ projects the web will get. For example imagine being able to run a full self hosted C++ compiler itself from a browser on any device with a browser.