In the bustle of announcements surrounding OSCON, Blackhat, and the Ajax Experience one single, incredibly important, announcement was made: The introduction of two new Mozilla projects: IronMonkey and ScreamingMonkey.
The critical, core, component of this is the Tamarin virtual machine (which is an Open Sourced version of the ActionScript Virtual Machine that powered the Adobe Flash Player). Tamarin already supports ECMAScript 3 (and, thusly, JavaScript, ActionScript, and JScript) and parts of the upcoming ECMAScript 4 specification.
Briefly, since they’re both still under planning, here’s what IronMonkey and ScreamingMonkey are setting out to achieve.
IronMonkey
IronMonkey is setting out with the goal of mapping Microsoft’s Common Intermediate Language (CIL) to ActionScript Byte Code (ABC), allowing additional language implementations, such as IronPython and IronRuby, to run in the Tamarin Virtual Machine.
IronPython and IronRuby are implementations of Python and Ruby, respectively, that runs on .NET Common Language Runtime (CLR) (and, incidentally, also on Mono), written in C#.
IronRuby is built on top of the Dynamic Language Runtime (DLR)… DLR will ship as part of the Common Language Runtime (CLR) in the future…
To break all of this down: There are implementations of Python and Ruby that are capable of being compiled down to a Common Intermediate Language, which will then be able to be run on Tamarin via IronMonkey.
This is a huge, huge, deal. This means that JavaScript will no longer be the only viable scripting language in browsers that use that Tamarin engine. At the very least, there’ll be two more languages to work with. However, if IronMonkey works out well, I wouldn’t be surprised if we see an implementation of PHP that runs in the browser.
ScreamingMonkey
Tamarin being able to run JavaScript 2, Python, and Ruby really doesn’t mean a whole lot (to the general web-developer public) if the languages don’t work in all modern browsers (even though it’ll give development on the Mozilla platform a considerable boost). This is where ScreamingMonkey comes into play.
ScreamingMonkey is the effort, being led by Mark Hammond, to allow the Tamarin engine to run within non-Mozilla browsers, starting with Internet Explorer.
Unfortunately, the Internet Explorer team is caught up fixing bugs in their existing ECMAScript implementation (JScript), thus their likelihood of implementing ECMAScript 4, in a reasonable time frame, is slim to none.
The result of this effort will be for a developer to be able to reference ECMAScript 4 or JavaScript 2 from a script tag and have it load a required plugin in order to execute it, for example:
<script type="application/ecmascript;version=4">...</script>
or:
<script type="application/javascript;version=2">...</script>
There’s a detailed plan of attack laid out and it will require a lot of work. The end result still needs to be actualized, but it will most likely be in the form of a standalone Tamarin runtime (possibly embedded in another distribution) that will be able to hook into its relevant browsers.
As with IronMonkey, this is a huge announcement. This immediately helps to give credence to using the upcoming JavaScript 2 language as its cross-browser support is practically assured. While we’re still a long ways off from being able to use this particular project, the result of it will surely be incredible.
Regardless of the outcome of either one of these projects, it’s obvious that browser scripting is beginning to shift in some appreciable ways. Although, should these projects succeed the resulting effect upon the web development industry will be incalculable.
glandium (August 8, 2007 at 1:21 am)
Are there plans to have a spidermonkey-compatible API for these ?
Also, when the decision making was happening, why was tamarin chosen over mono (which would have directly run ironpython and ironruby) ?
http://tirania.org/blog/archive/2007/Aug-06-1.html
fxj (August 8, 2007 at 3:38 am)
Maybe I dont see the big deal, but all this is already possible by using jython and jruby and building java applets…
So where is the huge difference?
Greg K Nicholson (August 8, 2007 at 6:26 am)
So basically, Mozilla is going to make IE support JavaScript 2—kicking and screaming—by getting it installed along with Flash. Awesome.
(Only half-jokingly: can you do the same for CSS2?)
Steve Goguen (August 8, 2007 at 10:34 am)
Oh my god.
So Mozilla is creating the ultimate dynamic language platform that executes CIL as embeddable open source component. Very nice indeed.
John Resig (August 8, 2007 at 10:52 am)
@glandium: I’m unsure about the Spidermonkey API-compatibility, but without having intimate knowledge, I’m going to have to lean towards ‘no’.
As I understand the decision of Tamarin over Mono (besides the obvious fact that Tamarin is already part of the Mozilla project) was over intellectual property concerns. I guess there’s some special licensing issues at play with Mono that would be incompatible with including it directly into Mozilla itself – whereas Tamarin has no such issues.
@fxj: The advantage to this set of techniques is that it will be able to degrade nicely, if a required plugin is not included. For example, the following could work:
Not to mention the fact that since Tamarin is already set to be included in Mozilla (and via ScreamingMonkey, in other browsers) then its a viable platform for further distribution.
If the question then becomes “Why not Java?” I’d like to refer you to this comment made by Brendan Eich:
@Greg: Unfortunately, CSS is a whole other ball of wax – since there’s currently no plans to have a deployable CSS engine (although, that would be pretty cool, you have to admit).
Mike (August 8, 2007 at 11:40 am)
Good post! Does Tamarin + IronMonkey provide a cross-lanaguage security sandbox? I’m curious to know how the security model works for running IronRuby in the browser. Similarly, how is the DOM accessed from say IronRuby/IronPython?
It’d be great if this all comes together in “10 fucking months” ;-), but whenever it seems huge…
John Resig (August 8, 2007 at 11:53 am)
@Mike: It’s unclear as to how the DOM integration will occur – but it definitely appears to be within the scope of the IronMonkey project (since not including any DOM access would make for a fairly useless web scripting language). But yeah, security will be in place (much of the normal Python libraries won’t be accessible, such as File I/O – you’ll only be interfacing with the language itself and its DOM libraries).
As to the time frame, that’s also unclear – I’d imagine that this would probably be destined to come out at around the same time as Mozilla 2, which is still pushing for some time 2008-2009.
Dao (August 9, 2007 at 3:58 am)
Hm, it’s not obvious to me how
<noscript><script type='text/javascript'>...</script></noscript>
could possibly do something without the plugin.pd (August 9, 2007 at 6:45 am)
Can you clarify the planned deployment situation for IE?
It would need to be installed as a plugin? Is Mozilla Tamarin work going to be pushed back up into Adobe’s Flash code? If so doesn’t this mean that we will have a common scripting engine in both major browsers because Flash is a default plugin distributed with IE isn’t it? At least it was in the olden days.
These changes are almost too huge to comprehend and let’s face it, as Web developers, we’ve been treated like crap in terms of vendors making our lives tolerable. Who would dare get one’s hopes up that this will meaningfully change? Last time I did that was when I allowed myself a modicum of hope that IE7 would make a difference, even though I knew in my brain that they were not allowing it to replace IE6 completely. Damn that hope from my heart, pay attn to brain!
Doug (August 9, 2007 at 9:55 am)
“As I understand the decision of Tamarin over Mono (besides the obvious fact that Tamarin is already part of the Mozilla project) was over intellectual property concerns.”
Adobe Flash though is still proprietary (the plugin and authoring environments). The decision to go with Tamarin sure is good for Adobe.
Mono is LGPL, Java is GPL. Both already run dozens of languages. This should have happened years ago. Why not make the browser scripting language pluggable, so we could have a jvm plugin and/or a mono plugin.
Brendan Eich (August 9, 2007 at 5:40 pm)
Glandium, John: actually, ActionMonkey is an evolutionary merger of SpiderMonkey and Tamarin, so it will have the JS API, with as much compatibility as we can maintain. The JS API is used to embed SpiderMonkey in many places, including Adobe Acrobat and Tellme’s VXML service.
fxj: you have to get Java, and even then you don’t get Jython or JRuby DOM scripting via tags in the page. Also, I’ve heard (someone please correct me if I’m wrong) that Jython is pretty much dead since Jim Hugunin went to MS to do IronPython.
Greg: CSS, probably no. A few DOM fixes, maybe. Consider a world where you have very fast JS on top of a working substrate common across all browsers. Even with a few IE-specific forks of the JS code, once that code is distributed widely (downloaded, or pre-installed even), and if it’s fast and memory-frugal, who cares about those IE quirks? Most programmers will be using higher level APIs such as jQuery, EXT, etc.
Mike: same-origin security model would be language-independent. My goal is to have an even better security model, based on information flow.
Dao: why the noscript tag containing the real script? If a browser does not understand the script type, it skips it.
Doug: running dozens of languages is not the goal. Running JS first and fast (not regressing browser performance in a competitive market) is the first goal. Supporting other languages is a secondary goal. As I have said elsewhere (http://blogs.sun.com/chrisoliver/entry/hotspot_vs_adobe_tamarin_vm), Java and Mono are too big, not to mention other problems.
/be
Seo Sanghyeon (August 9, 2007 at 7:25 pm)
be: “Also, I’ve heard (someone please correct me if I’m wrong) that Jython is pretty much dead since Jim Hugunin went to MS to do IronPython.”
You are wrong, so stand corrected. :) Wikipedia(http://en.wikipedia.org/wiki/Jython) has a fine summary of Jython history. Jim wasn’t involved in Jython development for 8 years now.
John Resig (August 10, 2007 at 12:10 am)
@Brendan: It’s definitely clear that ActionMonkey will have the SpiderMonkey API compatibility, but I wasn’t sure about the IronMonkey-based projects – since their APIs would be quite divergent, I’d imagine. Although, if the full IronMonkey -> ActionMonkey chain is complete, then I could definitely see what you’re saying, and that’d be quite cool.
Dao (August 10, 2007 at 6:05 am)
I cited John. The point is that, in order to execute a legacy script if the plugin is missing, you have to make the two versions mutually exclusive. I.e. if application/javascript;version=2 is handled, ignore the text/javascript version, and vice versa. Unless the plugin disables text/javascript entirely when application/javascript;version=2 is found, I guess that’s not possible to achieve with markup only.
startupflames.com (August 11, 2007 at 8:30 am)
Thanks MS for the Iron* ports. What is the timeline for getting these projects to production releases?
bozo (August 12, 2007 at 10:07 am)
Just what we need, more executable web content and a proliferation of languages when we can’t even make Javascript secure.
Revolution indeed. Thank God for the NoScript extension.
Ric (September 12, 2007 at 4:32 am)
What about SilverLight? Microsoft implemented
peebyenhazy (September 18, 2007 at 4:08 am)
Hello http://porn-video-of-paris-hilton.blogspot.com porn video of paris hilton porn video of paris hilton porn video of paris hilton