Perl 5.11.0 Released
jamie points out that Perl 5.11.0 was released yesterday, as well as a schedule for future 5.11.x releases, planned for the 20th of every month. Jesse Vincent encouraged testing of the new (development) version, saying, "If you write software in Perl, it is particularly important that you test your software against development releases. While we strive to maintain source compatibility with prior releases wherever possible, it is always possible that a well-intentioned change can have unexpected consequences. If you spot a change in a development release which breaks your code, it's much more likely that we will be able to fix it before the next stable release. If you only test your code against stable releases of Perl, it may not be possible to undo a backwards-incompatible change which breaks your code."
It must be real good if it goes to eleven.
5.10.1 just came out like a week or so ago... there seems to be a slightly accelerated rate of Perl development lately, which is nice as it proves it's not a 'dead' language by any stretch... and with extensions such as MooseX::Declare, it really gives some of the more modern, OO-based dynamic languages like Python or Ruby a run for their money in their traditional sphere as well, I'd say.
and first post i think.
While you're being adventurous and testing Perl 5.11.0 I also suggest trying a Perl 6 implementation. Rakudo Perl (running on the Parrot VM) is one of the most actively developed right now. Not as solid as Perl 5.X yet, but certainly getting there.
Kernel 2.6.31.1
PHP 5.2.11
Apache 2.2.13
Debian 5.0.3
Keep up with all those thrilling point released with slashdot.org
For software of any appreciable size, Perl has unfortunately died in industry. People just aren't using it for anything more than 10-line throwaway scripts.
Perl 6 was something those of us in industry had been anticipating with glee. We expected it to modernize the Perl platform, and make it a contender against Java, .NET and C++ for large-scale software development. But we also expected we'd have that around 2005. It's nearly 2010, and we still don't see much real progress on that front. Rakudo just isn't a production-grade product yet.
I'm sad to admit it, but instead of waiting for incremental Perl 5 releases for the next decade until Perl 6 is finally mature enough, the company I'm with has started to migrate from Perl to Python. Unlike the Perl community, the Python community has shown with Python 3 that they're capable of working together to create a major release with many new features in a relatively short amount of time (especially compared to the Perl 6 effort).
Rewriting our approximately 3 million lines of Perl code into Python has actually gone reasonably well. Although I was a staunch defender of Perl, I do have to give Python its kudos. Every day it looks more and more like we've made the right choice moving away from Perl, and towards Python.
"For software of any appreciable size, Perl has unfortunately died in industry. People just aren't using it for anything more than 10-line throwaway scripts"
...
"Large and high profile websites using Perl include: Slashdot, The Internet Movie Database, Amazon.com, CMPnet technical magazines
Unit tests are only as good as the programmer that programs them.
Many times, your solution is not cut and dry.
nice to hear of universe between your ears, where it's 1999. outside of that, in real world use, Perl has plummeted in use in last five years, from third most widely used language to eleventh. the language has stagnated and any Perl creative effort being wasted on the undead Perl 6.
http://xkcd.com/224/
Limitations in studio, please.
Larry is old enough we should start placing bets, does he die before Perl 6 comes out?
I'm accepting bets whether a card runs you over before you read the comment.
All hope abandon ye who enter here.
qw(the list of strings operator) is awesome and is equivalent to a list of strings. The main complication of Perl data types: If the thing you're assigning to, or getting out, is an array, it starts with an @: @states = ("Alabama", "Alaska", "Arizona", "Arkansas"); (or if you don't like typing ",s all day long, @states = qw(Alabama Alaska Arizona Arkansas). If the thing you're assigning to, or getting out, is a scalar, it starts with a $: $states[0] eq 'Alabama' or $states[0] = "Canada". If you want an array reference, the reference itself is a scalar, and the thing you're pulling out is also a scalar because that's all you can put into arrays (which is why complex data structures are arrays or hashes with references to other arrays or hashes inside). $stateref = \@states; $stateref->[0] eq 'Canada'; $other_ref = [qw(manitoba vancouver tiajuana)]; @array_again = @$stateref; @array_again = @{$other_ref}.
And that's really all there is to it, unless you want array slices or something (and who doesn't? @threestates = @states[0..3]).... or getting those out of a reference (@{$stateref}[0..3]).
Oh, and hashes work on the same principle, but with % for the hash, {} for the indexes, () for populating the hash with an even-sized list, {} for the anonymous reference, and you can do @a_codes = @state_to_postal_codes{qw(alabama alaska arizona arkanasas)}
The World Wide Web is dying. Soon, we shall have only the Internet.
too many better competitors with powerful features have sprung up
Such as... what? A Visual Basic clone (Python), a rewrite of VB itself (.Net), a Java ripoff (C#), something that brings a website to its knees before it hits 20 simultaneous users (Ruby), or an absolutely appalling clusterfuck of a language that can't even use consistent function names within a single module (its name shall not be spoken).
Perl probably has the best testing culture out there from the major programming languages, including Java on the list. Between TAP, Perl 5 core's large test suite and a myriad of test related modules it has automated testing well covered.
Did you know for example that when you upload something to CPAN, it gets automatically smoked on dozens of platforms and hundreds of different boxes, test reports sent to the author and assistance provided to diagnose platform specific problems if needed?
Manual testing is for the problems not caught by the huge array of automated tests.
It takes a man to suffer ignorance and smile
Be yourself no matter what they say
Yeah, I'm gonna use this statistic, but only the part of it that I like.
Every so often when I think that Perl might be worth considering again, I come across some truly baffling example of misguided intentions like this.
I'm sure someone thought it was a brilliant idea to save keystrokes - why type "list.GetRange(0,3)" when you can create syntax using random unused symbols on your keyboard like @states[0..3]? After all, the metric we use to judge programmer productivity is the number of keystrokes they use writing code, not the maintainability of their code.
Oh yeah! And let's pick a totally random set of characters and use it to tell the code syntax parser to change modes! How brilliant! We can just use "qw" to mean "list of strings operator". Sure, why not, nobody would ever write a function called qw on their own, so there will never be a conflict. And now our code has random text in it which is hard to scan for and isn't surrounded by quotes and doesn't obey the same logic that any other text does.
Seriously, consistency helps reduce the burden on a programmer. There is no excuse for a language that attempts to remove readability and consistency for the sake of reducing the number of keystrokes required to type a task. You can only save yourself typing time once, whereas readable code saves you time every day for years.
Really? Or are you just making stuff up?
an absolutely appalling clusterfuck of a language that can't even use consistent function names within a single module (its name shall not be spoken).
I think its name should be spoken. I doubt that I'm the only one who doesn't know what language you're talking about.
Let's just say that you might need a Physicians Health Plan after trying to remember whether or not a function name has an underscore.
Perl has that too.
With the additional advantage of that it uses a regular expression, so you can split by a much more complex criteria.
The difference is that qw happens at compile time, and split happens at runtime, so it has efficiency advantages. Additionally, qw lets you choose the delimiter. For instance:
I believe he's talking about this.
What random symbols? the 0..3 type of syntax seems to be pretty common outside of Perl as well.
And Perl doesn't have a .GetRange(0,3) type syntax since it's not an OO language originally. OO was grafted on to it later, so a list in Perl is still a list, and not an object with methods.
Same logic could apply to exactly any other function. Personally I think "print" is a much more logical name for a function a programmer might want to use than "qw" (if your code has functions with names like that, I don't want to deal with it).
As a language construct though, it'd be weird if "qw" had a much longer name, since it's intended to help make things shorter. And it probably stands for "quote words" which seems pretty logical given what it does.
Also, this complaint seems odd in regards to Perl, which has a much cleaner namespace than many other languages, and helps keeping it clean.
I don't get this part?
I agree, though in part only.
Seriously, Perl gives you a choice. If you don't like it, don't use it. I don't use every single construct I can either. Sometimes they help:
Why type all those quotes and commas, which can easily be messed up, leading to a compile failure? It's even more readable this way. Sometimes things like $_ help inside things like map, sometimes they make things more confusing. A good programmer knows when a tool is appropiate.
Sometimes quick and dirty is a good thing. When I make a log parser in 15 minutes to gather some stats for a one time event, it helps being able to take some shortcuts. But those are by no means necessary, and I don't use them when writing bigger things.
Kids today... Who writes in C? Real Programmers write everything in assembly - all those fancy "volatile" and "restrict" constructs are just cruft required because they couldn't find Real Programmers who didn't need stinking optimizers. Java... don't even get me started - support for synchronization IN A LANGUAGE - that's just silly talk.
Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading
We must REALLY be behind the times like it's 1999. Because a lot of our stuff is not only written in Perl, but deployed on FreeBSD too!
Most of our stuff was in PHP and usually what the public sees in the terms of our control panel and shopping cart system is PHP. But behind the scenes, it's all perl. All our billing scripts, maintenance scripts, log parsing scripts, reporting scripts, and API are all Perl. Anything that needs extensive regex is Perl. Granted, most of those scripts I've built probably 10 - 12 years ago, but they still do their jobs and do them well why change?
We've been looking into datamart for long-term storage and analytics and the one we're close to selecting turned out to have no PHP support at all (well supposedly ODBC works), but Perl had not 1, but 2 modules in CPAN to connect and work with the database. And thanks to that it turned out to be faster in loading batch jobs than PHP/ODBC.
Recently we'd been using a PHP based CMS that while popular is slow. The content is mostly static, but the pages needed to load faster. We switched to a Perl based CMS with flatfile databases that load in less than 2 seconds vs. 12 seconds for the PHP/MySQL based CMS.
"The problem with socialism is eventually you run out of other people's money" - Thatcher.
Wait, wait. I'm not clear on your concept. Are you saying that compilation makes programs more stable and maintainable? What's the connection between stability, maintainability, and compilation?
Are you saying that if I ran C or C++ code inside an interpreter (and there are some), then that code would somehow become less stable and maintainable?
But I gave up on Perl because CPAN never worked properly on Solaris (I know about the gcc version, don't get me started). So it seems after the Perl kids grew up, the next generation adopted Python. I'm sick and fucking tired of trying to figure out if a certain "program" writen in Python need to be run with Python 2.4, 2.5, 2.6, or what the fuck ever, but now there seems to be a new generation for which Python is your Dad's scripting language, so they're onto Ruby.
And when the Ruby kids grow up, what's next? Can't we have some software that if it runs now, it will still run ten years from now, like Cobol, FormTran, or C?
I'll bet you consider those to be antiquated don't you? And yet programs in those languages are being run all over the world to do serious stuff, and will be for a long time, and your OS may be written in one of them.
My first computer in the 70's had an interactive BASIC interpreter that was great for playing around with programing. The scripting languages that have sprung up since them are acestors of that BASIC interpreter, and must be very educational for the younger generation, but IMHO are not suitable for production software.
I use Perl for one-time jobs... Repairing badly-formatted 80GB data files. Splitting flat files into multiple output files. Testing uniqueness of various fields. Finding the line(s) in a 250GB file that is crashing the sqlload program, and fixing it, because you have two hours or we'll lose the project. (nevermind it's the client's data). Editing several files to purge or excise fields or characters before doing serious work with them. Most of these I do via the command line. I'll write actual Perl scripts to crawl throughout our network and gather statistics on files and projects, to test patch status, to download files, process them, and email the results.
Quick! The boss is standing over you demanding that you convert a flat file into csv, add a header, prepend a unique id, and spit any lines with weird characters into a separate file. Here's the printout of the layout. You have ten minutes. There's a million lines in the file and they've got to build a marketing model before the client meeting in one hour.
Everyone is entitled to his own opinions, but not his own facts.
OK, then there's Ruby. It preserves the best pieces of Perl, Smalltalk, Python, and Lisp.
Perl's `qw(one two three);` actually works in Ruby as `%w{one two three}` but many constructs are semi-close to Perl.
It is considered to be in the Perl family of languages but is a supremely cleaned up / ultra powerful OOP language, in the Smalltalk vein.
In general, Ruby is as pragmatic as Perl, if not more so. It has a cleaner, more readable syntax, and code is very/most often shorter than a Perl equivalent.
As an ex-Perler myself, I'm not looking back. Ruby is a far more powerful language, and I can read other's code (and even my code, 6 months later).
Ruby exceeds Perl in web development, a la Rails (or Merb). It comes with many "hackers' libraries" built in, such as Expect, Erb, and Net::. Ruby Gems has Rubyforge, Raa, and GitHub as sources, which are functionally similar to CPAN. However, Gems is cleaner, without all manner of compilation and portability issues (and less code rot).
Ruby's lambdas, open classes (monkey patching,) and method_missing() make Perl hackery look anemic and juvenile, by comparison. If you need a different way to program, try building a DSL in Ruby, which is similar in functionality to Lisp's macros, just without S Expressions.
In short, Ruby is a better Perl 5/6 than Perl 5/6....
Molecular biologists and bioinformaticians use Perl extensively for manipulating databases of long chains of DNA and proteins. Perl excels in this regard, due to its string manipulation prowess.
How about:
Python's full grammar specification fits on two pages of A4.