Home

Advertisement

Customize

Firefox multilanguage

Mozilla supporting IronPython and IronRuby seems like pretty big news...not sure how I missed it. I'm going to have to pay closer attention to happenings in Mozilla-land.

So if I understand correctly, the way it would work is that Tamarin would include a translator from CIL bytecode to Tamarin bytecode? So finally when a website includes: <script lang="text/python">, what would happen is that the code would be compiled via IronPython (which itself was originally in CIL form, now translated to Tamarin) to CIL, and then Tamarin would translate that to its bytecode, and execute it?

Wow...why aren't they just using Mono directly?

Comments

(Anonymous)

I think it will be compiled to tamarin bytecode directly, as that is the only way it would make sense.
How? IronPython itself is written in C# and (Iron)Python. They'd write a new Python->TamarinBC compiler, and just use the IronPython runtime libraries?

staged development

Our goals with IronMonkey are eventually to support memory-safe implementations of Python and Ruby using as much unpatched IronPython and IronRuby code as we can. Bytecode translation is just a quick and dirty way to get something working on Tamarin; it may be bypassed quickly by writing an alternative code generator. You'd still have to run mcs offline and download bytecode, so this stage would not reach the final goal of <script type="application/x-python"> or whatever, but one step at a time. Self-hosting a compiler front end and code generator is for later.

Seo Sanghyeon is alread moving fast, so check his updates to the http://wiki.mozilla.org/Tamarin:IronMonkey page.

Why not Mono? We've been over this before, for over three years (see http://www.research.ibm.com/vee04/talks.html). Browsers that actually gain and hold market share have to be small in code size and free of patent FUD. They also must run JS quickly, parsing it very quickly in order to avoid losing page load benchmark wars (and real usability contests in the market). Mozilla's search for a VM partner was consummated last year with Adobe's contribution of Tamarin. Tamarin is all about ECMAScript, although without a self-hosted compiler as of today (one's under construction), and focused more on typed code than untyped. So we're aligned on growing Tamarin to support JS2/ES4 as well as other languages.

Even if we could ignore the patent threats (which are not unique to Mono, but they're deal killers for everyone but MS and Novell), there's no way we could justify a multi-year reset to try to get Mono to fit, and at the same time to get its "JScript" equivalent to work compatibly with SpiderMonkey and the DOM. Instead, we are merging SpiderMonkey and Tamarin in stages, keeping compatibility as we go. See http://wiki.mozilla.org/JavaScript:ActionMonkey for details.

Accusations of NIH are easy to make, especially if it all looks the same from 100,000 feet. VMs are not all the same; the patent and performance issues do matter (even for Mono vs. .NET, performance differences still cause problems); careful with those cheap NIH shots.

/be

Re: staged development

Thanks for the response Brendan! I wasn't suggesting that all your work was just NIH syndrome. You answered a lot of my question, and I appreciate it.

I think this work's pretty interesting, as the engineer in me cringes at the thought that the current state of software is that JavaScript is essentially the common bytecode (c.f. Google Web Toolkit). The .NET framework is extremely well designed - having the code we download JIT-able, being able to hook into all the great developer tools (i.e. debuggers) available for a platform like .NET seemed to have a lot of potential.

Anyways though, I see the rationale for the current direction. The possibility of writing code in Python instead of JavaScript is pretty exciting.
Not Invented Here?

*sigh*

Advertisement

Customize