News for hackers. Stuff that matters.
Re:Why Perl? by rhizome31 on Tuesday November 15, 2011 @10:06AM (#3238401)
This is really just a checklist that can be applied to any language. So yes, why not Perl after all...
Re:Why Perl? by lawn on Tuesday November 15, 2011 @10:38AM (#3238550)
Hmm let's see.

"Perl Programmers love their language." Sadly not true enough for many languages. Does PHP programmers love their language like Perl programmers do for example? Somehow I doubt it.

"True Freedom" Perl is free and open source and most code is too. How does that compare to Java or the microsoft stack?

"Great Community" There are a lot of great communities surrounding most languages to be sure, but it's a stretch to say that any (every) language has it.

"CPAN" How would this apply to any language? There's simply nothing near CPAN anywhere. Ruby has gems and Haskell has hackage, but they aren't comparable to CPAN in size or breadth.

"Awesome Third Party Support" Is a language simply the syntax and the standard library or could the freely available libraries and tools be counted too? In that case Perl stands out as well, there's just so much of it. Can C or Java rival it? Sure, maybe, but most others won't even come close.

"Jobs" I wouldn't say that Perl has the highest job count out there, but compare it to Scala, Haskell, Go, Rust and many other and it's probably easier to get hired.

I like Perl, it's a fun language to use, but I'm not the biggest Perl advocate in the world. But it does do pretty good in the above points and to say it's a checklist that can be applied to any language is just untrue.

If there are good or bad points that's a whole other topic. I think they are pretty good points, and we must remember that this is an explanation of why they personally are using Perl. Find another language which does better on these points if you can, cause I can't think of any.

Re:Why Perl? by scott_s on Tuesday November 15, 2011 @11:02AM (#3238644)
Sadly not true enough for many languages.

But I think equally true for the languages considered its successors: Ruby and Python.

Re:Why Perl? by berntb on Tuesday November 15, 2011 @12:18PM (#3239051)
From what I've seen of at least Python, it can't really touch CPAN (yet?). It is not the same width of neither modules nor infrastructure (CPAN Testers, etc.).

And the lack of code blocks irritates the life out of me. But I get why it is a common education language, like Pascal in its days.

Edit: Mithaldu wrote this up well.

Re:Why Perl? by scott_s on Tuesday November 15, 2011 @01:04PM (#3239285)
I was responding directly to the "loved" part, but now I realize that was not clear. For the record, I think everything but CPAN applies to Ruby and Python. And your personal irritations are not really relevant to people who use it, just as my personal irritations with Perl are relevant to people who use (and maybe love) it.
Re:Why Perl? by berntb on Tuesday November 15, 2011 @07:23PM (#3241062)
Considering the amount of trolling you get when Perl is mentioned on e.g. HN, I'd say that some other language culture's love is boundless -- and a bit less than fully grown up...

Which also applies to that "great community" point. Shudder.

Re:Why Perl? by kablamo on Tuesday November 15, 2011 @11:19AM (#3238730)
There are lots of great languages. I think we can learn from each other. Perl has a lot of problems but also a lot of strengths. CPAN is one of its strengths.

Compare CPAN: https://metacpan.org/module/Moose::Manual

Then compare with other repositories from other languages: http://stackoverflow.com/questions/1693529/list-of-top-repos...

CPAN does

* Documentation

* Historical versions of libraries

* Search

* Source code

* Integrated bug tracker

* Integrated review system

* Links to repositories

* Integrated automated tests regularly run against hundreds of machines/operating systems/perl versions.

Re:Why Perl? by draegtun on Tuesday November 15, 2011 @11:52AM (#3238886)
And also there is:

* CPAN Forum - http://cpanforum.com/

* Annotated CPAN - http://www.annocpan.org/

* Discussion/review on pre CPAN modules - http://prepan.org/

Re:Why Perl? by mikeryan on Tuesday November 15, 2011 @11:39AM (#3238828)
Sure but 99% of what I want is something that A. Has a library I want and B. can install it easily.

All those bells and whistles are nice. But they're not something I'm basing my technology stack on because most of the time theyre not something I need.

Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @10:19AM (#3238463)
Honestly, the only point there that applies to any language is the "freedom" one. The rest are, with varying margins, real differentiators. Especially the CPAN ecosystem one. No other language has that.
Re:Why Perl? by rhizome31 on Tuesday November 15, 2011 @12:48PM (#3239200)
Having worked on real-world projects in Perl, Python and Ruby, I can tell you that CPAN is not a differentiator. It doesn't matter if there are gazillions of packages to choose from. What matters is if I can find the packages I need to do the job. I remember working on a Perl project and being mocked by a Python guy because I had to implement a library that was already available for Python. On the other hand, I could choose from many different Perl packages to help me write classes and do things that Python does out of the box.
Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @01:43PM (#3239480)
What was that library you reimplemented?
Re:Why Perl? by Kototama on Tuesday November 15, 2011 @10:25AM (#3238489)
What are the differences between CPAN and, for instance, Maven repositories?
Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @11:06AM (#3238662)
Next time i'll make the ecosystem bit blinking and pink.

Maven repositories are just that: Repositories. They store file and display some metadata.

CPAN shows documentation from the code of a distribution itself. It also provides a bugtracker. When installing things from CPAN via cpan on the command line, the tests of that dist are run. Users can opt to install Test::Reporter, which then uploads those test results to cpantesters.org. Many people do this, across many OSes and Perl versions across the globe. Authors of dists get emails of failures. Users can look at nice matrices displaying the passes and failures on their platform combination. On failures regression analysis is performed automatically to try and pinpoint possible failure reasons. Since metacpan there is also a public API to an ElasticSearch database containing all the metadata about CPAN dists and their authors. So you can for example, find all dists written by authors living in your town.

Et cetera.

I could go on, but i think i made my point.

Re:Why Perl? by blibble on Tuesday November 15, 2011 @10:33AM (#3238526)
indeed, or pypi, or PEAR, and I'm sure ruby has something similar too
Re:Why Perl? by gte910h on Tuesday November 15, 2011 @10:36AM (#3238544)
http://rubygems.org/gems 2005 gems listed at the moment.
Re:Why Perl? by utkarshkukreti on Tuesday November 15, 2011 @11:48AM (#3238866)
That's 2005 gems starting with the letter "A".
Re:Why Perl? by gte910h on Tuesday November 15, 2011 @02:17PM (#3239663)
Good Catch
Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @11:07AM (#3238670)
All of those have a long way to go yet to match the CPAN ecosystem. See my reply above.
Re:Why Perl? by blibble on Tuesday November 15, 2011 @11:48AM (#3238868)
and as a user of packages, rather than a package developer, I care about precisely none of that functionality.

I want this package installed (plus its dependencies), and I want it now, that's all.

I'm not sure I buy that (paraphrased) "Perl is good because CPAN has billions more packages than other language's repos" either, for one I remember trying to find a library that did SHA1 digests, there were three, and I managed to pick the one that give incorrect results...

of course in Python it's just built-in, as are sockets, http, smtp, imap...

Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @11:56AM (#3238914)
As a user of dists all that stuff is extremely important to you for two reasons:

For one, it means the dists are of higher quality because authors have better tools at their hands and get poked to increase quality.

For the other, as a user you can tell whether the dist works on your particular system without even installing it and if it doesn't, you can easily find out on what system it DOES work, or which previous version did work on your system: http://www.cpantesters.org/distro/M/Moose.html#Moose-2.0205

> I managed to pick the one that give incorrect results...

That's why there is a review system:

http://cpanratings.perl.org/dist/Email-Send http://cpanratings.perl.org/dist/Email-Sender

Re:Why Perl? by blibble on Tuesday November 15, 2011 @12:09PM (#3239009)
I guess understanding why purely language bound code (which most likely accounts for 95% of the packaged code out there), e.g. an object system, would need testing across the cartesian product of all versions, all OSes and all archs, is beyond me...

I guess when you have a language that doesn't have a specification, you require things like this...

Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @12:46PM (#3239195)
It doesn't need it. It just gets it because the ecosystem is there and automatically does it for everything. The database interfaces get it, the Windows Process Memory access library gets it, the Hiragana learning tool gets it. Doesn't matter how big or small the project is, the service is provided for free, for all.

That is why i said the other languages have a long way to go yet; no matter how much you try to shift goal posts or resort to out-of-band attacks.

Re:Why Perl? by blibble on Tuesday November 15, 2011 @12:58PM (#3239253)
yes, but the point is if the utility provided by these "dists" would be mostly useless for other languages, then it's hardly honest to use said feature to promote CPAN (and therefore perl) against other languages.

the review system is a questionable advantage too, as I don't want to go digging through 16 SMTP packages to find the best one, and especially as I suspect most people install CPAN modules through the command prompt (or via their distro's package manager), rather than digging through a website.

I also note that Python tends to adopt the best packages into the standard library...

Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @01:17PM (#3239356)
> yes, but the point is if the utility provided by these "dists" would be mostly useless for other languages, then it's hardly honest to use said feature to promote CPAN (and therefore perl) against other languages.

Jeeze, you're barely making any sense. I have to wonder if you're trolling here. My point was about the utility of the ecosystem, which is useful for any language. The dists i mentioned are just examples of distributions you could find on CPAN other than Moose which all receive the same treatment.

> I suspect most people install CPAN modules through the command prompt (or via their distro's package manager), rather than digging through a website.

The installation is done via command line, but it is always preceded by research on the websites. Would you exclusively buy movies by title alone without looking at reviews?

> I also note that Python tends to adopt the best packages into the standard library...

Perl core developers do include useful things as well, but they are fairly strict about which ones, since they prefer to leave them on CPAN so they can be developed and released at a faster pace than the core. And in fact, the core is increasingly being viewed merely as a tool to access CPAN.

Re:Why Perl? by true_religion on Tuesday November 15, 2011 @02:44PM (#3239810)
Maybe I can put this arguement to rest.

It doesn't matter how competant your product is (CPAN) if you aren't delivering what the market wants.

Yes, CPAN provides a utility in the ecosystem, but most users do not use the extra features that CPAN provides over something like PyPi.

And even in the cases where there is a feature overlap (e.g. repository storage and breath), after a certain point things are "good enough" and theres a marginal return for adding more.

Does it matter if there are 17 SHA1 implementations on CPAN and 3 on PyPi? Not really, since you only need 1 good implementation. In fact it could be argued that having more implementations is worse due to paradox of choice.

Re:Why Perl? by Mithaldu on Tuesday November 15, 2011 @02:51PM (#3239855)
> Yes, CPAN provides a utility in the ecosystem, but most users do not use the extra features that CPAN provides over something like PyPi.

How do you know that?

Re:Why Perl? by berntb on Tuesday November 15, 2011 @03:32PM (#3240055)
In short, you're arguing against the long tail...

Let me add also mine anecdotal experience from yesterday:

I looked for a good SQL parser/evaluator in Python (which I partly use at work). There might be one, but I didn't find any. It is easy to find on CPAN. (And this is hardly an unusual request.)