Virtual Machine War

by David Sklar

If this were just a language battle of Perl 6 vs. C#, it wouldn't merit any more notice than any other matchup in the perpetual linguistic conflict that is constant among programmers. What sets this face-off apart is that each of these VMs can host other languages as well. Running on top of Parrot, Python code can use Perl libraries and vice versa. Running on top of the CLR, C#, J#, Visual Basic.NET code can perform similar feats of reuse.

Rarely are functions in the standard C library reimplemented in systems programming. This kind of wheel-reinvention happens all the time in web apps, however. The multi-language capabilities of Parrot and the CLR provide the opportunity for each system to have a "libc for the web" that handles standard functionality: handling form and URL data, serving and consuming web services, processing XML, and all of the other tasks that make up the plumbing of web applications. No matter what language you write your application in, you can use the same core library functions. If knowing a language's library APIs is as crucial as knowing a language's syntax, a common core library makes you productive in new languages much more quickly.

Microsoft's ASP.NET libraries, also implemented for Mono, are a shot at the prize. There is plenty of code in CPAN that, converted to Perl 6, could also be a contender.

So why was php-con a skirmish? The talk by Sterling Hughes and Thies Arntzen about their plans to build a PHP-to-Parrot compiler tug the future of PHP towards Parrot. But there's also an existing project to build PHP#, a version of PHP that runs on the CLR. (Memo to Microsoft: hire Alan Knowles and/or anyone else you can get your hands on to make PHP# a reality if you want to win this battle.) Brian Goldfarb, a Product Manager from Microsoft, came to PHP-Con to learn from folks there.

Microsoft was blindsided by Linux and now is attempting to avoid their mistakes in the world of scripting languages and PHP. With little to no commercial backing, PHP has become an incredibly popular on-ramp to small-time web developers. That's supposed to be Visual Basic's niche. So maybe by understanding PHP, Microsoft can compete better in that world.

There is a lot going on that makes the outcome of this titan clash still unclear. ActiveState is working on Perl for .NET. The .NET development model is tightly integrated with Visual Studio, which is designed with languages like Visual Basic and C# in mind, so day-to-day comfort of application development doesn't yet quite sync with the technical possibility of running other languages on the CLR. The CLR and Mono are available now, while Perl 6 is not. PHP 5 is on the way ("before Perl 6" I think is the target release date) and plenty of people will stick with PHP 4, let alone move from PHP 5 to a future Parrot/CLR based version of PHP in a few years. IIS and Windows are tuned to provide the best operating environment for .NET -- what kind of tight integration will be developed between Apache, Linux, and Mono or Parrot?

Oh yeah, Java is still around, right? Visual J# seems focused on migrating developers away from Java and I don't expect a version of Java for Parrot (but open-source developers have built all sorts of crazy projects). Both Parrot and the CLR have learned from the Java VM's host-only-one-language mistake. Given the $zillions invested Java deployments to date, I suppose Java's not disappearing any time soon, but Sun needs to work on how to stay relevant in the multi-language VM world of the near future.

What do you think will happen in the battle between .NET and Parrot?


2003-10-30 13:24:37
JVM multi-language years ago
I hesitated to even bother because it only took 2 seconds on Google.

2003-10-30 14:35:29
JVM multi-language years ago
Thanks for the link. I stand corrected on the technical possibility of hosting another language on the JVM.

However, the risk of only spending 2 seconds on finding a link is that you don't actually digest what's behind the link. The list you cited refers to an article that pretty much demolishes the idea that the JVM is hosting languages other than Java in any practical sense. Even the "rebuttal" which highlights a Smalltalk-like language hosted on the JVM, doesn't provide a path for more widely deployed languages to be implemented on the JVM. And Sun certainly isn't pushing for it.

2003-10-30 15:55:24
JVM multi-language years ago
It is certainly true that languages other than the Java language have been run on the JVM. Gosling has pointed this out, I believe, in at least one interview.

It is also true that Microsoft shipped a "shared source" implementation of the .NET runtime for BSD.

However, both of these efforts can be dismissed as academic exercises. There are no production quality implementations of non-Java languages for the JVM, just as there are no production quality MS .NET offerings for *nix operating systems. I would, of course, be very excited to find a counter example of which I'm currently unaware, but this is the state of the world as I know it today.

2003-10-30 17:06:10
is it a war?
I will grant that my knowledge of this subject comes largely from the perl6-internals mailing list, but it would seem to me to be hard to wage a war between VM's that serve different programming niches.

CLR and Mono are targeted towards implementing fairly static languages, while Parrot looks to serve dynamic languages. This is a big reason why Parrot was started in the first place, rather than aiming to make Perl run on CLR or other VM's. There are things that dynamic languages do or will do that don't have good implementation support on CLR and the like

2003-10-31 05:38:14
JVM multi-language years ago
Um... Jython is production-quality as shown by the commercial companies that are using it to provide extensibility for various applications.

On the other hand, both the CLR and Parrot Python implementations were research exercises that were far from complete and quite slow.

2003-10-31 05:38:21
JVM multi-language years ago
Maybe I'm not fully understanding your point, but what about Jython - - ? I've only briefly looked at it, but isn't that essentially Python running on a JVM?

2003-10-31 07:20:12
is it a war?
I think folks at Microsoft (and Ximian/Novell, I suppose) would like CLR-hosted languages to be used for the things that dynamic Parrot-friendly languages are used for. Hence the conflict, whether Parrot is spoiling for a fight or not.
2003-10-31 11:24:22
JVM multi-language years ago
The "article" is by Roger Sessions, a notorious Microsoft shill. And putting the word rebuttal in quotes the way you did smacks of prejudice (I did this myself deliberately to illustrate the point).

It's true that Sun isn't pushing for another language -- why would they? They have nothing to gain and a lot to lose.

I like Open Source, but the idea of a match between Parrot and the CLR in the commercial world is just ludicrous. The JVM, on the other hand, is a "contendah".

2003-10-31 12:01:28
is it a war?
well, then that is the old my language is better than your language holy war, and isn't specifically VM-specific. No doubt the war is much more a reality for those _using_ the languages than for those writing a language to run on a particular VM
2003-11-22 17:13:14
JVM multi-language years ago
True - jython is quite useable, but it constantly seems to be far behind in implementing the current Python language releases. Of even more concern is that it is unclear how much reliable support there is in developing/maintaining jython.
2004-02-06 08:31:51
The premise, despite its popularity, is wrong
The whole "this is a war!" premise is just flat-out wrong. It isn't a war, and it never has been. There won't ultimately be one big "winner" here. The world is an enourmous, complex place, with many different, varying, sometimes conflicting conflicting needs and requirements, and to think that a single anything could reasonably satisfy them all's overwhelmignly arrogant, hopelessly naive, and terribly foolish.

.NET will have its niche, as will Parrot, the JVM, and VMs that come along later, as do the VMs that came before us did and still do. The only thing that looking on this as a "war" will do is make sure that everyone loses some in the end. Hardly a productive outcome, unless you're feeling petty.

2004-02-18 11:41:53
I can end the war with two words (kinda)

2004-07-27 07:30:00
other explanations for lack of jvm's other lanugages
i think its worth considering that there are not many production languages available for the jvm because of the lack of demand - typically java is exactly what people want to use when writing software intended to run on a jvm

if people had a task that is suited to perl, then they can use perl :)

if the perl community wants to develop a vm in a hobbiest capacity then this is fine, but imho the world of commercial software construction is moving on to .NET CLR and at least for some time to come the JVM

2004-07-27 07:35:32
perl 6 compiler to possibly target JVM and CLR?
this sounds interesting..

also, there is a scripting language called "groovy" which has been designed for the jvm this maybe is different from the gist of the article of porting existing languages to the jvm though..