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.
$Book = 'Perl For Dummies';
print 'The title is $Book.';
When you run the program, Perl displays
The title is $Book
.
Now change the single quotes to double quotes in the print statement:
$Book = 'Perl For Dummies';
print "The title is $Book.";
When you run the program now, Perl displays
The title is Perl For Dummies.
http://askaralikhan.blogspot.com/
...
unit tests.
Cwm, fjord-bank glyphs vext quiz
I have no clue? You assign values to an array in Perl in pretty much the same way as in any other language: $array[1] = $value;
"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
uh huh, then there's @array=qw(its whale guts) or @array=("its","whale","guts")
behold the whale guts!
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.
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.
Nice to hear of the universe between your ears, where it's a fantasy island that you created yourself. Perl is the 5th most popular language on Github (and Ruby doesn't count because Engine Yard give Ruby guys free accounts). And Perl 5 and Perl 6 development are happening very separately, one of Rakudo's lead devs said a month or two ago that if they (personally) weren't working on Perl 6 they wouldn't be working on anything in the Perl community.
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).
qw and similar are there just to make assigning multiple values more comfortable. You can completely ignore its existence and not miss anything.
That leaves the '@array=("its","whale","guts")' form, which is also very similar to many other languages.
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.
I love Perl, but I'll admit that after 6 months away I'm having to think a bit to get back into the all the reference/derefernce idioms.
So when the parent post explaining it all gets modded as funny... well, I hate to admit it, but that's kind of funny itself.
Never shake hands with a man you meet in a fertility clinic.
Perl was so. fricking. awesome. back when the only choices were shell scripts or compiled apps. It was such a leap forward. Who wouldn't be excited about Perl back in the '90s
But we're far beyond the sophistication of Perl. I'm not saying that you can't do some pretty fricking awesome things in Perl, but that Perl doesn't do many of the meta-tasks that we've come to expect in languages. These supporting features don't necessarily make things run or run fast, but rather help developers in the process of creation and maintenance. The industry has grown up and the black magic of hacking has been codified into the craft of coding.
And Perl isn't alone here, C++ is undergoing the same process.
Notes From Under *nix: blas.phemo.us
Perl would be a whole lot better if the damn interpreter wasn't so freakin' huge and didn't take almost fifty MBs of RAM to load. 50 MBs isn't that much to speak of unless you're not running MOD_PERL and you have several Perl scripts running at the same time and your poor server is brought to its knees.
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.
hahaha, never heard of github until now? and the fifth most popular language of these gits means what exactly? bet Perl was their #1 a few years back if that site more than four years old
qw and similar are there just to make assigning multiple values more comfortable. You can completely ignore its existence and not miss anything.
But what does Perl qw do that PHP explode() or Python str.split() doesn't?
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.
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.
Hey I still use and love perl!
Is there a list online of the cool new features?
Also, people dumping perl... what are you moving to?
(Thanks)
So you can also do @list[1,1,2,3,5,8,13,21,34] or @list[getFibonacci(0..8)] or any one of a number of things like that. So you can say
.
Yes. Totally random, because no one will understand that 'qw' means 'quote words' (or that qq{foo} and qq(foo) is the same as "foo", or that q{foo} is 'foo', or qr{foo} is the regular expression /foo/, or that qx(foo) will execute the system command foo and return the output... No, no rhyme or reason to that setup at all! And no one will ever think to read it in a book or perldoc perlop.
Which is why (properly-executed) Perl is as awesome as it is. Look, I realize there are some trade-offs there, and that non-Perl parsing of Perl in particular is a nightmare, but between having the programming language type my quotes and commas, and having myself type the quotes and commas, I will pick the programming language 98% of the time. My IDE can handle it.
The point of a programming language is to make things easier for people with a modicum of basic skills, not the illiterate - otherwise we'd just use BASIC all the time. When it comes to Perl, you don't have trouble because there's something wrong with the language: you have trouble because you're ignorant and illiterate with regards to Perl. Stop blaming the language for your own deficiencies, and either learn the language or decide you have no need to and accept it as a personal limitation.
The World Wide Web is dying. Soon, we shall have only the Internet.
Random unused symbols such as the at-sign, square brackets, and periods? E-mail must be difficult in that case.
Also, "qw" stands for "quote words." Simple enough.
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.
Perl is used very extensively, in industry, military and academia, that is not to say anything against Python.
I find it is much easier to get people from a traditional programming environment, FORTRAN, C, C++ productive in Python than Perl, since the style is much more compatible. Perl as line noise is a joke and is easy to write well and debug.
But again, you must learn your tools, but all learning is at a cost. Also developers tend to overcomplicate.
The which is the best Programming language | Methodology | Pattern is getting very old!
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?
For me anyways:
1: Better multi-threading support
I have written a huge estimation application (web-based). The calculations are something like O(n^n) or worse... point is, processors aren't getting faster. We are however getting a lot more cores. The algorithm parallelizes very well, but perl does not do efficient multi-threading. So I will have to re-write the estimation engine in something else.
2: Compilability
For the companies that want to keep their code proprietary... there are projects that pretend this, but they just append the code to the interpreted. Trivially reversable.
uh, your graph shows constant ~1% of all language *internet listings* of Perl for the last four years. Proving what, I'm not sure. And let me tell you how internet job listings work. One place has a real job, and then 30 other recruiting firms see that job and also run same listing with slight variabtion hoping to find person they can then present to the original company so they can get a cut. So the number of real actual Perl jobs on your graph is in the "statistical noise" percentage of perhaps 0.03% or so.
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've found I can do pretty much everything I need with shell. I've also tended to find that I can store and retrieve whatever data I'm working with in flatfiles with awk, as well. Some people might find that horribly primitive, but truthfully flat text is a lot easier for me to understand and work with than XML.
I feel that awk has an excessively bad rap, to be honest. I know of some people who like it, but it doesn't seem to get used much. I find it very useful at times.
What do people use Perl for?
\the syntax is just to arcane.
Perhaps the syntax of English is just a little too arcane as well?
While I am not a fan of Perl, in fairness square brackets are a nearly universal programming language notation for array indexing, and "0..3" is very common mathematical notation meaning "everything between 0 and 3 inclusive."
Snarkiness is inversely proportional to wisdom because it emphasizes feeling right rather than being right.
You Perl faggots always like to bring out CPAN, don't you?
The last five or six times I've tried to install a module from CPAN on a modern Linux distribution, it has fallen flat on its face.
First, you have to wade through 15 or 20 similar, yet equally shitty, modules before you find the one that actually sort of works. Then you have to pray that it installs correctly, which it usually doesn't. Finally, you have to try to figure out how to properly use the goddamn module, which is often as cryptic as anal warts and of course lacks documentation and helpful comments.
But by that time, you've wasted a better part of a day, and you realize that Perl is a waste of time, CPAN is a waste of time, and that Python just works. 7000 modules each doing one thing very well are better than 70000 modules where 10 perform the same task, and all of them suck rotting goat penis.
Add SQL to the list and it beats even C.
http://www.indeed.com/jobtrends?q=c%2C+java%2C+perl%2C+php%2C+python%2C+ruby%2C+sql&l=
If I have seen further it is by stealing the Intellectual Property of giants.
I know I already replied to this. But if you click "relative" you get an idea of the growth in language jobs (though I suspect that the y axis needs to be logarithmic). On a whim I decided to include web frameworks too. e.g. Django, ruby on rails. SQL and C are still on top (followed by VBA) in the absolute, but in relative Ruby on Rails and Django appear to smoke everything else.
absolute: http://www.indeed.com/jobtrends?q=c%2C+java%2C+perl%2C+php%2C+python%2C+ruby%2C+sql%2C+postgresql%2C+mysql%2C+django%2C+ruby+rails%2C+cobol%2C+assembler%2C+MATLAB%2C+VBA+visual+basic&l=
relative: http://www.indeed.com/jobtrends?q=c%2C+java%2C+perl%2C+php%2C+python%2C+ruby%2C+sql%2C+postgresql%2C+mysql%2C+django%2C+ruby+rails%2C+cobol%2C+assembler%2C+MATLAB%2C+VBA+visual+basic&l=&relative=1
I have no idea whether the growth in jobs is matched by the growth in programmer numbers in those areas. Also any new languages/frameworks/whatever are probably going to grow like crazy if they are any good. But even among web frameworks it seems that the growth of the top 3 is exceptional. Drupal, Ruby on Rails and Django are still top. (I added a bunch more from http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks). That's not to say that the most popular language/database/web framework/whatever are the best. e.g. I'd never willingly use mysql over postgresql, even though there are way more mysql jobs. Growth rate is the same however. Another factor is the payscale. If you were after money you'd pick a language that is both well paid and growing at a rapid rate. Intuitively, a more powerful but harder to use language should pay more because the supply is more limited.
relative: http://www.indeed.com/jobtrends?q=django%2C+ruby+rails%2C+zend%2C+zope%2C+pylons%2C+symfony%2C+cakephp%2C+drupal%2C+fuse%2C+turbogears&l=&relative=1
absolute: http://www.indeed.com/jobtrends?q=django%2C+ruby+rails%2C+zend%2C+zope%2C+pylons%2C+symfony%2C+cakephp%2C+drupal%2C+fuse%2C+turbogears&l=
This site is pretty cool too.
http://www.hotscripts.com/blog/determining-programming-language-popularity/
If I have seen further it is by stealing the Intellectual Property of giants.
Sorry to be pedantic... @threestates = @states[0..3] really gets you "fourstates".
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....
just to clarify, the q and qw etc are not random characters to avoid collisions, you just have to consider them as abreviations:
q = single quote:allows you to write things like
q{
<a href = 'somewebsite.com'> show me the $! </a>
}
without having to escape the quotes (readability), and avoiding $ interpretation as variable
qq = double quote: allows you to write things like
qq{
<a href = "$location"> some random location! </a>
}
without having to escape the quotes, but with $variable interpretation
qx = quote & eXecute : allows you to write things like
qx{
ls "some directory with spaces"
}
qw = quote on whitespace : treats whitespace as a quote delimeter
qw{
one
two
}
(a list of two quoted words)
why do these exist? I'm not sure exactly. But they are a godsend when trying to quote things that are full of $, and " marks ( like other programming languages, or even raw text)
"Infecting minds with my own memetic virus, one post at a time." Ultimape
get_real_name_of_this_language();
Maybe?
Dark Reflection
Obligatory xkcd reference:
http://xkcd.com/378/
Sorry that you had problems with Perl, but I am now running Perl code since 9 years on an environment consisting of three different platforms, which are Solaris, Windows and cygwin (yes, also Windows, but there are differences between running Perl pure on Windows and in Cygwin). The libraries and programs I have written can be installed unmodified on any of these platforms and provide the same functionality. I never had any problems running Perl on Solaris, but the prerequisite is that a gcc is installed beforehand and that you have the possibility running it always when necessary, especially when installing C-based packages from CPAN.
I did not even have a choice in the matter, my boss decided 9 years ago that I should do everything with Perl, because we inherited some Perl code from another site that was to maintain.
The thing that helped me become a better (Perl) programmer was the discovery of How To Design Programs, and discovering that Perl has the same wonderful functional possibilities as Scheme and Lisp.
How about:
Python's full grammar specification fits on two pages of A4.
Perl is king of the hill in web development. RoR brought us a clearly defined concept that doesn't work in practice (implementation). Perl has Catalyst that scales with increased requirements and complexity very well. It runs some very high traffic websites in the world.
Github is not a replacement for CPAN. Github allows you to get a code repository, with you know, git. I use it every day, but CPAN is so much more. It's a network of archives that you can use to install software from using any complete Perl 5 installation.
About cross-platform compatibility and portability, Perl runs on around a hundred platforms by last count. Ruby is "cleaner" if you take it to mean that it doesn't work on nearly as many platforms and as such it has no "issues" originating from those platforms.
You might have a point with Perl 5, since it's pretty old. However, Perl 6 is way WAY ahead of Ruby, in part because the features that Ruby borrowed from Perl 5 and cleaned up, got borrowed from Ruby into Perl 6 and improved upon again :)
It takes a man to suffer ignorance and smile
Be yourself no matter what they say
Yeah, it's so much easier to type VisualEditor filename - vi is so hard to remember! QuoteWords makes so much more sense than qw! I see the light now.
-- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
I know plenty of Perl hackers who have no trouble reading their own code six months later. I suspect this reflects more on your code than the language.
Ruby extensions written in C require compilation. Ruby Gems would also have portability issues if they were actually tested on all of the platforms that CPAN supports.
I suspect you know very little about Perl 6 then.
how to invest, a novice's guide
I trade most milestones in the Perl renaissance directly to Perl 6.
(Sclerotic? If that's the word you intended, the metaphor is... difficult.)
how to invest, a novice's guide
...yet in practice, CPAN has trouble compiling large numbers of libraries on "tier 2" platforms, such as AIX and HPUX.
Try getting Expect from CPAN for HP/UX, some time.... Expect works, Perl works, Expect.pm does not.
In practice, even Solaris 8/9/10 has issues where package A depends on version x.y.z of package B which conflicts with version a.b.c of package C, and package C needs a newer version of package A than will compile on Solaris, due to C-library vs. Xyz.pm issues.
Where I worked, it was often nightmarish to compile/make the 150+ CPAN packages and install tons of GNU libraries, to make a typical Apache-based website that had both Websphere and Perl CGI.pm-based apps. We loved Perl and touted it, even as we were cursing CPAN packages under our breath.
To me, an ex-Perl programmer, it doesn't matter if it compiles on "hundreds" of platforms, if my platform runs only the parts of CPAN I don't need....
Also, I wrote well-documented code, compared to most Perl programmers. Yes, I have read much Perl code over the years, at work, home, and on the 'net -- my own and others.
Perl is notorious for unreadable code! Just check the opinions of *seasoned* Perl programmers on the net. There is an attitude that "if it was hard to write, it should be hard to read."
Perl has never been known for clear, clean code -- short code but not clean code. It's "blessed" object model, for instance is an ugly, bolt-on hack.
I have no interest in Perl 6, ever since I read that its backward compatibility with Perl 5 was even worse than Python 3 was with Python 2.x (which has a converter) and also after I spoke to somebody on the Perl 6 team who said that the spec, years later, was not even close to complete. Two years later, it still isn't.
Who really trusts Perl 6 in a mission-critical production environment? Many do daily with Java, C#, vb.net, Python, Cold Fusion, Ruby, asp, vbscript, etc. Perl 6, of course, isn't "finished" yet.
I believe Perl 6 has no future. This was the final nail in the coffin for me to explore this up-and-coming Ruby. Many Perlers, back then, were open-minded enough to try Ruby, as were many in the Java world.
I made the switch, and while I am still more proficient with Perl (after 13 years of Perl 4/5 vs. about 1-2 with Ruby), I find a "programmer's joy" with Ruby and a learning experience nearly every time I use it. My code is cleaner, more readable, more concise, and more reusable in Ruby. It is fun, enlightening, and better for scripting.
Try Ruby, you might like it. I've "evangelized" Ruby to Perl and Python addicts at work. Much to their delight, Ruby becomes something they quickly begin to prefer over Perl and Python. Almost every time they use it, they find the same "profound enlightenment" moments I have. Lispers have this same experience, although probably to a greater degree.
Nobody is saying you have to be an exclusive Rubyist. I still do use Perl, for the quick-and-dirty. I still use bash and am learning Python.
I now know a little Rails, which (make no mistake) has a steep learning curve.
Who says RoR doesn't work in practice? Twitter? LinkedIn? Hemnet? Shopify? Doodlekit? 43Things? Nope.
In each of the above cases, the site either has to scale/perform like crazy, has complex data needs, needs rich content, or all of the above. It works in practice...
Again, be open-minded and try Ruby. You just might like it. Unlike Perl 6, it's here and now. If you are stuck in a Java-only environment, try JRuby 1.x, which is Ruby for the Java masses.
BTW, PHP is the undisputed king in web development and compares favorably with Java and C#, in terms of sites, code, and jobs. It's also faster, easier to learn, and cleaner than Perl.
Perl definitely has more legacy code and sites than Ruby on Rails, sure.
I'd submit that RoR code is better/cleaner and supports larger teams of coders.
Even if all you do is get proficient with Ruby and later RoR, you will change the way you code in Perl/PHP/whatever.
BTW, if imitation is the most sincere form of flattery, see CakePHP, Groovy on Grails, ColdFusion on Wheels, the Castle Project, and Mojo. RoR is influencing frameworks on PHP, Groovy/Java, Cold Fusion, C#, and Perl, respectively.
I would be happy to introduce you to dozens of seasoned Perl programmers who object strenuously to that mischaracterization.
Lifted straight from Python.
Neither is Ruby 2 or Python 3 or ECMAScript 4 or ....
If Perl 6 wanted to support only those language features that Ruby 1.9 supports, Perl 6 would have been "here and now" years ago. That's a modest goal, and my goals are much, much more ambitious. Ruby's still playing catch up with Perl 5 (let's talk object systems, platform compatibility, library support, compiler warnings and errors, a built-in test suite...).
how to invest, a novice's guide
I'd really like to see you support most of this sentence.
Regarding the influence of Rails, note that the strongest influences for Catalyst (likely the strongest influence on Mojo) predate Rails measurably.
how to invest, a novice's guide
Sorry, Mojo is "like" Rack. Mojolicious is more "like" Rails. I use the quotes around "like," because both are weakly inspired by Rack and Rails, not close to being "clonish" like Groovy on Grails.
Speed, by the way, is *not* one of Ruby's strengths, although its performance and scalability are greatly improving and have more "tweakability."
I am having trouble backing up the performance differences claim (one that used to be easy to do) -- perhaps Perl has finally closed this gap over the past couple of years.
However, the opinions that PHP is cleaner and easier to learn are shared by many:
http://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/
http://www.webmaster-forums.net/web-programming-and-application-development/php-vs-asp-vs-perl
http://www.thesitewizard.com/archive/phpvscgi.shtml
I used to be a believer in Perl (and PHP, for web development) but have changed my mind, due to Ruby.
As a programmer, are you open to change and trying new stuff? Why not learn from other languages, like Ruby, Lisp, or Smalltalk, to become a better Perl programmer?
Over Perl 5? Unlikely. The last I looked (I haven't looked at Ruby 1.9.x), Ruby closures had to close over all lexicals in a program. There's a great way to reduce scalability, memory wise. (I can also mention that the last I knew of Ruby's GC, it unshared way too many pages during a naive mark and sweep.) As well, I seem to recall that a Perl 5 program won Tim Bray's Wide Finder benchmark.
Let's talk numbers. How many default functions and operators does PHP have? How many does Perl 5 have? How many of PHP's default functions and operators are compile-time settings or settings in php.ini?
I first programmed Ruby in 2001. I've written my own Scheme. I have the Smalltalk-80 books on my desk, and I've referred to them in the past few days.
The only thing I consider worth learning from PHP is the necessity of ease of deployment.
how to invest, a novice's guide
Lifted straight from Python? How's that? The syntax doesn't even superficially resemble Python's. Where do you get proof for that (I looked and see nothing to back up your claims)?
Perl got objects in 1994, with Perl 5. Python was released in 1991. It *could* have happened the way you describe, but I don't see evidence of that. I bet some Pythonistas would challenge that assumption.
In Python, as far as I can remember, nearly everything is an object (except, basically keywords and immutable types), with the ability to call methods on most things, even many immutable types, such as numbers:
>>> (1).__add__(2)
3
In Ruby, where essentially everything (other than keywords) is an object:
>> "hello world".length
=> 11
How does Perl compare to either of these, even Python?
Ruby 1.8 and Ruby 1.9 are production-ready, as is Perl 5.
Perl 6 is "any decade now." I don't see a sequitur leap to a comparison between Ruby 2 and Perl 6, since you started by comparing Ruby 1.9 to Perl 6.
Very few people worry about Ruby 2, while Perl 6 is considered a "big deal" to Perlers. Perl 6 is still on the drawing board and is in a severe state of flux, many, many years later. I think the Perl 6 project has failed due to scope creep. Ruby 2 is rarely discussed, since it's not a "big deal," so it hasn't suffered from that kind of "bit rot," yet. Ruby 2 is just a relative glimmer in a few people's eyes, even if it, like Perl 6, is a long-term project.
Comparing Ruby 1.9.x to Perl 5.11.x may be more of a valid comparison, in terms of what they mean to the next big leap.
Both Ruby 1.8 and 1.9 have severely more powerful OOP constructs than Perl 5. All three of these are prod-ready.
Still, Perl 6 is supposed to greatly break compatibility. Ruby 1.9 doesn't greatly break compatibility, and 2.0 is also expected to be easy to port, but we'll see. Perl 6 is mostly a different language, according to what I've read.
Perl 5 has bolt-on class-based objects. These superficially resemble C++/Java/C#'s classes. Ruby has objects resembling the king of OOP: Smalltalk. There's a big difference, there.
Ruby has open classes, true exception handling, method_missing(), duck typing, and reflection. Lambdas are truly useful (check out iterators).
Even though Ruby is extremely dynamic, it is strongly typed, without getting in your way -
This is an error:
"hello world" + 5
This is not and returns an integer 5:
"hello world".to_i + 5
In Perl 5, this is not an error:
"hello world" + 5;
So, in Perl 5, if you accidentally set a variable wrongly, you still get an answer, instead of an exception you can handle. This can be catastrophic to data integrity. `use strict;` and `my $variable;` don't help this situation.
I just have one question, in closing.... Have you spent at least 6 months trying to become proficient in Ruby? If not, I challenge you, as a former Perler. Try it for 6 months, part-time....
See if you get as hooked as many of us have.
Then use the cpan CLI tool or if you're using Debian use the prebuilt apt packages
"Linux is for noobs"-The new MS fud strategy
Indeed I have. It's a decent language. It has nothing on Perl 6 (and, frankly, it's missing a lot of nice features of Perl 5).
Larry's exact quote is "I don't really know much about Python. I only stole its object system." You should have no trouble finding confirmation on the Internet.
Nonsense. Compare Perl roles to Ruby monkeypunching.
The twenty-second monthly release of Rakudo Perl 6 in a row will take place in two and a half weeks. You're almost two years out of date with respect to your Perl 6 information.
Nonsense.
Perl 5 objects (using Moose) have more features from Smalltalk than Ruby objects do then. Of course, that's because Moose backported them from Perl 6, which borrowed some of the formalisms from Smalltalk for the design of the particular feature I have in mind.
Perl 5 has all of those as well. Perl 6 adds built-in support for roles, class finalization, junction types, optional typing, serialization, multi dispatch, and more. You can try them today.
... because of Perl 5's type system and Perl's nature as an operator-oriented language. I can understand how this might be confusing if you never learned the language, but it's a deliberate design principle. Don't pretend it's an accident perpetuated by clueless buffoons who never saw the grape-flavored wonder that is Ruby.
how to invest, a novice's guide
Github gives everyone free accounts for open source development. But Github popularity isn't a measure of much of anything about a language, its more useful to tell you which communities Github has gained popularity in than which languages are widely used.
wrong, Ruby mostly just hobby.
The languages I use as part of my job include J2EE, Perl, PHP, C/C++, Python. One of the reaons I bitch so much about Perl is it was my first scripting language love, so awesome at the time compared to the NOS JCL, VMS DCL and Unix sell clunky scripting. sad to see Perl 6 in present state.
As a long-term Perl programmer, myself, who switched to Ruby, virtually everything you're talking about is either an ugly hack or is an add-on via CPAN or is only available in 5.10+.
As for features available in 5.10+, that's totally fair, but I abandoned Perl around that time. As for Moose, it's not part of the core language today.
Maybe if a production-ready version of Perl 6 ships by late 2011, I may give it a try, then. Is it truly ready for prod, now? If so, I'm interested.
Don't get me wrong; Perl 5 is a popular, very powerful dynamic language that I programmed in for 12-13 years, myself.
To say, however, that Perl 5 is better than Ruby 1.8/1.9 in every respect or to equivocate between the already available Perl 5 and the maybe-it'll-be-released-real-soon-now-perhaps Perl 6 isn't fair and smacks of fanboyism.
It's not like I am comparing 2 languages, one of which I never programmed in.
So what?
Plenty of widely-used Ruby libraries aren't part of the core language. Is Rake in 1.9 yet? The Enterprise Ruby patches make Ruby much more usable, and they're not in the core language either.
That would be stupid, which is why I never wrote that.
As I wrote earlier, the 23rd monthly release in a row of Rakudo Perl 6 will occur in two weeks. It supports more features than Ruby 1.9 does and you can use it today. It may not support the features your code needs -- but that's okay. Ruby 1.9 doesn't support the features my code needs.
how to invest, a novice's guide
That somebody thinks the above is clear erases from my mind any doubts about opening any book with a camel on its front cover....
IANAL but write like a drunk one.
I am not saying it is sensible or clear, but it is not unique to Perl: :pinguino:~$ sh
$ Book='Perl For Dummies'
$ echo 'The title is $Book'
The title is $Book
$ echo "The title is $Book"
The title is Perl For Dummies
IANAL but write like a drunk one.
You can do:
As well. Though I find the qw idiom more natural for the particular task. For me it's deeply ingrained that split() is something you do at runtime, to a variable that may have a different content every time. qw is a compile time operation. To me, "@months = qw (...)" and "@months = (..)" are Perl versions of the C array initializer "char *months[] = { ... }", while split implies a mess with malloc and strtok, and which should be avoided for static data.
That's good to know, it'll make things easier when I finally find a reason to bother learning it. Not trying to troll here, I know Perl, it does everything I need doing at the time. Learning another language to do the same thing except in a prettier and maybe slower way seems wasteful with other more interesting things to do.