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

[perl #19610] [PATCH] New language support: Ook!

24 views
Skip to first unread message

Nicholas Clark

unread,
Dec 30, 2002, 6:45:19 PM12/30/02
to perl6-i...@perl.org
On Mon, Dec 30, 2002 at 11:09:07PM +0000, Jerome Quelin wrote:
> Ok, about this implementation:
> - this is a compiler (and not an interpreter) that spits Parrot
> assembly code (yes, I'm targeting Parrot).
> - it implements every Ook! instruction but the "Ook. Ook!" one. I'll
> work on it later.
> - currently I'm just printing on stdout the resulting parrot code, I
> lack an eval instruction in Parrot. Dan, Leo? :-)

Because what I said I'd really like (apart from "moon on a stick",
"a new apocalypse" (and "a pony", which Jerome had to remind me about))
would be a compiler that reads in Ook!, creates parrot bytecode on the fly,
and then calls it, without using temporary files.

> Disclaimer: it's all of Nicholas Clark's fault. Really. He's the one to
> take the blame for it.

Indeed. However, when I tried compiling my Ook! test program:

Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook.
Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook. Ook? Ook! Ook? Ook. Ook?
Ook. Ook. Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook!
Ook. Ook? Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook!
Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook! Ook. Ook? Ook. Ook? Ook. Ook?
Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook? Ook.
Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook? Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook! Ook. Ook? Ook. Ook? Ook.
Ook! Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook?
Ook! Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook.
Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook! Ook. Ook?
Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook? Ook? Ook. Ook. Ook. Ook? Ook.
Ook? Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook! Ook! Ook? Ook!
Ook? Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook.
Ook. Ook. Ook? Ook. Ook? Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook. Ook?
Ook! Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook.
Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook! Ook. Ook?
Ook. Ook? Ook. Ook? Ook! Ook? Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook? Ook.
Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook. Ook? Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook? Ook. Ook! Ook.

I got this:

Label KOO1_2 already exists at ../../assemble.pl line 557.

(admittedly from a pre-built parrot that is about 2 weeks old)

Nicholas Clark

Nicholas Clark

unread,
Dec 30, 2002, 7:02:17 PM12/30/02
to perl6-i...@perl.org
On Mon, Dec 30, 2002 at 11:45:19PM +0000, Nicholas Clark wrote:

> Indeed. However, when I tried compiling my Ook! test program:

> I got this:


>
> Label KOO1_2 already exists at ../../assemble.pl line 557.
>
> (admittedly from a pre-built parrot that is about 2 weeks old)

Also on a clean checkout I've just built

Admittedly my program may not be portable Ook! as it does assume that
cells wrap round from 255 to 0
The original brainfuck version worked fine on Leon's interpreter.
(I find Ook! too hard - I'm just another brainfuck monkey)

Nicholas Clark

Leopold Toetsch

unread,
Dec 30, 2002, 7:30:14 PM12/30/02
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
Jerome Quelin (via RT) wrote:

> # New Ticket Created by Jerome Quelin
> # Please include the string: [perl #19610]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19610 >

> - currently I'm just printing on stdout the resulting parrot code, I
> lack an eval instruction in Parrot. Dan, Leo? :-)


Here is the solution of our perl6 bootstrapping problem, I'll make an I<eval> ops ...


> +Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
> +Ook. Ook. Ook. Ook. Ook! Ook?


... and you have only to reimplement P6C - Ook!

leo - is it 1:30 here or do I have already 5 beers or both ;-)

Daniel Grunblatt

unread,
Dec 31, 2002, 12:10:56 PM12/31/02
to Leopold Toetsch, perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
On Monday 30 December 2002 21:30, Leopold Toetsch wrote:
> Jerome Quelin (via RT) wrote:
> > # New Ticket Created by Jerome Quelin
> > # Please include the string: [perl #19610]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19610 >
> >
> > - currently I'm just printing on stdout the resulting parrot code, I
> > lack an eval instruction in Parrot. Dan, Leo? :-)
>
> Here is the solution of our perl6 bootstrapping problem, I'll make an
> I<eval> ops ...

May be you can use PDB_eval (If it's still around)

Jerome Quelin

unread,
Dec 31, 2002, 12:18:36 PM12/31/02
to Leopold Toetsch, perl6-i...@perl.org
Leopold Toetsch wrote:
> > - currently I'm just printing on stdout the resulting parrot code,
> > I lack an eval instruction in Parrot. Dan, Leo? :-)
> Here is the solution of our perl6 bootstrapping problem, I'll make an
> I<eval> ops ...

Nice to see how dummy languages make the whole stuff advance... :o)


> > +Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
> > Ook. Ook. Ook.
> > +Ook. Ook. Ook. Ook. Ook! Ook?
> ... and you have only to reimplement P6C - Ook!

Sorry, I didn't get that one. Could you explain please?


Jerome
--
jqu...@mongueurs.net

Dan Sugalski

unread,
Dec 31, 2002, 12:49:55 PM12/31/02
to Jerome Quelin, Leopold Toetsch, perl6-i...@perl.org
At 6:18 PM +0100 12/31/02, Jerome Quelin wrote:
>Leopold Toetsch wrote:
>> > - currently I'm just printing on stdout the resulting parrot code,
>> > I lack an eval instruction in Parrot. Dan, Leo? :-)
>> Here is the solution of our perl6 bootstrapping problem, I'll make an
>> I<eval> ops ...
>
>Nice to see how dummy languages make the whole stuff advance... :o)

There should actually be one spec'd in PDD6. Let me check...

No. Hrm. I'll go fix. Back in a bit.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Simon Cozens

unread,
Dec 31, 2002, 12:23:03 PM12/31/02
to perl6-i...@perl.org
bugs-...@netlabs.develooper.com (Jerome Quelin) writes:
> Thanks to our dear summarizer, I'm now known (from a googlism point of
> view) as 'one of the "let's implement a bunch of languages on parrot"
> crew'. So, in order to prove him right definitely (and also because
> orang-utans should also benefit from Parrot's speed), here's a new
> language supported by Parrot: the Ook! language.

Shouldn't this be reworked as a patch to Acme::Ook?

--
<Masque> It's all fun and games until someone loses an eye.
<purl> Then it's a sport!

Dan Sugalski

unread,
Dec 31, 2002, 1:14:30 PM12/31/02
to Jerome Quelin, Leopold Toetsch, perl6-i...@perl.org
At 12:49 PM -0500 12/31/02, Dan Sugalski wrote:
>At 6:18 PM +0100 12/31/02, Jerome Quelin wrote:
>>Leopold Toetsch wrote:
>>> > - currently I'm just printing on stdout the resulting parrot code,
>>> > I lack an eval instruction in Parrot. Dan, Leo? :-)
>>> Here is the solution of our perl6 bootstrapping problem, I'll make an
>>> I<eval> ops ...
>>
>>Nice to see how dummy languages make the whole stuff advance... :o)
>
>There should actually be one spec'd in PDD6. Let me check...
>
>No. Hrm. I'll go fix. Back in a bit.

Okay, fix to docs partially checked in. The compile and compreg ops
are defined, and I'll work on the rest of the dynamic bytecode
generation ops today.

This doesn't actually *implement* them, but that should come next.

Nicholas Clark

unread,
Dec 31, 2002, 1:37:13 PM12/31/02
to Jerome Quelin, Leopold Toetsch, perl6-i...@perl.org
On Tue, Dec 31, 2002 at 06:18:36PM +0100, Jerome Quelin wrote:
> Nice to see how dummy languages make the whole stuff advance... :o)

Then there's the zcode interpreter...
(dynamic opcode library loading, foreign bytecode translation)

Nicholas Clark

Jim Cromie

unread,
Dec 31, 2002, 9:30:15 AM12/31/02
to perl6-i...@perl.org
Nicholas Clark wrote:

>Admittedly my program may not be portable Ook! as it does assume that
>cells wrap round from 255 to 0
>The original brainfuck version worked fine on Leon's interpreter.
>(I find Ook! too hard - I'm just another brainfuck monkey)
>
>Nicholas Clark
>

>.
>
>
>

I hesitate to suggest (seems there are better things to discuss), but

bf -> brainfart

Its closer to original name, not (too) offensive, and serves as an estimate
the language's sophistication and expressiveness.

Dan Sugalski

unread,
Dec 31, 2002, 3:06:59 PM12/31/02
to Jim Cromie, perl6-i...@perl.org
At 9:30 AM -0500 12/31/02, Jim Cromie wrote:
>Nicholas Clark wrote:
>
>>Admittedly my program may not be portable Ook! as it does assume that
>>cells wrap round from 255 to 0
>>The original brainfuck version worked fine on Leon's interpreter.
>>(I find Ook! too hard - I'm just another brainfuck monkey)
>>
>>Nicholas Clark
>>
>
>I hesitate to suggest (seems there are better things to discuss), but
>
>bf -> brainfart

Nope. The big issue with something like that is that it's not our
language, and thus we're not really the ones to be deciding a new
name for it. BF is what they use in a number of places, hence what we
went with.

Nicholas Clark

unread,
Dec 31, 2002, 7:34:15 PM12/31/02
to perl6-i...@perl.org, Jerome Quelin, bugs-...@rt.perl.org
On Mon, Dec 30, 2002 at 11:09:07PM +0000, Jerome Quelin wrote:
> # New Ticket Created by Jerome Quelin
> # Please include the string: [perl #19610]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19610 >
>
>
> Thanks to our dear summarizer, I'm now known (from a googlism point of
> view) as 'one of the "let's implement a bunch of languages on parrot"
> crew'. So, in order to prove him right definitely (and also because
> orang-utans should also benefit from Parrot's speed), here's a new
> language supported by Parrot: the Ook! language.

On Tue, Dec 31, 2002 at 06:15:43PM +0100, Jerome Quelin wrote:

> Oh, btw. This patch assumes the first Ook! patch is already commited.

Thanks, both applied

Nicholas Clark

0 new messages