Re: Hyper operator corner case?

2005-04-18 Thread Thomas Sandlaß
Roger Hale wrote: One set of cases that doesn't seem to have come up in discussion: (1, 3, 2) - (83, 84, 81, 80, 85) Should this give (-82, -81, -79, -80, -85) From an arithmetic point of view it should be exactly that. The implementation might need to morph the code though, see below. as

Re: Hyper operator corner case?

2005-04-17 Thread Roger Hale
Thomas Sandla wrote: John Williams wrote: Good point. Another one is: how does the meta_operator determine the identity value for user-defined operators? Does it have to? The definition of the identity value---BTW, I like the term neutral value better because identity also is a relation between

Re: Hyper operator corner case?

2005-04-15 Thread Thomas Sandlaß
John Williams wrote: Good point. Another one is: how does the meta_operator determine the identity value for user-defined operators? Does it have to? The definition of the identity value---BTW, I like the term neutral value better because identity also is a relation between two values---is that

Re: Hyper operator corner case?

2005-04-14 Thread John Williams
I found where Damain explains the rule as basically replicate dimensions, extend lengths, using an identity value when extending the length. http://www.mail-archive.com/perl6-language@perl.org/msg08304.html On Wed, 13 Apr 2005, Thomas Sandlaß wrote: Brent 'Dax' Royal-Gordon wrote: IIRC, it's

Re: Hyper operator corner case?

2005-04-14 Thread Larry Wall
On Thu, Apr 14, 2005 at 11:08:21AM -0600, John Williams wrote: : Good point. Another one is: how does the meta_operator determine the : identity value for user-defined operators? : : (1,2,3,4,5) my_infix_op (3,2,4) : : Maybe we should say that the excess length is simply copied unchanged. :

Re: Hyper operator corner case?

2005-04-13 Thread Brent 'Dax' Royal-Gordon
David Christensen [EMAIL PROTECTED] wrote: Example: (1,2,3,4,5) + (1,2) Is this equivalent to: a) (1,2,3,4,5) + (1,2,undef,undef,undef) (undef padding) b) (1,2,3,4,5) + (1,2,1,2,1) (repetition) c) (1,2,3,4,5) + (1,2,2,2,2) (stretching) d) (1,2) + (1,2) (truncation) e) something

Re: Hyper operator corner case?

2005-04-13 Thread Thomas Sandlaß
Brent 'Dax' Royal-Gordon wrote: IIRC, it's f) (1,2,3,4,5) + (1,2,$identity,$identity,$identity), where $identity's value is determined by a table something like this: In the case of infix_circumfix_meta_operator:{'»','«'}:(List,List:op) there's no upgrade---to use the S03 term. A simple apply op

Hyper operator corner case?

2005-04-12 Thread David Christensen
Hey folks, I wanted to delurk and address an issue that may need clarification in regards to hyper operators. Quoting S03: If one argument is insufficiently dimensioned, Perl upgrades it: (3,8,2,9,3,8) - 1; # (2,7,1,8,2,7) Now in this example case, it's pretty clear that the scalar