
Shumway - Mozilla - nsmalch
http://mozilla.github.io/shumway/
======
bdg
It's a very cool project I've thought about gettinng involved with. My company
has a number of complex flash games that will not initialize in shumway, but
for toys and small apps it works about half the time -- and that's cool! So
far, when it works, performance is about 3x slower.

~~~
mbebenita
I work on Shumway, and we would love to get more complex Flash games running.
Would you and your company like to help our team get these games running?
Performance is a hit or miss, sometimes we can be really fast, sometimes
really slow, it all depends on either:

1\. We haven't implemented some feature well enough. 2\. We can't implement a
feature in JavaScript/HTML5 and we have to emulate it in a very slow way. In
these cases, we can either improve the Web Platform to support these features
natively, or work with various game developers to avoid using them.

~~~
bdg
We're a small dev team but I'm happy to help out. I've submitted code to moz-
central before, but I noticed shumway is in anpther repo. What type of help
did you have in mind?

------
ryen
This was discussed on HN a few weeks ago:
[https://news.ycombinator.com/item?id=6481319](https://news.ycombinator.com/item?id=6481319)

------
nthitz
Fun fact: Shumway, was originally based on similar software called Gordon...
And who is Gordon Shumway?
[https://en.wikipedia.org/wiki/ALF_(TV_series)](https://en.wikipedia.org/wiki/ALF_\(TV_series\))

~~~
abrowne
Cf. Servo and Crow¹ from
[https://en.wikipedia.org/wiki/Mystery_Science_Theater_3000](https://en.wikipedia.org/wiki/Mystery_Science_Theater_3000)

1\.
[https://github.com/mozilla/servo/issues/111](https://github.com/mozilla/servo/issues/111)

~~~
pcwalton
I am still pushing to name version 0.1 of Servo "Santa Claus Conquers the
Martians". :)

~~~
fzzzy
Torgo!

------
optymizer
Could someone help me understand the logic behind this project?

Actionscript runs in a VM, that's native code. It seems like Mozilla's
argument is that the AS VM is buggy and, thus, is/was/could be exploited
often, so it's a security liability.

Their solution to this problem (as far as I understood) is to interprete the
SWF bytecode using JavaScript/HTML5, because JavaScript runs in a sandbox.

Isn't anyone concerned that this is not the best solution to the problem?
What's the difference between bugs in the AS VM and bugs in the JS VM? The JS
VM is native code too, I don't see anyone rushing to replace it.

If the JS VM is more mature, then this is just a matter of getting the AS VM
to that maturity level. If someone wrote clang while gcc existed for many
years, why can't Mozilla focus their efforts on writing a better AS VM,
instead of writing an emulation layer?

Given that both AS and JS are ECMAScripts, why can't AS be compiled in a way
that allows it to run on the JS VMs?

If the bytecode generated by the AS compiler doesn't match what a JS VM can
execute, then, since the AS bytecode will necessarily mimic features available
in the language (and the languages are similar), why can't we translate the AS
bytecode into JS bytecode?

~~~
lucian1900
It may be possible to translate Flash bytecode to JavaScript, but an
interpreter will almost always be more accurate. In this particular case,
being accurate first is important. Performance can be fixed later by adding a
JIT-like mode.

~~~
mbebenita
This is what Shumway does, it has both an Interpreter and a JIT.

------
barrkel
I'm in favour as long as there is a reliable way of turning these things off.

The biggest advantage of Flash is that Flashblock fairly reliably turns it
off, so that ads that use Flash for animation don't get a chance to run.

In the absence of Flash, I worry about gobs of marketing JS animating pages
with fewer generic ways of turning them off.

~~~
uulbiy
I see no reason why flashblock would not work with this. If the embed is has a
swf extension then it will be blocked.

~~~
shawnz
Because there is no <embed> tag. This is a pure javascript flash VM.

------
dethstar
I actually just turned off Flash and am going to try this for a while, youtube
works pretty good so far.

~~~
secoif
alternatively, you could try the html5 youtube player
[http://www.youtube.com/html5](http://www.youtube.com/html5)

~~~
tr4656
Well, not all videos will work with the HTML5 player.

------
dave809
WOW, those demos run super smooth. This is really cool, I'll be trying the
extension out

------
eridius
I assume the extension is Firefox-only? It would be really cool to have Safari
support for this.

~~~
mbebenita
Shumway runs in every browser, including IE. The extension however is Firefox-
only, but it should be easy to make it run in Safari or Chrome. We're just not
familiar enough with those code bases to do it ourselves. It involves some
intimate knowledge about how to intercept Flash player initialization.

~~~
eridius
Is it easier if Flash isn't installed? Because I don't have Flash installed at
all, which is why I'm interested in Shumway. I have Chrome installed purely to
use when I need Flash support.

