[Applied] Yet another MANIFEST patch

2002-04-06 Thread Josh Wilmes
Applied this one. No time to look at the others tonight, but i'll pick them up if nobody else does. --Josh At 19:03 on 04/06/2002 EST, Simon Glover <[EMAIL PROTECTED]> wrote: > > > --- MANIFEST.old Sat Apr 6 13:35:21 2002 > +++ MANIFEST Sat Apr 6 13:37:17 2002 > @@ -163,6 +163,7 @@

Unary dot

2002-04-06 Thread Piers Cawley
Whilst I've been hacking the perl 6 scheme interpreter I've found myself using code like the following method get_token( $self: ) { given $self.get_char { when !defined { fail IOException: msg=> "EOF" } when /\s/ { $self.get_token } when '(' { $the_left_paren }

Re: Ex4 smart match question

2002-04-06 Thread Peter Scott
At 10:34 AM 4/7/02 +1000, Damian Conway wrote: > > It's very cool--but why is it $key =~ %hash but $value =~ @array rather > > than one way or the other? > >Because it's *both* ways. Perl 6's C<=~> operator is reversible. > >So you can write: > > $key =~ %hash > >or: > > %hash =~ $

[TENTATIVE PATCH] Label arg type

2002-04-06 Thread Andrew J Bromage
G'day all. The optimizer needs to know what operands are INTs and which are actually code targets in disguise in order to be able to restructure code. The patch below gives one simple solution, but I'm not sure that it's the "best". I suspect that code processors (including optimizers) might ne

[PATCH] Core.ops documentation patch

2002-04-06 Thread Simon Glover
The enclosed patch expands (and hopefully clarifies) the documentation for rotate_up, plus fixes one or two other niggles in the docs. Simon --- core.ops.oldSat Apr 6 19:12:43 2002 +++ core.opsSat Apr 6 21:12:42 2002 @@ -229,8 +229,13 @@ =item B(in INT, in NUM) +=item B(in I

[PATCH] Substr tests

2002-04-06 Thread Simon Glover
Enclosed patch adds a number of tests for the 5-argument form of substr. Simon --- t/op/string.t.old Sat Apr 6 19:56:32 2002 +++ t/op/string.t Sat Apr 6 20:38:59 2002 @@ -1,6 +1,6 @@ #! perl -w -use Parrot::Test tests => 64; +use Parrot::Test tests => 76; output_is( <<'CODE',

Re: classes, interfaces, properties and 'is'

2002-04-06 Thread Damian Conway
Melvin Smith wrote: > I see the potential for another Perl 'non-warning' bug, where > someone typed: > > class Appliance { > ...mucho lines of code... > } > > class Toaster is appliance { > ... > } That's probably an "Undefined property 'appliance' ascribed to class Toaster" error. > It sca

Re: Ex4 smart match question

2002-04-06 Thread Damian Conway
John A asked: > > This new turbo-charged 'smart match' operator will also work on arrays, > > hashes, and lists: > It's very cool--but why is it $key =~ %hash but $value =~ @array rather > than one way or the other? Because it's *both* ways. Perl 6's C<=~> operator is reversible. So you can

[PATCH] Stacks tests

2002-04-06 Thread Simon Glover
This patch contains several more tests for the stack ops, in particular for rotate_up. Simon --- t/op/stacks.t.old Sat Apr 6 13:47:09 2002 +++ t/op/stacks.t Sat Apr 6 14:58:01 2002 @@ -1,6 +1,6 @@ #! perl -w -use Parrot::Test tests => 20; +use Parrot::Test tests => 28; use Test:

[PATCH] Yet another MANIFEST patch

2002-04-06 Thread Simon Glover
--- MANIFEST.oldSat Apr 6 13:35:21 2002 +++ MANIFESTSat Apr 6 13:37:17 2002 @@ -163,6 +163,7 @@ languages/cola/cola.l languages/cola/cola.y languages/cola/examples/calc.cola +languages/cola/examples/expressions.cola languages/cola/examples/fib.cola languages/cola/examples/life

Re: $^a, $^b, and friends

2002-04-06 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > : In a use.perl post not far away I sketched out something like the following: > : > : module foo is Mixin { > : > : sub category($category, &block) { > : &block.abstract_syntax_tree.walk_with -> $node { > :

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote : > > It's not clear that the lexer is a separate entity any more. Lexers > were originally invented as a way of abstracting out part of the > grammar so that it could be done in a separate pass, and to simplify > the grammar for the poor overworked parser. Indeed. Another bene

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Dan Sugalski wrote in perl.perl6.language : > > Don't forget, we already change parsing rules at compile time. Perl's > got three (maybe four) different sets of rules as it is: > >*) Normal perl >*) Regexes >*) Double-quoted strings >*) Single-quoted strings > > Adding another,

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Piers Cawley writes: : In a use.perl post not far away I sketched out something like the following: : : module foo is Mixin { : : sub category($category, &block) { : &block.abstract_syntax_tree.walk_with -> $node { : when AST::Method { : .attrib(cat

Re: $^a, $^b, and friends

2002-04-06 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Rafael Garcia-Suarez writes: > : Larry Wall wrote in perl.perl6.language : > : > > : > Such a grammar switching routine could operate either over a lexical > : > scope or over the rest of the file. The only restriction is that > : > one module not clobbe

Re: Tail Recursion optimization

2002-04-06 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 11:45 PM +0100 4/5/02, Piers Cawley wrote: >>So, here I am working on a Scheme interpreter in Perl 6, and I'm >>trying to write it in a (for want of a better description) >>'Scheme-like' fashion with lots of recursion. >> >>The trouble is, unless Perl

Re: Tail Recursion optimization

2002-04-06 Thread Larry Wall
=?iso-8859-1?q?Jonathan=20E.=20Paton?= writes: : Anything that touches string evaluation (Perl5's eval"") could harbour : caller(), this wouldn't matter unless there was a way to proprogate : exceptions out of an eval"" - and I bet someone already has the : appropriate RPC written. Well, eval pes

Re: Tail Recursion optimization

2002-04-06 Thread Larry Wall
=?iso-8859-1?q?Jonathan=20E.=20Paton?= writes: : > : Piers Cawley writes: : > : : > : So, here I am working on a Scheme interpreter in Perl 6, and I'm : > : trying to write it in a (for want of a better description) : > : 'Scheme-like' fashion with lots of recursion. : > : : > : The trouble is,

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Rafael Garcia-Suarez writes: : Larry Wall wrote in perl.perl6.language : : > : > Such a grammar switching routine could operate either over a lexical : > scope or over the rest of the file. The only restriction is that : > one module not clobber the grammar of a different module. : > : > Basica

Re: Questions about private variables

2002-04-06 Thread Larry Wall
Piers Cawley writes: : Um... there'd be a syntax error before that. "\\=" should be "//=" surely? The //= operator is spelled \\= on Windows. ;-) Larry

Re: Tail Recursion optimization

2002-04-06 Thread Dan Sugalski
At 11:45 PM +0100 4/5/02, Piers Cawley wrote: >So, here I am working on a Scheme interpreter in Perl 6, and I'm >trying to write it in a (for want of a better description) >'Scheme-like' fashion with lots of recursion. > >The trouble is, unless Perl6 is going to be guaranteed to do >optimization o

Re: $^a, $^b, and friends

2002-04-06 Thread Dan Sugalski
At 2:34 PM -0700 4/5/02, Luke Palmer wrote: > > You can do anything you like if you mess with the parser. Changing >> the rules for recognizing an identifier would be trivial. > >Does this refer to messing with the parser... compile time (that is, when >Perl compiles, not when Perl is compiled)

Re: Tail Recursion optimization

2002-04-06 Thread Jonathan E. Paton
> >> : Piers Cawley writes: > >> : ... > >> : The trouble is, unless Perl6 is going to be guaranteed to do > >> : optimization of tail calls, this is going to lead to horribly slow > >> : code. So, do I bite the bullet and recast some of the functions in an > >> : iterative vein, or do I trust t

Re: Tail Recursion optimization

2002-04-06 Thread Piers Cawley
"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: >> : Piers Cawley writes: >> : >> : So, here I am working on a Scheme interpreter in Perl 6, and I'm >> : trying to write it in a (for want of a better description) >> : 'Scheme-like' fashion with lots of recursion. >> : >> : The trouble is, unles

Re: Tail Recursion optimization

2002-04-06 Thread Jonathan E. Paton
> : Piers Cawley writes: > : > : So, here I am working on a Scheme interpreter in Perl 6, and I'm > : trying to write it in a (for want of a better description) > : 'Scheme-like' fashion with lots of recursion. > : > : The trouble is, unless Perl6 is going to be guaranteed to do > : optimization

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > > Such a grammar switching routine could operate either over a lexical > scope or over the rest of the file. The only restriction is that > one module not clobber the grammar of a different module. > > Basically, we're trying to make the opposite mist