Perl 5.8.1 Released
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.
Damn, Slackware 9.1 is out of date already...
...as I've encounted a few script problems with the last few perl incarnations. Could have been the libraries however.
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.
and now they release both a new perl and a new slackware, after 3 months of unemployment. I say they do it to pester me.
the pun is mightier than the sword
Click here
You mean this one?
Who do you get to be an expert to tell you something's not obvious? The least insightful person you can find? -J Roberts
A quick pass through the changes uncovered:
;)
... now it will never die! :)
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
Some code just deserves to be broken ;)
Perl modules for artificial intelligence must be kept current with the new Perl release.
The Perl AI Weblog has some sample Perl AI code for the main Alife module of the Open-Source AI Mind in Perl.
Register your own Perl weblog if you are writing AI or other good code to share in Perl.
Does that mean the guys at perl.org are saying "I, for one, welcome our new Slashdot overlords!" as well?
luckily, they have the bandwidth to get slashdotted.
Yes, this is an excellent point. Case in point. Basically, everything can be done in any Turing-complete language (which is something I wish the "But you can do everything in Visual Basic!" sales people would get...).
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.
-- B.
This sig does in fact not have the property it claims not to have.
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.
This whole list of posts so far is really depressing. At times Slashdot is a great source of information, at times it is just worthless. It all depends on the people posting the comments. Moderators, I know you only have what you are given to work with, but 90% of theses posts are totaly off topic. Larry Wall and the shit in his pants have nothing to do with a new release of Perl. A release that does some pretty damn cool things BTW like making it possible to switch on and off the new signel behaviour with an ENV var.
If anyone wants to know where Perl is going in the future and why it is a damn good lang to stick with, read the O`Reilly book "Perl 6 Essentials" I think a lot of programmers, even some pretty experenced ones confuse syntax that they don't like with "bad" but as has been quoted over and over Perl is about having fun with programming, and being able to make your master work, or being able to dig your own grave. I very well know there are good and bad ways to program in any lang. Even PHP which I tend to dislike, I have to admit most of the reason is because of the nightmare applications that chew on their own tails to such a degree they are next to impossible to figure out. But I know it is possible to do better work in PHP than that. Perl started out in exactly that way with the oh so lovely Matt's script archive Perl 4 type of scripting. But back then it really was *just* a scripting lang. Now it is much more developed. A simple rule of thought that many of you guys need to consider from Aristotle that I here paraphrase; If a man is sitting on a chair and you maintain he is sitting, you are correct. If he gets up, but you still maintain he is sitting, you are incorrect. Sounds like duh huh? But it is the cleanest way I have every heard expressed the idea that if you base your opinons on information that is outdated, then your opinons can be just plain wrong.
Thanks,
Eric
Python 2.3.1 [python.org] final was released this week. Where was the Slashdot story about that one?
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? Obviously I'm treading the wrong territory here, this being a Perl article an all. By hacking w/ Python, many Perl mongers would be furthering the OSS movement more, not to mention their own careers...
As far as py2.3.1 goes, it's hardly big news, it being just a bugfix release after all.
Save your wrists today - switch to Dvorak
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 fall for your troll. But I may as well let those of us who don't know Perl know that you don't, either. "Perl hacker" my ass.
Nice post. Your concern and sincerity are commendable. Yahoo! Oops, wrong web site. I like the wild-west kinda of feel of slashdot, kinda the Internet before commercialism. I know that Microsoft has people (employees) who are paid (encouraged) to promote Microsoft on slashdot.org. Did you know that? It's kinda funny actually. I would never go to some website promoting MS and try to argue Unix. Thus I think slashdot.org is a good thing.
How do you know when someone is being genuine? and not just tied to some agenda? I think there are many people with many agendas on slashdot and that's what makes it interesting. Defend or attack to your hearts content. Hopefully time teaches us to filter with a critical eye that which is meaningful written by those who care. As obviously you do which is why I chose to reply.
All the best!
-Mybrid
Actually, the guys at linuxfromscratch had a patch available that fixed that problem a while ago... not that it matters now of course...but heres a link to the db 4.1.25 instructions which points out that you will have to patch perl if you plan to compile it with db 4 support...
Chaos is Divine *
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 insane. I don't know why we keep printing their works.
(Stupid troll. Made me flame.)
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
My camel stepped on your python. ;(
There's enough crap out there you gotta sort through it somehow--and I'd prefer to use something from a bright. I'm sure Knuth's book is infected with decimal anyway--there's two strikes.
-Libertarian secular transhumanist
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.
Karma: 0 (But I wield a mean +10 Vorpal Apathy)
I have to call BS on that one. I did look into the history of someone who admits to working for Microsoft (Dave Obsjano or something), but I highly doubt this person is paid to post to slashdot. I just don't think posts to slashdot figure in during the annual review.
-Libertarian secular transhumanist
trying to get the meaning of some Perl gibberish
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.
"If anything can go wrong, it will." - Murphy
It's always been a problem trying to read from a filehandle that is not open, just as it's always been a problem trying to fill a glass at a tap that's not open.
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?
Warning: This signature may offend some viewers.
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.
How small a thought it takes to fill a whole life
You can write beautiful and very scalable code in Perl.
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 way to make code truly unreadable, while in Perl you have to go out of your way to make it readable.
Furthermore my experience has been (beware: sweeping generalizations coming up) that Perl coders tend to care about Perl, Perl and nothing but Perl. Why normalize a DB when you have Perl, why make a decent user interface when anyone can see it was written in Perl and therefore superior by default!.
And don't point me to slashcode, I've never actually looked at the code, but any decent web-programmer only has to look at the brain-dead interface to know that it was written in Perl.
What a rotten party, have we run out of beer or something?
I thought slashdot was coded in lisp. ?
it's called Ruby ;-)
Ehr..well as you rightly suspect they have nothing to do with the language really, except that in my bitterness of maintaining too much Perl crap that should never have been written in ANY language, I see it as an attitude found in too many Perl coders.
:-)) and Perl certainly isn't alone in this. The next big victim of poor coding standards is probably PHP.
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 obfuscate your incompetence. Perl really does encourage writing unreadable code.
What a rotten party, have we run out of beer or something?
Mental Note: Remember to spell check when I type after 3 AM.
set softtabstop=4 shiftwidth=4 expandtab nocp worlddomination
Great post. I epecially liked the Aristotle quote. I'll use that when trying to explain why it's not a bad idea to use Perl to a PHB some time.
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.
set softtabstop=4 shiftwidth=4 expandtab nocp worlddomination
I hate it when I'm overtired and don't cap off a tag and screw up grammatically from editing...
Heh, reminds me, I actually wrote a quick program in perl once to do a statisical anyalsis on die rolls that proved the difference between odds and cumulative odds.
;)
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.
I take it back. Perl 5.8.1 doesn't bring a fix for the memory leaks. This program will still make perl blow up:
use threads;
use threads::shared;
my @shared : shared;
@shared = (1) while (1);
set softtabstop=4 shiftwidth=4 expandtab nocp worlddomination
[Disclaimer: I do both Perl and Python. Marvelous languages, both. This isn't a swipe at Python]
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 and judgement it wouldn't at all. On what do you base this claim? I just can't see how you reach this conclusion.
And the answer is:
./lightbulb line 13, near "= ;" ./lightbulb aborted due to compilation errors.
... it will just sleep for a bit and then exit. I see what it's intended to do, but I suspect this must be some sort of subtle statement about Perl, or perhaps all the languages mentioned ... but I'm not sure what exactly. Either that or it's just broken ;)
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
Why is choosing Python furthering OSS more than using Perl?
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 systems of similar scale/complexity. Churning out cute little scripts is not a wise career move in the long run, even if it can be a lifesaver in various situations. Management is more likely to assume that those scripts could have been written by anyone, while with bigger programs one can demonstrate their architectural vision.
Save your wrists today - switch to Dvorak
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.
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 systems of similar scale/complexity
What? Yes, they can. Why not?
Churning out cute little scripts is not a wise career move in the long run, even if it can be a lifesaver in various situations. Management is more likely to assume that those scripts could have been written by anyone, while with bigger programs one can demonstrate their architectural vision.
I don't "churn out little scripts" in Perl. Never have. I've done plenty of large and complex systems in Perl however, and I'm far from the only one.
I don't want to get into an argument particularly, but if this reasoning is the basis of your statements, then it's clear that they are completely unsupportable.
Before you leap into a reply you may want to consider if you really know much about Perl at all. From the above statements, it's clear that you don't. Now that's not a bad thing in itself, but it's best not to criticize from a position of ignorance like this just to attempt to rally support for your current favourite language. You won't succeed in convincing anyone, and will actually drive people away with statements such as "furthering the OSS movement more, not to mention their own careers..."
Why not talk about the object models instead, say? Or something else aside from FUD? That would be a much more productive approach.
Anyway, good luck with Python. It is a nice language, as I said. I use it a lot.
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.
The "readability" issue is merely an opinion.
:-). Additionally, it was saturday night and I had been drinking in preparation for a night at a club, so... :)
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 trying to fix.
Before you leap into a reply you may want to consider if you really know much about Perl at all.
I know just enough not to like it. I have tried to like it, though; I've read most of the O'Reilly basic Perl (PP, advanced perl programming, LP...) books, so you can hardly say I didn't give it a chance. And then I discovered Python, and realized I had been wasting my time giving Perl a chance.
You won't succeed in convincing anyone, and will actually drive people away with statements such as "furthering the OSS movement more, not to mention their own careers..."
I can admin that I could have been more diplomatic, but such a thing rarely occurs when Perl and Python people collide on slashdot; Perl and Python are the Emacs and VI of modern times
Why not talk about the object models instead, say?
Perl adapted it's object model from Python's, but somehow, it doesn't feel right or natural. It's probably because it has messed up reference system, while python treats everything naturally as a reference.
Anyway, good luck with Python. It is a nice language, as I said. I use it a lot.
Great.
Save your wrists today - switch to Dvorak
Readability of Perl has rarely been considered a matter of opinion
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 problems. Even Larry Wall agrees with that, or at least has at some interviews. This is something perl6 is trying to fix
So, I'm just imagining all the large problems solved with it, then? As for these "interviews", I think I know what you're referring to, and that's not true at all.
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.
Like I said, you don't know what you're talking about, you were trolling, I gave you a chance to explain yourself, and you have been (gently) corrected, and continuing to try to defend this position justs continues to make you look a bit silly. It really is as simple as that. The best thing to do is grow up a bit, admit you were flatly wrong in the first place, and move on. Really.
Advocacy: If you speak incorrect BS, do you really expect any Perl programmers to consider Python? Or just roll their eyes and get on with implementing their large scale systems in an OSS language? I really do want more people to try Python, but this is having the exact opposite effect. Think about it. Please!
No one cares about what *you* consider to be open.
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.
Save your wrists today - switch to Dvorak
I can hardly speak for anyone else but myself.
... it's not hard or anything.
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 scale systems", that would be another subject you probably need to get some experience dealing with.
Yeah, whatever.
You might at least want to look up the definition of Open Source Software before talking about it next time