On 4 Aug 2000, Ariel Scolnicov wrote:

> Karl Glazebrook <[EMAIL PROTECTED]> writes:
> 
> > OK I will raise to the bait
> > 
> > I think it's a bit unfair to say that PDL people have failed to 'bite',
> > there was quite a bit of discussion on our list after your post. Also
> > some concern about how much of perl6 is vapourware.
> > 
> > I am game to take part in discussions. 
> > 
> > It has always been apparent to me that Numerical Python is better integrated
> > than PDL. Some language changes in core python WERE made to accomodate it,
> > also Python had less syntax clutter to get around.
> > 
> > I definitely support embedding many of the key PDL ideas into the language
> > - they key one is a much easier syntax for a multi-dim slice. We are currently
> > driven to
> > 
> > $a->slice("10:100,30:200");
> > 
> > compared to IDL AND NumPy: a[10:100,30:200]
> 
> Perl doesn't have multi-dimensional arrays (yet, I hope), but it
> *does* spell `:' as "..", even today.  @x[7..9] is a 3-element list,
> which I don't see as any different from @x[7:9].  Does the slice share 
> the elements of @a in your example?

Well, first of all, 

        10:100, 30:200

is not the same: in Perl it comes out as

        10..100, 30..200

        10, 11, ... , 100, 30, 31, .., 200

whereas what we want is

        Span(10, 100), Span(30, 200)

where Span is some suitable object telling that this span is a parameter.
There are also other syntaxes for slice we would like to have but these
can probably be kludged.
 
> > I'd propose simply building the a:b syntax into the core of Perl6. It's
> > convenient and almost standard.
> 
> Put the dots sideways, and it's Perl.

No it's not. Perl concatenates the two lists, which is not what we want.

> Regarding multi-dimensional arrays, the PDL porters are undoubtable
> champions; what is required?

Well, the PDL distro is our answer to that ;) ;)

        Tuomas

Reply via email to