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?"
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?
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.
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
Is Perl the "Ron Paul" of general purpose scripting languages?
*ducks*
Perl is not coming back. Get over it and learn something else.
It never went anywhere, so why would it need to come back?
I have a bias, but I've had many positive responses to Modern Perl: The Book.
how to invest, a novice's guide
Perl never went anywhere. Sure, it may not be today's new hip fad language, but it's widely used and supported.
I"m not sure what "not coming back" signifies. We run a decently large Perl codebase. We add some new features (nothing big) new code tends to go to python (though some new perl stuff). But changes in the tools as we maintain the codebase is important to us.
Coming back?
It never left, I used it everyday.
.. 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.
Try some perl development the old fashioned way. Document a list of "PITA" about developing in perl. Simultaneously study at least one framework and slowly enumerate a list of "this is how framework X fixes the Y problem" ah "I know kung fu" or whatever. At some point those lists will converge. Then seamlessly start developing the new way using a framework.
You can also have a lot of fun trying to implement your own homemade framework. Being a text processing language, making a MVC like system isn't too hard. Again, at some point your toy MVC will converge with some perl framework and away you go.
I started doing RoR probably 5, maybe 6 years ago, and I agree, the learning curve for a framework is darn near vertical unless you're doing the overly simplistic demo apps... note demos are selected precisely because they make the framework look good, not because they're realistic. Eventually the insane vertical learning curve flattens out. Just like second semester calculus, sometimes you just gotta gut it out till you get it.
You may be better off forgetting about "web development" which is a pretty huge and complicated solution space. Come back to it later. Go to projecteuler.com and solve a couple simple compsci algorithms in your new language. I am teaching myself Scala at this time, for the heck of it, by implementing the craziest solutions I can to some P.E. problems. I wish I had learned Ruby in full detail before I started to learn RoR, would have been a much smoother learning curve.
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
Slight bias indeed.
The man page to Moose is a good one too.
If you're in to web dev, the Definitive Guide to Catalyst is a good choice, too.
Unfortunately, I have to write this with a caveat: getting Catalyst and Moose set up can take some time. If you apt-get install/emerge/yum/whatever it, you'll probably get an old version.
If you install it from CPAN, it takes some time, since the two of them combine to require a craptonne of CPAN.
That said, once they're installed, a working catalyst web app you can hack on is as simple as catalyst.pl AppName; cd AppName;scripts/appname_server.pl
Who said anything about dagos and cathedrals? That's a bazaar inference!
"Flyin' in just a sweet place,
Never been known to fail..."
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
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.
Futurist Traditionalism
Boy, a sweet five-16th birthday! Happy congratulations, Perl!
So what to get a language for their 5.16th? A new Car-p? Or maybe an actual car from Dad's dealership?
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.
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
I think you replied to the wrong story.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
Perl is built up with a fair amount of exotic, idiosyncratic constructs, but its core features (datastructures and syntax), do it better than any of them. If you just resist getting sucked into all its esoteric aspects, which some quirky elements (with some questionable motives) seem to push so hard, then you'll do just fine.
"You take what you need and you leave the rest." Robertson (Helm)
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
Who said anything about dagos and cathedrals? That's a bazaar inference!
Well played Sir, well played indeed!
Apocalypse Cancelled, Sorry, No Ticket Refunds
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"
We call that the CPAN, and it's the opposite of plummeted.
how to invest, a novice's guide
If you're interested in facts, feel free to provide measurements or statistics to prove me wrong.
how to invest, a novice's guide
I use Perl nearly every (damn) day, on a very old codebase project. There are things about Perl I like, but there are also things that I really despise. Not through fault of Perl, really -- it's simply old, slow (yes, slow) and outdated compared to other modern languages.
There is no way I would start a new project in Perl, and the only people who would are people who are willfully ignorant of the rest of the industry. Perl is beyond its life. There is nothing it does better than other languages, and there are a whole hell of a lot of things it does much, much worse.
Sometimes it's best to just let stupid people be stupid.
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.
Coming back?
It never left, I used it everyday.
Hah, you got modded informative instead of funny.
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.
I've deployed a few projects in the last five years. I know many people who've also deployed projects.
how to invest, a novice's guide
Check out what lack of religion did to the Soviet Union, China, Vietnam, Cambodia, Cuba, and others.
No doubt totalitarian socialism had nothing to do with their outcomes, though.
(an all-powerful State can't tolerate any parallel power structures, such as a Church)
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
I can think of over 106,000 reasons to use Perl (and by the way, CPAN is still seeing very large numbers of both contributions and contributors).
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.
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.
Every single one, or just you?
I've been using Perl on small and big projects [both my own and commercial] since about 1994 and am very aware of its defects, terse and sometimes confusing syntax, especially 'things that work but somewhat unexpectedly', weak typing unless you add module magic etc. etc.
However, it has always felt incredibly intuitive and efficient, because, I suspect, that a linguistics person rather than a hard-IT construct-elegance person is behind its design. That and the fact that you can find a library for anything you want on CPAN, a good thing and a bad thing means that it remains my language of choice.
Natural languages are messy but expressive, intuitive and efficient, with a downside of [for example] some ambiguity, there's no reason not to try this a programming language. As I said in another post, I'm not sure I'd use Perl for avionics though.
On y va, qui mal y pense!
From the link:
From the link:
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.
In my experience Perl is fast, less resource intensive than other interpreters such as Python, is really good for regular expressions and data structures, and it just gets the job done in a short development time.
What's *really scary* is a perl script with '#use strict;'. Meaning they tried to use strict; but gave up on it.
Did they use common::sense; instead?
alias sudo="echo make it yourself #" ; # https://pipedot.org/~stderr & http://soylentnews.org/~stderr
Please see http://slashdot.org/comments.pl?sid=2865083&cid=40075109
Flamebait?! I was responding to the signature of the grandparent! Do moderators know any impartiality?
I had forgotten that a lot of skilled Perl users use "perl -e (commands)" with piping to get things done. You're right, that's extremely handy and definitely not something you can do with Python.
I think the perl6 windmill is worth tilting at - at worst it makes the people jousting more knowledgeable about writing interpreters and virtual machines, and gives ideas to the general community that improve other existing languages. That includes Perl 5, I understand some of the features in Perl 6 made it into Perl 5.14 and 5.16. If we have to wait another twenty years before Perl6 is rock solid, so what? Barring an unfortunate accident, I'll still be writing code then.
As a linked topic, at my day job I work on Java. I don't have many opportunities to use Perl 5 for more than toy scripts to accomplish simple tasks. But I find the general mentality of the Perl 5 and Perl 6 community refreshing - a good mix of brilliance and practicality. My personal experience with the Java community is that there is intelligence and innovation around the edges but a lot of stale repetition and over-engineered solutions that choke on their own complexity in the mainstream. If I could figure out how to transition from Java development to Perl development without taking a 20% pay cut, it would be tempting.
TL;DR: Dawkins killed 100 million! (Hey, if you can misread posts, so can I!)
You deliberately misread what I said. This suggest you have no argument and decided to resort to fallacies.
Very few of those deaths have to do with anti-religious intorlerance and none with materialism. Marxist socialism doesn't imply totalitarian socialism.
What? Have you ever studied Marxism? Marxism explicitly advocates class hatred, violent revolutions and the dictatorship of the proletariat.
Please at least attempt to argue rationally.
Perl is a beautiful language. I love the use of list operators and the concept of list context. Every symbol has meaning. No language does a better job of incorporating and taking full advantage of regular expressions. There are plenty of modules to assist in specific tasks, and because it doesn't enforce one programming paradigm, it allows those who use it the chance to be flexible and still maintain good structure if that's what's key. It takes some time to learn, but the benefits are rich and well worth the experience. The community is very mature, and there's a lot of free and minimally cost-based training available, without the fear of running to the edge of what's feasible or buggy. I highly suggest my favorite perl experts site: http://perlmonks.org/ if you want to learn the language. There are some amazing experts there, willing to share their knowledge and expertise, and thousands of tutorials and helpful comments.
http://www.beanleafpress.com
I always try to write a lot of comments into my code, whatever the language.
Most sample code and tutorials do so too.
So I would say, why not post some real world programs in Perl and Python and let people see what they look like, including comments. Even in this thread I see people talking about line noise but frankly, I don't see it. There are a lot of things I don't use in regexes for example but I know it can be done and if I want to I can always perldoc on the command line and brush up on what I don't remember or do so on the web. Since I don't know python much compared to perl it may just be me but my impression is that such comments come from people who have not taken the trouble to learn perl. I mean, there is no line noise in my programs and I split things into several lines and make it look pretty to keep my mind straight, beyond what is needed perhaps. It is possible to develop your own writing style in Perl whereas Python is apparently stricter, but there is probably a bit of missing information in both camps about what it is like in reality to program in the other side's environment.
there are plenty of useful sources other than search engines. firms who hire and employ software developers are given surveys, for example. Perl developer "share" is in huge decline. At no place I've worked in (huge clients with thousands of employees) in the past ten years was there a Perl developer. C, C++, Visual Basic, Java, Python, Ruby, even COBOL.....but no Perl. Unlike the 90s
yes, that's a valid point, forgot about that one. exception that proves the rule, I'd say
But Marxist Socialism is caused by the very same doctrine that today is advanced by Richard Dawkins.
Let's assume that's correct. Dawkins is an atheist and he promotes violence to achieve his social ends (socialism). I don't know if that's true, but it doesn't matter.
There are many non-theists who advocate and live by the non-aggression principle, Satyagraha, or Jesus's non-violent teachings. So you can make a 2x2 matrix of theists/atheists (x,y) and people who do/don't (m,n) support violence as their means.
You clearly have a problem with States in the (y,m) quadrant. That's great. Personally, I have a problem with States in the (m) half, but then again, all States are in the m half by definition. My rather non-simple conceptions about our Universe's purpose and creation aren't relevant to that judgment, but any follower of Jesus, for example, should be aligned in the (n) half and work to convince the (y) half, but far too many buy into later corruption of his teachings (designed to bolster State power) and support the (x,m) quadrants wholeheartedly.
If you have theists who actively work against their Gods' teachings, what matter is it that they are theists if it's not relevant as cause of their actions?
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
No, they just can't figure out how to pass some of the checks and disable them. Generally upon investigation I find use strict complained for very good reason and I'm able to close out 'mysterious' bugs just by use strict.
XML is like violence. If it doesn't solve the problem, use more.
The common::sense people claim it uses less memory than the combo, I'm currently using (mainly use strict; use warnings;), so I'm considering switching.
If anyone has any input about use common::sense; vs. use strict; use warnings;, I would like to hear it.
alias sudo="echo make it yourself #" ; # https://pipedot.org/~stderr & http://soylentnews.org/~stderr
First, I didn't mean that Dawkins explicitly advocates violence; I merely say that his ideology, if it spreads, will eventually lead to great violence.
I agree that people who believe in Jesus should live by His teachings. And regarding state-sponsored violence, please check out www.lewrockwell.com/orig6/ratzinger2.html (Why the Church and state must be separate, by Pope Benedict XVI).
And just so you know where I am coming from, i am half-conservative and half-libertarian. I am pro-life, anti-war, pro-immigration, pro-small government. I am even open to the idea of legalizing some recreational drugs (I think they are evil; but not every sin must be a crime).
My original point is simply that Dawkins is extremely partial and intellectually dishonest. He spreads the idea that religion is pure evil and that we must be hard-core materialists and be a huge intolerant impolite dick to anyone who believes in God. I am merely saying that this is wrong.
Regards
It can be, yes. The last two times I needed multiprocessing, I used Proc::Fork and WWW::Curl::Simple. These worked very well for me.
A lot of people use AnyEvent quite effectively too.
how to invest, a novice's guide
Take a look at Forks::Super. It's still a bit on the beta side, but useful enough for you to get real work done while you bang on the author to fix the remaining bugs. :)
There was never lack of religion, you are talking of the attempt to deny religions which, while it lasted, did a lot of bad, but I'm not sure what exactly do you think it did... but I'm guessing that you are assuming too much as usually when I hear something like this it seems that the person is associating intolerance for religion with all things that did go bad + all things that they think went bad - and often also ignore that not all socialist / communist (so called...) countries even try to kill religion and even that most of those that did also eventually gave up and realized that it was a futile attempt anyway.
Yes, it was really bad and I have no respect for what evil has resulted of religious intolerance (inflicted by anyone, including hatred against other religions and hatred against atheism). And no, I don't even know what exactly are you suggesting, the above assumptions are just that and what I really ask is to explain yourself - I'm not blaming you for anything in my text above, I can't, from what little you wrote, have knowledge of your personal views and what exactly you meant.
In capitalist USA corporations control the government.
I explained myself in http://slashdot.org/comments.pl?sid=2865083&cid=40075109
...jokes about perl being unreadable are childish and I usually tell such people to learn perl or shut up, because basing your knowledge on perl 4, one-liners for CLI & obfuscated perl contests does not give very professional image of their programming knowledge.
In capitalist USA corporations control the government.
Troll!?
Mods, have some honesty please!
"Troll" is not a substitute for "I disagree".