Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Why no one port perl5 to Parrot?

by xiaoyafeng (Chaplain)
on Nov 27, 2012 at 05:41 UTC ( #1005794=perlquestion: print w/ replies, xml ) Need Help??
xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

The following question is where perl5 spec is. ;)

Maybe I'm not a appropriate one to ask this question, But in my opinion, it would be great news once perl5 is ported to a virtual machine(not just parrot). Let's imagine: easy translating between 2 languages, reuse the library from other dynamic language, easy compile perl5 code to excutable, a brandnew, usable threading implementation, builtin type model, .... and the most important, we still can use the modules on CPAN! (some XS module might be rewritten tho).

I'm not an expert about language compiler, but anyone can tell me what problem impede person to create a perl5 interpreter on parrot? no resource? not mature enough( or lack a perl5 spec(my 2nd question)?

Any replys?

UPDATE: I think the design of parrot is really suitable for implmenting perl, both perl5 and perl6.

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Comment on Why no one port perl5 to Parrot?
Re: Why no one port perl5 to Parrot?
by moritz (Cardinal) on Nov 27, 2012 at 05:56 UTC

    There are lots of hurdles that prevent porting of Perl 5 to a different backend than what it currently has, and Parrot in particular:

    • Perl 5 is not specified, but dictated by the current implementation
    • Perl 5 has some weird behavior in quite many places, and it's nigh impossible to reproduce the same behavior with a different implementation
    • XS. Do I need to say more?
    • Whenever you port a high-level language with as many quirks as Perl 5 has to a different runtime that wasn't specifically designed to support it, you get quite some runtime overhead, making the port slower than the C implementation, even if the new backend is faster in places.
    • Parrot still lacks the maturity that Perl 5 needs in lots of areas (IO, threads, performance).
    • Man power. Porting any non-trivial language to $anywhere is a huge effort, and needs hackers that stay committed over a long time, and invest vast amounts of time and energy.

    While many folks agree that having Perl 5 on Parrot would be a nice thing, that alone simply isn't enough to make it happen.

Re: Why no one port perl5 to Parrot?
by grondilu (Pilgrim) on Nov 27, 2012 at 09:01 UTC

    Well, if you look here on the parrot wiki, you'll see at least one project porting Perl5 to parrot.

    I have no idea how advanced this is, though.

Re: Why no one port perl5 to Parrot?
by rurban (Scribe) on Nov 27, 2012 at 15:03 UTC
    parrot is currently too slow to be an efficient competitor, there's not much progress, and there was heavy mismanagement. Feature-wise it is an interesting alternative.

    But there is a lot going on.

    Larry is already writing a p5 grammer for perl6/nqp, and had with MAD a working src-level translator.
    Flavio Glock has with perlito a src level translator and compiler already.

    perl6 is quite perl5 compatible, with much more features and better performance than perl5 for complicated use-cases, which you would call "Modern Perl" (i.e. Moose, Grammars, ...). But it is totally post-modern perl. (5+6=11) is an umbrella project to try to mix/replace the various parts, parser, compiler/optimizer, runtime. See #perl11

    I am thinking of an implementation based on vmkit to replace parrot or write a better p5 vm, codename p2.

    rakudo is working into similar directions, making nqp on jvm or mono or whatever possible.

    Perl5 XS is not that big a deal. Either throw it away as it is inefficient and hard to work with anyway. Or provide convenience wrappers. Better languages provide better glue interfaces. Inline e.g. is much better, but you still have to deal with the XS API.

      All true and instructive.

      One might also mention that Perl6 is specified to be able to include some Perl5 code with the 'use v5 {}' construct. This means that eventually Perl5 will be ported to parrot, at least via the rakudo implementation of Perl6.

      We just have to be patient.

      Larry is already writing a p5 grammer for perl6/nqp, and had with MAD a working src-level translator.

      Very interesting, Is this work there somewhere on the internet or Larry is still developing it in private.

      I am thinking of an implementation based on vmkit to replace parrot or write a better p5 vm, codename p2.

      Again is this work there some where on the internet.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1005794]
Approved by moritz
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-09-20 04:42 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (153 votes), past polls