Live data from Hacker News

The Death of Flash and Rewriting 1.4M Lines of Code

gamasutra.com

141–150 of 203 posts

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#141
post #112

Earlier quoted context omitted.

Valid point - currently, wasm cannot target the DOM. I think the GP would've been more accurate in saying the logic is all performed in Rust - JS is only used for DOM access.

Is it because of security reasons?

Nope. It's because one of the things that WebAssembly did to succeed was stay small. Instead of a huge kitchen sink spec, it's lean and mean, and will add things over time. DOM access is one of the first features to be layered on.

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#143
post #76

> rewriting the entire codebase in ActionScript first to take full advantage of GPU acceleration, before porting it into Haxe So let me get this straight. It was already written in ActionScript. They re-wrote the ActionScript. All of it, then ported it to the Haxe language. So the purpose of the first "re-write" was... refactoring it to use GPU acceleration in ActionScript? I guess they just hadn't gotten around to t…

AS3 has 2 rendering modes: CPU - this is an old API that can render vector based graphics. Every game before 2011 uses this API. GPU - Adobe introduced a thin OpenGL wrapper around 2011. This is a completely new API and looks very similar to OpenGL. I guess Haxe code looks much more similar to a game written in OpenGL, this they rewrote the rendering pipeline (and converted all assets from vector animations to sprite…

The Haxe code might even look similar to the GPU ActionScript - they're (deliberately) very similar languages.

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#144

Earlier quoted context omitted.

No, but there are tons of prettifiers that can get minified/obfuscated JS back into a state that it can be read and reasoned about fairly easily. It's not like minifiying/obfuscating JS compiles it into byte code. It's still plain text.

Do you or anyone else have any recommendations for a good tool to recover minified java script?

http://jsnice.org works well, though misses many oportunities of restoring variable names based on property names which cannot be minified.

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#145
post #41

Earlier quoted context omitted.

WASM replaces Javascript as the target of other language compilers. If you already use Javascript, WASM won't be much help. But WASM lets you compile C/C++ and with a bit more effort other languages into a bytecode instead of weird looking Javascript, or its more streamlined and still weird form, asm.js.

> WASM replaces Javascript as the target of other language compilers. Ugggh, still no evidence. WASM is a compile target in a sandbox. It is the new Flash or Java applet. Everything else is a wish list from people incredibly insecure about touching JavaScript. So far any advocation that WASM will magically replace JavaScript severely misunderstands both WASM and JavaScript. I will continue to await something more tha…

WASM replaces Javascript as the target of other language compilers.

JavaScript is also a compile target in a sandbox. Emscripten started with outputting plain JS, then that was optimized to asm.js, now optimized to WASM.

I completely agree that WASM should NOT replace JS for normal DOM apps. It's currently possible through awkward calls into JS, and might be possible in the future more directly, but there's no need to replace JS.

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#146
post #4

Does anyone know of tools I can use to convert simple .swf animations to html + .js? I did a thorough research and found Swiffy (discontinued by google) and Shumway (discontinued by mozilla). All the other tools seem to require original source code to be available, which we don't have... (Context: educational animations for early childhood, e.g., cool numeracy animations with sounds and colors for kids to learn to do…

"Discontinued" does not mean "they don't work". Have you tried them?

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#147
Even though the OpenFL api matches the AS3 version pretty closely, a porting job of this scale would've been a huge ordeal to go through. To have this kind of a positive trip report after the whole process is over is a great credit to Josh's work on OpenFL.

(self-disclosure : member of Haxe community)

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#148
post #126

Earlier quoted context omitted.

I had the impression that the Web got significantly better after it was released from the Flash lock-in.

So instead of click-to-play Flash, now you have unstoppable, auto playing audio and video ads that spy on you...? Yes Flash with it's weekly or sometimes daily security vulnerabilities was bad, but HTML5 is not "better". It is design by giant corporations (DRM inside your CPU, inside your browser, etc.) FOR other corporations. It is not designed for people, for freedom. It is regulatory capture by Silicon Valley "tec…

In Firefox at least, you can disable auto-play media in about:config

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#149

Earlier quoted context omitted.

> WASM replaces Javascript as the target of other language compilers. Ugggh, still no evidence. WASM is a compile target in a sandbox. It is the new Flash or Java applet. Everything else is a wish list from people incredibly insecure about touching JavaScript. So far any advocation that WASM will magically replace JavaScript severely misunderstands both WASM and JavaScript. I will continue to await something more tha…

WASM replaces Javascript as the target of other language compilers. JavaScript is also a compile target in a sandbox. Emscripten started with outputting plain JS, then that was optimized to asm.js, now optimized to WASM. I completely agree that WASM should NOT replace JS for normal DOM apps. It's currently possible through awkward calls into JS, and might be possible in the future more directly, but there's no need t…

> WASM replaces Javascript as the target of other language compilers.

No, it does not. Compiling to WASM is not a replacement or synonym for compiling to JavaScript. JavaScript is not locked in a sandbox, in the same way, as it has a multitude of APIs. WASM does not have such APIs as it is just the sandbox.

Here is the deal. All modern browsers now claim to support WASM. If WASM were capable of replacing JavaScript it would do so right now, but it isn't because it cannot. The demand is certainly there and yet despite that demand the results are completely absent.

People claim this is because WASM lacks DOM bindings. True, but that is only a tiny bit of it. WASM also does not have a security model around code/data distribution. WASM also does not have access to the chrome of the browser (the parts outside the DOM). I also haven't heard much about asynchronous threads in WASM, which is a huge requirement when working with distributed code execution. This list could go on and on.

This is common knowledge for people who do this work professionally. There is an incredible amount of work to do before an arbitrary compile target can replace a major platform consideration, and much of that work isn't API bindings.

The people who claim WASM as a replacement for JavaScript, as evidenced on r/programming, tend to be the people most ignorant and fearful of JavaScript. They want a replacement so badly they assume this is it without any consideration for what the technical requirements are, because they have no idea what they are.

Re: The Death of Flash and Rewriting 1.4M Lines of Code

#150
post #4

Does anyone know of tools I can use to convert simple .swf animations to html + .js? I did a thorough research and found Swiffy (discontinued by google) and Shumway (discontinued by mozilla). All the other tools seem to require original source code to be available, which we don't have... (Context: educational animations for early childhood, e.g., cool numeracy animations with sounds and colors for kids to learn to do…

You can try Jeff - https://www.npmjs.com/package/jeff

It should be able to do it.

Post reply on HN