
Perl far from dead, more popular than you think - chanux
http://royal.pingdom.com/2009/11/06/perl-far-from-dead-more-popular-than-you-think/
======
showerst
There are millions (billions?) of lines of COBOL still out there too.

I can think of two strong arguments against picking a less-discussed (dying?)
language:

1) Anecdotally, the top 1% of programmers (the people you really want to work
with) will go to the tools that make them the most productive. The reason
there's so much hype around languages like Ruby is that it makes programmers
feel more productive and happier. The kind of programmers that go online and
talk about these things after hours and argue about minor semantics are the
passionate ones, and the most likely ones to rock from 9-5.

A 2% increase in productivity _matters_ to a programmer that already gets
twice as much done as an average code-monkey.

2) One also has to look at what languages are being learned by new coders.
Code today might need to be maintained in 5, 10, or 20 years (let's hope
not...). If Perl coders are sparse now, what happens when you need to hire a
contractor at 2am in 10 years? You don't want to pay for one with an obscure
skill-set.

I'm a firm believer in choosing the best tool for the job, and not jumping on
the 'newest thing' every time a new blub gets an endorsement from this year's
DHH, but; ceteris paribus, I'd pick a language that's gaining momentum in the
world, not losing it.

~~~
pshangov
1) The top 1% of programmers will indeed go to the tools that make them the
most productive, which are not necessarily the tools that happen to be
currently most fashionable with the youngsters. Claims that Ruby is more
productive than Perl are vaporware. Ruby did have an advantage for a while,
but now Catalyst, RoR, and Django have now very similar feature sets (only you
get CPAN as a bonus with Perl).

2) A language that is currently gaining momentum is not necessarily a language
that will still have that momentum in 5, 10, or 20 years time. Perl popularity
reached its peak years ago, then slowed down and has now settled and remained
constant for a number of years. Given the kinds of mission critical
applications that have been written and are still being written in Perl, with
all my respect for Ruby (which I think is a fantastic language) I think it is
a safe bet that in 20 years' time there will still be more Perl programmers
than there will be Ruby programmers.

~~~
SwellJoe
I think it is a safe bet that JavaScript (or whatever it becomes) will be more
popular than Ruby, Python, PHP and Perl combined in 20 years time. And I think
it will be popular on both the server-side and client-side.

But, making bets about technology 20 years out is a risky game. 20 years ago,
there was no Java (and now it has come and gone as The Next Big Thing),
JavaScript, PHP, Ruby, or Python. Perl was just getting started and Haskell
was mostly just a gleam in some academic's eye. All of those techs are still
on upward trajectories to varying degrees, and some rose faster than others,
and some (Haskell, for example) have only recently started to see a burst of
activity and interest.

In other words, I don't actually have any idea what's going to happen in
languages, but I suspect that in 20 years, it probably won't be recognizable
as anything we're using today. Because the languages most used today for new
projects did not exist 20 years ago. But, I do have a lot of reasons for
believing that JavaScript will slowly, but inevitably, become a dominant
language for new applications on the server-side, just as it has become the
dominant language on the client-side for new applications.

------
n8agrin
Oh come on. Why is it that every 3 months there is a new article defending
Perl's vitality? I don't hear many people claiming Perl is dead. Does anyone
who likes and uses Perl care, and I mean really care, if Perl maybe be deemed
"dead" by non-Perl users? I understand public perception is important and a
growing active community is important. All that's well and good, but as a non-
Perl user I've never had anything but the impression that the Perl community
is alive and well. If people started telling me Python is dead I would
probably ask them if they meant their pet snake, and then I'd get right back
to writing all my double underscore methods happily. I certainly wouldn't
write blog posts claiming Python is not dead. Maybe this is just my take but
it seems like constantly claiming Perl isn't dead sure is a good way to push
the language in that direction.

~~~
joe_the_user
Actually,

I think you answer your own question here. Perl seems dead because the Perl
articles have titles like "Perl's Not Dead". If a language's supporters have
to argue for its very existence, the language can't be doing very well. And
with many languages very visibly growing, not being dead isn't enough, if a
language isn't growing, it can easily seem dead.

An article like "Why Is Everyone Excited By Perlfoo, The Latest Perl Library
That's Transforming The World" would actually be a better argument that Perl
had life in it.

------
jsrfded
At blekko we're building a web-scale search engine in perl. It includes a
distributed platform (kind of like bigtable) currently running on ~200
machines (soon to be 700). The total datastore, containing several n-billion
page crawls and associated indexes on our cluster is about 350tb.

I think of perl as a replacement for C. We're using it as a system language,
doing things like running epoll event loops, sending/receiving udp packets,
mmapping files, etc.

IMO perl, python and ruby are all great choices for a project. Perl seems to
be unfashionable these days, but we picked it because it came out the fastest
on the benchmarks for what we're doing, and being the oldest is has some of
the deepest library support through CPAN. The pragmatic-vs-idealistic attitude
of the community is also a plus for us.

~~~
Freebytes
I have seen Perl slurp and parse a 200MB text file in seconds. (It is really a
remarkable language for practical extraction and reports after all.) I have
also used it for its search capabilities. If PHP did not have preg functions
(Perl Compatible Regex), I would not be using PHP. Perl is known for its
speed. My only concerns with Perl stem from my inability to develop
applications quickly with the language, but that is due more to my
inexperience with it. However, after using it for years, you would think I
would know everything there is to know about it.

------
flatline
"A new version, Perl 6, is on its way but still under development."

Terrible article, it ignores so many of the issues that have directly led to
Perl's downturn in popularity and just hand-waves that Perl is still alive and
kicking. The phantom of Perl 6 has been a weight around the community's neck
for years, and the incremental 5.x releases with unrealized promises of 6 have
probably driven away many developers to newer, sexier languages, that can
deliver a major release in under a decade.

~~~
chromatic
> ... newer, sexier languages, that can deliver a major release in under a
> decade.

Did you know that Guido switched jobs in spring 2000 (not a typo) to work, in
part, on Python 3000? Python 3 is _older_ than Perl 6, and it's a much less
modest project. Compare Perl 6 rules and grammars to anything Python 3000
invented, for example.

~~~
donaldc
To be fair, python 3 now has a complete, usable implementation, whereas perl 6
does not.

That said, I very much like what I've seen/heard of perl 6, and will certainly
learn it once it's production-ready.

~~~
zaphar
Perl6 is actually pretty useable as is now also. I wouldn't say production
ready but It really is real close and I can use it for personal projects
already.

------
Jeema3000
Job openings on Indeed.com by keyword:

Ruby: 5,978 Python: 9,802 Perl: 22,172

If Perl is dead, then what are Ruby and Python...

~~~
jrockway
People like to look at rates of change, or if that isn't favorable to their
argument, the rate of the rate of change. With enough operations that remove
the "+ c" term, you can win any argument.

This results in:

"The total number of people that have ever used Ruby is greater than the rate
of people switching to Perl."

"Clearly Perl is dead!! My decision to use Ruby is justified with mathematical
fact!"

~~~
jrockway
I meant to add; there is nothing wrong with using Ruby. You do not need
mathematical proof that it is better. If you use it and it makes you happy,
that is all the "reason" you need.

It would be amusing if people argued over colors and ice cream flavors in the
way they argue over programming languages. "Chocolate is dead!"

------
tonystubblebine
How many new initiatives use Perl though? There's a lot of legacy code in that
list.

~~~
jrockway
Perl is what I use for my new initiatives, and it's a choice I've made through
careful consideration of many alternatives. Perl has the right "balance" of
languages features for web applications.

Some options I've tried and what I didn't like:

Haskell is much faster and a better language in general, but just doesn't have
enough usable libraries for writing web applications. (My first Haskell web
application was an application that generated an image of the latest Twitter
post from a user using a given hashtag. It went together quickly enough, but I
didn't really feel like "wow, this was a great web development experience that
has changed my life". I do feel that way about Haskell for text processing and
system programming, ironically. It definitely beats Perl there. But for simple
and complex web applications, Perl is much better.)

CL has the best development tools of any language, so I really wanted to like
it, but it doesn't really have a coherent community. I started writing a web
application in CL to allow clients to email us files, even when they were
behind a firewall that blocked outgoing email and ftp (!). This didn't go too
well; I really didn't like cl-who or html-template, and there were no other
options. (People in #lisp agreed with me, but their advice was to "just write
my own". The answer to every question about libraries on #lisp is "just write
your own".) I started porting Template::Refine from Perl to CL (see template-
refine and cl-template-refine on my github), so I could generate HTML.
closure-xml and cl-stp are great XML libraries, BTW. The next thing I wanted
was a dependency-injection framework. There were no libraries for that, so I
had to "just write my own". cl-junkie is on my github (junkie, "dependency
injection", get it?), but I got bored and didn't finish it. I ended up not
needing the app anyway. Too much yak-shaving lets you get over the excitement
of your actual idea, and leads to it never being done. With Perl I can get a
working application before I am not excited anymore. (Then I get excited about
cleaning up the libraries, and do that _afterwards_. Bootstrapping++)

Moving along, there is Scala and Clojure. Scala is a fine langauge, it really
"gets" functional programming. Clojure is not to my liking. (And it's not the
parentheses; I have a shit-ton of "production" Emacs Lisp lying around.)

These languages are both cases of the "oh, just write your own libraries"
community problem. Even worse is the potential to reuse Java libraries. I
don't see the point of using a nice functional language with overly-verbose
libraries that are going to randomly throw NullPointerExceptions. Many other
problems I have with Java carry over to Scala and Clojure if you use Java
libraries. (Design pattern overload, extremely poor object system, no types
that cannot be null, etc.)

(I know I said "bootstrapping++" above, and that you can bootstrap clean
Scala/Clojure libraries off the messy Java ones. But it's just too painful for
me. It's not boring, it's just pure pain.)

I use Scala for Android applications simply because there is absolutely no
other option. (I couldn't get any Clojure code to compile, and I am certainly
not going to use plain Java. I prefer Scala to both anyway, but obviously I
would prefer various non-JVM languages to those.)

So then there are Ruby and Python. Both are basically Perl with very tiny
superficial differences, so there is no reason to waste my time becoming good
at those. (Similarly, if you are a Ruby guru, you will probably not be too
excited to switch to Perl. Same language, except you aren't a guru anymore.) I
think Perl's libraries are, in general, more extensive and more mature than
Python or Ruby's. But for the beaten path, you will do fine with any. Ruby has
this "Rails" thing that I hear is pretty popular.

One thing I've noticed, though, is that the Perl community is better at
stealing from Ruby and Python than those communities are at stealing from us.
DBIx::Class is significantly more advanced than any Python or Ruby ORM that I
know of, KiokuDB is the only sane object database among those three languages,
etc., etc. But Ruby and Python still don't have anything close. OTOH, Python's
WSGI and Ruby's Rack are great ideas... so the Perl community now has PSGI and
Plack. So you can see why I find it compelling to stick with Perl. Good ideas
eventually migrate over here, and the community supports them.

Anyway, if I had a point, it's that there is no reason to disqualify Perl from
"what should I write my new app in" discussions, except ignorance. Perl has
its tradeoffs, but so does anything else available. (Don't let "I last used
Perl in 1995, so Perl must still be the same as it was in 1995," ruin your
next application development project!)

~~~
DanielStraight
Ruby and Python are basically Perl with superficial differences? How in the
world did you come to that conclusion? I don't think I have ever seen anyone
make that argument before.

~~~
jrockway
I can only explain in terms of an experiment:

Write an algorithm (or app) in your favorite language of the three. Then port
it to a different one of those three.

Now port to Common Lisp or Haskell, and see how your code feels different.

I find that Ruby/Python/Perl basically let you write the same program with
different syntax. "$self->foo" instead of "@foo". I find that Haskell changes
the way you actually program. Example: Nobody (except me) uses a type like
Haskell's Error monad in Perl; they use exceptions.

(Similarly, look for a "web framework" in Perl/Python/Ruby. Perl has Catalyst.
Python has Django. Ruby has Rails. They are all different, true, but the idea
is the same. If three people each started the same project on those various
frameworks, the end result, code-wise, would be very similar.)

~~~
btilly
While you will have that experience with a lot of code, there are some
concepts that don't translate so easily.

As an experiment port this Ruby to Perl:

    
    
      def  each (arg,*more_args)
          ( [] != more_args ) ?
              arg.each {|l| each(*more_args) {|r| yield [l]+ r }} :
              arg.each { |r| yield [r] }
      end
    
      each( 1..2, 'a'..'c', 'A'..'D') { |args|   puts args.join " " }
    

Then port this Python to Perl:

    
    
      def fib():
          fn2 = 1
          fn1 = 1
          while True:
              (fn1, fn2, oldfn2) = (fn1+fn2, fn1, fn2)
              yield oldfn2
    
      g = fib()
      for i in range(20):
          print i, g.next()
    

See what I mean?

~~~
jrockway
Some people refer to carbonated sugary beverages as "soda" and others say
"pop", but both are still speaking the same language.

~~~
btilly

      $point->missed
    

I know Perl far, far better than I know Ruby or Python. But I can't easily
reach for the abstractions in those examples within Perl.

That said, I'm in agreement with your basic point. On the whole the scripting
languages (including JavaScript) are much more similar than different.

~~~
jrockway
I don't consider these as being particularly interesting differences. With the
right modules, I can write code that looks like that in Perl. (It's not
idiomatic, though, so it is worth exploring other languages to see which
idioms you'd like to steal. I stole monads and applicative functors from
Haskell for Perl in MooseX::Data, for example. Monadic control flow is not a
common Perl idiom, but it is perfect for my asynchronous CPAN client.)

I am talking major differences, things that are so fundamental that you can't
really steal. Looking at Haskell, I see things like lazy evaluation, purity,
static typing and type inference, etc. Very, very different from Perl.

In Scheme, I see the "call stack" as a graph of frames, not as a linked-list
as in C. This is quite radical.

But in Ruby and Python all I see are different built-in functions, some with
special syntax. (Generators, list comprehensions, etc., etc.)

 _I know Perl far, far better than I know Ruby or Python. But I can't easily
reach for the abstractions in those examples within Perl._

I can. I hope you are considering CPAN as part of Perl, because "core perl" is
a very, very outdated and broken programming language. I think I would even
prefer Java!

------
mx12
There are definitely areas where Perl is still alive. I work in a
bioinformatics lab and we use Perl for the majority the analysis software we
write. Mostly because of Perl's strengths of handling files compared to
languages like Java.

------
buster
Listing very old sites which may have still some perl fragments somewhere in
there infrastructure doesn't mean perl isn't dead. I don't know of any major
sites written in perl today. Also, i thought slashdot used perl a long time
ago but have already written an new system, but i may remember that wrong...

[http://duartes.org/gustavo/blog/post/programming-language-
jo...](http://duartes.org/gustavo/blog/post/programming-language-jobs-and-
trends) has some interesting trends. From what i see there, i'd say perl is
probably still alive but slowly dying.

My hopes have been on parrot for perl. But after reading about the new perl
version and its ridiculous new "features", i am convinced that perl will die
when parrot breaks module compatibility with cpan, because noone will port
modules, yet care for the new perl.

~~~
chromatic
> I don't know of any major sites written in perl today.

Did you read the linked article?

> i am convinced that perl will die when parrot breaks module compatibility
> with cpan, because noone will port modules, yet care for the new perl.

Look into projects such as Plumage, Blizkost, and Perl 6 proto.

------
Freebytes
I loved Perl, and I still use it for quick hacks, but there are multiple types
of languages for different tasks. One of the tasks is to create a client side
application as an enterprise solution. Perl is not necessarily best suited for
this even if people try to make it so. The next is for web development. I
originally started with Perl for this, but PHP came along and made things so
much easier. Using Perl before PHP resulted in me knowing PHP the same day I
started using it. The general concepts were already there. However, PHP is
ugly in the way that the attributes to functions are inconsistent. I still use
PHP for web development, but for my next project, I am going to take a look at
a higher level language based on Ruby. Ruby looks very easy. While I enjoy
complexity in programming, I enjoy productivity during the creation process
just as much and products such as Rails look like they are the next step in
such development. Lastly, there is the quick hack. I still grab Perl for such
solutions, but this is code I would never show anyone else. So, yes, Perl is
not dead for me and maybe never will be, but it has had one foot in the grave
for a while. Perhaps a web development kit on top of an existing Perl
architecture to better separate the HTML, data, and functions would be the
cure, but it may be too late for that.

~~~
adam-_-
Have you looked at Catalyst?!

~~~
Freebytes
No, but I am going to look at it now. Now I am interested in taking a look
since Perl needs a web framework that is better than the standard CPAN stuff.

~~~
__david__
Also check out Mojolicious (<http://mojolicious.org/>). Mojolicious::Lite
(<http://search.cpan.org/dist/Mojo/lib/Mojolicious/Lite.pm>) seems very cool
for that 3 page site I've been thinking about lately...

There's also jifty (<http://search.cpan.org/dist/Jifty/lib/Jifty.pm>) which
seems a little more magic-y (ie, rails like) than Catalyst or Mojolicious.

------
elblanco
Perl is one of those "expected" utility languages everybody (developers)
should have some familiarity with. I don't think it's generally considered for
app development. But if somebody needs to do some quick, 1-off data
processing, a person that knows a bit of Perl can knock it off in a small
fraction of the time as somebody that doesn't.

I have a hard time hiring developers that don't know at least a smattering of
the Rubbish Lister.

------
btilly
Most of the examples listed are companies that started with Perl and have
never migrated. Of more interest for the future of the language are succeeding
current startups done in Perl.

Two that I'm aware of in the Los Angeles area are CampusExplorer and The
Rubicon Project.

------
makecheck
They ought to look at a lot more than web sites (although I've written plenty
of Perl CGI, and can understand why people would still use Perl).

Perl 5 is used extensively to automate tasks at companies; for example, in the
semiconductor industry. I've found that most of the engineers working in
design are basically fluent in Perl, and choose it for anything serious. I've
also seen TCL used, but that's mostly because so many tools support only TCL
APIs. Python has caught on in some places, but it is still mostly appealing to
pure software developers.

------
joblessjunkie
Ohloh tracks source control activity for open source projects.

They show a steady decline in Perl activity over the last decade:

[https://www.ohloh.net/languages/compare?measure=projects&...](https://www.ohloh.net/languages/compare?measure=projects&percent=true&l0=perl&l1=python&l2=-1&commit=Update)

~~~
jrockway
I spend my time writing code (or watching TV, or whatever) rather than
maintaining Ohloh stats for each of my 100+ open-source Perl modules. Most
other people I know do the same.

Perl is the 5th most popular programming language on github (in terms of
unique non-fork projects that contain some code in that language). It is ahead
of Java and PHP, for example.

------
jhannah
<http://www.catalystsites.org/>

