develooper Front page | perl.perl6.language | Postings from June 2009

Re: The game of life

Thread Previous | Thread Next
From:
John M. Dlugosz
Date:
June 1, 2009 18:08
Subject:
Re: The game of life
Message ID:
825-27381@sneakemail.com
yary not.com-at-gmail.com |Perl 6| wrote:
>>  <http://www.dlugosz.com/Perl6/web/APL.html>
>>     
>
> The rho example is interesting, though it doesn't compile in current Rakudo.
>
> "1 2 3 ⍴¨ 10 would natively be written in Perl 6 as 10 »xx« (1,2,3)."
>
> perl6 complains about non-dwimmyness. 10 <<xx>> (1,2,3) gives
> (10),(10,10),(10,10,10) , I think that matches the rho example.
>
>   
Ah, I seem to remember something about which way the arrows point with a 
scalar.  I'll look it up.


> "So let’s implement the APL ⌿ operator which works on the columns of a matrix."
>
> I think that's something that perl6 could do better then APL. From
> what I understand, APL has some operators that work on columns and
> other similar ones that work on rows, p6 has an opportunity to take
> the direction/dimension as an argument. Which is something I'm
> thinking about...
>   
Good point.  Even infix operators can take adjectives!

Can the same effect be achieved with slices?

--John


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About