Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jon Lang
On Wed, Sep 30, 2009 at 11:58 PM, wrote: > > Author: moritz > Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) > New Revision: 28523 > > Modified: >   docs/Perl6/Spec/S32-setting-library/Numeric.pod > Log: > [S32::Num] More thoughts on Inf/NaN Complex, and on comparing Complex and > Real number

object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Darren Duncan
Jon Lang wrote: On Wed, Sep 30, 2009 at 11:58 PM, wrote: +C is an immutable type. Each C object stores two numbers, +the real and imaginary part. For all practical purposes a C with +a C in real or imaginary part may be considered a C itself (and +C<(NaN + 1i) ~~ NaN> is C). I'm not sure that

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Jon Lang
Darren Duncan wrote: > Jon Lang wrote: >> I'm not sure that I feel comfortable locking C into >> rectilinear coordinates as its internal storage method, as there will >> be cases where the code operates more smoothly if you're using polar >> coordinates to store the numbers: we should leave the inn

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Jon Lang
Some further thoughts: Essentially, this could be done as an extension of the versioning system. The difference between "possrep" versioning and normal versioning would lie in the means by which the possrep dimension would be resolved if not specified. Namely, the compiler would make the decisio

r28528 - in docs/Perl6/Spec: . S32-setting-library

2009-10-01 Thread pugs-commits
Author: lwall Date: 2009-10-01 18:53:43 +0200 (Thu, 01 Oct 2009) New Revision: 28528 Modified: docs/Perl6/Spec/S04-control.pod docs/Perl6/Spec/S32-setting-library/Basics.pod docs/Perl6/Spec/S32-setting-library/IO.pod Log: [S04] add statement_prefix: [IO] add "note" function as say to stde

Re: r28528 - in docs/Perl6/Spec: . S32-setting-library

2009-10-01 Thread Jon Lang
On Thu, Oct 1, 2009 at 9:53 AM, wrote: >  The Perl 6 equivalent to Perl 5's C is C. >  (Perl 6's C function only evaluates strings, not blocks.) > -A C block by default has a C block that handles all > +A C block by default has a C block that handles all fatal >  exceptions by ignoring them.  If

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Moritz Lenz
Jon Lang wrote: > On Wed, Sep 30, 2009 at 11:58 PM, wrote: >> >> Author: moritz >> Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) >> New Revision: 28523 >> >> Modified: >> docs/Perl6/Spec/S32-setting-library/Numeric.pod >> Log: >> [S32::Num] More thoughts on Inf/NaN Complex, and on comparing

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jan Ingvoldstad
On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz wrote: > > > What's the 0th root of a number, then? > It would be a number $y for which $y ** 0 == $x, which can only be > fulfilled for $x == 1. So in the general cases the answer to the > question root($x, 0) is nonsense, which is best mapped to NaN.

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Minimiscience
On Oct 1, 2009, at 4:15 PM, Moritz Lenz wrote: -Returns a list of all C<$n>th (complex) roots of C<$x> +Returns a list of all C<$n>th (complex) roots of C<$x>. Returns C if +C<< $n <= 0 >>, itself if C<$n == 0>, and is free to return a single C Shouldn't this be "C<< $n < 0 >>"? What's t

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Minimiscience
On Oct 1, 2009, at 4:43 PM, Jan Ingvoldstad wrote: On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x, which can only be fulfilled for $x == 1. So in the general cases the answer to the question root($x, 0)

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Moritz Lenz
Jan Ingvoldstad wrote: > On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz wrote: >> >> >> What's the 0th root of a number, then? >> It would be a number $y for which $y ** 0 == $x, which can only be >> fulfilled for $x == 1. So in the general cases the answer to the >> question root($x, 0) is nonsense

99problems-31-to-40 failure

2009-10-01 Thread Kevin Phair
# P35 (**) Determine the prime factors of a given positive integer. This test fails for me with the latest Rakudo. It looks like this is because when a variable is pushed onto an array, and then auto-incremented, it is also auto-incremented inside the array. my @stuff; my $w = 1; @stuff.push

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jan Ingvoldstad
On Thu, Oct 1, 2009 at 11:03 PM, Minimiscience wrote: > On Oct 1, 2009, at 4:43 PM, Jan Ingvoldstad wrote: > >> On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz wrote: >> >>> What's the 0th root of a number, then? >>> It would be a number $y for which $y ** 0 == $x, which can only be >>> fulfilled fo

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Darren Duncan
Jon Lang had some good thoughts on this. I want to clarify or expand on my proposal so it is more clearly understood. 1. First of all, and there may have been no confusion on this but I'll say it anyway: When a class has multiple possreps, one main point here is that users could use the cla

Re: 99problems-31-to-40 failure

2009-10-01 Thread Daniel Ruoso
Em Qui, 2009-10-01 às 12:22 -0400, Kevin Phair escreveu: > This test fails for me with the latest Rakudo. It looks like this is > because when a variable is pushed onto an array, and then > auto-incremented, it is also auto-incremented inside the array. > my @stuff; > my $w = 1; > @stuff.push($w