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

Interesting article on CPAN and C/C++

by adamsj (Hermit)
on Aug 08, 2001 at 08:29 UTC ( [id://102969]=perlmeditation: print w/replies, xml ) Need Help??

Here's the link: CPAN, but why not CCAN

adamsj

They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen

Replies are listed 'Best First'.
Duh (Re: Interesting article on CPAN and C/C++)
by mugwumpjism (Hermit) on Aug 08, 2001 at 08:54 UTC

    Because if there was a huge, widely available archive of high quality free libraries for C and C++, how would that affect the job security of the C++ programmer?

    I mean, you'd spend a month developing this great library, then someone would point out to you that there was already something on CCAN to do it, and you just wasted a month, and need to waste more to bring your code into line with the "standard" interface available in the "standard" library. Would managers like that? No.

    Or, even worse, you would be able to do most projects in a half, or (shudder) a quarter of the time of rewriting all of those libraries yourself. You might need to look for another contract in 3 months!

    No - let's bury that thought, and keep reinventing the wheel time and time again. After all, the best person to support production code is the person who wrote it. And hey, you know what that means - being able to name your own rate.

    2006-06-13 Retitled by planetscape, as per Monastery guidelines


    Original title: 'Duh'

      'Oh Shared Library Farts!'

      There were large freely available C libraries that pre-dated even our beloved Perl. In fact if wasn't for freely available 'C' libraries Perl might not exist.

      Lets look at one of Perl's most admired features the regex engine. Perl Version 1 used Larry's regex from rn which was based on James Goslings Emacs regex . In V2 Larry realized that V1 regex was lacking so he turned to Henry Spencer's popular regex package and the rest is history.

      In fact some of our most popular Modules depend on freely available 'C' code. Take XML::XXXX -> expat, soon to be upgraded to libXML2 from the GNOME project. So I guess in a way CPAN has always delivered C code to the masses.

      CPAN is an incredible architecture for accepting, tracking and delivering code. Loved by us and coveted by our brethren. I would watch carefully our Python brothers as they create their version of 'a better CPAN'. They might just surprise us!

      Truth and history are as valuable to the true cynic as air.
      -- Bernard Shaw (??)

      mitd-Made in the Dark
      'My favourite colour appears to be grey.'

Re: Interesting article on CPAN and C/C++
by Sherlock (Deacon) on Aug 08, 2001 at 17:57 UTC
    I would think that one reason something like this doesn't exist is because it really just isn't plausible. Unlike Perl or Java, C/C++ implementations vary from machine to machine and compiler to compiler. By that, I mean that an int on one machine with one compiler might be stored as 4 bytes while on another machine with a different compiler might be stored as 8 bytes. Obviously, there are other, possibly more severe issues than this - this is just a quick example. Using someone else's code written with someone else's compiler is almost guaranteed to give you problems. The only real solution would be to rewrite every class for every system/compiler combination available. <Extreme Sarcasm>Good luck!</Extreme Sarcasm>

    This is a limitation of C/C++ but, due to this limitation, C/C++ is able to provide incredible execution speed over languages such as Perl and Java which are not compiled to the degree that C/C++ is.

    Appealing as the thought of a CCAN might be, I (coming from a fairly strong C/C++ background) sure wouldn't know how to write a class that anyone could use.

    - Sherlock

    Skepticism is the source of knowledge as much as knowledge is the source of skepticism.
      Unlike Perl or Java, C/C++ implementations vary from machine to machine and compiler to compiler.

      Mmm. That is one good reason. This can be worked around, as demonstrated by GNU project's tools.

      In fact, isn't this just what the GNU project was supposed to be? A collection of C libraries aimed at bringing high quality software to the average coder, being as portable as possible? We have a winner!

      But wait... we hit that "licensing" problem. RMS is so left wing that it scares many people off using the libraries or contributing to the project.

      There are a few people Stallman has driven into believing the GPL is the Way, the Truth and the Light and the only way to programming nirvana is through the GPL. Perl's GPL license keeps that camp happy, while drawing them to Perl. Then the Artistic license just basically says "Respect!"; the way it damn well should be.

        'Oh IP Elephants'
        'In fact, isn't this just what the GNU project was supposed to be? A collection of C libraries aimed at bringing high quality software to the average coder, being as portable as possible? We have a winner!'

        Ah... no, I don't think so:

        'The GNU Project was launched in 1984 to develop a complete Unix-like operating system which is free software...'
        --gnu.org

        '... RMS is so left wing that it scares many people off using the libraries or contributing to the project.'

        Simply using 'political polarization' to characterize RMS is, at best, cowardly and at worst, ignorant.
        '...scares many people off using have you looked at SourceForge lately?

        'There are a few people Stallman has driven into believing the GPL is the Way, ...

        See above comment.

        There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance ? that principle is contempt prior to investigation.'
        --Herbert Spencer

        mitd-Made in the Dark
        'My favourite colour appears to be grey.'

        If one does not like GNU due to the GPL, one can always grab something under the BSD license for a similar effect with fewer restrictons. The LGPL is pretty handy in this respect, too, as are public domain snippets and licenses that say "Do what you will, but give me a little credit in your readme".

        I guess there's always Dr. Frob's language snippet CDs... *ducks*

        Chris

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://102969]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-03-28 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found