Slash Boxes
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 ]

pdcawley (485)

  (email not shown publicly)
AOL IM: pdcawley (Add Buddy, Send Message)

Journal of pdcawley (485)

Monday June 04, 2001
12:33 PM

Who knows where the time goes?

[ #248 ]
Hmm... I can't stand that song. Ah well.

So, at about 0630 I start hacking on Acme::Dice (the provisional name), Making `proper' classes for the syntax tree, making real modules, mucking with the Exporter, all that good stuff, and I end up with something that'll let do most of what I want (including roll 4d6 discarding lowest), I write some scanty documentation and start to think about writing good test cases.

While I'm thinking about said test cases, I replace the simpleminded add in that I wrote for dipsy with something that uses Acme::Dice. And life is good. Folks on can test it for me, which they do. And things are looking good...

Then blech blows it up by telling dipsy to roll 1000000d6 and my simpleminded (and painfully inefficient) syntax tree chews up all the available memory on dipsy's host box. Time for a rethink. The trouble is, I want to retain the ability to do explain roll <spec>, but that means I need to cache the results of rolls, so I'll need a memory efficient way of doing that.

At about this point Gill comes upstairs to tell me that it's now 1530 and she takes it that I won't be coming down for breakfast. Where does the time go?

While I'm busy catching up on some food and fluids, I start toying with evil ideas like storing the result of a group of die rolls in the form "13==(4 6 3)", which will `numify' to 13. But that's evil bad and wrong. Looks like I'll be using a hash as a sparse array. And I'm already regretting cheating by using $die->{sides} instead of using proper accessor methods.