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

Re: Punie

5 views
Skip to first unread message

Autrijus Tang

unread,
Jul 12, 2005, 12:41:00 AM7/12/05
to Allison Randal, perl6-i...@perl.org, perl6-c...@perl.org
On Mon, Jul 11, 2005 at 09:35:11PM -0700, Allison Randal wrote:
> I'd like to add Punie to the Parrot repository. It's a first step
> toward a compiler for Perl 1 running on Parrot. Currently it's *very*
> simple: it only parses and compiles a single statement printing a
> single digit -- but it uses PGE grammars and the stub in ast/ to do it.

Cool! However, I wonder if Punie is indeed targetting Perl 1.

As Schwern will attest, Perl 1 is a quite complicated language, with
nullary, unary, binary and ternary functions, arrays, hashes, pattern
matches, transliteration, format, loop control and labels.

Is it Punie's goal to support all of those semantic constructs? If not,
maybe call it something else than Perl 1, to avoid confusion? :)

Thanks,
/Autrijus/

Autrijus Tang

unread,
Jul 12, 2005, 12:56:28 AM7/12/05
to Autrijus Tang, Allison Randal, perl6-i...@perl.org, perl6-c...@perl.org
On Tue, Jul 12, 2005 at 12:41:00PM +0800, Autrijus Tang wrote:
> Is it Punie's goal to support all of those semantic constructs? If not,
> maybe call it something else than Perl 1, to avoid confusion? :)

(more bikesheding)

If the goal is to demonstrate the capability of the upcoming expression
parser and minimal AST, I think "bc", the arbitrary precision calculator
language, is a good candidate.

Thanks,
/Autrijus/

Allison Randal

unread,
Jul 12, 2005, 2:43:55 AM7/12/05
to Autrijus Tang, perl6-i...@perl.org, perl6-c...@perl.org
On Jul 11, 2005, at 21:41, Autrijus Tang wrote:
>
> Cool! However, I wonder if Punie is indeed targetting Perl 1.
>
> As Schwern will attest, Perl 1 is a quite complicated language, with
> nullary, unary, binary and ternary functions, arrays, hashes, pattern
> matches, transliteration, format, loop control and labels.

As a test case for the Parrot compiler tools, those are certainly
useful features to implement. We'll have to deal with them in more
"serious" languages anyway. But, we'll see. I'm not promising it'll be
an exact match to Perl 1 semantics, but I'd like to push it as close to
supporting the full Perl 1 test suite as possible.

> Is it Punie's goal to support all of those semantic constructs? If
> not,
> maybe call it something else than Perl 1, to avoid confusion? :)

How about Punie? :)

Allison

Autrijus Tang

unread,
Jul 12, 2005, 3:37:29 AM7/12/05
to Allison Randal, Autrijus Tang, perl6-i...@perl.org, perl6-c...@perl.org
On Mon, Jul 11, 2005 at 11:43:55PM -0700, Allison Randal wrote:
> >As Schwern will attest, Perl 1 is a quite complicated language, with
> >nullary, unary, binary and ternary functions, arrays, hashes, pattern
> >matches, transliteration, format, loop control and labels.
>
> As a test case for the Parrot compiler tools, those are certainly
> useful features to implement. We'll have to deal with them in more
> "serious" languages anyway. But, we'll see. I'm not promising it'll be
> an exact match to Perl 1 semantics, but I'd like to push it as close to
> supporting the full Perl 1 test suite as possible.

That's cool. In that case I'll commit the test suite from perl-1.0_16
as TODO tests to the Punie tree, if that's okay with you. :)

Thanks,
/Autrijus/

Allison Randal

unread,
Jul 12, 2005, 3:17:48 PM7/12/05
to Autrijus Tang, perl6-i...@perl.org, perl6-c...@perl.org
On Jul 12, 2005, at 0:37, Autrijus Tang wrote:
>
> That's cool. In that case I'll commit the test suite from perl-1.0_16
> as TODO tests to the Punie tree, if that's okay with you. :)

Most welcome. I'm following a naming convention in the t/ directory of
changing the original "io.print"-style file names to "io_print.t", to
make it easier to see the correspondence between the Perl 1 and Punie
tests.

Of course, the ultimate test will eventually be running the Perl 1 test
suite as-is, without pre-digesting it into Parrot::Test calls. :)

Allison

Autrijus Tang

unread,
Jul 17, 2005, 9:50:04 AM7/17/05
to Allison Randal, Autrijus Tang, perl6-i...@perl.org, perl6-c...@perl.org
On Tue, Jul 12, 2005 at 12:17:48PM -0700, Allison Randal wrote:
> On Jul 12, 2005, at 0:37, Autrijus Tang wrote:
> >That's cool. In that case I'll commit the test suite from perl-1.0_16
> >as TODO tests to the Punie tree, if that's okay with you. :)
>
> Most welcome. I'm following a naming convention in the t/ directory of
> changing the original "io.print"-style file names to "io_print.t", to
> make it easier to see the correspondence between the Perl 1 and Punie
> tests.

Done as such. I have committed the five sanity tests in Perl 1.0.16's
distribution, similar to the intent of geoffb's Pugs's t/01-sanity/* that
helped Perl6->PIL->PIR compilation effort.

> Of course, the ultimate test will eventually be running the Perl 1 test
> suite as-is, without pre-digesting it into Parrot::Test calls. :)

Actually, if Punie can pass the five sanity tests, it would be strong
enough to run the tests as-is, since all they do is print strings with
conditional constructs. I look forward to that day -- a TODO or
ROADMAP in languages/punie/ will help, too. :-)

Thanks,
/Autrijus/

0 new messages