like mark

geoff on 2005-09-27T23:49:58

speaking of open source being a friendly and helpful place, I can't help pointing this out and stating for the record how much we all still stand to learn from mark.


digits of pi?

fxn on 2005-09-28T06:34:47

Is the link pointing to the right thread?

Re:digits of pi?

Smylers on 2005-09-28T07:08:02

Yes, it's the right thread — read the initial question, skim through the other responses on that page, and then go to the next page to read MJD's excellent response at number 11.

Smylers

Re:digits of pi?

fxn on 2005-09-28T13:17:37

Oh yes, I missed the page was the first one of a paginated thread. Thank you!

the best part

perrin on 2005-09-28T18:36:56

The funniest part is how it ends with the guy wandering off to try and do it in C...

Re:the best part

n1vux on 2005-09-28T21:36:12

Yeah, if he really wants to work in packed decimal efficiently (BCD) he should be using Cobol.
(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, 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.

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.