develooper Front page | perl.perl6.compiler | Postings from May 2005

Re: How to compile to PIR or byte codes

Thread Previous
From:
Autrijus Tang
Date:
May 20, 2005 09:05
Subject:
Re: How to compile to PIR or byte codes
Message ID:
20050520160431.GA4276@aut.dyndns.org
On Fri, May 20, 2005 at 03:13:52PM +0100, Colin Paul Adams wrote:
> I am trying to work out how to compile a perl script using pugs.
> (Am I on the right mailing list?)

Well, yes and no.  To run Perl 5 in Parrot, you want the ponie-dev
mailing list -- this is perl6-compiler after all. :-)

> If I do pugs -h, then it suggests to me the -C option will do the
> trick, but does not say what value the backend might be.

Thanks, the latest trunk now suggests ays:

    -Cbackend        compile using the compiler backend
		    (valid backends are: Pugs, Parrot, Haskell

> so it seems to dislike the for, but I guess it's something that comes
> before that. Is there a list of incompatibilites with perl 5 anywhere?
> (I might add that I know very little at all about perl).

The short answer is that Perl6->Parrot codegen is currently very
primitive in Pugs; I expect to improve it next month with Leo and Chip,
but currently it's not robust at all.

However, for some (minimal) success in embedding Perl 6 via Parrot, see
mod_parrot, which has a mod_pugs layer:

    http://www.smashing.org/mod_parrot/

The long answer is that, in general, Perl 5 script will not run as Perl 6
without some conversion.  The definitive documents about Perl 6 is the
Synopses:

    http://dev.perl.org/perl6/

There are various quick-references in the Pugs tree, assuming you know
some Perl 5:

    http://svn.openfoundry.org/pugs/docs/quickref/

There is also a Perl 5 to Perl 6 "porting guide":

    http://perlmonks.org/index.pl?node_id=442402

Larry is working on a translator that can compile Perl 5 program into
Perl 6, known as PPD, but it's not released yet.  Nicholas Clark is heading
an effort to run Perl 5 on top of Parrot VM, known as Ponie:

    http://poniecode.org/

Thanks,
/Autrijus/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About