Perl 5.8.1 Released 144
langles writes "Perl 5.8.1 has been released. Read the official announcement,
then download it from a CPAN mirror near you.
If you've been following the Perl5 Porters List, you'll know this version was very well tested before they released it. However, there may be some modules that will need to be fixed before they will work with this release." The announcement also contains full details on incompatibilities and known issues, so give it a once over before upgrading, especially if from a pre-5.8 version.
Already.... (Score:2, Funny)
This is good news (Score:3, Interesting)
But I have an honest confession.
Python has become my scripting language of choice over the last 2 years.
Does that mean I have a problem?
TO put things in perspective, I was an 0311 for 4 years so maybe that's why I have these recurring nightmares of perl necklaces and pythons tcling me.
Re:This is good news (Score:4, Insightful)
Seriously, scripting language holy wars are even sillier than other holy wars. I use Perl, Python, and PHP regularly (and both MySQL and PostgreSQL, on both Linux and BSD) choosing whichever seems best for the task at hand. (Yes, I know that I'm very lucky to have a job that allows me to do this.) And as a benefit, I've become pretty good at porting between various combinations of these languages, servers, and platforms. The underlying logic is a hell of a lot more important than the flavor-of-the-month.
Re:This is good news (Score:3, Insightful)
I agree! I'm happy to hear someone else say it. I use both Python and Perl continuously. My code isn't unreadable in either language. Yes, I've had other people work on my Perl code, and I've been able to read my own years later. No problem. OTOH, I'm currently refactoring Java code that is an incomprehensible mess in places. The fact is that the language is not the problem if your code is r
Re:This is good news (Score:5, Interesting)
But yeah -- it is entirely possible to write well-documented, well-organized Perl that other people (or you, well after you wrote it) can read, as you say. Actually, IMO, it's easier to write the code this way, once you get into the habit. Organizing the code well on screen helps you organize the thought processes in your head. Some programmers (and I do think that Perl programmers are particularly prone to this) seem to take a childlike delight in writing unreadable code. I maintain that people who do this deliberately are bad programmers, no matter how impressive their other skills may be.
Re:This is good news (Score:1, Informative)
Re:This is good news (Score:2)
seems to generally put a lot of emphasis on readable code.
Is the reputation for obfuscation just based on regexes?
Re:This is good news (Score:1)
One of perl's little catchphrases is "There's more than one way to do it." The language is extremely flexable.
I totally agree with the poster a few levels up, the on
Re:This is good news (Score:2)
www.cpan.org
There are TONS and TONS of code there and significant quantities are actually useful and usable.
The perl modules seem to be written by people who actually use them in _real_life_.
Unreadable code? Who cares man
Re:This is good news (Score:1)
If I can't figure out what's going on in them, how the hell do I know it works as advertised with a quick scan?
I'd rather just take a quick glance at the (whatever) code than worrying about adding yet another dependancy, and one that probably takes more time to read/convert/integrate than to just do it yourself from scratch.
That being said, there are a hell of a lot of great modules out there!
If you do
Re:This is good news (Score:1)
The apparent usefulness of Perl (like Visual Basic) is only indicative of the large number of modules it incorporates. It's got nothing to do with properties of the language itself. Personally I think the usefulness of a language should be measured using the
Re:This is good news (Score:1)
"The apparent usefulness of Perl (like Visual Basic) is only indicative of the large number of modules it incorporates."
I don't think that the flexibility of a programming language can be in any way be affected by the ancillary code produced later. The flexability or usefulness of a language, I think, is apparent in what you can do with it, period.
Basically either you can do something or you can't
Ug! (Score:1)
Re:This is good news (Score:2)
I thought your comment was very funny.
Re:This is good news (Score:1)
Re:This is good news (Score:2)
Sometimes just learning a new language keeps you out of the day to day rut, stress, and interest loss.
Re:This is good news (Score:1)
You can write stuff in English which reads like crap too, doesn't stop some people from using the language to write poems.
Same with Perl.
Re:This is good news (Score:2)
The cool thing is, I still ge
Re:This is good news (Score:1)
Re:This is good news (Score:1)
Re:This is good news (Score:1)
Yeah. Me, too.
Re:This is good news (Score:2)
Because programming is a tiny part of my job. We don't need a full time, or part time, programmer. I don't lose my job because I can adjust. Technically, I run the marketing dept for a manufacturer. But I do photography, website development, IT and several other tasks.
How I keep my job (easily) is because I am not great at any one
Re:This is good news (Score:1)
Yes, but apparently you're recovering
Re:This is good news (Score:2)
Only if you have a different prefered tab size to other people, and try to share code with them.
Re:This is good news (Score:2, Insightful)
Yep! (Score:4, Insightful)
My feeling is that, when people say something like "This language's code is easier to read", they don't mean as much the language's syntax, as the coding practices that the language's structure encourages.
See "There should be more than one way to do it" as opposed to "There should be one -- and preferably only one -- obvious way to do it", for instance. Different philosophies that fit different languages that fit different coding practices. You'll note that both principles do correlate with the main selling point of their respective language, namely, Perl's ability to be the shortest path from 'nothing' to 'job's done', and Python's knack at remaining damn readable through thousands of lines of code even for programmers not yet involved in the project (among other things).
Down the road it's only a matter of goals, and picking the most appropriate tool to reach that goal. The tricky part, of course, being that 'appropriate' is a relative thing, and sometimes a somewhat unfitting tool is more appropriate in terms of practicality than something you don't yet know and would have to learn from scratch.
Oh, and zealotry is sclerosis of the mind.
Idea (Score:1)
Has anyone ever tried coding in Perl to get the job done quickly and then converting that code into Python for further maintenance? That might leverage the strengths of both languages.
Re:Flamebait? (Score:1)
TRUE: C is a programming language
TRUE: Linux is a kernel
FALSE: Perl is easy to read and has a great syntax
TRUE: Saying Perl is hard to read is not flamebait
FALSE: Perl is the only language one can obfuscate
TRUE: Perl can be written clearly
TRUE: Saying "Saying Perl is hard to read is not flamebait" is ironic
Does that mean.... (Score:1)
luckily, they have the bandwidth to get slashdotted.
Re:Does that mean.... (Score:1, Interesting)
Re:Does that mean.... (Score:1)
Just got a new job... (Score:5, Funny)
Re:DB_File with Berkeley DB 4.1.25 fixed (Score:1)
And of a classic on-line argument? (Score:5, Interesting)
Miscellaneous Enhancements
map in void context is no longer expensive. map is now context aware, and will not construct a list if called in void context.
This must have been added to *end* the ceaseless wars over whether using "map" in a void context is lame, or not. This argument after repeated dowsing attempts, would constantly spring back into life with renewed vigor on comp.lang.perl.misc and other places.
Now it doesn't matter. Argument over. I think I'll miss it. Sort of. I can't remember a time when people weren't fighting about this. Next I suppose we'll be sorting out the whole "who would win, the Enterprise or a star destroyer?" mess
For those who don't know what I'm on about: "map" applies a subroutine or code block to each element in a list. Some people would use it to iterate over lists, instead of using "for". Perl is now smart enough to notice if you're not using the result of "map", and so won't generate the result list in that particular case.
The whole argument came down over whether to say:
map { do_stuff; } @list;
or
do_stuff for @list;
So the "for" people would, rightly, say that the "map" was inefficient if you weren't using the result list created by map, and the "map" people said that Perl should just figure it out and do the right thing.
Actually, now I think about it, this is going to make the argument *worse*, as now they are functionally equivalent, and it will just come down to taste! No! They don't know what they've done
Re: You've missed the point (Score:1)
syntax error at
Execution of
The odd thing is, this code doesn't even attempt to read the response from STDIN, and then doesn't try to answer the question
Re:And of a classic on-line argument? (Score:2)
This sounds like some Zen Buddhist zoan.
Re:And of a classic on-line argument? (Score:2)
void context maps good
map is now context aware
won't construct a list
Not sure how I feel about it though
Re:And of a classic on-line argument? (Score:1)
I know you were joking, but:
do for @chicks;
has an entirely different meaning, doesn't it? Well, sir, I congratulate you. You have discovered the long sought after example where the difference between "map" and "for" is significant semantically to the reader.
What a shame you posted anonymously. I can only credit "anonymous coward" with this one.
[and before the language lawyers start on about it, yes, "do" is a reserved word, so it's "&do for @chicks"]
Perl 5.81 AI Mind Modules (Score:1)
Perl modules for artificial intelligence [cpan.org] must be kept current with the new Perl release.
The Perl AI Weblog [virtualentity.com] has some sample Perl AI code for the main Alife module [visitware.com] of the Open-Source AI Mind in Perl.
Register your own Perl weblog [blogwise.com] if you are writing AI or other good code to share in Perl.
PerlDoc Bliss! (Score:4, Informative)
Complete rewrite. As a side-effect, no longer refuses to startup when run by root.
Okay, okay, I know, root bad, now shut up. I don't know how many freakin times I've been hacking away at a perl script, as root and had to actually log in as a different user just to read the damn documentation. Thank Wall for small miracles.
Not that I often read documentation, but anyway.
Re:PerlDoc Bliss! (Score:2)
I've already got Perl 6... (Score:4, Insightful)
Dear Mr President..... (Score:1)
With Perl 5.8.1 we finally get usable threads that efficently communicate and cooperate. There is a fix for the memory leak that existed when using shared queues, arrays and hashes in Perl 5.8.0. This starts a whole new era for Perl programs. My little language is finnally growing up (sniffle.)
Perl has been a great language for people who just want to "get it done." It get's the job done and usually get's it done fast.
Gud Speeling (Score:2)
Re:Dear Mr President..... (Score:2)
use threads;
use threads::shared;
my @shared : shared;
@shared = (1) while (1);
Lameness (Score:2)
It doesn't change the idea of whether map in a void context is lame, only about its cost. The great thing is now the arguments can't point back to the cost issue, and only deal with the pure idealism of whether map is a good substitute for foreach.
Re:Mod me off topic but... (Score:3, Informative)
You mean this one?
Re:Mod me off topic but... (Score:1)
Re:Mod me off topic but... (Score:3, Insightful)
And they haven't even got a topic for Python yet... *grumble*.
Slashdot is quite a bit biased towards perl, probably because the engine has been coded in perl. Let's forgive them for that. However, it's a shame that a language that seems so far to be the only free-speech-free-beer language capable of taking on Java and C# gets so little attention.
Will it take a Chandler release for all of you to wake up? O
Re:Mod me off topic but... (Score:1)
Re:Mod me off topic but... (Score:1)
By hacking w/ Python, many Perl mongers would be furthering the OSS movement more
Why is choosing Python furthering OSS more than using Perl? In case you weren't aware, Perl is completely open source, and has one of the largest and most active open source communities in existence.
On the face of it, this doesn't hold up at all.
not to mention their own careers...
This might well be true, but in my experience
Re:Mod me off topic but... (Score:2)
Because Python code is much more readable than Perl. Hence, it's more Open, because more people can take a look at the code, learn from it, and hack it.
[about careers]
This might well be true, but in my experience and judgement it wouldn't at all.
With Python, people can do bigger programs faster, One Python program equals ~ 4 Java/C++ programmers in productivity. Perl programmers are not even in the same league, because they can't implement sy
Re:Mod me off topic but... (Score:1)
The "readability" issue is merely an opinion. I've never found that at all. And now you're talking about "open" in an entirely different context from "OSS".
With Python, people can do bigger programs faster, One Python program equals ~ 4 Java/C++ programmers in productivity. Perl programmers are not even in the same league, because they can't implement sys
Re:Mod me off topic but... (Score:2)
Readability of Perl has rarely been considered a matter of opinion.
And now you're talking about "open" in an entirely different context from "OSS".
I don't consider a source code very open if it is extremely unreadable, especially in case of willfull obfuscation with tools etc.
What? Yes, they can. Why not?
Because perl just doesn't scale to large problems. Even Larry Wall agrees with that, or at least has at some interviews. This is something perl6 is tr
Re:Mod me off topic but... (Score:1)
Yes, I'm afraid it is. I don't find Python inherently more readable at all.
I don't consider a source code very open if it is extremely unreadable, especially in case of willfull obfuscation with tools etc
This is all just your opinion. About reabability, and about what is open and what is not. No one cares about what *you* consider to be open. What you said was absolute rubbish. End of story.
Because perl just doesn't scale to large pro
Re:Mod me off topic but... (Score:2)
I can hardly speak for anyone else but myself.
Perl 6: since you don't know anything about Perl it's best not to dig yourself in any deeper by starting to talk about Perl 6.
As I said, I know quite enough about perl, definitely more than I want to know.
The best thing to do is grow up a bit, admit you were flatly wrong in the first place, and move on. Really.
Yeah, whatever.
Re:Mod me off topic but... (Score:1)
You used a precisely defined term (OSS) in error. You don't get to "speak for yourself" about how you define it.
As I said, I know quite enough about perl, definitely more than I want to know
It's quite obvious you don't know anything at all about it. You can't possible have read "Programming Perl", given some of the laughable nonsense you've spouted here.
Just stop talking about things you know nothing about. And if you think Perl can't deal with "large sca
Re:Mod me off topic but... (Score:1, Funny)
Re:breakage: (Score:3, Insightful)
Re:breakage: (Score:3, Informative)
To clarify for those who don't know what he's talking about, neither does he. It doesn't make sense to read from an unopened filehandle; this is not something you can do in 5.6. The whole point of filehandles is that you can open the file once and then use the handle to read from it, rather than having to, say, open it every single time you want to access the file. If you haven't opened it first, of course, the filehandle is meaningless.
And, no, I didn't
Re:breakage: (Score:2)
Doesn't everyone who's been at this for more than a month or two check the return value of open() before trying to read the filehandle?
dude (Score:1)
anybody with an iq of 165 should understand that his sig is just a troll. or maybe iq isn't the measure for intelligence it's made out to be.. hm.
Re:Can we use languages not by lunatics? (Score:3, Insightful)
Yeah! He's a Christian, and therefore a lunatic. Clearly Perl's not worth anything because of that. Oh, but he's not only one! Isn't Donald Knuth a Christian? Everybody, take your copies of ``The Art of Computer Programming'' and burn them. Knuth's clearly a nut job!
But let's not stop there! Augustine, Martin Luther, Johann Sebastian Bach, Soren Kirkegaard, Reinhold Niebuhr, Thomas Moore, Dietrich Bonhoffer, John Wesley, Thomas Aquinas, C.S. Lewis, Martin Luther King, J.R.R. Tolkien... all obviously ins
Need some criteria. (Score:1)
Re:Can we use languages not by lunatics? (Score:3, Insightful)
Re:Can we use languages not by lunatics? (Score:1)
How do you know when someone is being genuine? and not just tied to some
Paid by Microsoft? (Score:1)
Re:Can we use languages not by lunatics? (Score:2)
Furthermore, If I were going to teach programming to anyone who was new at it I would absolutely, positively, teach them Perl. It's an awesome starter language and, unlike most good starter languages, it's a awesome full power language that you can build real usable software with.
Re:Sorry, but I cannot recommend Perl. (Score:1)
I'm sure you could, the thing is I've never seen anything in Perl that was scalable let alone beautyful.
I'm not trying to bash all Perl coders out there. But in my experience most Perl coders, when faced with "there's more than one way to do it" will choose the ugly, unreadable way.
Yes, you can write unreadable code in any language just as you can write decent code in Perl. The difference is that in most languages you have to go out of your wa
Re:Sorry, but I cannot recommend Perl. (Score:1)
I realize this is a gross generalization (I did state so even
The thing however that irks me about Perl is that it makes it entirely too easy to obfu
Re:Sorry, but I cannot recommend Perl. (Score:5, Insightful)
This confirms my solid belief that those who complain about Perl are the ones who do not know Perl.
Those folks who bothered to learn Perl, usually find it readable, easy to maintain, quite robust, and easy to work with.
The fact that it takes a "wild mix" (your words) of other languages to simulate similar behavior should say something about the expressive power of Perl, and the limitations of said in other languages.
Very readable sometimes!!! (semi-ot) (Score:1)
Granted, it could've been mucho ugly if I hadn't written it out the way I did with and with much commenting.
But man was fun to provide a functional program to make a point, and one that anyone off the street could read and comprehend easily. Would actually run through a half million loop iterations to prove the odds check too.