I think that's something that perl6 could do better then APL.
If anyone would like to channel this APL energy into APL-on-parrot,
I'm sure it could some attention since the parrot 1.0 release. =)
http://parAPLegic.googlecode.com/
The original implementation was basically a proof of concept to
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
yary not.com-at-gmail.com |Perl 6| wrote:
That was a big part of it... I'm glad Mark posted the APL snippet
because it got me to finally read up on the language that's been at
the back of my mind. Plus it's useful for p6 language discussion. APL
(and a successor, J) may still have a few tricks
yary not.com-at-gmail.com |Perl 6| wrote:
Though I'm not quite sure that S03 covers some of the different-dimension cases.
my @table=
(1,2,3;
4,5,6); # is this the syntax to create 2d array?
No, the Capture on the right, although a Capture of Captures, will be
flattened in the list
Em Qui, 2009-05-28 às 00:26 -0500, John M. Dlugosz escreveu:
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote:
Perhaps Perl 6 should not aspire to the expressiveness of APL. :) As
nice as it is that you can write Conway's Life in a one-liner(*), I
think that a little verbosity now and
the game of life, they do a
great job of explaining the one-liners.
http://aplwiki.com/GameOfLife - short version, one generation, more
descriptive variable names
http://catpad.net/michael/apl/ - longer version, which, instead of
using a loop, makes a string copy of the short version N times
If anyone wants to try tackling this, a longer APL one-liner is
referenced on the APL wikipedia page and discussed in length here:
http://catpad.net/michael/apl/
As an aside, APL was the first computer language I was exposed to.
When I was around 7 years old my aunt (who lived in Boston near
And a link explaining the shorter one-liner:
http://aplwiki.com/GameOfLife
a quine
(typo - should be It's - uri)
* Turns other programs into quines
* Plays Conway's Game of Life
* Animates a marquee banner
It does so without importing any modules, and without using a single if,
unless, while, until, for, foreach, goto, next, last, redo, map, or
grep.
uri
--
Uri
yary not.com-at-gmail.com |Perl 6| wrote:
If anyone wants to try tackling this, a longer APL one-liner is
referenced on the APL wikipedia page and discussed in length here:
http://catpad.net/michael/apl/
As an aside, APL was the first computer language I was exposed to.
When I was around 7
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote:
Perhaps Perl 6 should not aspire to the expressiveness of APL. :) As
nice as it is that you can write Conway's Life in a one-liner(*), I
think that a little verbosity now and then is a good thing for
legibility
(*) life ←{↑1 ω⌵.^3 4=+/,‾1
11 matches
Mail list logo