Re: Pack in perl6

2011-02-13 Thread Richard Hainsworth
I am not too clear on how pack works in perl5. Is there a work around in perl6 to achieve the same result, viz., not using pack? Richard On 02/14/2011 02:41 AM, Carl Mäsak wrote: Richard (>): I came across the idiom print "P4\n$w $h\n"; for my $y (0..$h-1) { print pack 'B*', pack 'C*',

Re: Pack in perl6

2011-02-13 Thread Carl Mäsak
Richard (>): > I came across the idiom > > print "P4\n$w $h\n"; > for my $y (0..$h-1) { >    print pack 'B*', pack 'C*', map dot($_, $y), 0..$w-1; > } > > in a perl5 program for outputting dots in a graphical format. dot() produces > a 0 or -1. > > I found the 'pack' function in perl6, but it does

Re: benchmarking against other languages

2011-02-13 Thread Guy Hulbert
On Sun, 2011-13-02 at 20:27 +0300, Richard Hainsworth wrote: > Before doing any more work on this benchmarking project, I was wondering > if any one else thinks the effort is worth it. Me. I hope to get started in a couple of weeks once my accounting is done. > > Although it is early days, it

Re: benchmarking against other languages

2011-02-13 Thread Will Coleda
On Sun, Feb 13, 2011 at 12:27 PM, Richard Hainsworth wrote: > Before doing any more work on this benchmarking project, I was wondering if > any one else thinks the effort is worth it. Assuming that perl6 here == rakudo on parrot, I and others on the parrot dev team would definitely find these hel

benchmarking against other languages

2011-02-13 Thread Richard Hainsworth
Before doing any more work on this benchmarking project, I was wondering if any one else thinks the effort is worth it. Although it is early days, it seemed reasonable to start setting up a framework for benchmarking perl6 algorithms against implementations/releases and against other language

Pack in perl6

2011-02-13 Thread Richard Hainsworth
I came across the idiom print "P4\n$w $h\n"; for my $y (0..$h-1) { print pack 'B*', pack 'C*', map dot($_, $y), 0..$w-1; } in a perl5 program for outputting dots in a graphical format. dot() produces a 0 or -1. I found the 'pack' function in perl6, but it does not seem to work the same.