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 singl

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 w

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Dan Sugalski
At 09:56 AM 8/26/00 +1200, [EMAIL PROTECTED] wrote: >Dan Sugalski wrote: > > > It looks like we need to be able to override operations on arrays, have > > multi-dimensional arrays, and do some rather odd slicing operations that > > give values still linked to the original matrices. > > > > Has any

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread c . soeller
Dan Sugalski wrote: > It looks like we need to be able to override operations on arrays, have > multi-dimensional arrays, and do some rather odd slicing operations that > give values still linked to the original matrices. > > Has anyone asked for complex number support yet? It's hidden in one o

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 sh

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread c . soeller
Karl Glazebrook wrote: > "->" really sucks as something to routinely type in to a interactive shell > all the time. I hate it. I can not agree more. It just seems terribly unnecessary. Just allow us to directly overload some of the braces/parentheses for objects. I would be happy with $pdl(0:

Re: New variable type: matrix

2000-08-25 Thread c . soeller
Karl Glazebrook wrote: > The key from my point of view is to have enough syntactical > hooks in the core so that using it is not like wading through > treacle. Hence the PDL RFCs - especially on [] overloading and ranges. > > The Numerical Python people seem to have accomplished this, and we can

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread c . soeller
Dan Sugalski wrote: > to make foo and bar 5x5x5 matricies that you casn multiply to get baz then, > well, say it. If that means you need to define a way to provide overridden > operators in the Matrix package, then go for it and say that. > > Let the -internals folks worry about the Weird Magic

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Dan Sugalski
At 01:11 PM 8/25/00 -0600, Nathan Torkington wrote: >Heh, we're on the same page here. I'm just setting the framework >for that discussion. I don't think the PDL folks yet know what >they want, other than "better support for numerical structures". > >I'm trying to see what's wrong with the exist

Re: New variable type: matrix

2000-08-25 Thread Karl Glazebrook
Nathan Torkington wrote: > > Karl Glazebrook writes: > > I agree with your sentiments. Most people in PDL DO come from the > > number crunching/scientific background. > > Whereas the rest of Perl users don't, and will probably never need the > matrix manipulation stuff. I think a happy medium w

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Karl Glazebrook
Nathan Torkington wrote: > > (1) The current > > > >$pdl->slice("0:$n,(0)"); > > > > syntax sucks. > > Would: > > $pdl->[0:$n][0][:] > > suffice? I figure this would translate into something like: > > $pdl->subscript( 0, $n ) > ->subscript( 0 ) > ->subscript( undef, undef

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: rfc142

2000-08-25 Thread Glenn Linderman
Note that I am not subscribed to perl6-language-data, and that all the prior discussion of this RFC took place on -language. Perhaps it is better classified under -data, but that's not its present discussion list, according to the RFC. "David L. Nicol" wrote: > Glenn Linderman wrote: > > > Ed

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Tom Christiansen
>Right you are. I'm still living in the 20th century :-) So are all of us -- just give it a few months, though. :-) --tom

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Nathan Torkington
Tom Christiansen writes: > >> >Also, there are many array operations (push, pop, etc) still not > >> >supported by tie. > > Eh? Either that's no longer true, or we're doing the time warp again. Right you are. I'm still living in the 20th century :-) Nat

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Tom Christiansen
>> >The problem is that you can tie() an array, but an object is a scalar. Yes, Python unifies these. >> >Also, there are many array operations (push, pop, etc) still not >> >supported by tie. Eh? Either that's no longer true, or we're doing the time warp again. --tom

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Nathan Torkington
Dan Sugalski writes: > Sure, it's handwaving, but it's handwaving with a purpose. What I don't > want is for people to get bogged down by the limits of what perl 5 > provides, or what looks to be some sort of reasonable extrapolation > of those features. > > If a fully working tie's what you

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Dan Sugalski
At 12:38 PM 8/25/00 -0600, Nathan Torkington wrote: >Dan Sugalski writes: > > The operative word in that last sentence is "Currently"... > > > > >The problem is that you can tie() an array, but an object is a scalar. > > >Also, there are many array operations (push, pop, etc) still not > > >suppor

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Nathan Torkington
Dan Sugalski writes: > The operative word in that last sentence is "Currently"... > > >The problem is that you can tie() an array, but an object is a scalar. > >Also, there are many array operations (push, pop, etc) still not > >supported by tie. tie makes assumptions about arrays that are perha

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Dan Sugalski
At 12:11 PM 8/25/00 -0600, Nathan Torkington wrote: >[EMAIL PROTECTED] writes: > > (1) The current > > > >$pdl->slice("0:$n,(0)"); > > > > syntax sucks. > >Would: > > $pdl->[0:$n][0][:] > >suffice? I figure this would translate into something like: > > $pdl->subscript( 0, $n ) > ->s

Re: New variable type: matrix

2000-08-25 Thread Nathan Torkington
Karl Glazebrook writes: > I agree with your sentiments. Most people in PDL DO come from the > number crunching/scientific background. Whereas the rest of Perl users don't, and will probably never need the matrix manipulation stuff. I think a happy medium would be to provide core support for oper

Re: Some PDL issues (was Re: Test)

2000-08-25 Thread Nathan Torkington
[EMAIL PROTECTED] writes: > These are some of the current issues that we have identified: Excellent! Thanks for this. > (1) The current > >$pdl->slice("0:$n,(0)"); > > syntax sucks. Would: $pdl->[0:$n][0][:] suffice? I figure this would translate into something like: $pdl->subscr

Re: rfc142

2000-08-25 Thread David L. Nicol
Glenn Linderman wrote: > Edwin's arguments against the idea seem reasonable; I think it would take some > compelling benefit to invest in implementing a C type & structure parser in perl, for > this use. Further, the C syntax doesn't provide for explicitly sized types, and what > would you do wi

Re: rfc142

2000-08-25 Thread David L. Nicol
Edwin Wiles wrote: > Maintainer Statement: > Okay, I've added a note that wholesale adoption of C structure > definitions, with appropriate modifications, has been suggested. > However, if you really want it seriously documented, you'll have to > write it up. I did. Three or four times

Re: New variable type: matrix

2000-08-25 Thread Karl Glazebrook
Hi Baris, I agree with your sentiments. Most people in PDL DO come from the number crunching/scientific background. I would say that a matrix is just a special case of a general N-dimensional compact array which obeys various rules. PDL supplies a matrix-mult operator ("x") and other matrix ops

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 differe

Some PDL issues (was Re: Test)

2000-08-25 Thread c . soeller
> I'm here because: > * I think the PDL folks have valid needs > * I think a lot of people are having trouble making suggestions for >language changes that mesh well with other constructs in the >language. > * I'm not able to tell you want you need, but I will try to help >you come