Processing Visualization Language Ported To Javascript 171
Manfre writes "On his birthday, John Resig (creator of jQuery) has given a present to developers by releasing Processing.js. This is a Javascript port of the Processing Visualization Language and a first step towards Javascript being a rival to Flash for online graphics content. His blog post contains an excellent writeup with many demos."
'polished turd' (Score:3, Insightful)
but this is like a polished-turd. Flash doesn't exist anymore to do animation or dynamic graphics, it exists to run fast. JS engines were not designed to process this kind of data efficiently, as seen by your CPU graph when running the demos.
I don't want to take away from the work, because it's a slick hack, but it's not the right tool for this job.
Regards,
Re:'polished turd' (Score:5, Insightful)
Wait, are we talking about the same Flash? Because I've done a lot of Flash and Actionscripting, and "Fast" is not even in the vocabulary. Software rendered graphics pipeline? Check. Slow VM interpreter that makes Java 1.0 look fast? Check. Lack of direct rendering APIs? Check. Focus on animation at the expense of dynamic scene creation? Check.
Granted, Flash 9 is a major improvement, but it is arriving rather late in the game.
Not going to happen (Score:4, Insightful)
Re:Heh AvP comes ot mind here (Score:4, Insightful)
Eric (Score:5, Insightful)
Re:'polished turd' (Score:5, Insightful)
Whiskey Tango Foxtrot. Optimized for image manipulation? You do absolutely ZERO image manipulation in Javascript. Same with Actionscript. All that is pushed down into the Canvas and Flash rendering engines, respectively. Same thing with DOM manipulations. Sure, you say "insert this item" or "delete this object", but it's the C/C++ engine under the covers that does the heavy lifting.
People haven't done their own image manipulation since Amigas stomped the earth.
You make that statement, yet you posted a benchmark that showed Javascript to be faster than Flash. I'm rather confused. You do realize that the benchmark you posted below was in millisecond and not operations per second, right? i.e. Lower is better.
You have zero evidence for your statements. Listen to someone who actually knows something about these platforms. There's no reason why Javascript can't perform the same function as Flash using the Canvas APIs. And you know what? That's not a bad thing.
Re:Not going to happen (Score:5, Insightful)
You know, I recently heard about a project by John Resig (creator of jQuery) called Processing.js. It's a Javascript port of the Processing Visualization Language, which means it could be viewd as a rival to Flash for online graphics content.
You should check out his blog post [ejohn.org]
In case the sarcasm wasn't obvious enough: that's one of the most important things that Javascript libraries solve
Re:'polished turd' (Score:5, Insightful)
The secret to the performance of Flash 9 is this little beauty: http://www.mozilla.org/projects/tamarin/ [mozilla.org]
A fully modern, high-performance, Just In Time compiler that gives the JVM a run for its money. It's an amazing piece of Javascript technology that Adobe has donated to the Mozilla project for inclusion in the next major revision of FireFox. Wonderful, wonderful engine that absolutely no one is using yet.
See, if you compiled to Flash 7 or 8, you're still triggering the Flash 8 engine. The Flash 9 engine is a complete rewrite that only works with Flash 9 content. So the next chapter of performance wars has yet to be written.
Q.E.D.
Re:Creator of WHAT?! (Score:5, Insightful)
Can someone please explain to me why anyone would regard jquery as a black mark on John Resig's work?
I've found it very useful for anything but the most mundane js tasks. Certainly better than the piles of other libraries that all seem to be based around the fallacy that javascript needs classical inheritance. (Hint: It doesn't. It has prototypal inheritance.)
Re:'polished turd' (Score:3, Insightful)
Re:Creator of WHAT?! (Score:5, Insightful)
Re:'polished turd' (Score:3, Insightful)
Actually, you should check my post below as I explained in detail why Flash lost that handily. The short version is that Flash 9 is not comparable right now because the VM is not in use by many projects. By the time it's in heavy use, FireFox will be using the exact same engine.
Sure. And the piece you picked (like most of the code) is motion computations. The piece you picked does a handful of mulitplies and library (fast!) calls for log, random, and square root. That *could* be heavily optimized with lookup tables, but there wouldn't be much point. That's not even a blip on the processor's time. All the real work is done in the Canvas API calls where the blitting happens.
There is no image manipulation in Javascript or Actionscript. The computations you see could be faster if Javascript had true primitive support, but at the end of the day it just doesn't matter. I know that because that was optimization 101 back when we developers had to write our own 3D engines. A routine that runs once per frame is far less of a concern than a routine that runs once a line or even once a pixel! Moore's law has continued to reinforce that truth.
Other than that, Mrs. Lincoln, how was the play? (Score:5, Insightful)
Don't get me wrong, I think its a cool toy I will be playing with, but until it actually works in more than one beta browser, its is no threat to Flash at all.
-Em
Re:My Post (Score:5, Insightful)
Re:Heh AvP comes ot mind here (Score:3, Insightful)
And, BTW, we need one badly, because the Flash (I don't trust Adobe) and Silverlight (I don't trust MS) crowds are coming and won't wait for a fast JavaScript engine.
Re:My Post (Score:2, Insightful)
Re:My Post (Score:3, Insightful)
Re:'polished turd' (Score:3, Insightful)
Re:My Post (Score:2, Insightful)