Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-28 Thread Karl Glazebrook
Consider @x[10:20, 20:40:2, 30:50] This ALMOST works in the current Perl. @x gives array context, then the , produces a list. If [] is overloaded on @a then the subroutine sees a list like "10:20", "20:40:2", "30:50" The only reason it does NOT work in the current perl is that "10:20" is a

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-28 Thread Christian Soeller
Karl Glazebrook wrote: Consider @x[10:20, 20:40:2, 30:50] This ALMOST works in the current Perl. @x gives array context, then the , produces a list. I see a number of problems with the current (scalar) PDL objects being turned (essentially) into perl arrays in perl6. 1) How do you

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-26 Thread Ariel Scolnicov
Nathan Wiger [EMAIL PROTECTED] writes: $a[$i][$j][$k] or $a[$i,$j,$k] The second one has no useful meeting, "," is just an operator which does nothing much useful in this context. Not true, at least not in the Perl I know. :-) Here's a description of what these do in Perl just to

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-26 Thread Daniel Chetlin
On Fri, Aug 25, 2000 at 07:35:24PM -0700, Nathan Wiger wrote: $a[$i][$j][$k] or $a[$i,$j,$k] The second one has no useful meeting, "," is just an operator which does nothing much useful in this context. Not true, at least not in the Perl I know. :-) Here's a description of what these

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-25 Thread Karl Glazebrook
Nathan Wiger wrote: OK here is a basic question: how do we specify element access in PDL type arrays? $a[$i][$j][$k] or $a[$i,$j,$k] Both of these already have firm meaning in Perl. The second one is used to bite off selected elements of an array. So if you want a different eh?

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-25 Thread David L. Nicol
Looks like if we give the data type control over what the meaning of square brackets after it is, the rest becomes example code. I think this s covered in the horribly misnamed http://dev.perl.org/rfc/115.pod which covers overloading bracketing. @reshaped = reshape $x, $y, $i, @array [,

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-25 Thread c . soeller
"David L. Nicol" wrote: Looks like if we give the data type control over what the meaning of square brackets after it is, the rest becomes example code. I think this s covered in the horribly misnamed http://dev.perl.org/rfc/115.pod which covers overloading bracketing. Agreed. We should

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-25 Thread Nathan Torkington
David L. Nicol writes: Looks like if we give the data type control over what the meaning of square brackets after it is, the rest becomes example code. I think this s covered in the horribly misnamed http://dev.perl.org/rfc/115.pod which covers overloading bracketing. The big problem with

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-25 Thread Nathan Wiger
$a[$i][$j][$k] or $a[$i,$j,$k] The second one has no useful meeting, "," is just an operator which does nothing much useful in this context. Not true, at least not in the Perl I know. :-) Here's a description of what these do in Perl just to clarify: $a[0][1][2]; # get a single

RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-24 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Add reshape() for multi-dimensional array reshaping =head1 VERSION Maintainer: Nathan Wiger [EMAIL PROTECTED] Date: 24 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 148