RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-05 Thread Sean O'Rourke
On Thu, 5 Sep 2002, Brent Dax wrote: > Sean O'Rourke: > # > # 4 - the other arrays boosted to the highest dimension > # > It's already been defined to be #4. > # > # Argh. Then I need to whinge a bit -- what if it's a ragged > # array? What if different elements have different dimensions > # the

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-05 Thread Peter Haworth
On Wed, 4 Sep 2002 22:51:53 -0700 (PDT), Sean O'Rourke wrote: > On Wed, 4 Sep 2002, Brent Dax wrote: > > Sean O'Rourke: > > # On Wed, 4 Sep 2002, Brent Dax wrote: > > # > What if (say) @b is a two-dimensional array? > > # > > # Then you get "interesting values of undef" :). Seriously, I > > # sus

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-05 Thread Ken Fox
Brent Dax wrote: > Keep in mind how much it could inflate the bytecode if > we render a ton of generic, N-dimensional hyper-operator logic into > bytecode. The main problem I see is that you could spend minutes executing inside that hyper op. Doesn't that screw with the plan for putting the even

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-05 Thread Brent Dax
Sean O'Rourke: # > # 4 - the other arrays boosted to the highest dimension # > It's already been defined to be #4. # # Argh. Then I need to whinge a bit -- what if it's a ragged # array? What if different elements have different dimensions # themselves, e.g. "[1,[2,3]]"? I think there's seri

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Sean O'Rourke
On Wed, 4 Sep 2002, Brent Dax wrote: > Sean O'Rourke: > # On Wed, 4 Sep 2002, Brent Dax wrote: > # > What if (say) @b is a two-dimensional array? > # > # Then you get "interesting values of undef" :). Seriously, I > # suspect one of the following: > # > # 1 - runtime error > # 2 - each row (or c

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Brent Dax
Sean O'Rourke: # On Wed, 4 Sep 2002, Brent Dax wrote: # > What if (say) @b is a two-dimensional array? # # Then you get "interesting values of undef" :). Seriously, I # suspect one of the following: # # 1 - runtime error # 2 - each row (or column) of @b numified to its length # 3 - the first e

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Sean O'Rourke
On Wed, 4 Sep 2002, Brent Dax wrote: > What if (say) @b is a two-dimensional array? Then you get "interesting values of undef" :). Seriously, I suspect one of the following: 1 - runtime error 2 - each row (or column) of @b numified to its length 3 - the first element of each row/col of @b 4 - t

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Brent Dax
Sean O'Rourke: # On Wed, 4 Sep 2002, Peter Haworth wrote: # > Having the iteration done in the bytecode could make this simpler, # > although at the expense of needing more bytecode. # # And fewer temporaries, by translating this: # # @a = @b ^+ @c ^+ @d; # # into this: # # for @a; @b

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Sean O'Rourke
On Wed, 4 Sep 2002, H.Merijn Brand wrote: > On Wed 04 Sep 2002 20:31, "Sean O'Rourke" <[EMAIL PROTECTED]> wrote: > > And fewer temporaries, by translating this: > > > > @a = @b ^+ @c ^+ @d; > > > > into this: > > > > for @a; @b; @c ; @d -> $a, $b, $c, $d is rw { > > $d = $a + $b + $c;

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread H.Merijn Brand
On Wed 04 Sep 2002 20:31, "Sean O'Rourke" <[EMAIL PROTECTED]> wrote: > On Wed, 4 Sep 2002, Peter Haworth wrote: > > Having the iteration done in the bytecode could make this simpler, > > although at the expense of needing more bytecode. > > And fewer temporaries, by translating this: > > @a

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Sean O'Rourke
On Wed, 4 Sep 2002, Peter Haworth wrote: > Having the iteration done in the bytecode could make this simpler, > although at the expense of needing more bytecode. And fewer temporaries, by translating this: @a = @b ^+ @c ^+ @d; into this: for @a; @b; @c ; @d -> $a, $b, $c, $d is rw {

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Peter Haworth
[OSCON has left me way behind in reading my mail, so apologies for the late reply] On Wed, 14 Aug 2002 16:45:09 -0500 (CDT), David M. Lloyd wrote: > Here's how I'd expect these expressions to be executed internally, in > gross pseudocode, ignoring for the moment the multimethod vaporware: > > $r

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-08-25 Thread Sean O'Rourke
I ran across this in looking at tidying up old bugs. It seems like things are backwards below -- hyper-operation is a language-level shorthand for iteration over a container, so there's no reason for the container's vtable methods to be "hyper". Actually, it seems like there are at least a coupl

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-08-14 Thread David M. Lloyd
On Wed, 14 Aug 2002, David M. Lloyd wrote: > > The problem was that the math vtable methods were giving up if the > > other side of the operator wasn't an int or a num. So the current > > version of PerlArray would make $x undef. I'm not sure getting the > > other thing's int value (as opposed

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-08-14 Thread David M. Lloyd
On Fri, 12 Jul 2002, Sean O'Rourke wrote: > # New Ticket Created by "Sean O'Rourke" > # Please include the string: [netlabs #801] > # in the subject line of all future correspondence about this issue. > # http://bugs6.perl.org/rt2/Ticket/Display.html?id=801 > > > > This patch makes the followin

[netlabs #801] [PATCH] PerlArray in scalar context

2002-07-11 Thread Sean O'Rourke
# New Ticket Created by "Sean O'Rourke" # Please include the string: [netlabs #801] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=801 > This patch makes the following behave as it does in Perl 5: @a = 1..3; @b = 1..3;