News for hackers. Stuff that matters.
Re:WebAssembly Browser Preview by IvanK_net on Monday October 31, 2016 @03:32PM (#12840122)
Three years ago, I had an idea to write my own Flash Player in Javascript, but I was too lazy to start working on it.

Today, we have PDF.js, emulators of gaming consoles, or even emulators of a whole x86 computer, which can run Windows OS. I believe that "SWF interpreter" in Javascript can run pretty fast. The specification is free available online.

The only problem I see is, that in Flash, you can create TCP / UDP sockets, which is not possible in a web environment.

Re:WebAssembly Browser Preview by catshirt on Monday October 31, 2016 @04:52PM (#12840818)
Re:WebAssembly Browser Preview by Sophistifunk on Monday October 31, 2016 @07:47PM (#12842024)
JavaScript also lacks (and apparently will always lack) a weak reference type, which Flash supports at the very core, for example weak event handlers.
Re:WebAssembly Browser Preview by spyder on Tuesday November 01, 2016 @11:04AM (#12846220)
Re:WebAssembly Browser Preview by bzbarsky on Tuesday November 01, 2016 @12:59PM (#12847759)
WeakMap holds a weak reference to the _key_, not the _value_. That's not enough to do weak event handlers, for example...
Re:WebAssembly Browser Preview by Sophistifunk on Wednesday November 02, 2016 @04:52PM (#12859164)
It can't be used because they refuse to allow iteration.
Re:WebAssembly Browser Preview by merb on Monday October 31, 2016 @04:37PM (#12840722)
> The only problem I see is, that in Flash, you can create TCP / UDP sockets, which is not possible in a web environment.

You can send it to a backend via WebSocket, tough TCP/UDP proxy.

Re:WebAssembly Browser Preview by Ph0X on Monday October 31, 2016 @08:54PM (#12842489)
who's running these proxies? The idea is to have a replacable flash player that works out of the box with all the flash content on the web.
Re:WebAssembly Browser Preview by imtringued on Tuesday November 01, 2016 @09:27AM (#12845488)
You can do it yourself.
Re:WebAssembly Browser Preview by jim-greer on Monday October 31, 2016 @05:53PM (#12841290)
There are some other things you can't do from the browser in addition to sockets. Full screen, camera, and microphone. But most games don't use that stuff.
Re:WebAssembly Browser Preview by od14 on Monday October 31, 2016 @06:23PM (#12841510)
This is not true, all of the things you mentioned are possible in modern browsers and are being standardized. However some of them require permission from the user.

(1) Full screen: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_...

(2) Camera + Microphone: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice...

Re:WebAssembly Browser Preview by tuxracer on Monday October 31, 2016 @10:40PM (#12842948)
Those things are all possible in the latest versions of every major browser. Web standards have come a long way!
Re:WebAssembly Browser Preview by altstar on Tuesday November 01, 2016 @12:12AM (#12843374)
You can try flexjs.