Re: How to speed up a grammar

2009-06-06 Thread Minimiscience
should be there. I think it might be causing the grammar engine to check whether it can omit the ending of each tag and attach it to the enclosing tag instead, which it can't confirm without examining the whole file at least once for each tag. -- Minimiscience

Re: RPN calculator in Perl 6

2009-06-06 Thread Minimiscience
a.pop; (Note that, in addition to the use of .pop, $rs is now acquired before $ls.) At least, I think that's how it works. -- Minimiscience

A few questions

2009-07-11 Thread Minimiscience
s there some sort of shortcut (e.g., of the form ".‽method") for calling a method on an object if the object is defined and returning undef if it is not defined? I was hoping that ".?method" could do this, but it doesn't seem to (in Rakudo, at least). Thank you in advance, Minimiscience

Re: A few questions

2009-07-12 Thread Minimiscience
ature? It seems like there should be more to it than that. -- Minimiscience

Re: A few questions

2009-07-12 Thread Minimiscience
v6; my Str $x = undef; say ($x.?comb).perl; This gives a "Use of uninitialized value" warning when run. -- Minimiscience

"take"-ing to-be-modified variables

2009-07-21 Thread Minimiscience
e current block? Is this even necessary, i.e., is the observed behavior just a bug in Rakudo, or is that too much to hope for? #!/usr/bin/env perl6 use v6; my @stuff = gather { my @things; for ^23 { @things.push: $_; if @things == 5 { take @things; @things = (); } } } say @stuff.perl; __END__ -- Minimiscience

Duration of a flip-flop's flippy thing

2009-09-16 Thread Minimiscience
updating it each iteration until true is returned, but it seems like Perl 6 should have a better way. Thanking you in advance, Minimiscience