Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl6 without GHC or Parrot?

4 views
Skip to first unread message

Andy Dougherty

unread,
Jun 22, 2006, 2:26:29 PM6/22/06
to perl6-c...@perl.org
Intriguied by the recent posts on Audrey's blog
(http://pugs.blogs.com/pugs) about Deploying Perl6 Now, I decided to take
a look and see what was possible on a system which runs neither GHC or
Parrot.

I recall hearing about misc/pX/Common/lrep before, but it looks like it's
only a very beginning implementation -- it handles a few simple
constructs, but fails on many others.

Today's blog post says there's a "new Perl5-based Perl6 compiler:"

use v6-pugs;
"hello, world".say;

$ perl -Ilib hello_world.pl

So I thought I'd try it out. Alas, it doesn't work either. First, I had
to install Module::Compile (which, in turn, required Test::Base, which, in
turn, required Spiffy). Then I had to install PadWalker. When all that
was done, it failed with:

Can't locate object method "compile" via package "Pugs::Compiler::Perl6" at lib/v6.pm line 41.
Compilation failed in require at lib/../../Pugs-Compiler-Rule/lib/Pugs/Grammar/Rule.pm line 18.
BEGIN failed--compilation aborted at lib/../../Pugs-Compiler-Rule/lib/Pugs/Grammar/Rule.pm line 18.
Compilation failed in require at lib/../../Pugs-Compiler-Rule/lib/Pugs/Compiler/Regex.pm line 10.
BEGIN failed--compilation aborted at lib/../../Pugs-Compiler-Rule/lib/Pugs/Compiler/Regex.pm line 10.
Compilation failed in require at (eval 1) line 3.
...propagated at /opt/perl/lib/5.8.8/base.pm line 85.
BEGIN failed--compilation aborted at lib/../lib/Pugs/Compiler/Perl6.pm line 9.
Compilation failed in require at lib/v6.pm line 40.

What am I missing? Or is it just not possible to run any of this stuff
without GHC?

--
Andy Dougherty doug...@lafayette.edu

Flavio S. Glock

unread,
Jun 22, 2006, 2:52:36 PM6/22/06
to perl6-c...@perl.org
Please install Pugs::Compiler::Rule (from CPAN or Pugs repo).
Thanks for testing!

- Flavio S. Glock

2006/6/22, Andy Dougherty <doug...@lafayette.edu>:

Andy Dougherty

unread,
Jun 22, 2006, 3:37:51 PM6/22/06
to Flavio S. Glock, perl6-c...@perl.org
On Thu, 22 Jun 2006, Flavio S. Glock wrote:

> Please install Pugs::Compiler::Rule (from CPAN or Pugs repo).
> Thanks for testing!

Ah. Ok. Installing Module::Compile, Test::Base, Spiffy, PadWalker,
Parse::Yapp, and then Pugs::Compiler::Rule, I get to the point where

$ cd misc/pX/Common/Pugs-Compiler-Perl6
$ perl -Ilib hello_world.pl

actually works. Well done!

Still, it fails the following tests in 01-sanity:

07-for.t
07-isa.t
07-range.t
07-ref.t
07-simple-multisubs.t
07-tailcall.t
08-test.t

as well as nearly all of the other tests under t/. I imagine you
already knew that, but I didn't, and others reading the blog might not
be aware either.

One other oddity: You can't run the test file twice without cleaning up
the generated .tc files first. Specifically:

$ perl -Ilib 01-sanity/01-tap.t
[ works ]

$ perl -Ilib 01-sanity/01-tap.t
Unmatched right curly bracket at 01-sanity/01-tap.tc line 7, at end of line
syntax error at 01-sanity/01-tap.tc line 7, near "}"

Anyway, it's remarkable how much you've accomplished. Thanks, and good
luck.

--
Andy Dougherty doug...@lafayette.edu

Audrey Tang

unread,
Jun 22, 2006, 3:47:45 PM6/22/06
to Andy Dougherty, Flavio S. Glock, perl6-c...@perl.org
2006/6/22, Andy Dougherty <doug...@lafayette.edu>:

> Still, it fails the following tests in 01-sanity:
>
> 07-for.t
> 07-isa.t
> 07-range.t
> 07-ref.t
> 07-simple-multisubs.t
> 07-tailcall.t
> 08-test.t
>
> as well as nearly all of the other tests under t/. I imagine you
> already knew that, but I didn't, and others reading the blog might not
> be aware either.

Yeah indeed, it should probably be reflected on the blog announcement
page as well.

The Parrot/Perl6 is in a very similar state -- once the the 7-* sanity
tests works for either one of the Parrot/Perl5 implementations, we can
use Test.pm on them, and the rest of the 11000+ tests becomes
available, making TDD much more effective (and more rewarding -- see
iblech++'s previous record of making three-more-tests-pass-per-day for
the JavaScript backend). I look forward to make that happen in the
Chicago hackathon. :-)

Thanks,
Audrey

Swaroop C H

unread,
Jun 22, 2006, 2:33:45 PM6/22/06
to Andy Dougherty, perl6-c...@perl.org
Hi Andy,

I think you need to do this to get it running :

[16:57] <kolibrie> fglock: so first go into Pugs-Compiler-Rule and perl
Makefile.PL
[16:58] <kolibrie> and then perl -Ilib hello_world.pl ?
[16:58] <fglock> yes, in PC-P6


Regards,
Swaroop


--
Swaroop C H
www.swaroopch.info

Audrey Tang

unread,
Jun 24, 2006, 12:36:49 AM6/24/06
to Andy Dougherty, Flavio S. Glock, perl6-c...@perl.org

在 2006/6/22 下午 12:37 時,Andy Dougherty 寫到:

> One other oddity: You can't run the test file twice without
> cleaning up
> the generated .tc files first. Specifically:
>
> $ perl -Ilib 01-sanity/01-tap.t
> [ works ]
>
> $ perl -Ilib 01-sanity/01-tap.t
> Unmatched right curly bracket at 01-sanity/01-tap.tc line 7, at
> end of line
> syntax error at 01-sanity/01-tap.tc line 7, near "}"

That has just been fixed in the repo; please install the
Module::Compile copy in Pugs's perl5/Module-Compile/ and the problem
should go away. I have pinged ingy for a new release.

Thanks,
Audrey

PGP.sig
0 new messages