RE: A few multiple dispatch questions

2008-08-06 Thread Steve Brockbank
"noncitizen" is the more appropriate term you are looking for I think regards steve -Original Message- From: chromatic [mailto:[EMAIL PROTECTED] Sent: 06 August 2008 04:03 To: Bob Rogers Cc: [EMAIL PROTECTED] Subject: Re: A few multiple dispatch questions On Tuesday 05 August 2008

[perl #57652] [BUG] successfull 'when' does not skip the following tests.

2008-08-06 Thread [EMAIL PROTECTED] (via RT)
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #57652] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=57652 > Yesterday, I downloaded and compiled perl6 of parrot-0.6.4. Testing some basic perl

Re: A few multiple dispatch questions

2008-08-06 Thread Jonathan Worthington
Larry Wall wrote: On Tue, Aug 05, 2008 at 06:17:30PM +0200, Jonathan Worthington wrote: Hi, I am currently reviewing bits of the spec surrounding multiple dispatch and, of course, have a question or two (I'll probably have some more later, as the dust settles in my head). 1) The spec s

Re: [perl #57608] [PATCH] add ports/cygwin

2008-08-06 Thread Mark Glines
On Tuesday 05 August 2008 20:57:53 chromatic wrote: > On Tuesday 05 August 2008 01:35:48 Reini Urban wrote: > > Attached patch adds the directory ports/cygwin with > > the most recent cygports file, > > the most recent src patch and the sources for the CYGWIN patches. > > (the contents of parrot-0.

smart match Any ~~ Num

2008-08-06 Thread TSa
HaloO, the smart match table in S03 has the Any ~~ Num meaning numeric equality. But shouldn't that be a bit fuzzier? E.g. a match $x ~~ $num should check abs($x - $num) < epsilon with an epsilon that depends on the size of $num. Also for strings some fuzziness might be a good idea, e.g. to go c

Re: new article, "A Romp Through Infinity"

2008-08-06 Thread TSa
HaloO, I wrote: That is you can do the usual Int arithmetic in the ranges Inf..^Inf*2 and -Inf*2^..-Inf except that Inf has no predecessor and -Inf no successor. Well, and we lose commutativity of + and *. I.e. 1 + $a != $a + 1 if $a is transfinite. Well, we can of course count downwards from

Re: syntax question: "method close is export ()"

2008-08-06 Thread Larry Wall
On Tue, Aug 05, 2008 at 05:43:57PM +0800, Audrey Tang wrote: > John M. Dlugosz 提到: >> Does that mean that traits can come before the signature? Or should it >> be corrected to >> method close () is export { ... } > > It's a simple typo. Thanks, fixed in r14572. The strange thing is that we

Catching exceptions with the // operator

2008-08-06 Thread Yaakov Belch
In a little language that I wrote some time ago, I found it very useful to let the // operator catch exceptions: f(x) // g(y) does: * If f(x) returns a defined value, use this value. * If f(x) returns an undefined value, use the value of g(x) instead. * If f(x) throws an exception, catch and keep

Re: Catching exceptions with the // operator

2008-08-06 Thread jerry gay
On Wed, Aug 6, 2008 at 8:58 AM, Yaakov Belch <[EMAIL PROTECTED]> wrote: > In a little language that I wrote some time ago, I found it very useful to > let the // operator catch exceptions: > > f(x) // g(y) does: > * If f(x) returns a defined value, use this value. > * If f(x) returns an undefined v

Re: Catching exceptions with the // operator

2008-08-06 Thread Paul Seamons
> in my mind, this strays too far from the meaning of C and adds > ambiguity that makes the operator unusable. perhaps there's room for > an operator that gives some sugar for > > my $bill = try { ack() CATCH { thpp() } }; > > but to me that code is concise enough that it doesn't warrant syntacti

Re: Catching exceptions with the // operator

2008-08-06 Thread Larry Wall
On Wed, Aug 06, 2008 at 09:36:16AM -0700, jerry gay wrote: : i don't think this will work for perl 6. since perl 6 has resumeable : exceptions (like C), the meaning of the C operator could be : ambiguous. given the following statement, : : my $bill = ack() // thpp() // ppt(); : : with perl 6's

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Patrick R. Michaud
On Tue, Aug 05, 2008 at 10:51:08AM -0700, Klaas-Jan Stol wrote: > From pdd19: > > The optional C<:unique_reg> modifier will force the register allocator to > associate the identifier with a unique register for the duration of the > subroutine. > > > This, however, does not document /why/ you wou

Re: [perl #57608] [PATCH] add ports/cygwin

2008-08-06 Thread Will Coleda
On Wed, Aug 6, 2008 at 11:09 AM, Mark Glines <[EMAIL PROTECTED]> wrote: > On Tuesday 05 August 2008 20:57:53 chromatic wrote: >> On Tuesday 05 August 2008 01:35:48 Reini Urban wrote: >> > Attached patch adds the directory ports/cygwin with >> > the most recent cygports file, >> > the most recent sr

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Will Coleda
On Wed, Aug 6, 2008 at 1:58 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Tue, Aug 05, 2008 at 10:51:08AM -0700, Klaas-Jan Stol wrote: >> From pdd19: >> >> The optional C<:unique_reg> modifier will force the register allocator to >> associate the identifier with a unique register for the d

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread chromatic
On Wednesday 06 August 2008 11:08:13 Will Coleda wrote: > > Sometimes the register allocator will re-use a register when it's > > important that the register not be reused. > > Can you describe a situation where this occurs that isn't a bug in the > register allocator? I can't think of one. -- c

Re: [perl #57548] [TODO] enhance #CONDITIONED_LINE by recursive logical expressions as in LISP

2008-08-06 Thread Reini Urban
2008/8/3 Reini Urban via RT <[EMAIL PROTECTED]>: > First patch was wrong, this is ok. (conf arg was missing) And this patch actually implements this feature for 90%. (and or not mult.keys) Just the parenthesis grouping is missing. (and key (not key)) I'll commit more useful examples later, where

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Jonathan Worthington
Will Coleda wrote: Can you describe a situation where this occurs that isn't a bug in the register allocator? Yes. IIRC, it was added when I was working on the .Net bytecode translator, and it needed to take references to registers in callers. If you're doing that, you need to know that the

Re: [perl #57548] [TODO] enhance #CONDITIONED_LINE by recursive logical expressions as in LISP

2008-08-06 Thread Reini Urban
2008/8/6 Reini Urban <[EMAIL PROTECTED]>: > 2008/8/3 Reini Urban via RT <[EMAIL PROTECTED]>: >> First patch was wrong, this is ok. (conf arg was missing) > > And this patch actually implements this feature for 90%. (and or not > mult.keys) > Just the parenthesis grouping is missing. (and key (not

Re: [perl #57548] [TODO] enhance #CONDITIONED_LINE by recursive logical expressions as in LISP

2008-08-06 Thread Reini Urban
2008/8/6 Reini Urban <[EMAIL PROTECTED]>: > 2008/8/6 Reini Urban <[EMAIL PROTECTED]>: >> 2008/8/3 Reini Urban via RT <[EMAIL PROTECTED]>: >>> First patch was wrong, this is ok. (conf arg was missing) >> >> And this patch actually implements this feature for 90%. (and or not >> mult.keys) >> Just t

Re: [perl #57548] [TODO] enhance #CONDITIONED_LINE by recursive logical expressions as in LISP

2008-08-06 Thread Reini Urban
2008/8/6 Reini Urban <[EMAIL PROTECTED]>: > 2008/8/6 Reini Urban <[EMAIL PROTECTED]>: >> 2008/8/6 Reini Urban <[EMAIL PROTECTED]>: >>> 2008/8/3 Reini Urban via RT <[EMAIL PROTECTED]>: First patch was wrong, this is ok. (conf arg was missing) >>> >>> And this patch actually implements this feat

Re: Catching exceptions with the // operator

2008-08-06 Thread John M. Dlugosz
Yaakov Belch perl6-at-yaakovnet.net |Perl 6| wrote: Let me explain why this is useful and why I think this is "the right thing": First of all, it provides a very light-weight exception handling using well-known ideoms like: $file_content=read_file($filename) // $default_value; compute_statist

Re: new article, "A Romp Through Infinity"

2008-08-06 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Firstly, shouldn't there also be infinite strings? E.g. 'ab' x Inf is a regularly infinite string and ~pi as well. Other classes might have elaborate notions of infinity. A string whose length is Inf is not itself equal to Inf. But $s.chars > $b