in reply to Re^2: Getting started with MCE (the Many-Core Engine)
in thread Getting started with MCE (the Many-Core Engine)

incrementing strings perl-style

You mean, as in perlop, string

matches the pattern /^[a-zA-Z]*[0-9]*\z/, the increment is done as a string, preserving each character within its range, with carry
? What an unusual and interesting task. What's the context? And string is huge enough for parallelization overhead to pay off? Off the top of my head, split the string into more or less equal substrings (their number equal to number of workers), guaranteed not to carry when incremented required number of times -- or, find indices within original, then feed the data to MCE::Map, then concatenate the output :-)

Replies are listed 'Best First'.
Re^4: Getting started with MCE (the Many-Core Engine)
by Anonymous Monk on Jun 12, 2018 at 17:45 UTC
    > You mean, as in perlop

    Yes and I've been re-reading that page for weeks :-)

    What an unusual and interesting task. What's the context? And string is huge enough for parallelization overhead to pay off?

    I'm doing with words what mathematicians do with numbers. It's very similar to searching for prime numbers. These liguistic primes are defined by rules of grammar. So my data is not huge strings but huge sets of billions, and trillions, and hundreds of trillions of uniform sized strings. You nailed what I have to do by suggesting chunking the data to equal sizes guaranteed not to increment. Perfect for MCE! Thank you.

    This one liner prints all my data, one string at a time:

    perl -e '$a="a";$n=1;$s=time;print"SEC\tWORD\tITER\n";while(){print"\r +",time-$s,"\t$a\t$n ";$a++&&$n++}'
    I'll post a root node with more detail once I get it ported over to MCE.