Re: N-dimensional arrays and compiler support

2012-03-23 Thread Daniel Carrera
On 23 March 2012 12:55, Carl Mäsak wrote: > The "shaped arrays/hashes" parts of S09 have been in the planning > stages a long time in Rakudo. They've had to wait for better MOP and > better native-types handling (which is another part of S09), but now > the time for shaped arrays/hashes is surely

Re: How to make a new operator.

2012-03-23 Thread Patrick R. Michaud
On Thu, Mar 22, 2012 at 11:07:08AM -0500, Bruce Gray wrote: > Well, it works in Niecza. It does not (yet) work in Rakudo: > 15:25 perl6: my @squares := 0, (-> *@a { @a.elems ** 2 }) > ... *; say ~@squares[^11]; > 15:25 ..niecza v15-4-g1f35f89: OUTPUT<<0 1 4 9 16 25 36 49 > 64 81 100NL

[perl #111646] Arity counting mis-treats slurpy and capture parameters

2012-03-23 Thread Patrick R. Michaud via RT
Now fixed in 69920db585. > say &infix:<~>.arity 0 > say &infix:<~>.count Inf > say .reduce(&infix:<~>) abcd Ticket can be closed when we have appropriate spectests. Thanks! Pm

[perl #111944] a constant hash does not coerce its RHS correctly

2012-03-23 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #111944] # in the subject line of all future correspondence about this issue. # https://rt.perl.org:443/rt3/Ticket/Display.html?id=111944 > 14:37 < moritz> nom: constant %h = 1, 2; say %h.WHAT 14:37 <+p6eval> rakudo 4a247b

Re: N-dimensional arrays and compiler support

2012-03-23 Thread Carl Mäsak
Daniel (>>), Stefan (>): >> 1. The semicolon operator would allow Perl 6 to support N-dimensional >> arrays... How would one iterate over that type of array? >> >> my num @matrix[ 10 ; 10 ; 10 ]; >> >> I ask because a natural extension is to add arithmetic operators and >> you have the beginnings o

Re: How to make a new operator.

2012-03-23 Thread Damian Conway
> But unless we twist smartmatching semantics for that purpose, No! Please, no. ;-) > it means we cannot do the same fuzziness for the endpoint, Except that we will be encouraging people to use: * >= $END as their standard endpoint pattern, which will provide most of the necessary fuzz. > S