Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
brian, thanks for the pointers!
CPAN already has Set::CrossProduct, Object::Iterate, and Tie::Cycle. I think those three modules cover just about everything discussed in the node, and anything they don't I can add.
While the overlap of my meditation's sequences and your modules is large, I would like to point out some philosophical differences between our approaches. (These aren't pros or cons – just differences.)
  1. The sets that sequences represent are implicit. This lets them be defined on the fly so that, for example, you can efficiently take the Cartesian products of arbitrary sequences (that themselves may the products of sequences). This also lets you work (space efficiently) with sequences whose lengths cannot be known until they are exhausted. However, the lengths of sequences cannot be known until they are exhausted.
  2. You can observe the cyclical wrap-around point of a sequence. This lets the wrap-around be used as a trigger for other events, such as terminating a parallel merge operation or advancing the next most-significant sequence in a series of sequences.
  3. I think that it's easier to build up a chain of operations with sequences than with the collection of CPAN modules. For example, it seems like you must forego the space-saving benefits of iterators to take the product of an earlier product, which discourages the use of products in computational chains.
  4. Nevertheless, I think that the CPAN modules are probably more practical for the functionality where our libraries overlap. My sequences are first and foremost meditative material. In their present form, they aren't suited for production use.
If you're looking to add features, it would be nice if Set::CrossProduct could take the product of arbitrary iterators.   :)

Cheers,
Tom


In reply to Re^3: A mini-language for sequences (part 1) by tmoertel
in thread A mini-language for sequences (part 1) by tmoertel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (3)
    As of 2019-10-21 03:40 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?