Slashdot Mirror


Perl 5.7.0 Released (Devel Version)

qbasicprogrammer writes "The long awaited Perl 5.7.0 version has finally been released! Source code is available from CPAN. If you haven't upgraded yet, now is the time. In related news, development of Perl 6 is continuing swiftly as demonstrated by the Perl 6 Library." Check out the head's up story saying that it was coming - just a reminder this is *devel*. Don't play with it unless you know what you are doing.

35 of 92 comments (clear)

  1. Re:Is slashdot supposed to be taken seriously ? by Hemos · · Score: 2

    What's wrong with it? It's a devel version - it says as much in the story.

    --
    Yeah, I'm that guy.
  2. Re:Short answer: not anytime soon by pb · · Score: 2

    Well, the idea behind Perl is a little bit different; it has too many decently implemented features to just be a scripting language, no matter how some people use it. It's humble, too--although it has the few useful features of Java, (packages and object-orientation, at least) it doesn't take the NIH approach and pointlessly rename everything like Java does. :)

    I like C, too; because Perl is generally interpreted, and because of some of the features it has now, writing your average C-looking code in Perl isn't worth it--it'll be up to 10 times slower. However, writing code that takes advantage of Perl's features will perform much better, and can be expressed in much fewer (and easier to read) lines of code.

    Examples:
    - Being able to use a hash for quick lookup, or as an arbitrary name-space is really handy.
    - A reference to a sub-routine functions as a closure, not as a function pointer; without this, functional programming can be more difficult to do... :)
    - Arrays are readily growable, and can function as a stack, or other linear data structure.
    - Extra types, like arbitrary-precision number routines, are readily available.
    - CGI and database programming is ridiculously easy to do.

    Finally, I wrote a program that takes arbitrary input line-by-line, and outputs sorted unique lines with a count of how many of each line it found. It took me 7 lines of Perl code, (counting the comment to run the Perl interpreter :) and 50 lines of C.

    The C approach dynamically grows the strings as needed, and using a dynamic array of pointers and qsort takes up a little bit more code than using a binary tree with a reference count, but they are both around 50 lines of code.

    I haven't tested the two of them against each other yet, but the Perl code should be faster in general, for big files, because the built-in hash routines are algorithmically superior. (i.e. I don't think they have a worst-case of Order-n-squared...)

    So, yes, a place for everything, and everything in its place. There are many times when Perl is the right tool for the job, and C isn't. I wouldn't write an Operating System Kernel in Perl unless I could make a *really* optimized compiler for it, but for many other tasks it's a much better choice. Besides, if you *need* to write something in C, you still *can*. And if you still don't like it, well, you can write a better language in C, just like they wrote Perl. :)
    ---
    pb Reply or e-mail; don't vaguely moderate.

    --
    pb Reply or e-mail; don't vaguely moderate.
  3. Re:Python and objects by AMK · · Score: 2

    It's true that it's difficult to do much without creating an object at some point. However, you can do quite a lot of useful work in Python without understanding the OO model, inheritance, or any of those concepts. To me, the difference between C's "file = fopen(...); fread(file, ...)" and Python's "file = open(...) ; file.read(...)" is simply a matter of syntactic sugar. But you don't need to subclass some generic file class in order to create a file that's unbuffered, or is for writing instead of reading. Java's I/O library seems far more OO to me, in that you have to instantiate the right StreamWriter/Reader class.

  4. Re:Simple solution - don't use it by AMK · · Score: 2
    Note, however, that having regexes as an add-on module means they can be dropped if you don't need them, such as if your interest is in wrapping numeric code or using it as an embedded language. This is why there's already an early version of Python for PalmOS, while Perl for PalmOS doesn't seem to exist yet.

    And calling python "academic", as if that's a term of derision, is simply silly. It's not a language that has attempted to create new ideas in programming languages; it simply starts with different design principles and, unsurprisingly, ends up in a different place. See Tim Peters's "19 Pythonic Theses" for a (retroactively coined) list of principles.

  5. Re:*PLEASE* do not install 5.7.0 into production u by pudge · · Score: 2

    Yeah, how DARE the GUY WHO RELEASED THE SOFTWARE warn people NOT TO USE IT without knowing exactly what they are doing, to counteract the original submissions saying "go upgrade now." Little wanker.

  6. Re:Slashdot Perl Scripts by pudge · · Score: 2

    Slash (and Slashdot) runs on perl 5.005_03. It may run fine on perl 5.6. The current development branch of Slash, bender, is going to be tested on perl 5.6. We may upgrade Slashdot to perl 5.6 someday if it proves stable, or we might wait for perl 5.8.

  7. Re:Phew. by pudge · · Score: 2

    BTW, I meant to add that I've run perl 5.6 on a machine with Slash and saw no problems.

  8. Re:Does Anyone Know... by Darchmare · · Score: 2

    Really? That's funny - I know a lot of people who 'got into Perl' by reading those books... Myself included.

    Someone has to write good documentation and tutorials. Without it, not as many people would learn the language.


    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  9. Re:Does Anyone Know... by Darchmare · · Score: 2

    Why should they? They've already given a lot back to the people who developed Perl by helping immensely in the spread of the language. This allows the coders to spend less time worrying about documentation and more time coding.

    I haven't exactly seen Larry Wall or anyone else complaining about it - it would appear they are at worst neutral on the issue, and quite likely very appreciative. Wall in particular seems to be above jealousy over someone else *gasp* making money by writing about Perl.


    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  10. Remember it is a development release by jjr · · Score: 2

    Check it use beat it up purge it system out of bugs

    This a a quote from the perl site for thsoe who do not read the links

    "Check that your favorite patch is in, check that your favourite module still
    works, check that it still works on your favourite platform. Yes, I know it's a
    development release, but I still would prefer not to wreak havoc more than
    necessary," he said.

  11. 5.6.1 will be coming shortly by tilly · · Score: 2

    The roadmap chosen is to have 5.7.0 come out, and then take out the risky bits and call the result 5.6.1. So that should be arriving, probably within the month.

    At the moment here are recent releases in terms of my trust for them:

    5.005_03
    5.7.0
    5.6.0

    Why?

    Because there are a number of significant bugs in 5.6.0 that are fixed in 5.7.0. The worst of which IMO is this:

    perl -e 'my $x = 10; $x = "2" . $x; print $x + 0'

    (In 5.6.0 prints "10".)

    Cheers,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
  12. Re:Short answer: not anytime soon by Cato · · Score: 2
    Finally, I wrote a program that takes arbitrary input line-by-line, and outputs sorted unique lines with a count of how many of each line it found. It took me 7 lines of Perl code, (counting the comment to run the Perl interpreter :) and 50 lines of C.

    Ah, you mean like 'sort | uniq -c'? :)

    Still, Perl is very nice when your problem doesn't neatly fit the Unix tools approach, e.g. multiple-line records or whatever.

  13. Re:Simple solution - don't use it by Omnifarious · · Score: 2

    perl and Python are in competition for a few reasons:

    1. As someone else said, they are both high level interpreted languages
    2. They both rely heavily on outside services and libraries to make them truly useful.

    Now, if they were both the same, there would be no point in them competing. perl and Python differ in several important ways:

    1. Python uses whitespace as a block delimeter. This does force code to have some marginal level of readability, which is nice. The loss of freedom this entails is very occasionally annoying.
    2. Python was designed from the beginning to have modules, and an eye towards object orientation. The namespace rules in Python are consequently much more regular and easier to understand.
    3. Perl was designed as a replacement for complex shell scripting, and if your habits come from this kind of background, it fits much more easily into how you work than Python.
    4. Python has simply amazing (reminiscent of lisp) reflection capabilities. Perl has them, but they are arcane and difficult to use and understand.

    Python regular expressions are now as powerful as perl's, but still not quite so convenient to use. A compiled regular expression is a first class object in Python, so you have a lot more control over when and where an expression is recompiled. This lack in perl is a major annoyance of mine.

    I actually see Python as a viable (and desirable) replacement for perl in most instances. Of course, I tend towards the academic mindset. I suspect that people who would rather solve their problem than think about it too hard would vastly prefer perl.

  14. Backwards compatibility in Perl 6? by jetson123 · · Score: 2

    The list of RFCs for Perl 6 is pretty long. The changes look like they address a lot of the problems people have had with Perl. But how compatible is Perl 6 going to be with Perl 5? Will most packages/scripts need to be rewritten? Will the C extensions of Perl 5 need to be rewritten? I didn't see anything in the Perl 6 materials on the site that answered these questions (but maybe Larry addressed it in his speech).

  15. Re:Development release! by grappler · · Score: 2
    Perl is now following a release style similar to Linux - even numbered releases are 'production' releases

    Hmm, sounds like the development branch only just started, in that case.

    "What a waste it is to lose one's mind. Or not to have a mind is being very wasteful. How true that is"

    --
    Vidi, Vici, Veni
  16. Re:YMNSICU by macpeep · · Score: 2

    Java is *100%* backwards compatible with older versions. New Java versions introduce HUGE amounts of new stuff - 1.2 did so in particular, but never has backwards compatibility been broken. Sure large API changes have been made in some areas, but the old API's still exist and are only marked as deprecated - not removed.

  17. Re:Simple solution - don't use it by Our+Man+In+Redmond · · Score: 2

    Perhaps it depends on how your mind works. Python is a highly disciplined language where in general there is One True Way. It's very easy to read. The object-oriented features of Python are more deeply embedded than those of Perl (read: the whole blippin' language is object oriented). And of course it's an excellent language for beginning programmers.

    If Python points to the One True Way, Perl points to All Of The Many True Ways. It doesn't impose its structure on you. This can be bad if your mind demands structure; it's good if, like mine, your mind is completely unstructured (some might say "loosely hinged") but you occasionally want to impose structore onto it -- though only if you have to, not because the language demands it. What with the regular expressions and variable designators ($%@ and their friends) Perl is occasionally compared to "executable line noise." This bothers some people, although considering that my first language used variables like B! and X$ and U#, it doesn't bother me. The OO features of Perl are easier to avoid than Python's if you don't want to use them. And of course, it's an excellent language for beginning programmers.

    Python might be a better choice for writing large programs that are going to require a lot of maintenance, or that will someday be moved over to C. Perl definitely shines in the areas of system maintenance, quick one-off scripts and one-liners. One-liners in particular are impossible in Python because of its use of whitespace and newlines as delimiters, although Python's interactive mode is much better than Perl's. Both are good for rapid prototyping.

    I would say check 'em both out and use whichever one suits you. I tend to prefer Perl, but that's just because it works the way my mind works. YMMV (Your mind may vary).
    --

    --
    Someone you trust is one of us.
  18. Re:*PLEASE* do not install 5.7.0 into production u by jhi · · Score: 2
    *SIGH*

    Please keep on reading those release notes... Perl 5.7.0 does NOT have "full Unicode support". It has some Unicode bugs fixed compared to 5.6.0, but that's it.



    --
    jhi@iki.fi

  19. *PLEASE* do not install 5.7.0 into production use! by jhi · · Score: 4
    Hi,

    this is the Perl patch pumpking (release wrangler, if you will) speaking. Please read the announcement letter carefully. The bottom line: you should NOT install 5.7.0 into production use. Unless you know who are the perl5-porters, what is perlbug, and preferably, how to pronounce my name :-) you should not even think about installing 5.7.0.



    --
    jhi@iki.fi

  20. Re:Short answer: not anytime soon by maraist · · Score: 2

    Hash lookup takes a constant amount of time, O(1), ...


    Open hashes are O(k + m) where k is the length of the string (which is almost always miniscule, though the overhead is pretty large), and m is the size of the linked list, which is generated from overlapping mappings of keys.

    Perl allows you to view the statistics as follows:
    $num_elements = keys %hash;
    $used_and_free_cells = %hash; # "used_cells/total_cells"

    An important problem with hashes is that when you get full you have to rehash. This has an incredible cost (much more than simply copying out an array to a new larger spot in memory). If you never rehash, but you keep growing your data, then your linked lists will grow so large that m will approach n. An alternative solution would be to use a tree instead of a linked-list. But for larger data-sets, this defeats the purpose of hashes.

    --
    -Michael
  21. Re:Perl VS Python by Abigail · · Score: 2
    This [Perls use of braces //A] naturally leads to errors where the indentation (highly visible) is correct but a brace is missing or extra. Python lets the visible thing (indentation) take on the syntactic role.

    It isn't very easy to miss a brace - if you miss a brace, the code is unlikely to compile. Of course, you might misplace a brace, but you might as easily misplace whitespace. And given that people tend to indent their code, in Perl you would actually have to misindent *and* misplace the brace to make an error that isn't bloody obvious from staring at the code 40 feet away. So.... you might as well say that in Perl, the purpose of the braces is to see whether you indented right. ;-)

    Last time I checked, Python's regular expressions were inferior to Perl's in speed, ease of notation, and power/comprehensiveness.

    It has been a while ago that Python copied Perl's regexes, so the ease of notation argument doesn't hold. Nor does the power/comprehensiveness argument.

    I program a lot in Perl and never in Python.

    From the code I often see, I would say than more than half of the people programming in Perl would have been better off if they never had programmed in Perl but used Python instead.

    -- Abigail

  22. Re:*PLEASE* do not install 5.7.0 into production u by Abigail · · Score: 2
    who are the perl5-porters

    It's the bunch of freaks and geeks meeting at Larry's for tea every Tuesday afternoon.

    what is perlbug

    That's the Beetle (with flower power decorations) donated to Larry by a certain German car maker.

    how to pronounce my name

    That's easy. It's Finnish, so you just have to pronounce it the way it's written.

    -- Abigail

  23. Re:Short answer: not anytime soon by Abigail · · Score: 2
    That's of course 6 lines too long. Such a trivial thing is a one liner:

    perl -wne '$_ {$_}++; END {print "$_{$_}: $_" for sort keys %_}'

    And you are right. You only have to add a tiny bit of code to do it for each word.

    perl -nalwe '$_ {$_} ++ for @F; END {print "$_{$_}: $_" for sort keys %_}'

    -- Abigail

  24. Development release! by nconway · · Score: 5
    Since no one has commented on this yet: this is a development release! It is not intended for public consumption. It *probably* breaks lots of stuff. Don't run this anywhere your job is on the line.

    As was announced with Perl 5.6.0, Perl is now following a release style similar to Linux - even numbered releases are 'production' releases (e.g. 5.6.x, 5.8.x, 5.10.x), odd numbered releases are 'development' releases (5.7.x, 5.9.x, etc).

    I haven't checked out the change summary yet - I wonder what's been improved. My personal hope is the Perl compiler (B::C, B::CC, etc). Neat stuff!

  25. Re:Is slashdot supposed to be taken seriously ? by Money__ · · Score: 2
    absolutely no thought whatsoever went into editing it.

    No, then it wouldn't be a quote from the story poster. It IS a good addendum warning about the status of the release. The story goes a little something like this:

    Perl 5.7.0 Released (Devel Version) Posted by Hemos on 07:51 PM -- Sunday September 03 2000
    from the makin'-time-with-the-camel dept.
    qbasicprogrammer writes "The long awaited Perl 5.7.0 version has finally been released! Source code is available from CPAN. If you haven't upgraded yet, now is the time. In related news, development of Perl 6 is continuing swiftly as demonstrated by the Perl 6 Library." Check out the head's up story saying that it was coming - just a reminder this is *devel*. Don't play with it unless you know what you are doing.

    Note, the stuff in italics is a quote from the story poster and the addendum on the bottom talking about it being *devel* is Hemos being a good journalist, actuarially quoting the story poster in it's entirety and informing the reader with a stern warning in the headline and the tagline.

    If you want stuffy editors filtering your content, goto the nytimes. This is /. it ain't all right but it's allright.

  26. Larry Wall speeks by Money__ · · Score: 3

    Larry Wall speeks at Dr. Dobbs about PERL6.

  27. Perl VS Python by crucini · · Score: 3
    I agree that it's silly to evade language comparisons with the excuse that they're not directly comparable. Perl and Python are similar enough to invite comparison. They are both high-level interpreted (effectively) languages. Here are the main differences as I see them:
    1. Python uses indentation as punctuation. This could be great or terrible. Look at it this way - if you write perl per `perldoc perlstyle` you're describing block structures twice - once with indentation level, and once with braces. This naturally leads to errors where the indentation (highly visible) is correct but a brace is missing or extra. Python lets the visible thing (indentation) take on the syntactic role. The downside, if any, is that you lose the freedom to indent code however you want.
    2. Python is believed to have better object-orientation than Perl. Since I don't have the OO religion, this makes very little impression on me.
    3. Python is purist/academic in flavor, while Perl is eclectic/pragmatic. Perl's power is strongly tied to its mixed ancestry. Perl basically swallowed C, shell, and either sed or awk.
    4. Last time I checked, Python's regular expressions were inferior to Perl's in speed, ease of notation, and power/comprehensiveness. This may not be true anymore.
    In case it's not obvious, I'm a bit biased towards Perl. I program a lot in Perl and never in Python. The one place I can imagine Python being superior is a largish team of newbie programmers. The enforced indentation would help ensure uniformity of style, and the bias towards object orientation might encourage modular and reusable code.
    1. Re:Perl VS Python by alleria · · Score: 2

      Python is believed to have better object-orientation than Perl. Since I don't have the OO religion, this makes very little impression on me.

      After reading Dr. Conway's _Object Oriented Perl_, I'd tend to agree with Python having 'better object-orientation.' But this isn't due by any means to features, but rather to standardization:

      the Python OO model is standardized enough that you don't have to roll your own, and also includes quite a few gee-whiz features like being able to replace methods at runtime, I believe. This leads to good object interoperability, and likely superior speed since OO _is_ somewhat less of a hack.

      Perl is a lot less standardized, but equivalent at least in power. With the above example of subroutine replacement at runtime, this could be achieved by designing the class so that all methods are called through subroutine refs, and then just assigning to that subref for a new method.

      The main problem that I see with Perl OO right now is the non-interoperability that is achieved when everyone rolls their own. The power is definitely amazing, but the ease-of-use between modules is fairly low. I believe that someone might even have a Perl6 RFC or two written up about this?

  28. time for more coffee by TeVi · · Score: 2
    Damn, i really need coffee. I read 'evil' instead of 'devel':

    just a reminder this is *evil*. Don't play with it unless you know what you are doing.
  29. Short answer: not anytime soon by Ars-Fartsica · · Score: 3
    Take a look at the mailing list traffic (which is so overwhelming that people holding full-time jobs cannot hope to follow).

    Its pretty obvious that no one really knows yet what perl6 is going to be.

    Some factions are gunning for radical changes, others (notably Tom Christiansen) seem to be holding a conservative stance.

    One thig is certain - perl6 is not coming in any form anytime soon. Try 2002.

    1. Re: Re: Short answer: not anytime soon by qbasicprogrammer · · Score: 2
      the built-in hash routines are algorithmically superior. (i.e. I don't think they have a worst-case of Order-n-squared...)
      Close. Hash lookup takes a constant amount of time, O(1), as explained in Uri Guttman's and Larry Rosler's article A Fresh Look at Efficient Perl Sorting. For more information on algorithmic efficiency of Perl's builtins, see Shift, Pop, Unshift, and Push with Impunity!.


      --

      10 LIST : REM MER : TSIL 01
  30. sweet by \\x/hite+\\/ampire · · Score: 2

    Hopefully it'll help speed up certain unnamed (*cough* /. ) perl generated sites. ;-)

    --

    ``We are the people our parents warned us about.''
  31. OT Re:New Version of Linux Kernel Available !! by Luminous · · Score: 2
    Can't help but sense the hostility from the multiple posts given to what you seem to believe is a social injustice.

    I have to say anyone with half a brain, who is in charge of doing the upgrades for PERL in their production environment would also be bright enough to catch the DEVEL in the title of the article, or if worse came to worse, would read the notes regarding the fact that this is a Development Release and not for production.

    Alas, a more savvy 'journalist' would have edited the original statement, but at some point in time you have to assume the audience has a base intelligence in regards to the subject matter. Anyone who believes a random report to make business decisions will always end up with the short end of the stick.

    --
    This is not the way to build a lasting empire.
  32. Re:idiot by Arimus · · Score: 2

    what the fuck is your problem? I think it is nice for once to warned not to install as it is a development release. Too many people have the habit of just rushing out and installing the latest whatever and totaly screwing up their systems.

    --
    --- Users are like bacteria -> Each one causing a thousand tiny crises until the host finally gives up and dies.
  33. Re:Simple solution - don't use it by David+Hume · · Score: 2
    I'm tired of this silly back and forth - these tools are not in competition - they fulfill different needs.
    This is an honest question, albeit one that demonstrates my ignorance :), and not a troll. Why are Perl and Python not in competition? What are the different needs that they fulfill? What does Perl do that Python doesn't, and vice versa? What does Python do better than Perl, and vice versa?

    My purpose is NOT to start a religious war, but to honestly learn which to work with.