Re: Rakudo test miscellanea

2008-06-29 Thread TSa (Thomas Sandlaß)
HaloO, On Thursday, 26. June 2008 18:46:25 Larry Wall wrote: Neither is nor does is quite right here, because the mathematicians have seen fit to confuse representation semantics with value semantics. :) Hmm, but the uppercase types should hide the representation type. IOW, there's only one

Re: Rakudo test miscellanea

2008-06-28 Thread Aristotle Pagaltzis
* Mark J. Reed [EMAIL PROTECTED] [2008-06-26 20:20]: On Thu, Jun 26, 2008 at 1:31 PM, [EMAIL PROTECTED] wrote: Most financial institutions don't use float, rational or fixed point, they just keep integer pennies. I'm not so sure about that. There are lots of financial transactions that

Re: Rakudo test miscellanea

2008-06-28 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis [EMAIL PROTECTED] [2008-06-29 02:05]: [repeat of statements made days ago] Sorry, I was only just catching up and didn’t notice this orphan subthread had siblings, where the point was already covered. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Rakudo test miscellanea

2008-06-27 Thread Wolfgang Laun
Larry Wall wrote: but probably what the financial insitutions want is special fixed-point types that assume a divisor anyway. Would any financial institution care to comment? Some (VAT tax) computations are defined, by law, to be executed with a cetain precision. You have to be able to

Re: Rakudo test miscellanea

2008-06-27 Thread Moritz Lenz
Larry Wall wrote: On Thu, Jun 26, 2008 at 04:50:21PM +0200, Moritz Lenz wrote: : I assume that 'Num' is meant to be a non-complex. : Then it seems to make sense to assume: : Int is Rat : Rat is Num : Num is Complex : or am I off again? Well, there's this little thing called Liskov

Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
This is a more or less random collection of thoughts and questions about the rakudo testing infrastructure. First of all I feel that it's in a rather good shape. I put up a chart of number of tests on http://rakudo.de/ and plan to update it regularly (via cron job once the admin installs

Re: Rakudo test miscellanea

2008-06-26 Thread Patrick R. Michaud
On Thu, Jun 26, 2008 at 11:36:05AM +0200, Moritz Lenz wrote: This is a more or less random collection of thoughts and questions about the rakudo testing infrastructure. First of all I feel that it's in a rather good shape. I agree -- it's looking better all of the time. Many thanks to you,

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
Patrick R. Michaud wrote: On Thu, Jun 26, 2008 at 11:36:05AM +0200, Moritz Lenz wrote: [...] it would be useful to have an option that makes localtest more verbose. Specifically if a script dies, it's not obvious after which test it died. I'm not exactly sure what is meant here -- do you

Re: Rakudo test miscellanea

2008-06-26 Thread Ryan Richter
On Thu, Jun 26, 2008 at 11:36:05AM +0200, Moritz Lenz wrote: There seems to be a thorough confusion about numeric types. for example some tests read like this: is (1.1).WHAT, 'Num'; and then in a different file is (1.1).WHAT, 'Rat'; That raises two questions for me 1) should we test for the

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
(cross-posting to p6l) Ryan Richter wrote: On Thu, Jun 26, 2008 at 11:36:05AM +0200, Moritz Lenz wrote: 2) How do we know which numeric type is a class and which is a role? Is there an explicit spec about the types of number literals? That could have some impact on type checking in the

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
On Thu, Jun 26, 2008 at 10:23 AM, Moritz Lenz [EMAIL PROTECTED] wrote: Thanks for the effort, but it also raises new questions. For example: Int is Num Rakudo doesn't do it that way, because the 'A is B' relation in OO means Every instance of A is also an Instance of B, which certainly isn't

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
Mark J. Reed wrote: On Thu, Jun 26, 2008 at 10:23 AM, Moritz Lenz [EMAIL PROTECTED] wrote: Thanks for the effort, but it also raises new questions. For example: Int is Num Rakudo doesn't do it that way, because the 'A is B' relation in OO means Every instance of A is also an Instance of B,

Re: Rakudo test miscellanea

2008-06-26 Thread Trey Harris
In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: I assume that 'Num' is meant to be a non-complex. Then it seems to make sense to assume: Int is Rat Rat is Num Num is Complex or am I off again? S29 seems to have been assuming this, if I'm reading the multis correctly. -- Trey Harris

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
Trey Harris wrote: In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: I assume that 'Num' is meant to be a non-complex. Then it seems to make sense to assume: Int is Rat Rat is Num Num is Complex or am I off again? S29 seems to have been assuming this, if I'm reading the multis

Re: Rakudo test miscellanea

2008-06-26 Thread Patrick R. Michaud
On Thu, Jun 26, 2008 at 10:40:53AM -0400, Trey Harris wrote: In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: I assume that 'Num' is meant to be a non-complex. Then it seems to make sense to assume: Int is Rat Rat is Num Num is Complex or am I off again? S29 seems to have been

Re: Rakudo test miscellanea

2008-06-26 Thread Ryan Richter
On Thu, Jun 26, 2008 at 04:50:21PM +0200, Moritz Lenz wrote: What's the alternative? I don't think it's a good idea to special-case numeric types, and I don't think it's a good idea to define multis for each numeric type either. I assume that 'Num' is meant to be a non-complex. Then it

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
Moritz Lenz 3.14 would be a Rat or a Float or whatever That's a good question, actually. Does the literal 3.14 get turned into a Float or a Rat? Float is probably simplest, and matches what e.g. Lisp does, but you could argue either way. Especially since many exact decimal literals become

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
On Thu, Jun 26, 2008 at 04:50:21PM +0200, Moritz Lenz wrote: : I assume that 'Num' is meant to be a non-complex. : Then it seems to make sense to assume: : Int is Rat : Rat is Num : Num is Complex : or am I off again? Well, there's this little thing called Liskov substitutability... Neither is

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
On Thu, Jun 26, 2008 at 12:45:39PM -0400, Mark J. Reed wrote: : Moritz Lenz 3.14 would be a Rat or a Float or whatever : : That's a good question, actually. Does the literal 3.14 get turned : into a Float or a Rat? Float is probably simplest, and matches what : e.g. Lisp does, but you could

Re: Rakudo test miscellanea

2008-06-26 Thread Ryan Richter
On Thu, Jun 26, 2008 at 09:55:09AM -0700, Larry Wall wrote: We could go as far as to guarantee that Nums do rational arithmetic out to a certain point, but probably what the financial insitutions want is special fixed-point types that assume a divisor anyway. Would any financial institution

Re: Rakudo test miscellanea

2008-06-26 Thread Uri Guttman
RR == Ryan Richter [EMAIL PROTECTED] writes: RR On Thu, Jun 26, 2008 at 09:55:09AM -0700, Larry Wall wrote: We could go as far as to guarantee that Nums do rational arithmetic out to a certain point, but probably what the financial insitutions want is special fixed-point types that

Re: Rakudo test miscellanea

2008-06-26 Thread mark . a . biggar
Most financial institutions don't use float, rational or fixed point, they just keep integer pennies. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: Larry Wall [EMAIL PROTECTED] Would any financial institution

Re: Rakudo test miscellanea

2008-06-26 Thread Larry Wall
On Thu, Jun 26, 2008 at 09:46:25AM -0700, Larry Wall wrote: : the VM somehow sneaks in the appropriate conversion for us if we : actually try to pass an Int to a Rat. I'd point out that this is fundamentally the same decision point that is reached when we want to do boxing, because we basically

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
On Thu, Jun 26, 2008 at 1:31 PM, [EMAIL PROTECTED] wrote: Most financial institutions don't use float, rational or fixed point, they just keep integer pennies. I'm not so sure about that. There are lots of financial transactions that deal in sub-$0.01 fractions: taxes, currency conversion,