[PUGS] [PATCH] Fix unary -

2005-02-26 Thread Luke Palmer
I hunted down the -1 + 10 == -11 bug. I came up with a fix, but I'm not sure how apporpriate the fix is, which is why I'm submitting it as a patch. The problem was that in Prim.hs all the symbolic unaries were being listed alongside the named unaries, and the unaries in the precedence table were

Re: [PUGS] [PATCH] Fix unary -

2005-02-26 Thread Autrijus Tang
On Sat, Feb 26, 2005 at 01:11:05AM -0700, Luke Palmer wrote: > I fixed it by adding a new "associativity", "spre" (symbolic prefix). > This is for prefix things that are listed in the precedence table in > Parser.hs. > > Please look over it. It looks sane. We eventually want to regenerate the wh

Q: Junctions & send+more=money

2005-02-26 Thread Markus Laire
I have two questions about this example code (taken from http://svn.openfoundry.org/pugs/examples/sendmoremoney.p6) (btw, a really nice example of how to use junctions - just try to write this in perl5 :) #!perl6 use v6; my $s; my $e; my $n; my $d; my $m; my $o; my $r; my $y; $s = any(0..1

S06: Pairs as lvalues

2005-02-26 Thread Ingo Blechschmidt
Hi, quoting http://dev.perl.org/perl6/synopsis/S06.html: > Pairs can be used as lvalues. The value of the pair is the > recipient of the assignment: > > (key => $var) = "value"; > > When binding pairs, names can be used to "match up" lvalues > and rvalues: > > (who => $name, why => $rea

Re: S06: Pairs as lvalues

2005-02-26 Thread Uri Guttman
> "IB" == Ingo Blechschmidt <[EMAIL PROTECTED]> writes: IB> Hi, IB> quoting http://dev.perl.org/perl6/synopsis/S06.html: >> Pairs can be used as lvalues. The value of the pair is the >> recipient of the assignment: >> >> (key => $var) = "value"; >> >> When binding pairs, name

Re: S06: Pairs as lvalues

2005-02-26 Thread Ingo Blechschmidt
Hi, Uri Guttman stemsystems.com> writes: > note the binding := which is not the same as =. binding is > similar to aliasing. in the above case it matches the names > and assigns the new values accordingly. that makes sense. But consider: > > "IB" == Ingo Blechschmidt web.de> writes: > IB

Re: TAP and STDERR

2005-02-26 Thread Mark Stosberg
On 2005-02-25, Michael G Schwern <[EMAIL PROTECTED]> wrote: > > I'm going to call a big, fat YAGNI on this one for the time being. I looked that one up. :) You Aren't Going to Need It. http://c2.com/cgi/wiki?YouArentGonnaNeedIt I like it. Mark -- http://mark.stosberg.com/

Re: Q: Junctions & send+more=money

2005-02-26 Thread Rod Adams
Markus Laire wrote: I have two questions about this example code (taken from http://svn.openfoundry.org/pugs/examples/sendmoremoney.p6) I have a few issues with this code. Or at least observations of how it differs from the classic "SEND + MORE = MONEY" problem. see below. #!perl6 use v6; my $s;

PATCH: Make check_tail_call work in two more situations.

2005-02-26 Thread Bob Rogers
From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Tue, 22 Feb 2005 10:40:40 +0100 Bob Rogers <[EMAIL PROTECTED]> wrote: >From: Leopold Toetsch <[EMAIL PROTECTED]> > It had seemed otherwise, looking at imcc/pcc.c yesterday, but I must not > have been looking closely enough. Is

How can I suspend/control a Test::Builder testing session?

2005-02-26 Thread Tom Moertel
Is there any good way to temporarily suspend or, even better, take control of a Test::Builder testing session? The reason I ask is because I am working on a specification-based testing system for Perl that utilizes random-testing methods in which a single property check can involve thousands of ran

Re: S06: Pairs as lvalues

2005-02-26 Thread Luke Palmer
Ingo Blechschmidt writes: > that's really convenient, but what will the following code do? > my $x = (a => 42); # $x is a Pair. > $x = 13; # Is $x now the Pair (a => 13) or > # the Int 13? It's the Int 13. Your example looks a lot like this one: m

Re: How can I suspend/control a Test::Builder testing session?

2005-02-26 Thread Fergal Daly
Look at Test::Tester, it hijacks the Test::Builder object and replaces with another that sometimes delegates to the real Test::Builder object and other times delegates to a custom Test::Builder object that just collects results without outputting anything or affecting the "real" test results. You