Perl 5.14 Released
chromatic writes "Pumpking Jesse Vincent has just released Perl 5.14, the latest stable version of the venerable Perl 5 programming language. The list of changes in Perl 5.14 includes several enhancements, including performance tuning, Unicode improvements, and updates to the core libraries and documentation. Perl 5.16 is on track for a release next April."
I was just going to say that back in about 2001 someone gave me advice not to learn Perl 5 because a Perl 6 release was imminent.
---Technology will liberate us if it doesn't enslave us first.
Perl 6 is out. But it's a diffent language in the same way that python 3 is not like py 2.7
The thing I really like about perl is it's the shortest oreily pocket reference. it's even shorter than c++. Yet you can do vastly more than python without importing a single lib. that is to say it's surprisingly concise for encompassing such a lot of capabilities in the core language.
Some drink at the fountain of knowledge. Others just gargle.
.... does it have any new operator? :-P
And before you tell, it was just a joke, I know you should now add operators in a minor release.
Why can't
Where do I sign up?
No, Perl 6 is not "out". I can't use it on my production servers, because there's no good implementation yet, even after ten years.
I know there have been a few attempts, but none of them are seriously usable like Perl 5, Python, Ruby, Tcl, or Lua are.
At least when developing Python 3, the Pythonistas built a production-grade implementation. Even if its adoption hasn't been as fast as was initially hoped, at least those of us who do want to use it can actually use it, and we can do so for serious uses. The same can't be said about Perl 6.
Perl 6 has 140+ different operators! That is absolutely insane. While I support being concise, Perl has far more complexity in the language core than any other language I have ever seen.
Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
The more mature a programming language is, the harder it is to extend it. Mature languages have vast codebases that must be supported, and substantive changes break legacy support. That's why it's best to get it right early on.
Help stamp out iliturcy.
Perl makes a GREAT "general-administration" tool. I use it as basically bash++ - it's the best way,bar none, to write programs on the command-line. There's a reason even the ultra-minimalist OpenBSD includes Perl in the default install.
Python 3 is barely different from Python 2. It is not backwards compatible, but I've ported Python 3 programs to Python 2 (when I realized I had to use SciPy or run the code on a system with only Python 2), and nearly the only changes I had to make were changes for // for integer division and required () for print -- and these changes were trivial if I could simply import from __future__. In contrast, Perl 6 is very different from Perl 5.
What a fool believes, he sees, no wise man has the power to reason away.
Perl is alive!
Last time I checked Slashdot still runs on perl...
My company does too.
Now that ActiveState is providing Perl for Cloudfoundry, it's going to be good times in Perl land.
I love OpenBSD. But aside from scripts for mucking with perl itself, the reason perl is in the base install is to run the following (mostly brain dead simple) things:
/usr/sbin:
/usr/bin:
in
add_user and rm_user scripts
apxs (apache extension DSO builder / installer)
pkg_chk, pkg_delete, pkg_info, pkg_create, pkg_merge (our simple and crude package manager)
in
afmtodit font file creator for groff
c2ph/pstruct dump c structure with offsets from debugger stabs
find2perl convert find command with args to perl program
piconv character encoding converter
sed2p sed to perl converter
Nothing that couldn't be done better as a side effect to a rewrite to more modern and alive language, the apxs, package manager and add/delete user is probably the only things most people use beside some that might use the apache extension handler. That package manager is especially aching for better features anyway.
We still use Perl to develop our products (commercial and open-source.) Perl may be maligned, but it's still a good tool for a lot of purposes and if you pick and choose carefully, CPAN is an awesome resource. Perl has modern frameworks (eg, Catalyst) for Web development that are competitive with anything out there, and DBI is superior to most alternative languages' database libraries.
While I'm bullish on Perl 5, I'm not so optimistic about Perl 6. I think it's suffring horribly from second system syndrome and may never see the light of day as a useful production tool.
but, as with COBOL, that momentum is running down while with other scripting languages things are heating up. I like a language where the attention of the found and key developers are focusing on what will be used in the near future, not flying off into lala land for a decade speaking to each other in isolation.
Excellent troll... really first rate. Did you get federal funding from the Ministry of Trolling for that gem? I've been working professionally in unix/linux environments for about 12 years and believe me perl is still quite alive and well doing real work in lots of different kinds of companies. Php is somewhat painful to code in by comparison but both have their place. Except for java.. it has no sane place but you still find it in use everywhere which just goes to show anything can succeed in this world with enough marketing dollars behind it.
Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats. -HLM
With Duke Nukem Forever being released next month, I think we shouldn't lose faith in Perl 6 either.
It's taken 10 years, yes, but sooner or later they'll realize that what people are waiting for is a _native_ perl 6, not one on top of parrot, haskell, perl 5 or any other external engine. Cause if you virtualize, you might as well use the underlying langauge - it has to be at least as powerful as perl 6.
Despite what many are saying, Perl is still used extensively even for new projects. I use it daily, and while I really like ruby and python, for a variety of reasons, I have not switch away from Perl for most projects. My only question is when will Strawberry Perl 5.14 be released?
With Perl, that complexity gives you power. If one does lots of programming, and their mind is in good shape, Perl can be used to rapidly dispatch programming problems.
well, all the other languages jacked Perl's DBI (and many, many other things) for their libraries.
Your company has history with Perl, but I don't think it will be chosen for new things now, PHP alone is mostly eating its lunch. Web serving the stats are something like 75% PHP5.x and 20% dot-NET but only 1% Perl with J2EE 5% (some overlap as sites run multiple langauges, but still....). Compare that to over ten years ago (when I was developing in Perl), it's really fallen.
All I'll say to that is that the entire computing world does not revolve around websites... or programming certification mills. =] Perl is the duct tape that holds the networked world together... and it's not dying any more than actual duct tape is. It's a refined tool used by professionals to do the jobs that have always needed done in a minimum of time and that don't cater to the latest buzz word laden development methodology.
Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats. -HLM
In default installs, Python is eating Perl's lunch on the command line, I can confirm by greping through my distro's /usr/bin and /usr/sbin. More python scripts to admin the system than Perl! That argument (in the default install) doesn't hold as much weight anymore, Python is also default in most major linux distros (and the new admin stuff is using that, while the crufty Perl admin scripts linger because no one cares to rewrite them).
that "minimum of time" is only until the next poor SOB has to modify some code. Then it's time to go a-wadin' through the whale guts.....
Our entire API framework is Perl and has been for a few years now. Seemed like every time we needed to add a new format to return values in (originally was XML) like JSON, there always seems to be a perl module "for that".
The best part of things is the fact that while we've added new functionality, we haven't had to do any maintenance work on the script in almost 5 years now.
Biggest change we made from 5.8.x to 5.10 was rewrite some nasty els if statements and made them switch statements.
The original web based management tool was originally written in PHP and that is what took all the time to maintain. It seemed like with each dot release of PHP some little thing broke and we were always fixing something every few weeks because of it.
"The problem with socialism is eventually you run out of other people's money" - Thatcher.
A more readable changelog, with formatting, hyperlinks etc applied (rather than a raw pod file) can be seen here
I think the camel's head didn't fit. The pic probably needs resized. As for the camel, it's featured on "Programming Perl", which has been the main way to learn Perl for most programmers. BTW, "Programming Perl" is being updated for a maybe-December release. I was notified by O'Reilly after reviewing "Programming Perl" and saying it was old and out of date.
Perl 6 has 140+ different operators! That is absolutely insane. While I support being concise, Perl has far more complexity in the language core than any other language I have ever seen.
I like this about English too. Can't tell that Larry is a linguist by training, can you?
Come to think of it, I bet Python developers tend to be fond of Esperanto too. Some similarities there.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Internet Yiddish LIVES!
erm... i'm pretty sure there are a lot of gui programs that don't use print. ignoring that i think fixing brackets on print is pretty fucking trivial. do you have any better examples?
This is a joke. I am joking. Joke joke joke.
The new search engine blekko is written in perl - wrote our own NoSQL database in it, too. We found CPAN to be an awesome resource; we use 600 distros from CPAN, and only found a couple of bugs in them.
It's Java that's the new COBOL. (buh dum, ching!)
Python 3 is barely different from Python 2
It's different enough to break the language for legacy code.
When you have code by the million lines, it's impossible to have a script that can reliably convert programs like Guido thinks it can. It's not just adding parentheses to print, there are some beastly things, like giving the division operator a different behavior. In Python 2.7, the result of (3 / 2) is 1, in Python 3 it's 1.5. I have absolutely no way to pore through those million lines and checking every division to see which operator should I use, keep the '/' or change it to '//'.
Besides, the changes from Python 2 to 3 are *all* in the direction of making it a more verbose language. I couldn't find any example of code that would be shorter in Python 3 than in 2. That goes against the philosophy of a scripting language, the last thing we need is a new Java.
I had gradually changed from Perl to Python over the years, but this P3k made me reconsider if this was wise. Apparently, there's no good-for-everything language left. So, in the scripting side, where quick results count, I've been considering switching back to Perl. Conciseness is king here, and nothing beats Perl at that.
As for large projects, thank god C is still there, still running K&R style code almost unchanged. Looking back over the years, I find that, for big projects, no language has given me less trouble than C. Once you get it running, it runs forever.
Exfuckingactly. Whilst the buzz-word slavering IT managers and their Java sycophant underlings hype around in Brownian motion fiddling feverishly with websites, the rest of the professional world maintains the foundation and glue that really makes all the shit "just work."
With the possible exception of Python, nothing else comes close in satisfying it's intended purpose (talking toolkit/scripting/etc). Perl bashing reminds me of kids with snot-shiny upper lips whining about the "complexity" or "shortcomings" of C while not hearing the whooshing sound as the mothership-sized point sails over their heads.
Same with COBOL. Just because you don't encounter it in your little Javascript/PHP career does not mean it's not out their pumping major iron. You'd be amazed how many COBOL professionals there are laughing at the ignorance of these arrogant little dickheads talking out their anuses.
All programming/scripting languages have their place. They were all designed (some less so) to solve a specific problem.
Python has some advantages over Perl -- cleaner syntax, a better REPL, none of the legacy shell-script-derived cruft that makes it so easy to write terrible code in Perl. It also has quite a few disadvantages that make it harder to write robust code, such as its lack of any equivalent to Perl's extremely useful "use strict" and its poorly designed scoping rules.
I see a lot of new development taking place in both languages. I don't see much PHP, but that's a niche language restricted to web development, which isn't something I'm involved with.
"I was just going to say that back in about 2001 someone gave me advice not to learn Perl 5 because a Perl 6 release was imminent."
It's a shame that this 'Osborne effect' has hung over Perl for the last decade. I wonder how Perl 5 would now be perceived if Perl 6 had been given a different name and announced as a research project into language development, rather than the next version of Perl? With better PR, Perl 5.10 could easily have been 'Perl 6'.
All this tends to obscure the quet evolution of Perl 5 programming into what 'chromatic' and others are calling 'Modern Perl', using an idiomatic style that takes full advantage of recent language features (some borrowed from Perl 6) and CPAN to write efficient and maintainable code:
http://www.modernperlbooks.com/
http://onyxneon.com/books/modern_perl/
As always, a lot of the most active development is happening outside the core language. Anyone interested in some of the directions Perl 5 is going in today ought to check out projects like these:
http://www.iinteractive.com/moose/
http://plackperl.org/
http://www.catalystframework.org/
http://mojolicio.us/
PHP alone is mostly eating its lunch
Interesting you say that... our product's Web interface is written in PHP and I rue the day I made that decision. For all of Perl's faults, PHP is about 100 times worse. No proper namespaces, completely wild-west wacky naming "conventions", no decent DBI-like library, crappy add-on modules (just try finding a decent YAML parser for PHP.)
If I had to do something new, I'd probably look at Python. I have very little experience with it, but it seems quite easy to use and fairly readable. Nevertheless, CPAN still takes the crown for a useful repo of modules.
There are still a lot of companies developing in Perl. They tend not to tout it or make much noise about it, though. It's not trendy any more.
php5 is simpler? What planet do you live on?
In Perl:
curl -sL 'http://slashdot.org/index.rss' |perl -ne 'm/<title>(.+?)</ && print "- $1\n";'
Same thing in PHP5:
curl -sL 'http://slashdot.org/index.rss' |php5 -r '$h = fopen("php://stdin","r"); while(! feof($h)){$line=fgets($h); if(preg_match("/<title>(.+?)</",$line,$match)){echo "- ".$match[1]."\n";}}'
... and if you say "well, php5 is simpler for what *I* need," I'mma gonna poke you for thinking that everyone else has the same needs as you.
my $troll = $ubiquitous_BSD_is_dying_troll;
$troll =~ s/BSD/Perl/g;
print SLASHDOT $troll, "\n";
It's a very dark ride.
People express that sentiment often, but I've never found it realistic. Many of the philosophical goals of Perl 6 are the same philosophical goals Larry had when designing Perl 5. Many of the tactical approaches are far different, but there's where my disagreement with the "It deserved the label as an experiment at the time!" idea arises. No one really knew how far redesigning Perl needed to go to achieve those philosophical goals until the RFCs and Apocalypses started pulling at loose strings in the sweater.
Certainly, though it's less about using new and exciting features because they're new and exciting than it is about understanding how the language and its features, both new and old do—and, in some cases, don't—work. The biggest and most important language change has been the gradual lexicalizing of features such as filehandles, pragmas, grammar modifications, and even packages. You may have to squint to see the latter, but it's there. Perl 6 takes that principle to another level.
how to invest, a novice's guide
A recently installed server in a small company (Debian Squeeze):
$ find /bin /sbin /usr/bin /usr/sbin -type f -exec file "{}" \; | grep 'perl .*script' | wc -l /bin /sbin /usr/bin /usr/sbin -type f -exec file "{}" \; | grep 'python .*script' | wc -l
196
$ find
46
My notebook (Ubuntu 10.4):
$ find /bin /sbin /usr/bin /usr/sbin -type f -exec file "{}" \; | grep 'perl .*script' | wc -l /bin /sbin /usr/bin /usr/sbin -type f -exec file "{}" \; | grep 'python .*script' | wc -l
398
$ find
134
Of course, some may prefer Perl to grep + wc (it's faster too):
$ find /bin /sbin /usr/bin /usr/sbin -type f -exec file "{}" \; | perl -ne '/(perl|python) .*script/ && $$1++; END {print "$perl perl\n", "$python python\n"}'
398 perl
134 python