Perl New Version 5.5.660
aarestad writes, "Just saw this on perl.com:
the new beta leading to perl 5.6. Read the
announcement."
It's mostly bugfixes. Pumpking Sarathy says we're on track for a 5.6 final release candidate by Feb.28.
← Back to Stories (view on slashdot.org)
TCL 8.3 was just release a couple weeks ago too. TCL is a competitor to Perl which I happen to love. Not trying to start a flame war here!
If tits were wings it'd be flying around.
I was just wondering, what are the best resources for learning perl? Is there any books out there you guys/gals reccommend? thanks
-motardo
Which version(s?) of perl does Slashdot run with?
Does it work under Linux?
Does it cost a fortune like everythign else Rational makes?
Do you work for Rational?
They did. It's called Python.
only 6 thousandths away from 5.5.666!
:-\
cpeterso
I mean, why all these release updates?
Bjarne
I am enough of a masochist that I *enjoy* watching my program malfunction because I indented a line incorrectly
I don't see that this is any more painful than watching your program malfuction because you forgot an end-brace.
Yes. It came from a project called "Blacker" project. Here's the Linux Magazine article where he states that.
This is just a bugfix release. As a rule, new versions will almost *never* break compatibility with older versions. Only certain M$ products *cough*Excel*cough* do that.
Each version, a few things might be dropped/added. But usually the archaic forms are kept for a few releases until everyone's migrated.
void recursion (void)
{
recursion();
}
while(1) printf ("infinite loop");
if (true) printf ("Stupid sig quote");
Friends don't let friends misuse the subjunctive.
(I can't find Tom's Perl->Slashdot formatter, so make whatever you can of the script below.)
:object.property :object.method()
' .$2.$3:'$'.$1.'->{'.$2.'}'}egi;
#!/usr/bin/perl -w
# a filter for enabling C++-looking "OO" style in Perl.
# not tested; have no idea if it works; probably clashes with about a dozen other forms. As usual, provided without any warranty. Heh.
# syntax:
#
# => $object->{property}
#
# => $object->method()
while (<>) {
s{:(\w+).(\w+)\s*([\([^\(\)]*\)]?)}{$3?'$'.$1.'->
print;
}
Happy now?
To the editors: your English is as bad as your Perl. Please go back to grade school.
For those who want to know what is actually new in Perl 5.6, you want to look at perldelta . (The message linked to above is just what was new since the last beta).
Eventually I'll have to learn Perl. But I might wait for release 6.6.666, so that it runs on Windows properly. ;)
:)
Seriously, though, I think this is news, because Perl hasn't changed version numbers in a while. I guess this'll be cooler when it's a stable version, but...
Remember, Linux, Apache and Perl are always news here, because Slashdot runs on all three. And if Slashdot ever tackles that "slow under load" problem, that'll really be news!
---
pb Reply or e-mail; don't vaguely moderate.
pb Reply or e-mail; don't vaguely moderate.
As was pointed out there are a number of changes. This is not just a bug-fix. The biggest new item is Unicode support. If you have to do things like match patterns in multi-byte character sets, this will be really cool. If you don't it will still be a nice feature since a lot of things (eg the web, file-systems, etc) are moving towards Unicode as internationalization becomes more and more important.
:-)
The biggest "missing features" continue to be solid multi-threading, compilation, and solid 64-bit support. If you want the first one, rethink whether the fork model works. If you want the second think about embedding an interpreter. If you need the third I suggest getting used to opening pipes to and from programs that can handle large files...
A "cool feature" that was discussed (I have ignored the Perl development list for the last half year so I don't know if it is in) was embedding Perl and a directory structure in a zip format. Imagine shipping an executable which had an encrypted zip appended which was Perl, with your scripts, and a directory structure of all of the modules your script used...
Cheers,
Ben
My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
This is a big deal! :-)
Promising an actual living fork() so I can play robot wars in the background without getting too clunky and memory short.
New and possibly recursive regex code on which you can coredump but will be very nice for tag matching of all sorts.
Sigh, the only immediate problem is can only install on NT. wait till March for '98.
Just another perl hacker in Bangkok
Come on, sure a new version of Perl is great news, but it is really worthy of a front page listing on Slashdot? Certainly on freshmeat, but not on Slashdot.
There must be better stuff than this being submitted, or have you guys ignored everyone enough that no one is making good submissions anymore?
You just wish your ID was as low as mine! I used to be proud to have such a low id, but not so much now. Slashdot most
Where's the maximum threshold? On Slashdot, It seems like the troll comments are better than the highly moderated ones at least half the time! Don't get me wrong, there are good comments from people with great thoughts and opinions, but it seems like a lot of them are just trying too hard and not speaking their true voice because they want karma/community acceptance/whatever (JonKatz theme). A troll doesn't care what you think.
I'm looking forward to Signal 11's upcoming gallery of the greatest /. trolls...
How can I compile my Perl program into byte code or C?
Malcolm Beattie has written a multifunction backend compiler, available from CPAN, that can do both these things. It is included in the perl5.005 release, but is still considered experimental. This means it's fun to play with if you're a programmer but not really for people looking for turn-key solutions.
Merely compiling into C does not in and of itself guarantee that your code will run very much faster. That's because except for lucky cases where a lot of native type inferencing is possible, the normal Perl run time system is still present and so your program will take just as long to run and be just as big. Most programs save little more than compilation time, leaving execution no more than 10-30% faster. A few rare programs actually benefit significantly (like several times faster), but this takes some tweaking of your code. You'll probably be astonished to learn that the current version of the compiler generates a compiled form of your script whose executable is just as big as the original perl executable, and then some. That's because as currently written, all programs are prepared for a full eval() statement. You can tremendously reduce this cost by building a shared libperl.so library and linking against that. See the INSTALL podfile in the perl source distribution for details. If you link your main perl binary with this, it will make it miniscule. For example, on one author's system, /usr/bin/perl is only 11k in size!
In general, the compiler will do nothing to make a Perl program smaller, faster, more portable, or more secure. In fact, it will usually hurt all of those. The executable will be bigger, your VM system may take longer to load the whole thing, the binary is fragile and hard to fix, and compilation never stopped software piracy in the form of crackers, viruses, or bootleggers. The real advantage of the compiler is merely packaging, and once you see the size of what it makes (well, unless you use a shared libperl.so), you'll probably want a complete Perl install anyway.
(back to me) I also noticed GNU/Hurd is now supported. Hmm.. mebbe it's time to try that (the Hurd) out.
I also recommend Learning Perl, even if you are using Windows. Learning Perl on Win32 Systems does not get that great of reviews and at the entry level you are probably not going to be using anything unique to the Windows environment. BTW, if you aren't used to working from a console environment, Perl is going to be a good new experience for you (if you are going to be working in a Windows command console instead of Linux (or Unix or BSD...), you'll want to set up the console to have higher initial memory than the default so that you aren't dealing with that tiny little console). As far as getting more books, you may want to hold out until you've worked through the first book... I've always been able to find answers to more in-depth material in the Perldocs pretty easily. If you like Perl and start using it, then get hold of Programming Perl. Have fun, I've really enjoyed Perl!
If you read the whole original announcement, you find among other things, renaming "byte::" to "bytes::". Do you call this a bugfix? And what exactly is "default mkdir() mode argument to 0777"? Changing default mode arguments is definitely *NOT* a bugfix. Fixing a memory leak is a bugfix, but what about "generalize "%v" format into a flag for any integral format type: "%vd", "%v#o", "%*vX", etc are allowed"?
The reason I asked is because I have some doubts about the way Perl is evolving. When I used it first, about eight years ago, it seemed to me a pretty cool little language, but I never had the chance to use (and learn) it more extensively. A couple of months ago, I bought "The Perl CD Bookshelf" from O'Reilly and was surprised with all the features that had been added to Perl. Adding unneeded features is the quickest way to add bugs to a system. Look at the MS-Office or MS-Windows releases for the last ten years or so for further examples.
Seeing this announcement, if you only read the slashdot homepage, you think it's just bugfixes. If you go further and read the "announcement" itself, you see it labelled as a "development version", with "mostly bugfixes". Well, as I see it, if you are developing, you are not fixing bugs, you are adding new features. With new features come new bugs. Looking further, at the "original announcement", you need to be a Perl guru to understand all the notes.
I really like the Linux system, having a set of versions for adding features and a separate and parallel set of versions just for bugfixes. Although this system is sometimes not followed very religiously, it's an excellent basic principle. So, my original question still stands: is this version intended for fixing bugs or for adding new features or a little of each? Are they adding new bugs to Perl faster than they are debugging?
This rather long comment could have been avoided if you did what you preach and had actually read the whole original announcement. Clueless moderator, clueless AC, perhaps they are the same?
Moderators, take note:
1)Read the moderation guidelines before moderating anything
For inclusion in Perl 5.6, Randall L. Schwartz wrote perlroot.pod as a standard file to go with the distribution. It's a very good tutorial on Perl objects. I can't post it here or in my page because permission is only granted for inclusion in the Perl distribution (or that is what I understood), but you can look for that file in the Perl source tree.
I knew only a good deal of JavaScript when I decided I was going to teach myself Perl. I went out and picked up "Programming Perl". Who better to learn from than Larry, I thought. Doh! I'm glad I have the book now but it is definately not for beginners. I'd consider it a must-have reference, though. So then I got "Elements of Programming Perl" after the /. review a few weeks ago. I love it, for the most part. I think the exercises could be emhasized a bit more, but other than that it's very clear and concise. It's well structured and easy to understand (coming from me, that's an endorsement). I highly recommend it.
If you read the Linux Magazine article, you know much of the scoop. In short, Larry wasn't working for the NSA. Rather, he was working for System Development Corporation in Santa Monica on a project called BLACKER. BLACKER was a project to develop an A1 Secure (TCSEC pre-TNI) Wide-Area Network. As part of the A1 requirements, we had to do configuration management. We had machines on two coasts. Larry, being lazy and impatient :-), decided to adapt inews to keep news articles in synch, and to allow appending "approvals" to existing articles. This gave him the CM databases. For reports, he tried to use awk, but discovered that it couldn't handle multiple files or formats well. Thus, Perl was born to produce BLACKER CM reports. I then started writing Perl scripts to do other activities (such as maintaining our documentation library in sych with the code), as Larry and I were sharing an office (and a carpool) at the time. Larry has told the rest of the story (and yes, I forgave him long ago. Don't get up to the bay area often enough to see him anymore :-() Daniel