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

use Perl Log In

Log In

[ Create a new account ]

ethan (3163)

ethan
  tassilo.von.pars ... AMrwth-aachen.de

Being a 25-year old chap living in the western-most town of Germany. Stuying communication and information science and being a huge fan of XS-related things.

Journal of ethan (3163)

Sunday November 28, 2004
01:54 AM

Will it ever end?

[ #22030 ]

For over a week now I am preparing the next List::MoreUtils release. It takes so long because I am incorporating all stuff from List::MoreUtil into it. For each new function I had to write an equivalent XSUB and some of the turned out to be a bit tricky.

Then I noticed that List::MoreUtil's tests (that I simply took over) are incomplete in that they don't test some of the key characteristis of each function. Some map-like functions pass aliases to the original values to their code argument. Others don't. As it happened, I also noticed that the pure-Perl implementation and the XSUB one sometimes differed with respect to this so I had to make that consistent, too.

The only thing left is now copying the documentation for these functions over from List::MoreUtil. Most probably I will be deeply unhappy with it so I might end up rewriting it.

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.
  • avg() for getting the average over a list

    uniq() for returning unique values from a list

    uniq_ordered() for returning unique values from a list in the order that they were first seen

    stats() which will return max, min, ave, tot, count for a list

    See http://www.perlmonks.org/?node_id=407834 for background.

    Cheers
    L~R
    • avg is already getting dangerously close to statistical functionality. Not that this would be fundemantally wrong in a list-module, but then people might come and ask for functions to calculate the quadratic mean or geometric mean as well.

      As for uniq and uniq_ordered, the first is no more computational work than the second from an XS point of view (as there are no hash-slices in C so one needs to loop anyway). uniq I could add.

      I am not convinced that stats is so terribly useful. max and min are already in