Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


Most 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 ;)


Do you mean that WebAssembly will be more consistently implemented or that the web will become a generally a more viable platform?


Imagine 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.


Expect every language out there to have a WebAssembly implementation, including Flash.


Until wasm supports proper tail calls, only the ones with uninteresting control structures.


Couldn't the compiler take care of optimizing those when necessary? After all I don't know of any "real" assembly with tail call support...


Most assembly languages have a "jump" instruction, though -- wasm supports only structured control flow.


It has br and loop, good enough.


I 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).


JMP is the original TCO.


Tails calls can be easily replaceable by br or loop instructions, nothing special for anyone with compiler design knowledge.


That'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.)


I 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.


It's possible, yes, but it isn't possible to do particularly efficiently. If you want separate compilation, it gets even worse. (Separate compilation is where proper tail calls come in very handy.)


Ah you got a point there, forgot about separate compilation.


There is a proposal, though it's taken some work due to ABI issues. My understanding is that it's fairly close though.


I'm really looking forward to it.

For others who are curious about it, here it is: https://github.com/WebAssembly/tail-call/blob/master/proposa...


Is 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.


Lots 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.


There is even an ActionScript to Javascript __piler https://as3js.org/


ActionScript 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.


Archival 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.


There is still nothing better for (online cartoon) animation.


I'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.


I don't really understand this. Is a compiler in the browser all that different to a compiler on a server?


yes.

In the browser it can run offline and does not need the server at all. Wheter a c++ compiler really makes sense, I doubt, but it will definitely come ..


give me qt over js+css any time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: