Slashdot Mirror


Perl 5.16.0 Released

An anonymous reader writes "Perl 5.16.0 is now available with plenty of improvements all around. You can view a summary and all the change details here. With Perl on an annual release schedule, and projects like Mojolicious, Dancer, perlbrew, Plack, and Moose continuing to gain in popularity, are we in the middle of a Perl renaissance?"

37 of 192 comments (clear)

  1. Whatever happened to Perl 6? by BitterOak · · Score: 5, Interesting

    I love Perl, but I'm curious. Whatever happened to Perl 6? I remember hearing about it way back when I was in grad school, which was a long time ago.

    --
    If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
    1. Re:Whatever happened to Perl 6? by Anonymous Coward · · Score: 2, Informative

      Perl 6 is quite a departure, with many breaking changes from 5. People had code written in 5, and 6 became moored in WIP status for the last 6-x years.

    2. Re:Whatever happened to Perl 6? by vlm · · Score: 5, Funny

      The problem with trying to do absolutely everything is it takes awhile to implement.

      http://perl6.org/compilers/features

      Its kind of like that Arthur Clarke story "The Nine Billion Names of God". If, one night, you glance at the sky and see the stars start going out, you'll know that someone has finally implemented all the Perl6 features. Either that, or its cloudy and going to rain.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    3. Re:Whatever happened to Perl 6? by Surazal · · Score: 4, Informative

      I love Perl, but I'm curious. Whatever happened to Perl 6? I remember hearing about it way back when I was in grad school, which was a long time ago.

      Perl 6 isn't dead, per se. A quick google search shows that there are a few implementations running around, although none are even close to production-ready yet. Here's the Perl 6 portal, in case you were wondering.

      I did run and download one of the more complete implementations, and part of the problem I think is that perl 6 is not ANYTHING like perl 5. The reason I use perl at all, and the only reason I still use perl 5 TO THIS DAY is the regex capabilities. They completely ripped that out of perl 6 and re-implemented it to make it more user-friendly, and they did so poorly, IMHO. Instead of calling htis perl 6, they should have named it something completely different. Call it "perl" does a disservice to what made perl so powerful in the first place.

      --
      --- Journals are boring; Go to my web page instead
    4. Re:Whatever happened to Perl 6? by vlm · · Score: 5, Interesting

      became moored in WIP status for the last 6-x years.

      12 years, not 6.

      The killer is no one in the perl dev community wants it. This says it all "Backward compatibility with earlier versions of Perl is not a goal". The problem is I don't love perl because of its syntax, although some of it is pretty cool, I love it because of the CPAN which does all my work for me. All my problems seem to be solved by combining at most ten or so CPAN modules. Its kind of like how the whole world is built out of only a hundred or so elements... if I wrote a perl program that used 100 CPAN modules, the result would be a new universe would spring into being, like the big bang. Or something like that.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    5. Re:Whatever happened to Perl 6? by cant_get_a_good_nick · · Score: 2

      This scares me. The fact that there are two compilers (which sows confusion) and none is feature complete... and it looks like Parrot was dropped.

      This is beginning to look like the HURD. A lot of thrashing around for cool features, nothing ever released.

    6. Re:Whatever happened to Perl 6? by chromatic · · Score: 5, Interesting

      ... part of the problem I think is that perl 6 is not ANYTHING like perl 5.

      The parts of Perl 6 I like are a lot like Perl 5, and the parts I really like are much better than Perl 5.

      ... the only reason I still use perl 5 TO THIS DAY is the regex capabilities. They completely ripped that out of perl 6 and re-implemented it to make it more user-friendly, and they did so poorly, IMHO.

      I like Perl 6 grammars far, far more than I like Perl 5 regex. That's one of the best parts of Perl 6. Regex as borrowed from Unix and enhanced over the years have accumulated a lot of mutually incomprehensible cruft. Perl 6 cleans that up.

      The problem with Perl 6, of course, is that no implementation is anywhere close to practically useful. Almost twelve years after the Perl 6 announcement, there's still no reason to hold your breath.

    7. Re:Whatever happened to Perl 6? by chromatic · · Score: 4, Informative

      If that scares you, cover your eyes: there are more than two compilers.

      ... it looks like Parrot was dropped.

      Not exactly. The Rakudo (Perl 6 on Parrot) people want to write a VM independence layer and port that to multiple VM backends.

      Don't ask me to explain that.

    8. Re:Whatever happened to Perl 6? by zmughal · · Score: 5, Interesting

      As far as the matching capabilities of Perl 6, I think they're trying to do something that will advance the state-of-the-art in terms of programming langauge integration in the same way that Perl 5's regex did. The Perl 6 rules are similar to the tricks and hacks that people do with regular expressions to build up full grammars. By separating out the parts into logical components, you will get better readability and reusability. Not only will we get cleaner text processing, but this (along with the VM architecture) will aid the development of DSLs that will extend the language into an exciting future.

      Yeah, it's some good Kool-Aid and the Perl community been waiting for a while, but bringing these ideas into a production-ready language isn't trivial. I'm still using Perl 5 because of CPAN, but I feel that Perl 6 will eventually get to the same level especially with a source-to-source compiler. The hardest part would be dealing with native-code bindings.

    9. Re:Whatever happened to Perl 6? by stderr_dk · · Score: 2

      and it looks like Parrot was dropped.

      Nah, he's only resting...

      --
      alias sudo="echo make it yourself #" ; # https://pipedot.org/~stderr & http://soylentnews.org/~stderr
  2. Modern Perl book by Anonymous Coward · · Score: 4, Informative

    Chromatic's Modern Perl book is also available as a free download. It's useful for Perl programmers who want to know what's new in the Perl world in the last several years.

  3. Re:No by vlm · · Score: 2

    LOL apparently you've never seen the Perl6 feature list, which can be summarized to "implement every programming concept known to mankind", or the CPAN which is "everything that can be turned into (what amounts to) a library, turned into a library and ready to freely download".

    Its the ultimate glue language.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  4. Re:No by X.25 · · Score: 5, Insightful

    Perl is not coming back. Get over it and learn something else.

    It never went anywhere, so why would it need to come back?

  5. Re:Hard to get started by chromatic · · Score: 5, Informative

    Can some /.er point me down the path toward modern Perl learning?

    I have a bias, but I've had many positive responses to Modern Perl: The Book.

  6. Re:No by h4rr4r · · Score: 5, Informative

    Coming back?

    It never left, I used it everyday.

  7. Like Perl, but Python dominates by Anonymous Coward · · Score: 2, Insightful

    .. for prototyping and scripting. I'm a non-coder working for a software house with highly experienced coders. I taught myself Perl and C. But none of these guys will use Perl. For anything. All they will use for scripting and prototyping is *Python*. They make the usual cliche jokes about Perl being unreadable etc. I'm really beginning to think that I wasted my time learning Perl.

    1. Re:Like Perl, but Python dominates by ThePhilips · · Score: 3, Insightful

      All they will use for scripting and prototyping is *Python*.

      NOT using Perl for prototyping IME is a good thing.

      Many of my program and libraries begin their life as proof-of-concept in Perl. And the problem is that from Perl implementation it is pretty much never possible to devise how much time it would take to implement C/C++/etc equivalent.

      I had totally bad cases like where I have spent 2 weeks writing a library in C++ for which Perl's equivalent took me only 30 minutes. As a proof-of-concept, Perl implementation could be a quick hack - but C++ has to be a production quality. With the vast utility of Perl many corner cases seem trivial and work easily without performance regressions - while in C/C++ one ends up feeling like reimplementing the wheel for every one of them.

      Perl is BAD for prototyping for C and C-like languages IMO. The difference between the languages and the libraries is way too great.

      P.S. I'm not sure how better it is in Python. It should be better: the utility of the Python is much more limited compared to the Perl.

      --
      All hope abandon ye who enter here.
    2. Re:Like Perl, but Python dominates by ThePhilips · · Score: 2

      Exploring a concept to assess feasibility can work, but don't expect to not have to nearly start over, just with the benefit of knowing which algorithms/development paths just won't pan out.

      My problem with Perl is precisely that: it is nearly impossible (or very time consuming) to implement conventional data structures like list or tree in Perl. One generally doesn't need them in Perl - but they pop up pretty often in C/C++/etc.

      Now, when prototype is implemented using the Perl's arrays and hashes, they are orthogonal to data structures C++ code it going to use. Assignment of arrays and hashes (even during their mutation in loop) is optimized well in Perl - but in C++, it would end up being a pretty dumb copy of large chunks of data. I see often the cases where prototype in Perl is managing task in fraction of second - while code dumbly 1:1 translated to C++ is taking seconds.

      Thus IME even for potential algorithm assessment Perl is not a good choice. Algorithms as they are implemented in Perl and in C/C++ end up being way too different. In Perl it is easy to base many things on hashes and they would perform great. OTOH, if prototype is followed closely, in C++ one would be simply overwhelmed by the resulting code complexity of managing so many (potentially different) associative containers. Turning problem up side down and trying to implement prototype in Perl without hashes (I did this several times too) is a real chore and by complexity pretty close to implementing the same prototype in C++.

      As it stands, I yet to find a language which is good for C/C++ prototyping. I have tried in past the Python, but was turned off by the lack of warnings and very poor performance. Lisp and some of its descendants theoretically are good candidates too, but I have none of them available in office.

      --
      All hope abandon ye who enter here.
  8. Re:Renaissance? by Jeremiah+Cornelius · · Score: 2, Funny

    Who said anything about dagos and cathedrals? That's a bazaar inference!

    --
    "Flyin' in just a sweet place,
    Never been known to fail..."
  9. Re:Hard to get started by vlm · · Score: 3, Interesting

    Well that was embarassing. you don't want to see projecteuler.com. Try

    http://projecteuler.net/

    that works a heck of a lot better.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  10. Parallax by hessian · · Score: 5, Insightful

    We're seeing Perl as having moved because we have moved. Perl has kept doing what it has always done at a high level of excellence.

    The market shifted. First, many Perl programmers shifted to PHP once the net decided security and economy of processing power were not goals on the table. Second, a lot of newer programmers are reliant on frameworks and other pre-built systems and learned the languages that go with those.

    However, among those who've just kept making things work for the past 15 years, Perl remains alive and well. It is still the fastest way to get the widest range of tasks done. And if you don't code like an obscurantist maniac, it's easy to maintain.

    It may look to us like Perl went away, but what really happened was an infusion of other people and trends. Now that the free money from a dot-com booming economy has gone away, Perl is shining through once again as the reliable and powerful option that it is.

  11. Perl's strength by Okian+Warrior · · Score: 5, Interesting

    Perl's strength is that it's expressive. It's not a language which is easy to learn or which generates heavily optimized code.

    In the demo phase, you're not really worried about performance. The goal is to have something showing as quickly as possible, and not worry too much about how fast it runs, or how much memory it takes. Overspec your demo system for the time being (ie - make it really fast and install lots of memory), and once you have a reasonable interface go back and recode it in a simpler language which can be more easily optimized.

    Languages which are simple to learn (c++, for example) are generally not very expressive. You end up wasting tons of time debugging issues of memory allocation, library interface details, and datatype conversion.

    Languages which are expressive are a little harder to learn, but any individual line in the expressive language does a lot more. Since you are writing fewer lines, and since the fewer lines do more, you end up making programs more easily and in less time.

    Yes, the programs will execute a little slower, but as mentioned, this is not important in the demo stage. Your productivity will be much higher.

    And there are lots of places where performance simply doesn't matter. Scripts usually fall into this category.

    Perl was written by a linguist, not an engineer. As such, it's harder to learn (it's got tons more keywords and context), but once you get the hang of it it's much more expressive. The following single line:

    @Lines = sort { $a->{Name} cmp $b->{Name} } @Lines;

    unfolds into several lines of C++, plus a subroutine definition with datatype definitions. The following line:

    @Files = <c:/Windows/*.exe>;

    can be implemented using one of over a dozen possible library calls in C++, but is builtin in perl. You don't have to look up the library call interface specific to your system.

    1. Re:Perl's strength by Anonymous Coward · · Score: 2, Interesting

      Well put. Except perhaps for the part about C++ being "easy" to learn. C++ is a fucking mess.

    2. Re:Perl's strength by Anonymous Coward · · Score: 2, Insightful

      In other words, Python is just like Perl, only Python fans are deluded into thinking the Python way of doing things is the only viable way.

      Fixt.

    3. Re:Perl's strength by doti · · Score: 2, Insightful

      sorry, I tried many times to copy/past these so called python code, and then never work.

      yes, relying on white space is a stupid idea.

      --
      factor 966971: 966971
    4. Re:Perl's strength by skids · · Score: 3, Interesting

      In other words, Python is just like Perl, only it is readable and makes sense.

      Funny, I found the perl easier to read.

  12. Perl renaissance? by Fished · · Score: 2

    are we in the middle of a Perl renaissance?

    I hope not. I have to maintain a large body of Perl code at work, and it's a nightmare.

    --
    "He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
    1. Re:Perl renaissance? by kwoff · · Score: 5, Insightful

      Have you maintained any (large) body of code that isn't a nightmare?

  13. Re:No by doti · · Score: 2

    Right now I am (should be :) writing Perl code, and being paid for it.
    And it's a big and important project, not just some utility scripts.

    I also write one of my main pet projects in Perl.

    --
    factor 966971: 966971
  14. calls C/C++ libraries by bzipitidoo · · Score: 3, Interesting

    Ultimate glue? That's why I'm interested in Perl 6. It's supposed to be able call C/C++ library functions directly. No more need for wrapper libraries, which is the majority of CPAN. No need for SWIG, which I find bloated.

    --
    Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
  15. Re:There will be no Perl renaissance by chromatic · · Score: 2

    So yeah, of course some people are still using Perl....

    We call that the CPAN, and it's the opposite of plummeted.

  16. Bunch of stuck up nannies by cheekyboy · · Score: 5, Insightful

    If they write their own code, its unreadable?

    Fire them.

    Its easy to write code in perl that looks like C and is readable, and still fast. (Often faster than java btw)

    Yes, using shortcuts and lots of login in one line is cute, but its horrible to read, so DONT do it.

    --
    Liberty freedom are no1, not dicks in suits.
  17. Re:No by FrootLoops · · Score: 2

    Coming back?

    It never left, I used it everyday.

    Hah, you got modded informative instead of funny.

  18. Re:There will be no Perl renaissance by Sez+Zero · · Score: 4, Informative

    Sorry, Perl fanboys, but Perl is dead. Not only has it been eclipsed in the web domain by PHP, J2EE, ASP.Net, Ruby on Rails, and others, but in the scripting domain it has been overtaken by Python.

    TIOBE Index seems to disagree: Java, C#, PHP, Python, Ruby all down.

    Perl right there at 9, same as it ever was: a good tool for people that want to get work done and not chase the hot flavor of the month.

  19. Re:No by Junta · · Score: 2

    The reason I like perl is that it is 'good enough' and the people that would screw with it to make it inconsistent are all off on either perl6 windmill chasing or other languages. I will admit to some unfortunate ignorance of ruby, but at least with python, while I find it a commendable language, they have been much more aggressive about incompatible changes than perl5. A program written against perl 5.4 runs fine with perl 5.16. However, in my experience code written against python 3.0 might not work quite right with 3.2 without some tweaks.

    In terms of *nix friendly scripting languages, ruby, perl, and python are the only choices with a sufficiently rich set of libraries available to do things.

    Besides that, perl is serviceable. It allows programmers to employ unreadable syntax, but coding discipline can mitigate that. Generally poorly readable perl code can be written readably. Part of this is terse syntax to enable simple one-liners in a *nix pipe chain. Python isn't exactly a language amenable to that. However, perl syntax accomodates more verbose, readable style to be comparable to python in more sophisticated scripts. Compare this with awk, which also has excellent properties on CLI, but doesn't scale up to a 'real' program so well.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  20. Re:Short answer: No by Junta · · Score: 2

    What's *really scary* is a perl script with '#use strict;'. Meaning they tried to use strict; but gave up on it.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  21. Awesome (2nd try) by mattr · · Score: 3, Insightful

    From the link:

    According to the developers there are 590,000 lines of changes across 2,500 files from 139 authors in Perl5.16.0. Perl5.16.1 should be published on 20 June, addressing any significant bugs found in the 5.16.0 release. Work will then begin on the 5.17 development branch which should arrive as Perl5.18 in May next year.

    Sounds like a HUGE amount of development! I had no idea of the scale of the effort and love and use Perl myself.
    Hard to imagine how anyone intelligent could ever say Perl is not timely with this kind of mass coordination going on. (Not to mention Slashdot being written in Perl IIRC...)

    Personally I am excited about the Modern Perl book (I seem to have self-censored myself into using older versions).
    I have used and liked Catalyst but have also imagined even easier ways to build systems with it and say Moose.
    So I am going to have a lot of fun trying out Dancer and PSGI/Plack.