Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Parrot, Java, and Harmony

by dragonchild (Archbishop)
on May 17, 2005 at 19:02 UTC ( #457952=perlquestion: print w/replies, xml ) Need Help??
dragonchild has asked for the wisdom of the Perl Monks concerning the following question:

Slashdot had a couple threads about a new OSS implementation of J2SE 5 called Harmony. A common thread in the responses to both root nodes was that implementing a stable and well-performing JVM is a non-trivial task. I don't think anyone's going to disagree.

Enter Parrot. Back in 2001, Leon Brocard was reported as working on a Java bytecode -> Parrot bytecode converter. Presumably, writing a Java->Parrot compiler shouldn't be that hard, given the success of Pugs.

Am I missing something fundamental or is Harmony wasted effort? And, if so, who wants to tell them?

  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re: Parrot, Java, and Harmony
by perrin (Chancellor) on May 17, 2005 at 19:08 UTC
    The majority of the work in duplicating Java is in writing the incredibly huge class library. That's probably a bigger project by itself than all of Parrot. There is also a fair amount of stuff that is expected from a JVM these days, in terms of fancy remote debugging and profiling hooks, which may or may not be in Parrot.
        Classpath is very far from being complete.
Re: Parrot, Java, and Harmony
by hardburn (Abbot) on May 17, 2005 at 19:08 UTC

    Java (the language) -> Parrot shouldn't be any more difficult than any other language (certainlly easier than Perl5, and probably Perl6, too). Java Bytecode -> Parrot is iffy. I noticed that Microsoft ships a Java Bytecode -> CLR Bytecode converter with the .NET SDK, but I don't know how well it works.

    Any static language built on Parrot will have the disadvantage that Parrot is meant for dynamic langauges. That's a lot of extra overhead that can be ditched if you're focusing on languages that tend to be static.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: Parrot, Java, and Harmony
by radiantmatrix (Parson) on May 17, 2005 at 19:41 UTC

    The advantage to a project like Harmony, at least IMO, is to free an otherwise-acceptable langauge (Java) from the confines of a pretty stupid license granted by a pretty annoying company (Sun).

    The Java standard, you see, is public. However, the reference implementation -- that is, Sun's JDK/JRE -- is only sorta-open. The goal of Harmony is to create a JVM that is free of the PITA license of Sun's JVM, and that could (for example) be packaged alongside Apache or an application.

    The added motivation is that once such a huge task is complete, the OpenSource development model can take opportunities to improve its performance. Also, once the JVM is complete it could very easily be "ported into" projects like Tomcat, where an intimate level of integration could really improve the speed of servlets.

    As far as the Java->Parrot converter, I suspect that's a bit easier, as it could require the extant JVM to be installed (along with the extensive class library) for the conversion process. No need to write all of that JVM code from scratch to do conversion.

    The Eightfold Path: 'use warnings;', 'use strict;', 'use diagnostics;', perltidy, CGI or CGI::Simple, try the CPAN first, big modules and small scripts, test first.

Re: Parrot, Java, and Harmony
by lachoy (Parson) on May 18, 2005 at 02:54 UTC

    Prediction: Perl 6 will have not only a handful of releases but a whole slew of O'Reilly and Apress books before Harmony is usable by anyone other than the hardcore developers for a non-trivial application.

    And don't worry, plenty of people are telling them it's a wasted effort, but I don't think it matters. The BileBlog is always good for a few laughs...

    M-x auto-bs-mode

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://457952]
Approved by jfroebe
LanX ... reflecting root problems
choroba uses real lists so he can easily insert as many items in between as needed
LanX questions the integerity of this approach. ..
LanX doesn't sound natural
[LanX]: welcome to a new episode of Big Perl Theory...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2018-03-20 10:30 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (250 votes). Check out past polls.