Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-13 Thread Nick Ing-Simmons
Bart Lateur [EMAIL PROTECTED] writes: On Wed, 09 Aug 2000 12:46:32 -0400, Dan Sugalski wrote: @foo = @bar * @baz; Given that the default action of the multiply routine for an array in non-scalar context would be to die, allowing user-overrides of the functions would probably be a good

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Dan Sugalski
At 04:06 PM 8/9/00 +, Ed Mills wrote: In keeping with Larry's design philosophy that the language should "not just sit there -do something!" I agree that there should be a number of vector/matrix manipulations available, performed in a psuedo-scalar context (not in a loop). That would be

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Dan Sugalski
At 11:13 PM 8/9/00 +0200, Bart Lateur wrote: On Wed, 09 Aug 2000 12:46:32 -0400, Dan Sugalski wrote: @foo = @bar * @baz; Given that the default action of the multiply routine for an array in non-scalar context would be to die, allowing user-overrides of the functions would probably be a

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Jeremy Howard
Bart Lateur wrote: If you're talking about matrix manipulations, I should immediately hold you back. Perl arrays are pretty bad as is for representing matrices. Don't let anybody tell you otherwise: Perl data structures are one-dimensionaly by nature. A lazily evaluated slicing operator

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bryan C . Warnock
On Wed, 09 Aug 2000, Jeremy Howard wrote: Of course, if the user wants to overload this behaviour, we should let them. In the multiplication example, however, I would have thought that 'x' is a more suitable inner product operator... And that seems to be where most of the critics of

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Jeremy Howard
Bryan C.Warnock wrote: On Wed, 09 Aug 2000, Jeremy Howard wrote: Of course, if the user wants to overload this behaviour, we should let them. In the multiplication example, however, I would have thought that 'x' is a more suitable inner product operator... And that seems to be where most

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Bart Lateur
On Wed, 09 Aug 2000 12:46:32 -0400, Dan Sugalski wrote: @foo = @bar * @baz; Given that the default action of the multiply routine for an array in non-scalar context would be to die, allowing user-overrides of the functions would probably be a good idea... :) [Is this still -internals? Or

Re: vector and matrix calculations in core? (was: Re: Ramblings on base class for SV etc.)

2000-08-09 Thread Dan Sugalski
At 05:39 PM 8/9/00 +0200, Bart Lateur wrote: On Wed, 09 Aug 2000 09:41:22 -0400, Dan Sugalski wrote: @foo = @bar * 12; @foo = map { $_ * 12 } @bar; I don't see the need for a new notation. Well, compactness for one. With a scalar on one side it's less odd (it was a bad