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

2009-12-17 Thread Carl Mäsak
Larry , through S-ro commitbot: +Since a CKeyHash, unlike a CBag, is mutable, C.pick works +directly on the CKeyHash, modifying it in place.  You must copy +the CKeyHash first if you don't want it modified in place. This violates Least Surprise for me. An Array is also mutable, but it doesn't

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

2009-12-17 Thread pugs-commits
Author: masak Date: 2009-12-17 11:45:37 +0100 (Thu, 17 Dec 2009) New Revision: 29352 Modified: docs/Perl6/Spec/S03-operators.pod docs/Perl6/Spec/S32-setting-library/Basics.pod Log: kill off REJECTS It was generally agreed on #perl6 that the REJECTS method doesn't add anything to the

r29353 - docs/Perl6/Spec

2009-12-17 Thread pugs-commits
Author: masak Date: 2009-12-17 11:46:33 +0100 (Thu, 17 Dec 2009) New Revision: 29353 Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S09-data.pod Log: fixed one typo and one ws inconsistency Modified: docs/Perl6/Spec/S02-bits.pod

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Todd Olson
At 17:10 -0500 2009-12-16, Dave Whipp wrote: define the return value more formally, something like: our multi method polar (Complex $nim: -- [ Real $mag where 0..Inf, Real $angle where -¼ ..^ ¼ ]) is export { ... } In complex analysis it is often legitimate to work with numbers where the

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Todd Olson
At 19:46 -0500 2009-12-16, Dave Whipp wrote: yary wrote: At 00:15 +0100 12/17/09, Moritz Lenz wrote: Not quite, .abs returns one of the polar coordinates (the magnitude), so only a method is missing that returns the angle. Any ideas for a good name? Would a method called phi with a

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Dave Whipp
Moritz Lenz wrote: Dave Whipp wrote: [cut] Contrast with Rat which has both separate accessors and the nude method (a name that could possibly be improved to avoid adult-content filters) suggestions welcome. Attempting to generalize: what we want is an operator that extracts a Seq of

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Jon Lang
Dave Whipp wrote: Moritz Lenz wrote: Dave Whipp wrote: [cut] Contrast with Rat which has both separate accessors and the nude method (a name that could possibly be improved to avoid adult-content filters) suggestions welcome. Attempting to generalize: what we want is an operator that

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Dave Whipp
Jon Lang wrote: my ($num, $denom) = $num.^attr; # $num.WHAT == Ratio; my ($mag, $phase) = Complex::Polar($z).^attr; my ($re, $im) = Complex::Cartesian($z).^attr; my ($x, $y) = $vector.^attr »·« ( [1, 0], [0, 1] ); If I'm reading this right, the .^attr is exposing implementation details

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Jon Lang
Dave Whipp wrote: Jon Lang wrote:  my ($num, $denom) = $num.^attr; # $num.WHAT == Ratio;  my ($mag, $phase) = Complex::Polar($z).^attr;  my ($re, $im) = Complex::Cartesian($z).^attr;  my ($x, $y) = $vector.^attr »·« ( [1, 0], [0, 1] ); If I'm reading this right, the .^attr is exposing

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Todd Olson
At 14:54 -0500 2009-12-17, Jon Lang wrote: Dave Whipp wrote: And really, my whole point is that the implementation details are (conceptually) the only thing that distinguishes Complex::Polar from Complex::Cartesian. All though both e^(i ¼) and e^(i 3 ¼) evaluate to -1 + 0i it is often

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Doug McNutt
At 11:54 -0800 12/17/09, Jon Lang wrote: And I think there's a Math error in the 4th line: you don't need the components of a vector to do a dot product with that vector -- so it is just my ($x, $y) = $vector «·« ( [1, 0], [0, 1] ); True enough. Which makes me wonder if all of them are

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Dave Whipp
Doug McNutt wrote: my ($x, $y) = $vector «·« ( [1, 0], [0, 1] ); After a while I became resigned to the fact that dot and cross products were not what was being offered. Instead a product of two vectors was to be simply a component by component multiply that produced another vector of the

Re: Comments on S32/Numeric#Complex

2009-12-17 Thread Dave Whipp
Todd Olson wrote: At 14:54 -0500 2009-12-17, Jon Lang wrote: And really, my whole point is that the implementation details are (conceptually) the only thing that distinguishes Complex::Polar from Complex::Cartesian. All though both e^(i ¼) and e^(i 3 ¼) evaluate to -1 + 0i it is often

r29364 - docs/Perl6/Spec/S32-setting-library

2009-12-17 Thread pugs-commits
Author: lwall Date: 2009-12-18 03:57:14 +0100 (Fri, 18 Dec 2009) New Revision: 29364 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] change mutating .pick to be separate .grab method Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod

r29365 - docs/Perl6/Spec

2009-12-17 Thread pugs-commits
Author: lwall Date: 2009-12-18 05:05:15 +0100 (Fri, 18 Dec 2009) New Revision: 29365 Modified: docs/Perl6/Spec/S04-control.pod docs/Perl6/Spec/S29-functions.pod Log: [S04] rename break/nobreak to succeed/proceed Modified: docs/Perl6/Spec/S04-control.pod

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

2009-12-17 Thread pugs-commits
Author: lwall Date: 2009-12-18 05:28:09 +0100 (Fri, 18 Dec 2009) New Revision: 29366 Modified: docs/Perl6/Spec/S03-operators.pod docs/Perl6/Spec/S12-objects.pod docs/Perl6/Spec/S32-setting-library/Basics.pod Log: [S03] rename prefix:true to prefix:so to avoid having to explain the