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."
Second Step (Score:5, Informative)
Second step, actually. Apple and the WHATWG [whatwg.org] took the first step by introducing the Canvas API to the HTML 5 spec. That gave web developers the ability to do Flash-like content. This language is the second step, in that it gives programmers a standard framework from which to create impressive animations.
Kudos to Mr. Resig on a job well done! I can't wait to play around with this project more.
Re:'polished turd' (Score:2, Informative)
Flash is just Adobe Javascript (Score:4, Informative)
All this shows is just how terrible most browser's Javascript engines really are. Notice, modern browsers do considerably better on these demos than older ones, mainly because so much of the web has shifted to using Javascript and dynamic content, such that JS becomes a limiting factor in usability. Once JS engines have caught up to ActionScript in speed, what more use do we have for Flash? We already have Mozilla working to make use of the Tamarin byte-code engine, which will turn JS from being a slow, interpreted language into being a byte-code compiled language (speed on the order of modern scripting languages such as Python/Ruby and to some extent Java/C#).
So sorry, Javascript is the right tool for the job. It's the only tool for the job as far as Open Standards are concerned.
Re:Rival?! (Score:5, Informative)
Oh? I have, and I don't disagree. Of course, I've USED Flash quite a bit too, so I know how God-aweful slow that platform was up until version 9.
Why not? Flash == Software renderer. Canvas == Software renderer. Actionscript == ECMAScript engine. Javascript == ECMAScript engine. I'm not seeing the issue.
Hell, once FireFox is on the Tamarin engine, the two platforms will be practically the same!
Re:My Post (Score:3, Informative)
Re:'polished turd' (Score:3, Informative)
Array join (array size 1000, 500 iterations)
JS: FF2 - 375ms, Flash - 303ms
substring (10000 iterations)
JS: FF2 - 16ms, Flash - 3ms
Did you look at the link I posted at all? Even the older versions of Flash were split with JS ~50/50 on the various datapoints.
I'm not implying it's a bad thing to try, but seriously. Did you even look at the JS code that is your "framework" to this stuff? Let me grab you a piece:
do {
v1 = 2 * p.random(1) - 1;
v2 = 2 * p.random(1) - 1;
s = v1 * v1 + v2 * v2;
} while (s >= 1 || s == 0);
var multiplier = Math.sqrt(-2 * Math.log(s)/s);
nextNextGaussian = v2 * multiplier;
haveNextNextGaussian = true;
return v1 * multiplier;
The JS engines are not optimized to do the above. Sure they will do it, but not with any semblance of efficiency.
Re:Not going to happen (Score:3, Informative)
I haven't played with this new toy of his, but it stands to reason that he'll take the same care with it that he did with jQuery.
In other words, Javascript may be too fragmented, but this Processing language is not... and you write your code in Processing, not Javascript.
Re:Rival?! (Score:2, Informative)
The article submitter has clearly never actually used the HTML canvas object. There's no way in HELL canvas & javascript together could ever approach the render and execution performance of Flash.
Re:My Post (Score:3, Informative)
Seriously, you should at least *understand* the languages before you talk nonsense.
Re:'polished turd' (Score:3, Informative)
Re:My Post (Score:2, Informative)
Re:My Post (Score:2, Informative)
Re:'polished turd' (Score:1, Informative)
And all of the web designers upgraded their Adobe Flash, and deleted all their old
VM not in use by many projects?! (Score:2, Informative)
Are you serious? As a software engineer who works with Flash and Flex daily, I've worked exclusively with Flash Player 9 and ActionScript 3 for over two years. Almost anyone who calls him or herself a Flash developer will say the same. I might have let your argument slide a year ago, but with Flash Player 9 installed on well over 90% of web-connected computers, it's silly not to use AS3. Anyone still working with AS2 and Flash 8 is probably a designer building simple "experience sites" or advertisements who knows a little about coding or a developer who doesn't know any better (or is a masochist).
Re:'polished turd' (Score:3, Informative)