Slashdot Mirror


CPAN: $677 Million of Perl

Adam K writes "It had to happen eventually. CPAN has finally gotten the sloccount treatment, and the results are interesting. At 15.4 million lines of code, CPAN is starting to approach the size of the entire Redhat 6.2 distribution mentioned in David Wheeler's original paper. Could this help explain perl's relatively low position in the SourceForge.net language numbers?"

12 of 277 comments (clear)

  1. Interesting... POPFile cost $500K by JohnGrahamCumming · · Score: 2, Interesting

    Wow, using sloccount on the full POPFile source shows that developing it would have cost around $500K in a regular software company. That seems about right given the length of time we've been working on it and the number of people involved. Cool tool.

    Now if only I could push the donations up above $5,000 :-)

    John.

  2. Mining CPan by Numen · · Score: 1, Interesting

    Whatever ones favourite language might be, a project to mine CPan and port useful modules to Python, Java or C# would be interesting.... Perl syntax reads as a little terse to many non-Perl devs.

    1. Re:Mining CPan by imroy · · Score: 2, Interesting

      I think the Python work would be interesting. I'm a long-time Perl coder and Python looks interesting. But IMHO, PHP would be a waste of time. Part of the reason CPAN is so huge is that perl5 is coming up to its 10th anniversary. The perl5 language has remained very stable over that time. But PHP5 has just been released and from what I've heard it's another major change to the language. But if it's got namespaces and/or sane package management like everyone's been begging for, then PEAR might start to really pick up. I guess we'll see in another 10 years. Either PEAR will be huge success, or programmers will reminisce "Remember PHP? I think someone's coded up a Parrot compiler for that old language " :)

  3. Gilb's Law by YetAnotherName · · Score: 4, Interesting
    For anyone who says that lines of code isn't a useful measure, just remember "Gilb's Law":
    Two years ago at a conference in London, I spent an afternoon with Tom Gilb, the author of Software Metrics ... I found that an easy way to get him heated up was to suggest that something you need to know is "unmeasurable." The man was offended by the very idea. He favored me that day with a description of what he considered a fundamental truth about measurability. The idea seemed at once so wise and so encouraging that I copied it verbatim into my journal under the heading of Gilb's Law:

    Anything you need to quanitfy can be measured in some way that is superior to not measuring it at all.

    Gilb's Law doesn't promise you that measurement will be free or even cheap, and it may not be perfect---just better than nothing.
    --Tom DeMarco and Timothy Lister, Peopleware 2/E, Dorset House Publishing, New York, 1999.
    1. Re:Gilb's Law by T-Ranger · · Score: 2, Interesting
      You have a problem with different fields using "measurable" differently. In non-measurable sets, most non-set theorists would call that non-countable (which may or may not be a different theory. I remember "non-countable' from my discret math days, but never non-measurable. Beh). Many people would say that infinity is sufficent measurement (which is why I perfer countability to measurability).

      So far as Gib is concerned, "very big" is a measurement. If you have 3 sets of infinite size, saying that they have sizes of infinity, infinity-1 and infinity-2 (if you get them in the right order) is better then nothing. Such a definition would outrage any math geek. But now you have some metric

  4. Low position? by fanatic · · Score: 4, Interesting
    Copying and pasting the linked Sourceforge page into a file, then sortting yelds the following highest project numbers:

    Perl 5254 projects
    PHP 9010 projects
    Java 12210 projects
    C 13069 projects
    C++ 13255 projects

    So perl is behind only 4 others. Given that much Perl project work probably ends up in CPAN instead of sourceforge, this is actually pretty high. Did the poster mean he'd expect higher without CPAN?

    --
    "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
  5. All lines are not equal by fanatic · · Score: 4, Interesting
    One line on perl typically does a lot more than one line of C code (even without absurd "golf" tricks). The same is true of other high level languages. So even leaving out issues of programmer quality, what does this really mean?

    Also, from the linked article:

    Reasons why these results are meaningless:
    • Most importantly, I've told SLOCCount all of CPAN is one project, which is probably inflating the numbers significantly. When I get more time, I may run SLOCCount per-distribution, then sum the totals. However, SLOCCount appears to have bugs handling this many sub-projects, so I will need to run them separately and manually sum the results.
    • mini-cpan.pl doesn't actually find only the latest versions of everything, some dists are duplicated and some may be ignored.
    • There's probably plenty of generated code not being identified correctly.
    • There's probably plenty of code downloadable from CPAN that wasn't written for CPAN, and so probably shouldn't be counted.
    • All the usual reasons why code metrics based on numbers of lines of source code are meaningless.
    And here's another: CPAN includes perl itself - which is probably a *lot* of lines of C code.
    --
    "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
  6. PERL programs are hard to distribute by jzilla · · Score: 2, Interesting

    PERL is nice in that it has a lot of prepackaged modules that provide a lot of functionality. But when you distribute code that uses these modules, the end user must install them. This is a big pain in the rear for the average user, which is why I believe that PERL is a bad choice for programs intented for the end user.

    1. Re:PERL programs are hard to distribute by Dr.+Zowie · · Score: 2, Interesting
      This is a pain, and it has certainly hit us in the PDL world. We're only now starting to get appropriate automated packages built.


      On the other hand, if all you need is perl modules (no external libraries) then you can use the CPAN module itself to reach out to CPAN, get the perl code, and test it right there on your system. nearly all the time, it just plain works. That is amazing (to me, anyway).

  7. perllinux.sourceforge.net by GodWasAnAlien · · Score: 2, Interesting

    http://perllinux.sourceforge.net

  8. If the "Ruling Class" is made up of morons... by WebCowboy · · Score: 2, Interesting

    ...then how'd they become the Ruling Class? You know, not every rich person is a slutty blonde bimbo heiress like Paris Hilton (someone who I'm sure would struggle to make up the bed in just one room of one of daddy's hotels). A good deal of the wealthy class is self made (particularly in North America)--perhaps your view is coloured by the more class-oriented system of the UK, where there is a fair bit more wealth through inheritance.

    Jobs and Woznaik founded Apple and Jobs still runs it (hell of a lot bigger than a mere electronics store chain). I'm sure both of them would be more than capable of wiring up a 13A plug seeing as they were capable of designing, building and programming a computer (and devices allowing them to call Europe for free). And while Bill Gates came from a fairly affluent family, he was hardly a billionaire and managed to survive the early Micro-soft days in dumpy New Mexico digs and do low-level assembly programming.

    And yes, I'm sure many of the owners of GM and Ford know how to change a tyre--seing as they are publicly held companies with a large number of shareholders. I'm willing to bet that the executives.management could do it (Lee Iacocca comes agross as a guy who is down-to-earth enough that he could.

    My sister is the Canadian president of a multi-national corporation and not only can she peel a potato, she peeled many of them making dinner for her two kids every night as a stay-at-home mother when she was in her early twenties.

    Fact is, it is no longer the 19th century, democracy is widespread and the "ruling class" is no longer so dominated by inheritance like it once was. This Marxist theory of the proletariat rising up en-masse against a ruling class dependent on workers output just doesn't wash. Today, those of the working class with the capacity and drive to step up are able to rise one-by-one. And once you are part of the "ruling class" it is human nature to defend it regardless of others actions--particularly when your wealth is earned.

  9. Re:Perl still sucks by Eravnrekaree · · Score: 2, Interesting

    I use Perl every day and it has been one of the eisiest to learn and use language that I have found. The syntax to me, seems pretty clear, concise and easy to read, for instance, for a GUI example:
    use Tk;
    $win=MainWindow->new;
    $label=$win->Label(tex t=>'Hello World');
    $label->pack;

    . The syntax actually is very clean and rather simple and easy to use. In my extensive use of Perl I have found the syntax to be very clean, clear, and easy to understand. I think Perl does things a little differently than other languages, and immediately when people see something that is different to them, it seems many think that there is something wrong with it. If you look at another language for the first time it might seem unusual and strange to you. I have looked at PHP, Python, C++ and Java, those languages seem difficult and strange to me when I first look at them, but thats probably because I hadn't used them enough. It shouldn't be wrong to be different. Perl does things differently but that doesnt make it bad or worse than other languages.

    As far as OO goes, Perls OOs is not "bolted on". It is elegantly, carefully designed and integrated with the language. The process of creating and using a Perl module is simple and straightforward, I have done it many times, and just as easy as other programming languages. For example: use Module; $module=Module->new; $module->method(); seems pretty simple and clear to me, in fact, more elegant than some other OO languages that I have seen, in my opinion. I have used C++ and Java, and actually do prefer the design of Perls OO over other languages, it actually takes me less time to use it and code for it than it does on other languages, but thats my personal preference. I have found that with Perl OO and Perl syntax in general it is easy to write clear, good, concise code in less space than many other languages. Perl, to me anyway, requires less language verbage than say C++ or Java does, but is clear and concise.

    People have different needs and tastes, and if people should use the programming tools that best suites them. Perl best suites my needs and works in a way that is natural and easy to me. It took me less time to learn Perl than it has other languages.

    As far as the GUI libraries, Perl has interfaces to a wide range of GUI libraries, from GTK, QT, OpenGL, Tk, FLTK, etc. Take your pick. Tk is most often distributed with Perl, including with ActiveState Perl on Windows. I have used TK on many occassions and found it to have a very elegant and well designed, yet powerful API.

    Perl modules to me seem to be very portable, I have used ones on many different OSs and programs, with no problem. There is nothing inherit in the module system that makes it unportable.

    I really havent seen any of the issues that you have mentioned in my extensive use of the Perl programming language.