Processing Visualization Language Ported To Javascript
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, actually. Apple and the WHATWG 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.
Javascript + Nintendo DSi = DSiCade
Flash, when used non-gratuitously, has always run fast for me. Check out http://varriastudios.com/ for a site that illustrates what I'm talking about.
Website Hosting
Flash itself uses a dialect of ECMAScript (the common parent language of Javascript and ActionScript). So your assertion that Javascript engines were not written to do this is flat out wrong.
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.
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!
Javascript + Nintendo DSi = DSiCade
I am sick and tired of people confusing Java and javascript. They are not the same language. They are not even related languages. javascript is crappy scripting language for use with HTML. It is run my the browser and aids in display time processing. Java is a full blown object oriented programming language which runs on the Java Virtual Machine. Sine the JVM handles interfacing with the operating system Java itself is mostly platform independent.
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.
Website Hosting
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.
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
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.
I have used the HTML canvas object. It's not on par with Flash 9, which is why I wrote "a first step towards Javascript being a rival to Flash". I styled that to help you with reading comprehension. Processing.js is an enabler that will lower the bar for many developers and give it the attention needed to improve the weaknesses that exist.Except that Javascript is much more powerful than Java can ever hope to be. It's the environment thats crappy, not the language.
Seriously, you should at least *understand* the languages before you talk nonsense.
This sig does not contain any SCO code.
I think you missed the point. If your Flash code is not compiled for Flash 9, Tamarin is not used. The old Flash 8 engine gets loaded instead. Since the vast majority of Flash content is still Flash 8, no one is using Flash 9. :-)
Javascript + Nintendo DSi = DSiCade
Which was part of the design criteria for COBOL. It was so that "low level" (PFC) military "grunts" could write code that would work.
Tamarin is used in all Flash Players since version 9.
.swf files in favor of re-creating them in Tamarin-compatible form?
And all of the web designers upgraded their Adobe Flash, and deleted all their old
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).
It's scary being a Flash and Flex developer on Slashdot. You guys are unnaturally rabid.
The AS2 version of Papervision has basically been discontinued: all the shiny stuff is in the AS3 version. There's quite an incentive to run it in AS3, because it's relatively fast compared to the old AVM. Since I started messing around in PV3D I've switched entirely to AS3: it's not really much of a change in coding style.