Live data from Hacker News

Shumway: a SWF interpreter entirely in JavaScript

benjamin.smedbergs.us

11–20 of 61 posts

Re: Shumway: a SWF interpreter entirely in JavaScript

#11
post #8

Interesting to see tobeytailor (of Gordon[1]) working on this. Is this built on the same code Gordon uses? [1]: https://github.com/tobeytailor/gordon/

I don't know, but I would guess it is, if only because "Gordon Shumway" is the alias of ALF from the 80s tv show.

I actually don't think we're sharing any code with Gordon. But yes, the name is this obscure transitive-closure reference: (Adobe) Flash -> (Flash) Gordon -> (Gordon) Shumway.

Re: Shumway: a SWF interpreter entirely in JavaScript

#12
post #5
post #2

Pretty nice. The madness of interpreters on top of interpreters is not lost on my but still fun.

To be more precise, JITs on top of JITs. :) We have both an interpreter for ActionScript bytecode as well as a compiler that compiles that bytecode method-at-a-time to JavaScript using a restructuring approach like emscripten's relooper. Disclaimer: I work on Shumway.

I could give you the old guy's rant, "Back in my day we were happy to have only one 'core' and if it ran at 8Mhz it was in turbo mode!" :-) Its an amazing piece of work.

Re: Shumway: a SWF interpreter entirely in JavaScript

#14
Preface: this is pretty cool.

That said, is the payoff of implementing this enormously involved solution really worth it? I don't know why I feel like this, but something deep down pains me when I think of the man hours and frustration that had to have gone into something like this. Does anyone else know what I mean?

Re: Shumway: a SWF interpreter entirely in JavaScript

#15

Being more of a designer than a developer, I've got to admit that the thought of second wind for Flash kind of scares me. I've never liked Flash, mainly because historically it wasn't as "open" as HTML, Macromedia Flash (I know, right) crashed a lot, as well as the general abuse of Flash found all around the web in the late 90's/early 2k. Anyone willing/able to take my (probably irrational) fear away and tell me why…

Even though I think this is a cool project, I agree 100% with your fears.

I used to do Flash/Flex/Air extensively, and often preached it to my fellow developers, despite considerable resistance. I argued that SWF was fulfilling the cross-platform promise of applets.

And when Adobe managed to mishandle Macromedia's legacy, I was left with much egg on the face. I don't want to go through that again.

That said, good for Mozilla. They really are running with a ton of impressive open source projects.

Re: Shumway: a SWF interpreter entirely in JavaScript

#16

Being more of a designer than a developer, I've got to admit that the thought of second wind for Flash kind of scares me. I've never liked Flash, mainly because historically it wasn't as "open" as HTML, Macromedia Flash (I know, right) crashed a lot, as well as the general abuse of Flash found all around the web in the late 90's/early 2k. Anyone willing/able to take my (probably irrational) fear away and tell me why…

Even ignoring the Player / AIR runtime, Flash is a fantastic tool for animation authoring. For example, our game artists use Flash to create SWF clips which we then export and playback with an internal format and C++ engine, supporting a fairly limited subset of all SWF features. This content ranges from UI layouts and transition animations to particle special effects and storytelling cutscenes.

It wasn't hard to write it myself (I'd guess about 40 hours for everything), but if we were going to make HTML5 games, I'd definitely consider this library.

Re: Shumway: a SWF interpreter entirely in JavaScript

#17
While I understand that they want something that doesn't require installation, I think it's kind of sad that they felt they couldn't pick up on Gnash or LightSpark or some of the other good open-source Flash work out there. This is a nice concept demo; maybe they will choose to work on a grown-up Flash player instead now. Performance is bad enough without putting the JavaScript intermediary in there, and LightSpark is super promising.

A worthy goal, but I hope they don't let NIH set them years behind the curve.

Re: Shumway: a SWF interpreter entirely in JavaScript

#18

Being more of a designer than a developer, I've got to admit that the thought of second wind for Flash kind of scares me. I've never liked Flash, mainly because historically it wasn't as "open" as HTML, Macromedia Flash (I know, right) crashed a lot, as well as the general abuse of Flash found all around the web in the late 90's/early 2k. Anyone willing/able to take my (probably irrational) fear away and tell me why…

Even though I think this is a cool project, I agree 100% with your fears. I used to do Flash/Flex/Air extensively, and often preached it to my fellow developers, despite considerable resistance. I argued that SWF was fulfilling the cross-platform promise of applets. And when Adobe managed to mishandle Macromedia's legacy, I was left with much egg on the face. I don't want to go through that again. That said, good for…

No second wind here. Think instead of pdf.js and how it relieves you of the bloated security hole called Reader. PDF is a large format (extensions include SWF!) but pdf.js need not handle all of it to be useful in minimizing Reader activations.

Similarly, Flash is going down, never to come back (thanks, SJ). So Shumway need handle only the tall head, possibly as a previewer if not a full Flash replacement. The long tail is not too fat, but it will require a plugin for the foreseeable future.

In the far future, archeologists will pore over archive contents at the edge of the Beyond, decoding ancient languages including JS and SWF, leery of evil transcendant malware ;-).

/be

Re: Shumway: a SWF interpreter entirely in JavaScript

#19
post #11

Earlier quoted context omitted.

I don't know, but I would guess it is, if only because "Gordon Shumway" is the alias of ALF from the 80s tv show.

I actually don't think we're sharing any code with Gordon. But yes, the name is this obscure transitive-closure reference: (Adobe) Flash -> (Flash) Gordon -> (Gordon) Shumway.

wow. as someone born in the late '80s, thank you.

Re: Shumway: a SWF interpreter entirely in JavaScript

#20

Earlier quoted context omitted.

Even though I think this is a cool project, I agree 100% with your fears. I used to do Flash/Flex/Air extensively, and often preached it to my fellow developers, despite considerable resistance. I argued that SWF was fulfilling the cross-platform promise of applets. And when Adobe managed to mishandle Macromedia's legacy, I was left with much egg on the face. I don't want to go through that again. That said, good for…

No second wind here. Think instead of pdf.js and how it relieves you of the bloated security hole called Reader. PDF is a large format (extensions include SWF!) but pdf.js need not handle all of it to be useful in minimizing Reader activations. Similarly, Flash is going down, never to come back (thanks, SJ). So Shumway need handle only the tall head, possibly as a previewer if not a full Flash replacement. The long t…

Very well explained, you seem to know a lot about Javascript.
Post reply on HN