Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

afbach (7051)

afbach
  (email not shown publicly)
+ -

  Comment: Satyricon isn't just academic (pron) (Score 1) on 2009.05.12 22:03

by afbach on 2009.05.12 22:03 (#68547)
Attached to: Book review: The Satyricon of Petronius Arbiter
Er, my cheapo (no wait, gave it away) copy had a certain amount of commentary and ... er you don't mention the sheer "bawdyness" of the thing. Not so sure about the 'clearness' of the account but the focus is certainly singleminded. What I like about this and others (Pliny the younger, say) is how it shows these 'ancients' as reasonable people. There's no sense that they were superstitious, god-ridden morons who believed Apollo was up there in a chariot bringing daylight as is often the way they're represented. Rather things were much like today, only w/o electricity.
Read More 2 comments
Comments: 2
+ -

  Comment: Re:Overwriting the array in place (Score 1) on 2009.01.24 14:17

by afbach on 2009.01.24 14:17 (#67006)
Attached to: No Fisher-Yates Shuffle In Perl 6
Good news! as of Rakudo Perl 6, revision 35960 built on parrot 0.9.0-devel:
return @items.pick(*);

works, at least on x86 Leopard box.

Read More 6 comments
Comments: 6
+ -

  Comment: Re:Overwriting the array in place (Score 1) on 2009.01.21 11:35

by afbach on 2009.01.21 11:35 (#66991)
Attached to: No Fisher-Yates Shuffle In Perl 6
Yeah, I was able to get it to work from the command line yesterday too, so I'm guessing it's got to do w/ @items being a param to a method, maybe?, as in hangman.pl. Just try your new shuffle in there. I was working on making up a smaller test case. I use a nightly fetch of parrot/rakudo.
Read More 6 comments
Comments: 6
+ -

  Comment: Re:Overwriting the array in place (Score 1) on 2009.01.20 18:20

by afbach on 2009.01.20 18:20 (#66982)
Attached to: No Fisher-Yates Shuffle In Perl 6
Trying that in the hangman code:
@items.=pick(*);

gets:
Null PMC access in find_method()

if I do either (after:
my $i = @items.elems;
):
@items.=pick($i);

or:
@items = @items.pick($i);

I get:
Cannot assign to readonly variable

Doing:
return @items.pick($i);

works though ('*' again gets the Null PMC).

Read More 6 comments
Comments: 6