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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The funniest part is how it ends with the guy wandering off to try and do it in C...
    • Yeah, if he really wants to work in packed decimal efficiently (BCD) he should be using Cobol [wikipedia.org].
      (Don't laugh, $DayJob->employer still hires Cobolistas, and Cobol2002 supports Unicode and XML.)

      The questioner could also get direct access to BCD with PL/1, the original Swiss Army Chainsaw [plover.com], which brings us back to MJD.

      The questioner couldn't see the forest for the trees BCD only saves him 50% memory compared to Tiny (byte) integers or array of chars. (Or Tiny costs only 100%.) Which in big-oh notation is
      O(1)
      otherwise known as "irrelevant". And he was talking about streaming anyway -- streaming in Perl is MJD's current metier, and they were discussing BCD! *sigh* Using streaming techniques to fill a PDL array of ints would be efficient enough with a big window and enough overlap.

      I shudder to think what use he'll put to the patterns he finds in Pi's digits. I hope it's not serious mathematics, I'd be embarrassed if so.

      He started this project a week ago in PHP. He got the same answer there. [google.com]

      Using a Zip-type perl module to read a block of compressed PI file at a time, keeping a lenght($pattern) from previous block, would have been a fine solution, alas.

      --
      Bill
      # I had a sig when sigs were cool
      use Sig;