Re: RFC 272 (v1) Arrays: transpose()

2000-09-22 Thread Karl Glazebrook
Jeremy: you should look at the PDL mv() and xchg() methods and factor this into your thinking! Karl

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Karl Glazebrook
Ilya Zakharevich wrote: But with Fortran such things are not *needed*. Compilers are smart enough to convert (equivalents to) map 3*$_, 34..67 This is true, but easier (and less buggy) to say what you exactly what you mean. 102:201:3 Anyway the idea has been proposed, it won't break

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Ilya Zakharevich
On Fri, Sep 22, 2000 at 11:17:40AM -0400, Karl Glazebrook wrote: [Cryptocontext is:] f(3*@a) would typically be a list context - and suddently instead of 3*(1+$#a) you get Cmap 3*$_, @a. This is true, what I would propose is we declare 3*(1+$#a) outmoded and always have it mean

Re: RFC 272 (v1) Arrays: transpose()

2000-09-22 Thread Jeremy Howard
Karl Glazebrook wrote: you should look at the PDL mv() and xchg() methods and factor this into your thinking! Actually, the RFC is based on PDL's xchg()! I forgot to document using negative numbers to count from the last dimension--I'll add that into the next version. Are there any other

Re: RFC 272 (v1) Arrays: transpose()

2000-09-22 Thread Karl Glazebrook
Jeremy Howard wrote: Karl Glazebrook wrote: you should look at the PDL mv() and xchg() methods and factor this into your thinking! Actually, the RFC is based on PDL's xchg()! I forgot to document using negative numbers to count from the last dimension--I'll add that into the next

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Karl Glazebrook
Ilya Zakharevich wrote: You are trading a frequently used shortcut @a == 1 + $#a for a rarely-used-but-beautiful/intuitive semantic. I'm not sure it is a win. It's now boiling down to a matter of opinion and we'll have to agree to differ. Of course I use array arithmetic all the time as a

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Ilya Zakharevich
On Fri, Sep 22, 2000 at 05:24:55PM -0400, Karl Glazebrook wrote: It's now boiling down to a matter of opinion and we'll have to agree to differ. Of course I use array arithmetic all the time as a heavy PDL user. ...Do you say you are confused by using vectors (=scalars) instead of arrays?

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Jeremy Howard
Ilya Zakharevich wrote: Moveover, $x = 3 * @_; suddently being equivalent to $x = @_; does not look very promising... Why are these equivalent? RFC 82 only applies in list context. Am I missing something?

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Ilya Zakharevich
On Sat, Sep 23, 2000 at 09:52:51AM +1100, Jeremy Howard wrote: $x = 3 * @_; suddently being equivalent to $x = @_; does not look very promising... Why are these equivalent? RFC 82 only applies in list context. Am I missing something? Yes, the proposal to make

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Jeremy Howard
Karl Glazebrook wrote: Ilya Zakharevich wrote: You are trading a frequently used shortcut @a == 1 + $#a for a rarely-used-but-beautiful/intuitive semantic. I'm not sure it is a win. It's now boiling down to a matter of opinion and we'll have to agree to differ. Of course I use array

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Ilya Zakharevich
On Sat, Sep 23, 2000 at 10:01:11AM +1100, Jeremy Howard wrote: It's now boiling down to a matter of opinion and we'll have to agree to differ. Of course I use array arithmetic all the time as a heavy PDL user. It's not just for number-crunchers either. Array notation greatly simplifies

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Jeremy Howard
Ilya Zakharevich wrote: Are you trying to convince me/us that is going to be used often? Yes, I am. You made the unsupported statement that array operations are rarely used. I'm suggesting otherwise (although to say that they're rarely used in Perl 5 is a tautology, of course!). Array

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread Ilya Zakharevich
On Sat, Sep 23, 2000 at 10:41:07AM +1100, Jeremy Howard wrote: a) You can *already* use vectors as scalars in Perl; That's not what RFC 82 is proposing. Who cares? This already works... b) What we are discussing is Perl, not Mathematica, J, PDL, and so forth. These languages have

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

2000-09-22 Thread c . soeller
Ilya Zakharevich wrote: On Fri, Sep 22, 2000 at 05:24:55PM -0400, Karl Glazebrook wrote: It's now boiling down to a matter of opinion and we'll have to agree to differ. Of course I use array arithmetic all the time as a heavy PDL user. ...Do you say you are confused by using vectors

Re: RFC 272 (v1) Arrays: transpose()

2000-09-22 Thread c . soeller
Jeremy Howard wrote: Karl Glazebrook wrote: you should look at the PDL mv() and xchg() methods and factor this into your thinking! Actually, the RFC is based on PDL's xchg()! I forgot to document using negative numbers to count from the last dimension--I'll add that into the next