Slashdot Mirror


Perl's Extreme Makeover

PurdueGraphicsMan writes "There's an article over at Yahoo! about the upcoming version of Perl (version 6) and some of the new features (RFC list). From the article: "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages, "no one pretends for a moment that they're anything but hideously ugly," said Damian Conway, a core Perl developer and associate professor at Monash University in Australia.""

408 comments

  1. Whew, backasswards compat-with Perl 5 by microbob · · Score: 4, Funny

    Good! Looks like they kept Perl5 in mind and it will flip into a special mode to execute older Perl5 code.

    Nice!

    -mb

    1. Re:Whew, backasswards compat-with Perl 5 by JavaSavant · · Score: 1

      Great, will this be as reliable as OS9 mode in OSX? Not even going to bother with Perl 6. Perl 5 works fine for me.

    2. Re:Whew, backasswards compat-with Perl 5 by microbob · · Score: 1

      Me either...I've done about 90% of all my coding since '96 in Perl. I spend about 40-50% of my day coding, so that is a buttload of Perl code.

      I really, really doubt I'll move over to 6 unless they have some really cool OO fixes or I'm *forced* to move over to 6 (wich *will not* happen :>)

      Still, it is good to see progress!!

      -mb

    3. Re:Whew, backasswards compat-with Perl 5 by AoT · · Score: 1

      Um.. does reliable==annoying?

      that's all I ever got out of os9 on my PowerBook.

    4. Re:Whew, backasswards compat-with Perl 5 by ikewillis · · Score: 4, Informative
      Not only is it backwards compatible, but thanks to Perl 6's new modular architecture, Perl 5 code will simply include a separate parser/compiler which will generate code which will execute through the Parrot runtime, which adds a number of optimization benefits (at runtime, even) not currently possible through the current Perl 5 compiler/parser/runtime mush.

      Consequently, Perl 5 code should run faster under Perl 6.

    5. Re:Whew, backasswards compat-with Perl 5 by Anonymous Coward · · Score: 0

      I really, really doubt I'll move over to 6 unless they have some really cool OO fixes

      Well, they sure couldn't make OO in perl any WORSE, now could they?

      (Speaking as a professional Perl programmer since '97...)

      I like perl for a lot of reasons, but it's support for OO was clearly tacked on to the existing non-OO language. OO programming works well when you get the hang of it, but it's not intuitive, and the language actually makes it sort of awkward.

      Browse the RFC list, though. Grep for "object". I started to post a list of OO RFCs that sounded really nice, but when I realized there were dozens, I stopped.

      Suffice to say that OO in Perl 6 looks to be a lot better.

    6. Re:Whew, backasswards compat-with Perl 5 by gareth6889 · · Score: 1

      ???

      You say it like your better than us! You must be someone who can't get chicks AND can't code Perl :D

    7. Re:Whew, backasswards compat-with Perl 5 by Anonymous Coward · · Score: 0

      I read the article, and still can't understand. Why, exactly, is this funny?

    8. Re:Whew, backasswards compat-with Perl 5 by JavaSavant · · Score: 1

      Yes, hence the statement that I would just stick with perl 5. If I want fancy OO features, I'll user Python, Java, or PHP5.

    9. Re:Whew, backasswards compat-with Perl 5 by fanatic · · Score: 2, Interesting
      the current Perl 5 compiler/parser/runtime mush.

      But how does eval $string work in a runtime with no compiler?

      --
      "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
    10. Re:Whew, backasswards compat-with Perl 5 by mrogers · · Score: 1

      Yup, i've added Perl 6 to my resume already.

    11. Re:Whew, backasswards compat-with Perl 5 by Shillo · · Score: 1

      > But how does eval $string work in a runtime with no compiler?

      Parrot is a jitter, fed by the bytecode compiler written in... parrot. The bytecode compiler is part of the runtime, of course.

      --

      --
      I refuse to use .sig
    12. Re:Whew, backasswards compat-with Perl 5 by fanatic · · Score: 1

      The eval $string requires compilation from source at run-time, hence my original post.

      --
      "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
    13. Re:Whew, backasswards compat-with Perl 5 by Ian+Bicking · · Score: 1

      eval $string compiles the string to bytecode, then runs it. I'm sure this is how Perl already works, as do most bytecode-based "interpreters". eval would not be available to a runtime that was shipped with bytecode but no compiler -- however, that would be an uncommon deployment (and certainly never the default), and you'd simply have to make sure your code didn't use the eval function in that case.

  2. Perl: The Beginning by Anonymous Coward · · Score: 5, Funny

    a ,There's been
    a 0 an explosion
    a /|\ at the ASCII
    a | factory!!!!
    a /|

    1. Re:Perl: The Beginning by Anonymous Coward · · Score: 0, Insightful

      I'm not the person who posted that, but mr Mod, do you know what the fuck "redundant" means?

      Don't use words you can't understand

    2. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      It seems very funny, but I don't get it; I don't get the 'redundant' complaints either.

      Could anyone in the know explain it to us poor ignorami?

    3. Re:Perl: The Beginning by perly-king-69 · · Score: 4, Interesting

      well, this is quite proper and normal syntax:
      s/(.*?\s+)\(.*?\)/$1/g
      Looks like an explosion in the ascii factory to me!

      --

      --
      This sig is inoffensive.

    4. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      No, it just means you are as retarded as the person you replied to.

    5. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      Hurrah! The K5 ASCII Reenactment Players has returned to... er... Slashdot.

    6. Re:Perl: The Beginning by sumengen · · Score: 2, Insightful

      What's the point of giving a regular expression example? C# has the exact same regex syntax, as others (uglier actually).

    7. Re:Perl: The Beginning by perljon · · Score: 4, Insightful

      s/(.*?\s+)\(.*?\)/$1/g

      This is trying to match something like adsfdfsdfs()ASDfasd#@$!@afd (adsfad@#$@!)
      and replace it with
      asdfa asdfa asdf adsfdfsdfs()ASDfasd#@$!@afd

      or basically, get rid of things in parenthises that are after at least one white space.

      so,
      s/\s+\(.*?\)//g would work...

      but still a lot of slashes

      so try this
      my $stuffInParen = qr| \(.*?\) |;
      s/\s+ $stuffInParen //gx;

      or even
      my $stuffInParen = qr| \(.*?\) |;
      my $whiteSpace = qr| \s+ |;

      s/$whiteSpace $stuffInParen//gx;

      now, you can look at the code and have a pretty good idea what it's doing. (even without comments). we're switching stuffInParens that follow whitespace with nothing. just because Perl gives you the flexability to write ugly code doesn't mean you should. if you are writing perl code and it looks ugly, you're doing it wrong. you should find another way to do it... with great power comes great responsability.

      see http://www.perl.com/lpt/a/2003/06/06/regexps.html for more info.

      --
      This isn't the sig you are looking for... Carry on...
    8. Re:Perl: The Beginning by mrogers · · Score: 5, Funny
      now, you can look at the code and have a pretty good idea what it's doing.

      With the greatest respect, I think you're missing the point of Perl. If you can understand your code, the Indian programmer who replaces you can understand it.

    9. Re:Perl: The Beginning by GerritHoll · · Score: 1
      The shell also has nice syntax. Try:

      :(){ :|:& };

      Try it especially when logged on onto someone else's computer ;-)

      (I'm sure there is a Perl equivalent, but IANAPM so YYMV)

    10. Re:Perl: The Beginning by aerique · · Score: 2, Insightful

      The novice had a problem. "I know", thought the novice, "I'll just use regexps!" The novice now has two problems.

      -- Erik Naggum, comp.lang.lisp

    11. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      Shooting someone for poor moderation is possibly a bit extreme.

      Back in the good old days when men were men and sheep were nervous, most of the stuff I Meta-Moderated looked ok. Today (example) it was down to 60% or 70%, some moderaters simply do not 'get it'.

      Shooting them is still overdoing things though.

    12. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      The indian programmer replaces you because your unmaintainable code was useless since only you could add more bugs to it.

    13. Re:Perl: The Beginning by Anonymous Coward · · Score: 0

      Dumb question: What exactly is this doing?

    14. Re:Perl: The Beginning by GerritHoll · · Score: 1

      Sorry, it should have been:

      :(){ :|:& };:

      Just try it out ;-)

      (Hint: it creates a recursive function and runs it)

  3. Perl Haikus by Anonymous Coward · · Score: 5, Funny

    Okay, about 99% of the Perl Haikus will not apply anymore.

    1. Re:Perl Haikus by Anonymous Coward · · Score: 0

      i think you mean eval(), apply is a lisp thing

    2. Re:Perl Haikus by Anonymous Coward · · Score: 0

      New readable code
      Perl 6 evolves slow
      Tears a new one.

  4. Trolling, maybe by fsterman · · Score: 2, Interesting

    We might be able to actually use them in ten years or so... I do appreciate Open Source speed (done when done) and Perl is pretty complex but maybe they should have broken the upgrades into parts?

    --
    Is there anything better than clicking through Microsoft ads on Slashdot?
    1. Re:Trolling, maybe by irc.goatse.cx+troll · · Score: 4, Insightful

      Perl5 has lasted us 10 years. If they were to do one major change a month, messing with backwards compatability in your scripts would become a major pain. This way its atleast one major headache rather than a decade long depression.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    2. Re:Trolling, maybe by rgmoore · · Score: 5, Informative

      You might be interested in Ponie, then. Ponie is the project to create a Perl5 interpreter for Parrot. It should let you get much of the speed benefit of the new virtual machine without having to learn the new Perl6 syntax. Of course you may still want to learn the new syntax, since it will add many powerful new features, but Ponie will ensure that Perl5- and all of the work you've put into your Perl5 scripts- won't be completely abandoned just because Perl6 has come out.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    3. Re:Trolling, maybe by mrogers · · Score: 1

      Reminds me of the joke about driving in $denigrated_country_of_your_choice. They wanted to switch from driving on the left to driving on the right in order to be compatible with their neighbours, but they were worried that the sudden changeover would confuse drivers and cause accidents. So they phased it in over six months.

  5. We're all going to die by StuWho · · Score: 5, Interesting
    "But Perl also will remain a language with the diehard developer fans who are the impetus behind its popularity. "Personally, I'm hoping to get Parrot embedded into games and office suites," Sugalski said. "I for one would love to write my word processing macros and game scripts in Perl or Forth rather than in whatever hand-rolled language someone's come up with."

    Back to Pac Man and Vi then...

    --
    "If you think nobody cares if you're alive, try missing a couple of car payments." Earl Wilson
    1. Re:We're all going to die by Anonymous Coward · · Score: 0
      For an application scripting language, I think perl sucks.


      Something like lisp or ecmascript (javascript) are more consistent and easier to deal with.


      "There's more than one way to do that" is perl's motto for a reason. too much syntactic syntax spoils the soup.


      Also, perl isn't a standard. There's only one implementation of perl, and it can (and will) change. scheme, lisp, and ecmascript are standardized. ignoring specific bindings or DOM wackiness, the code works with different interpreters. Not so with perl.


      KDE has a nice javascript interpreter anyone can use. Guile (is it still around?) was supposed to be a scheme for gnome scripting. Both are better solutions than embedding perl, IMO.

    2. Re:We're all going to die by MrBlint · · Score: 1
      "no one pretends for a moment that (perl's regular expressions) are anything but hideously ugly,"

      He's obviously new here!

      --
      That's very perceptive of you Mr Stapleton and rather unexpected in a G Major
    3. Re:We're all going to die by meydey · · Score: 1

      Hey! vi is and always will be the best editor money can't buy.

    4. Re:We're all going to die by watsona · · Score: 1

      > RE: > Sugalski said. "I for one would love to write my word processing > macros and game scripts in Perl or Forth rather than in whatever > hand-rolled language someone's come up with." On the Macintosh, Nisus Writer Express already uses Perl as its scripting language.

    5. Re:We're all going to die by Mr.+McGibby · · Score: 1

      I agree so much that I'm posting this.

      --
      Mad Software: Rantings on Developing So
  6. quick question.... by thepyre · · Score: 5, Funny

    "no one pretends for a moment that they're anything but hideously ugly," Does he mean the lines of code or the programmers themselves?

    1. Re:quick question.... by gUmbi · · Score: 5, Funny

      Yes.

    2. Re:quick question.... by trb · · Score: 1
      Indeed, what does he mean? The beginning of this article is a combination of confusing and misleading.
      • it claims perl is the granddaddy of modern scripting languages. not true.
      • it claims perl was critical in the initial construction of the Internet. not true.
      • it discusses problems with the complexity of expressions, and then throws in regular expressions. expressions are not the same as regular expressions.
      It's nice to know that folks are working on improving perl, but I found the article as confusing as typical perl code.
    3. Re:quick question.... by Anonymous Coward · · Score: 2, Funny
      It's fair to say perl is the deadbeat dad (as in got drunk fucked a bar slut and haven't seen her since) for python, php, and ruby.


      I don't know what other modern scripting languages you use.

    4. Re:quick question.... by imipak · · Score: 2, Interesting

      I must be sick in the head or something, but I fell in love with Perl reading the 'Learning Perl v4' llama on the tube in 96 - to me the elegance simplicity and yes beauty of the code really took my breath away. Good Perl code is one of the few things that aren't music that genuinely move me, tickle my aesthetic dangleberries as it were.... I mean... while (){ print; }... *sigh* no really. I'm serious. Granted I was programming in Visual Basic when I fell for Perl - frmo the ridiculous to the sublime really....

    5. Re:quick question.... by mrogers · · Score: 3, Funny

      Journalist: Bob, you've gotta help me! My article about Perl 6 is due in an hour. WTF is Perl?
      Bob: Uh... it's an internet programming language. The webmaster's always talking about it.
      Journalist: Great - I'll put "critical in the initial construction of the internet". When was it invented?
      Bob: I dunno. It's pretty old though, it still uses ASCII.
      Journalist: Don't get technical with me, I'm on a deadline. So what do you know about the new version?
      Bob: I heard it's going to be a completely new language. The expressions are all going to be regular now, and the grammar's going to be regular.
      Journalist (typing): Hmm... I could put in something about Latin... Perl as the lingua franca of the Internet... nah, don't want to go over their heads. OK, gotta go. Thanks for your help, Bob.
      Bob: No problem man, just don't quote me.

  7. 18 months away... by Anonymous Coward · · Score: 1, Funny

    mmmm...thanks for sharing?

  8. Expressions .. by Billly+Gates · · Score: 4, Insightful

    .. is why I prefer python over perl. The resulting code is soo much cleaner.

    I suppose it has to do with the old debate of losely or strict typed langauges. Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

    Yahoo decided to support php rather then perl in their next generation yahoo services specificially because of "There is more then one way to do it".

    Of course its all being outsourced to India now where they can just hire more developers if complex problems arrise

    1. Re:Expressions .. by Xzzy · · Score: 5, Insightful

      > .. is why I prefer python over perl. The resulting code is soo much cleaner.

      Yes but you have to admit that perl has a certain charm about it.

      Haven't you ever sat there staring at a subroutine, thinking to yourself "man I sure wish I could just hold shift and slide my finger over the number row to get this done"? Then gone on and painstakingly crafted what you wanted to do in whatever strict language you were actually working in? ;)

      Maybe it's just me. But every time I sit down and promise myself to write a new script all tidy and clean in python, about five minutes into it I'm muttering "if this were perl I coulda been DONE by now" and quickly revert back to old faithful.

    2. Re:Expressions .. by Anonymous Coward · · Score: 1, Insightful

      The thing about Perl is, it not only gives you enough rope to hang yourself with but also cheerfully builds you the gallows.

      It is absolute possible to write clean and elegant Perl code, but the dicipline to do so has to come from the programmer and is not inherent in the language. Perl's flexibility is both it's greatest strength and greatest weakness.

    3. Re:Expressions .. by kfg · · Score: 4, Insightful

      Yes, but the flip side comes only a day later, when I sit down at my Python code and immediately start editing.

      Whereas I look at my Perl code for about an hour and a half thinking, "Ummmmmmm, what the fuck is this supposed to mean?

      Not that either of them have a patch on APL, mind you. APL Roolz.

      KFG

    4. Re:Expressions .. by zeroclip · · Score: 1, Troll

      "Ummmmmmm, what the fuck is this supposed to mean?

      This is only true for newbies. Experienced programmes in any language can figure what stuff means, even if they looking at code they dident write themselvs.

    5. Re:Expressions .. by Anonymous Coward · · Score: 0

      Then I would say you have very poor programming techniques.

    6. Re:Expressions .. by Goaway · · Score: 3, Funny

      So does a man standing next to, you holding a gun to your head, saying "INDENT THOSE BLOCKS!".

    7. Re:Expressions .. by Tony+Hoyle · · Score: 4, Insightful

      Untrue.. I've seen code in my lifetime that would turn your hair grey. It's pretty easy to write unreadable junk in most languages. Perl makes it *really* easy (since almost everything you type will compile.. it's making it do anything useful that's the hard bit), and alas a lot of people seem to be churning out the junk daily.

      If you haven't got the time to write something properly, forget it - you'll only regret it if you write junk.

    8. Re:Expressions .. by kfg · · Score: 1

      In Perl? Absolutely. Nolo Contendre. Dead to rights.

      Since I only use it to use it the only way I've found to combat the problem is to settle on one way of doing things. Discipline.

      Hey! Wait a minute. I can do that in elisp.

      KFG

    9. Re:Expressions .. by Gherald · · Score: 2, Interesting

      >> Python enforces clarity

      > So does a man standing next to, you holding a gun to your head, saying "INDENT THOSE BLOCKS!".

      Certainly, but somehow Python doesn't make me feel quite as nervous.

      Besides, there are too many availeability and cost issues with men-standing-next-to-you-holding-gun-to-your-head,
      whereas Python is 100% free, which I've found to be much more convenient.

    10. Re:Expressions .. by Anonymous Coward · · Score: 0

      I work on a team of 10 or more perl programmers. We don't have any proble at all. Do you know why? Because we choose lead programmers who set the style guidelines for code, and spec out everything before it's handed to other programmers.

      You're totally lying to yourself if you think any particularly programming language will magically make a team work together all hunky dory and write code that's all the same. I 100% guarantee you that if you write any decent sized routine in python, I can write it in a completely different way, just like any other language.

    11. Re:Expressions .. by Anonymous Coward · · Score: 0

      about five minutes into it I'm muttering "if this were perl I coulda been DONE by now"

      No offense, but you either:

      (1) are not a very skilled programmer
      (2) don't know the Python language very well
      (3) don't know Python's libraries very well

      Your lack of working knowledge with the tools is no reason to blame the tools. If you'd stuck with Python - rather than giving up and running back to the language that you know - I'm sure it would get much easier in the long run as you figure out the best way of doing things and become more comfortable with the language.

    12. Re:Expressions .. by consumer · · Score: 4, Insightful
      Yahoo decided to support php rather then perl in their next generation yahoo services specificially because of "There is more then one way to do it".

      Pretty ironic when you consider that PHP has exactly the same issue, along with some other issues Perl does not have (lack of namespaces, inadequate comparison operators, etc.).

    13. Re:Expressions .. by Anonymous Coward · · Score: 0

      Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

      I would hate to work in a team of any number of developers writing any language in their own styles and methods. It leads to ugly code no matter what the language is (aside, I suppose, from Python). That's what department style guides are for. I'm working as programmer lead for a department of 21 people, using perl as our primary language, and, guess what... it's completely readable. We have a style guide, and any code that doesn't meet the style guide gets sent back for clean up.

    14. Re:Expressions .. by Christianfreak · · Score: 2, Interesting

      Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

      Its called DISCIPLINE and its not that hard. Someone makes rules for the dev team and then they are followed and then your code is clean and readable. Why should the language force you to be disciplined? Good programmers know to program following some kind of standard.

      And why does everyone bring up PHP? PHP is nothing but Perl with all the best parts taken out and everything thrown into the core language. PHP breaks all the rules of good disciplined programming. With Perl you can shoot yourself in the foot but at least the newbies stay away from it enough to keep the damage to a minimum, and it has controls such as 'strict' and Taint mode so you know when you are shooting yourself in the foot. PHP on the other hand gives the newbies a shot-gun and says 'point this at your head'. PHP coders that actually understand the basics of good programming are few and far between. And trust me there is more than one way to do things in PHP as I've been fixing the problems created by the former 'programmer' in my company for the last year.

    15. Re:Expressions .. by Bingo+Foo · · Score: 2, Funny
      Whereas I look at my Perl code for about an hour and a half thinking, "Ummmmmmm, what the fuck is this supposed to mean?

      Which is why you use comments like this:

      s/(.*?\s+)\(.*?\)/$1/g # PC LOAD LETTER
      --
      taken! (by Davidleeroth) Thanks Bingo Foo!
    16. Re:Expressions .. by kooso · · Score: 1

      Of course its all being outsourced to India now
      where they can just hire more developers if
      complex problems arrise

      Uhum, you missed there the problem of scalability in software engineering...

      I mean, a problem ten times bigger is not solved by ten times as many people.

    17. Re:Expressions .. by takshaka · · Score: 2, Interesting

      I've seen plenty of poor Perl code, but I wouldn't call any of it unreadable--just bad. Writing truly unreadable code in Perl requires a much higher level of mastery than most people ever acquire.

    18. Re:Expressions .. by Anonymous Coward · · Score: 0
      Yahoo decided to support php rather then perl in their next generation yahoo services specificially because of "There is more then one way to do it"

      And some of Yahoo developers fought this in meetings until the very end.

    19. Re:Expressions .. by horos2c · · Score: 1

      Which is why you use comments like this:

      s/(.*?\s+)\(.*?\)/$1/g # PC LOAD LETTER

      I tend to turn my regular expressions into variables, ie:

      my $doublestring = q$(?>\"(?>[^\\\"]+|\\\.)*\")$;

      which is the only real way there is to make more complicated regular expressions, anyways. Oh yeah, and then test the hell out of them. The drawback is that you need to escape certain characters if you put them in doublequotes (to use regular expressions inside of larger regular expressions) but then again that's what quotemeta is for. Hence my regex look like

      $perlcode =~ m"sub\s*$function\s*$brackets"sg;

      Of course the above is one of the big reasons for perl6 - it just formalizes the building of larger regex via named rules. and gets rid of the annoyingly large number of \s* by making ' ' become a synonym for '\s*'.

    20. Re:Expressions .. by Billly+Gates · · Score: 1

      SIgh.

      I have no idea what that code is. I write a few cgi apps and avoid regex for obvious reasons. SHudder.

    21. Re:Expressions .. by mcrbids · · Score: 2, Interesting

      Maybe it's just me. But every time I sit down and promise myself to write a new script all tidy and clean in python, about five minutes into it I'm muttering "if this were perl I coulda been DONE by now" and quickly revert back to old faithful.

      Funny. I feel the same way about PHP. It's routine for me to take some broken, busted stuff written in Perl or c or whatever, and redo it in PHP in 1/4 the lines.

      As Jethro Tull once said:

      "You know what you like, and you like what you know".

      I can "do" Perl, but it brings me much grief to do so. While I find PHP consistently readable and understandable, pretty much no matter who wrote it.

      Oh, and BTW, since I've taken the time to "get" regex, I don't even find it ugly. The earlier example about $stuffinParen or whatever was hideous, and not nearly as understandable to me as the simple, concise, original example. Einstein once said:

      "Everything should be made as simple as possible -- but no simpler!".

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    22. Re:Expressions .. by hummassa · · Score: 1

      I don't. The strange thing is, when I look at a Perl Golf, I think "o, cool, so short and expressive!" instead of "what the heck?"

      --
      It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    23. Re:Expressions .. by Anonymous Coward · · Score: 0

      Lots of comments about indian programmers taking the jobs etc.., seems like lot of scared guys around.
      Stop whinning and go work or update your skills.

    24. Re:Expressions .. by Anonymous Coward · · Score: 0

      One hundred monkeys at one hundred typewriters typing for a long enough time will eventually produce the complete works of Shakespere and a Perl compiler.

    25. Re:Expressions .. by weave · · Score: 1
      Experienced programmes in any language can figure what stuff means, even if they looking at code they dident write themselvs.

      Clearly you've never seen a program written in APL :-)

    26. Re:Expressions .. by DrewFish · · Score: 1
      I work in a team of 10+ perl developers, all writing in their own styles and methods. I shudder daily.

      And I like perl.

    27. Re:Expressions .. by rpg25 · · Score: 1

      Ummmm.... isn't it obvious that there's a place for code that will never be read? If I want to fix a bunch of my dang ID3 tags that are goofed, I'll just write some perl. And who cares if I don't understand it later? I could spend three weeks trying to figure out the zillion java classes to do it, writing comments in javadoc, etc.,etc., but that would be totally pointless. It's a scripting language, for goodness sake!

    28. Re:Expressions .. by slycer · · Score: 1

      Let me guess, you started with php though right?

      I can "do" php, but I much prefer perl.

      I can read others perl code much easier than I can read others php code (side note.. in both languages I HATE seeing HTML in the code).

      Oh, and this might be strange coming from a perl coder but 1/4 the lines does not make the code better, just makes it shorter.

    29. Re:Expressions .. by Kirby · · Score: 1

      >I suppose it has to do with the old debate of losely or strict typed langauges. Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

      You know, having actually worked in teams of 10 or more perl programmers at two different companies - it's really not any more difficult than at C-shops or Python or whatever.

      Really, most of the style debates I've had have been about indentation and whether to put function { characters on their own line or after the sub foo. And this is hardly a perl issue.

      One good idea is that, when you hire new people, do a code review after their first major code is ready, and pay attention to style issues. And again, this is a good idea anywhere. (Regular code reviews are also a good idea anywhere, but good luck!)

      I've seen a very few people who write code that nobody else can follow. Maybe 5% of professional perl coders? And these people are, indeed, a problem. But isn't this always going to be the case? Aren't there C-coders who write mysterious stuff that somehow works? Of course.

      The idea that perl is hard to maintain, or that it's hard to run an enterprise-level software division with perl, is pure Myth. In practice, I've not once, in 6 years of professional perl work, seen the flexibility and more-than-one-way-to-do-it mentality cause an actual problem.

      Not once.

      --
      -- Kate
    30. Re:Expressions .. by mcrbids · · Score: 1

      Oh, and this might be strange coming from a perl coder but 1/4 the lines does not make the code better, just makes it shorter.

      With 75% less content, there is 75% less of a chance of mis-typing something since there is 75% less typed. While there are plenty of types of bugs other than typos, this does significantly reduce the odds for bugs.

      Also, if there is less code to look through, aren't you more likely to catch a fundamental flaw?

      And HTML in the code is ugly, hackful, and confusing. Good coding style attempts to reduce the number of problems you solve at a given time to as close to 1 as possible. Trying to consider appearance as well as logic is only a recipe for security holes and bugs.

      I all but refuse to write code with HTML in it, preferring to use a template engine such as PHPlib or php-template. (the latter being compiled as a module into PHP, makes templates faster than if the code was interspersed with the HTML!)

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    31. Re:Expressions .. by Anonymous Coward · · Score: 0

      > [Expressions] is why I prefer python over perl.
      The resulting code is soo much cleaner.

      And then again you can't use expressions in obvious places like lambda-constructs. (Which are arbitrarily limited to one statement because the language assumes you'll not be needing anything else.)

    32. Re:Expressions .. by slycer · · Score: 1

      I disagree with the 75% comment.

      I can take a longish bit of perl code and golf it down to a miniscule amount, does that make it more bug-free? Absolutely not, quite the opposite probably.

      And try and fix broken golf'd code?
      3 months later?

      If that's your style, than I still don't want to see your code.

      shorter != better

  9. The Parrot Engine? by blcamp · · Score: 2, Insightful


    Will that make Perl 6 coders a different kind of "Parrot Head"?

    --
    The problem with socialism is that they always run out of other people's money. - Margaret Thatcher
    1. Re:The Parrot Engine? by Jackdaw+Rookery · · Score: 0

      No but it might make them dead.

      http://www.mtholyoke.edu/~ebarnes/python/dead-pa rr ot.htm

      I like perl, it offers a flexability that other languages don't seem to have imo and it hasn't killed the cpu *that* badly.

  10. Ruby... by Tyler+Eaves · · Score: 1, Interesting

    ...provides almost all of Perls power, with none of the ugliness.

    --
    TODO: Something witty here...
    1. Re:Ruby... by Anonymous Coward · · Score: 0

      And none of the pervasiveness.

      Perl is installed everywhere [by default] and known by everyone [not literally]. Ruby is making great headway in both those arenas, but is not there yet.

    2. Re:Ruby... by vt0asta · · Score: 5, Insightful

      ...provides almost all of Perls power, with none of the ugliness... [emphasis mine]

      ...or the online documentation, the unit testing facilities, the CPAN repositories, the portablility, or the developer community.

      Sorry, but you had missed some things that Ruby has none of compared to Perl.

      --
      No.
    3. Re:Ruby... by Tyler+Eaves · · Score: 4, Informative

      You mean like:

      Doc

      http://www.ruby-doc.org/

      http://www.rubycentral.com/book/

      Unit Testing

      http://testunit.talbott.ws/

      http://www.rubygarden.org/ruby?RubyUnit

      Library Repository

      http://raa.ruby-lang.org/

      Portability
      Source compiles on anything vaugely Unix like

      Windows binaries available

      User Community
      comp.lang.ruby

      So, what were you on about again?

      --
      TODO: Something witty here...
    4. Re:Ruby... by kfg · · Score: 0, Offtopic

      Squeak! Squeak!

      KFG

    5. Re:Ruby... by Baki · · Score: 1

      I'm not really a Perl fan, and don't consider it good for "programming in the large". For that you might use Ruby better, but only if you don't need speed.

      For its original purpose however, small scripts handling large files or other datastreams and searching those, Perl is unparallelled.

      It comes close to the speed of C for such I/O tasks, which cannot be said of any other scripting language. Especially Ruby, while beautiful, is way too slow for such tasks.

    6. Re:Ruby... by Anonymous Coward · · Score: 2, Funny

      Your post is like arguing that Duluth is New York's equal because they both have buildings.

    7. Re:Ruby... by Anonymous Coward · · Score: 1, Insightful

      Oh puh leeze. RAA compares to CPAN like a glass of water compares to the ocean. CPAN has everything you can think of, and most of what you can't. Plus it has a pain free way of installing modules and following dependencies.

      And Ruby has documentation, sure... But nowhere near the amount that Perl does. I do man perl<tab> on my system, and there are 136 manpages available. And that's just manpages! What about perldoc? Plus there's just much more Perl stuff available online. You merely have to look.

      I actually really enjoy Ruby. I could almost see myself switching from Perl to Ruby, if a CPAN equivalent were available. I realize that Perl's had a few more years to accumulate modules, but frankly that's Ruby's problem, not mine.

      Until things I need are available on Ruby, I'm going to stick with Perl.

    8. Re:Ruby... by Adartse.Liminality · · Score: 1

      Windows binaries available? True, but Ruby also compiles cleanly in windows(no hacks needed, much less a ton of questions like , "if *this* doesn't make sense accept default (n)").

      --
      Smokin' & rubying away
  11. What everyone knows about perl by HappyCitizen · · Score: 5, Funny



    Unreadable code,
    Why would anyone use it?
    Learn a better way.

    ugliness that grows
    into beauty inside of
    your favorite shell

    Arbitrarily
    Nested structures for data;
    Joy of birds in flight.

    As with the spring rain
    Perl is indispensable
    Unquestionable

    http://aspn.activestate.com/ASPN/Perl/Haiku/Abou tP erl

    --
    http://www.beyourowneviloverlord.tk
    http://www.frozenchickenthrowing.tk
    http://www.killercamel.tk
  12. Anyone who intimately knows 5 by devphaeton · · Score: 4, Interesting

    ...would be able to tell me if i should

    a) start learning 5 anyways

    or

    b) wait till 6 is released, because going from barely having a grasp on 5 and then trying to learn 6 would just confuse myself?

    i realise that all the perl5 code in the world won't suddenly cease function the minute perl6 is released, but still..

    I can see the value in perl, and what a great tool it is, but for some reason i have a hard time wrapping my lil brain around it. It's a bit less "structured" or "consistent" than say C is. I suppose it has to be that way in order to do what it does, though.

    --


    do() || do_not(); // try();
    1. Re:Anyone who intimately knows 5 by smack_attack · · Score: 5, Interesting

      Learn 5, because it will probably take a few months until 6 is standard. Either way, in a few years you will look back on whatever you coded today and shake your head in shame. /used to printf() every line when he learned PHP

    2. Re:Anyone who intimately knows 5 by deja206 · · Score: 3, Insightful

      As a Perl 5 programmer, I don't think Perl 6 will be all that good.

      Not everyone will switch immediately, and not everyone will need/want to switch anyway.

      I say go on and learn Perl 5, you won't regret it...

    3. Re:Anyone who intimately knows 5 by psycho_tinman · · Score: 5, Informative

      I cannot claim to intimately know Perl 5, but I started learning it a few years back. I belong to the camp of Perl programmers (and I know there are a few of these) who are adopting a "wait and see" attitude to Perl 6.

      If you're interested in learning Perl now, you should probably go for the cookbook approach, ie: get a copy of OReilly's Perl cookbook and just try applying the solution to your problem. Then, trying tweaking and figuring out how it works.

      As for learning Perl 5, I'd probably point out that there are still some places that run 5.005_03 (certainly Solaris used to ship with that version by default), and that version is at LEAST 5-6 years old :) There are even some places I've heard of that run Perl 4 :) So, I think there is plenty of time to have your investment in learning Perl pay off before people start switching to Perl 6 en masse.

    4. Re:Anyone who intimately knows 5 by Telastyn · · Score: 5, Informative

      Personally, I found that perl was kind of odd and not fantastic until I learned perl with regexes [via O'Reilly's Mastering Regular Expressions, highly recommended]. Then alot of the little nuances made alot more sense. Alot of the examples in that book were things perl does easily in a few lines, but would cause most programmers to gouge their eyes out if they needed to do it in C.

    5. Re:Anyone who intimately knows 5 by amplt1337 · · Score: 3, Insightful

      It's all going to depend on how much they change the syntax, which Yahoo!!!!!111! doesn't seem to be providing us with right now. (I'm sure if I were on a perl list I'd hear more about it.)

      Personally what I'd recommend (as a full-time perl programmer) is to learn 5 anyway. It'll take two or three years before the next edition of the Llama (O'Reilly, _Learning_Perl_, look it up your own darn self on Amazon if you must) is out, and in the meantime you can get out of the baby-talk phase this way. Learn regular expressions thoroughly, absolutely thoroughly, backwards and forwards, even if you won't need to use most of the complex stuff -- you'll wind up using it sooner or later, and if you know if cold, then you've got better odds of remembering something obscure when you need it. [Caveat: apparently regexes are a big part of the language changes. So learn the Perl 5 regex engine as thoroughly as you can, and then compare and contrast with this rundown on the new stuff.]

      Obviously core language features aren't likely to go anywhere, and you won't be wasting your time learning them. And you'd be amazed at what even a couple of months will do for your language maturity.

      Start now. No sense putting it off.

      --
      Freedom isn't free; its price is the well-being of others.
    6. Re:Anyone who intimately knows 5 by ChaosDiscord · · Score: 5, Insightful
      start learning 5 anyways or ... wait till 6 is released

      Learn Perl right now because it will make your life better (assuming your life can be made better by a powerful scripting language/glue-layer from heck). Perl 6 is still far off on the horizon and Perl 5 knowledge will largely transfer to Perl 6.

      I can see the value in perl, and what a great tool it is, but for some reason i have a hard time wrapping my lil brain around it. It's a bit less "structured" or "consistent" than say C is.

      I think that setting out to learn Perl for its own sake will generally not work. One of Perl's strengths is that it grows with you and your needs. Learn a little bit of Perl and you still solve some very useful problems. For example, many people first learned Perl to do some quick-and-dirty projects like one-off data file reformatting, internal report generation, or simple CGI scripting. Learn more as you need it. It's taken me years to get to the point where I might call myself a skilled Perl hacker. But every step along the way was pleasant. I never felt I was learning stuff for the sake of learning stuff; I was always learning something that made my goals right now easier to achieve.

      Perl is about serving you, not you serving it.

    7. Re:Anyone who intimately knows 5 by hpavc · · Score: 1

      Your going to wait a long time for perl6 you could learn both

      --
      members are seeing something, your seeing an ad
    8. Re:Anyone who intimately knows 5 by cliveholloway · · Score: 3, Informative

      Start now. It's gonna be a while before six is out - and even longer before companies will trust it in production environments.

      And come over to The Monastery to get help when needed. A great resource for new (and experienced!) Perl hackers.

      .02

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    9. Re:Anyone who intimately knows 5 by devphaeton · · Score: 1

      cLive ;-)

      actually, i lurk there sometimes as "phaeton" ;)

      maybe i need to get more active

      --


      do() || do_not(); // try();
    10. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      You speak sooth.

    11. Re:Anyone who intimately knows 5 by Phillup · · Score: 5, Insightful

      Over twenty years I've programmed with at least as many languages.

      So, I won't claim to know any language intimately.

      But... I have programed in Perl for the last five years. Why is simple.

      Because Perl let's me leverage the last 20 years of programming. If they see a good idea in another language... they put it in Perl.

      You will see a lot of people complain because of how Perl code looks. The simple fact is that you can write clean looking code... or ugly code. Perl doesn't care. It is your code... do it the way you want.

      Perl's strength is that it let's a programmer program the way they want to. That is also it's weakness.

      My advice would be to spend a few more years with a few other languages. You won't appreciate Perl until you know how elegantly it lets you solve some problems that you have used other tools for.

      If you are looking for "structure" and don't have the discipline to enforce it yourself... then stay away from Perl.

      --

      --Phillip

      Can you say BIRTH TAX
    12. Re:Anyone who intimately knows 5 by thogard · · Score: 4, Insightful

      The procedural stuff will remain the same. The OOD is getting a decent syntax and will no longer be a bolted on hack.

      Perl started life as shell script with a built in sed and awk. It has since grown.

      The regex stuff in perl 5 is just like sed and grep as far as new user is concerned. The simple regex stuff won't change with perl 6 and the concepts are the same. Perl 6 is going to change the shortcut symbols for the regex expressions.

      Perl5 have has a =~ operator that is going to get replaced with a ~~ operator. The ~~ will work in many places where the perl5 =~ won't work. This is part of the push to make perl more orthogonal.

      Perl6 will also deal with unicode out of the box with no real issues. Perl5's unicode was a bit of a hackjob as the coders learned along the way. Not that unicode is understood, it will be done right. Some of perl6 seems to be intended to get rid of bad practices based on the concept that "all the world is ascii". For example in Perl upto 6 you can say [a-zA-Z] to mean letters but that won't pickup up the latin-8 char set. Perl6is going to make it harder to say that and easy to say "Letters in the current language".

      The list processing may get to the point that it is on the same level as lisp.

      Perl6 appears to about about 18 months away so if your going to wait, its a long wait.

      Damian Conway gave a great talk on this just a few days ago. If you get a chance to hear him talk, take it.

    13. Re:Anyone who intimately knows 5 by consumer · · Score: 1

      You didn't need to switch to PHP; you just needed to learn one of the powerful templating tools for Perl, like Template Toolkit or Mason.

    14. Re:Anyone who intimately knows 5 by barries · · Score: 1

      Learn 5 now. 6 will run 5 and 6 will be done when it's done, 5 is useful today.

      - Barrie

    15. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 1, Insightful
      As for learning Perl 5, I'd probably point out that there are still some places that run 5.005_03 (certainly Solaris used to ship with that version by default), and that version is at LEAST 5-6 years old :)

      Yes.

      bash-2.03$ vim test.pl
      bash: vim: command not found
      bash-2.03$ vi test.pl
      linux: Unknown terminal type

      [Using open mode]
      Segmentation Fault
      bash-2.03$ TERM=vt100 vi test.pl #Bingo!
      #!/usr/bin/perl

      use warnings;
      use strict;

      print "Solaris uses an old Perl.\n";
      bash-2.03$ ./test.pl
      Can't locate warnings.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at ./test.pl line 3.
      BEGIN failed--compilation aborted at ./test.pl line 3.
    16. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      /used to printf() every line when he learned PHP

      *shudder* /me loves the following bit of Perl, assuming slashdot doesn't b0rk it:

      print END_TOKEN
      You can print whatever you want, and even give it any ending token you like with this. It is INCREDIBLY useful sometimes... Helps you cut & paste things right into place. No more mucking about with escapes & crap!!!!
      END_TOKEN;

    17. Re:Anyone who intimately knows 5 by Tablizer · · Score: 2, Funny

      The simple fact is that you can write clean looking code... or ugly code. Perl doesn't care. It is your code... do it the way you want.... Perl's strength is that it let's a programmer program the way they want to. That is also it's weakness.

      There are languages that would be fun if ONLY YOU yourself do all the writing, but the potential for abuse and bizzar variation is so great that I don't want to make a paid specialty in them, fearing that someday I will inherit spehgetti-and-sand-in-a-blender hell.

      Thus, I divide languages into "paycheck" languages and "fun" (or "hobby") languages. Reminds me of an old army story told by who knows. The sarge overheard one guy calling his rifle a "gun", which is a no-no at this base. So he forced the soldier to run around the compound naked holding his rifle in his right hand and his dick in his left, and he had to repeat, "This is my rifle, and this is my gun. One is for shooting, and the other for fun".

    18. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      Yup, slashdot ate the two less than signs which should be before the first END_TOKEN. Oh well.

      You can see examples of this in all sorts of Perl code with a few minutes of Googling.

    19. Re:Anyone who intimately knows 5 by Phillup · · Score: 2, Insightful

      There are languages that would be fun if ONLY YOU yourself do all the writing, but the potential for abuse and bizzar variation is so great that I don't want to make a paid specialty in them, fearing that someday I will inherit spehgetti-and-sand-in-a-blender hell.

      If a company doesn't have the discipline to set and enforce coding standards, then the choice of language isn't going to be your biggest problem.

      IMHO

      --

      --Phillip

      Can you say BIRTH TAX
    20. Re:Anyone who intimately knows 5 by rgmoore · · Score: 1

      Couldn't you just use:

      bash-2.03$ perl -e 'print $]\n'
      5.00503

      or would that not be fun enough?

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    21. Re:Anyone who intimately knows 5 by Our+Man+In+Redmond · · Score: 1

      One of the problems I see with people learning Perl is that they think it should have strict typing, or some different kind of inheritance, or whatever, and because Perl doesn't have that particular feature they get frustrated and go away grumbling and end up going back to C or Java or whatever language has the feature they miss.

      Perl is Perl. It isn't C and it isn't Java. If you go into learning it with an open mind and a determination to use its features rather than trying to bend it to your idea of what a programming language HAS to be, you'll be fine.

      And if you never write complicated GUIs in Perl and only use it for parsing text, that's fine too. After all, it started out as a practical extraction and reporting language. All the really good stuff just came along later.

      Oh, and to answer the question, learn Perl 5. You'll be able to use it to get up to speed in the time it will take Perl 6 to become beta.

      --
      Someone you trust is one of us.
    22. Re:Anyone who intimately knows 5 by eyeye · · Score: 1

      You have given away in your comment that you know fuck all about anything perl.

      "it will probably take a few months until 6 is standard"

      LOL!

      --
      Bush and Blair ate my sig!
    23. Re:Anyone who intimately knows 5 by Ritontor · · Score: 1, Funny

      s/\salot\s/a\slot/gi;

      --
      Perhaps the answer to the problem of teenagers dropping bricks from motorway and railway bridges is to sue Tetris.
    24. Re:Anyone who intimately knows 5 by Paul+Crowley · · Score: 1

      Naah, learn Python. :-)

      But if you already know Python and are interested in getting into Perl, learn 5 now. 6 is designed for the people who know 5, and it'll be a GOOD LONG WHILE before 6 is the recommended version, so learn 5 and then see if you can get involved in making 6 happen faster.

    25. Re:Anyone who intimately knows 5 by Kyro · · Score: 1

      Reminds me of an old army story told by who knows. The sarge overheard one guy calling his rifle a "gun", which is a no-no at this base. So he forced the soldier to run around the compound naked holding his rifle in his right hand and his dick in his left, and he had to repeat, "This is my rifle, and this is my gun. One is for shooting, and the other for fun".

      That's from Full Metal Jacket if I remember correctly...

      --
      save the GNUs!
    26. Re:Anyone who intimately knows 5 by SpaghettiPattern · · Score: 1

      Go for a).

      As usual, it helps if you actually have to deliver something because goals inspire -unless you are very very lazy.
      You can almost do anything you want with Perl (although I personally think it's best suited for heavy duty text parsing and system programming) so that makes your choise of goal easy.

      In Perl I've written syadmin tools (for quiter nights), an MIS (to reduce manager questions), mass C code mutation programs (to save on C programmers which I would not have gotten anyway), a primitive multi access DB (manegement dissallowed the use of anything else than C, /bin/sh or Perl), DB/info sytem access tools, daemons, schedulers, code generators, CGI programs and much more.

      --

      I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
    27. Re:Anyone who intimately knows 5 by Shillo · · Score: 1

      > Learn 5, because it will probably take a few months until 6 is standard.

      In the same vein, I'm probably going to get my copy of Half Life 2 in a week or two... ;)

      --

      --
      I refuse to use .sig
    28. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0
      I am a Perl fanatic, and I agree wholeheartedly with the grandparent post. However, when working with developers with varying levels of programming talent, I have seen my share of spaghetti and sand in a blender Perl code. But then I've seen my share of spaghetti and sand in a blender C++ code and crappy Java code too. Other languages may attempt to enforce some good programming practices, but no language can truely enforce good programming.

      You can write an unreadable unmaintainable bug ridden mess in perl that consists of ten twenty page long functions in a module that access module scoped globals, and a short 'main' program that uses that module and calls the functions in order.

      You can take that Mess.pm and make it into an object with ten twenty page long methods and a 'new' method. The module scoped globals become data members which are initialized in the 'new' method. Your idiot boss is pleased that your spaghetti code is now 'object oriented', but it's still spaghetti code.

      The semi-clueful bad programmer may have started out with spaghett-code functions that at least took the data they changed/used as parameters instead of relying on module scoped 'globals'. But when they convert their mess to being object oriented, they 'improve' their methods by removing all that 'redundant' parameter passing by storing all data as data members of the object. The next guy to try and modify that code has to be aware of every object scoped 'global' that exists, and has to read and undestand completely every 20 page long spaghetti code method in order to try and attempt to build a coherent story of what happens to the data. The moron that wrote the code at least has a general idea of what it does and how it does it, but even a very clueful programmer who never would have produced such crapcode has no chance of reading it. This very clueful coder is not particularly adept at sorting through crap, as they have become adept at not producing crap that needs to be sorted through.

      The moron author of crapcode easily benefits from the readability of the code produced by their more talented peers. They easily perform simple maintenance tasks and look good to managers. They know their way around their own crapcode so are the best at maintaining it even if it is inherently unmaintainable, and they benefit from high quality of their peer's code. The talented programmers that write readable code look bad. They understand their own code, but are not much better than anyone else at maintaining it since it is so readable. They try like hell not to have to deal with the crapcode around them, but when they do have to perform simple maintenance tasks it takes them forever.

      But these problems are not unique to perl. No language can prevent a programmer from writing spaghetti code. And spaghetti code is the main source of all software troubles. Languages that, for instance, force everything to be an object are not enforcing good programming, they are merely enforcing a syntax.

    29. Re:Anyone who intimately knows 5 by smallpaul · · Score: 1

      It will probably be a few years until 6 is standard. The spec is not done. The implementation has hardly started. They've already been developing for two or three years and it doesn't look like they are even halfway there.

    30. Re:Anyone who intimately knows 5 by kwoff · · Score: 1

      And that is just to get perl itself done. I think there will be a long period in which incompatibilities in existing code, reluctance to break things, etc., will hold back perl 6's widespread acceptance. I'm thinking of mod_perl 2, for example.

    31. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      #!/usr/bin/perl -w

      print "use warnings wasn't around for 5.005\n";

    32. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      Fails to match alot at start/end of line or before punctuation. \s doesn't work on the right-hand side of a regex.

      s/\balot\b/a lot/gi;

    33. Re:Anyone who intimately knows 5 by Anonymous Coward · · Score: 0

      Do as you wish, but don't learn Python before, or you'll never look back...

    34. Re:Anyone who intimately knows 5 by Phroggy · · Score: 1

      Either way, in a few years you will look back on whatever you coded today and shake your head in shame.

      Boy, ain't that the truth.

      Depending on how strong each of the Three Virtues is, though, you'll probably go back and rewrite whatever old code is still in use, until it meets your current standards.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  13. Who would have thought! by Saeed+al-Sahaf · · Score: 5, Funny

    "hideously ugly" and "Perl" in the same paragraph? Who would have thought!

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Who would have thought! by Naikrovek · · Score: 4, Insightful

      You guys...

      Perl, if written right, can be a VERY good looking, and VERY easy to understand. All of you that say that it is hard to read are:

      a) reading code that wasn't meant to be cute, but was meant to work where nothing else was as practical,
      b) reading code that was written by someone that didn't know perl, or are
      c) reading code written by someone that knows perl a LOT better than you.

      In my personal experience, people that gripe about Perl are the ones that use it least. The people I know that use Perl quickly learned to love it.

    2. Re:Who would have thought! by halofan_sd · · Score: 1, Insightful

      "In my personal experience, people that gripe about Perl are the ones that use it least" well duh, people that don't like perl obviously wouldn't use it much.

    3. Re:Who would have thought! by Anonymous Coward · · Score: 0

      It's a common *joke*, that's all, A JOKE!

    4. Re:Who would have thought! by layingMantis · · Score: 1, Insightful

      a) reading code that wasn't meant to be cute, but was meant to work where nothing else was as practical, b) reading code that was written by someone that didn't know perl, or are c) reading code written by someone that knows perl a LOT better than you.
      br>Um, dude, you do realize that in the real world this is the situation 90% of the time? Code is generally used for a practical purpose, as far as I know.

      Juvenile Court to Try Shooting Defendant
      So like is there a certain lines per minute threshold at which one can enjoy Perl?

    5. Re:Who would have thought! by Anonymous Coward · · Score: 1, Insightful

      I just took a job at a shop that accumulated 2 years of perl hacks to run a e-com engine based on text files.

      They tried to "invest" in its two perl programmers to port the thing to Java. They wrote a very nice verbatim translation, relying on hashmaps and java regexp libraries and making a mockery of their objects, simply using them as ill-named procedural labyrinths.

      You can be ugly in any language.

      The only reason I prefer java is that its easier to enforce conventions, encapsulation, OO, etc., so as we ramp up with additional programmers, I won't have to worry as much about noodles of crap.

      I'm sure I can do any single programming task faster in perl, but over the long haul with a potentially rotating cast of programmers, java, combined with better design, will make everyone's jobs easier.

      Or i'm talking out of my axe and I'm just the next pulper in line.

    6. Re:Who would have thought! by edsterino · · Score: 1

      Almost 15 years ago, a friend urged me to learn Perl saying that "I would be a better programmer for it". So I did and he was absolutely right. I ate the language up. I couldn't get enough of it. I wrote thousands and thousands of lines of code. I knew the language pretty much upside down.

      I greeted Perl 5 with great anticipation. Object oriented, powerful data structures, modularity. But something wasn't right. I could still do the Perl 4-style coding but it felt wrong. Before Perl 5, simulating complex data structures with arrays was fine. In Perl 5, these were supported directly so I wanted to use them. And I wanted to love them. My code typically uses data structures heavily to manage the complexity. But I never got it. Simple things were fine but any task that ended up being more than a few pages (not in one giant function, BTW) started getting rougher. If I wrote Perl day in and day out, it would have been different, I'm sure. But that shouldn't be necessary. Normally I would code a few hours a week with the occassional larger task. Given my significant experience with Perl 4, my desire and my talent, that should have been enough.

      I languished wondering if Perl had gone wrong or if I just couldn't cut it. Like others have said, I too would hate having to go back to my own Perl code. I write extemely clear code. My coding and commenting style is first rate. (I attribute quite a bit of this, now, to knowing the frustration of reading my own Perl 5 code).

      Then I got a new job. They use Python. And it all clicked in almost no time flat. There are things I don't like about Python to be sure but the code just flows. The OOP doesn't feel like it was plopped on top. I can jump into my own code from a year earlier with next to no effort. I can write code for very complicated problems and the language doesn't get in my way. I CAN READ OTHER PEOPLE'S CODE with next to no effort. I can code stuff up with the ease I did in Perl 4 but with the power I know is in Perl 5 but was not able to use. Some of this is just age/experience but it's more than that. I'm not one of those Perl-dissing Python coders. That's not the point.

      History will look on Perl as one of the most important computer languages of the first 50 years of coding. But Perl 5, at least, doesn't have what it takes in 2004. I look forward to Perl 6. I truly hope they can do it again.

    7. Re:Who would have thought! by TheDigitalRaven · · Score: 1
      Um, dude, you do realize that in the real world this is the situation 90% of the time? Code is generally used for a practical purpose, as far as I know.
      It helps so much to actually read what one is replying to. To wit: a) reading code that wasn't meant to be cute, but was meant to work where nothing else was as practical There are plenty of situations where practical code is ugly purely because of either the ignorance (if sloppy) or genuis (if inspired) of the programmer. The situations which mandate ugly code are not all too common.
    8. Re:Who would have thought! by cybergrue · · Score: 1
      A few more tips.
      After you finish writing something in Perl, clean it up. Yes it is easy to write anything in Perl and get it to run, the trick is to make it look nice afterward.
      If some code's function is not immediatly obvious, comment it. Perl is one of the few languages where a comment per line code can be appropriate (especially the regexes). The rest of the code should be self documenting. If it isn't, clean it up.

      I have seen a lot of programming languages that try to promote tmenselves by comparing how nice a piece of there code is so some very ugly examples of Perl code. There examples are usually quite funny as there is usually a better way of writting the Perl code to do the same thing in much less space and in a much more elagent manner then the brand X language could even attempt. I have ever herd comments (here on Slashdot) about how Perl coders had to be retrained to use other languages. Well I am one of those tained perl codes that have moved on to other languages, and I am shocked that the rest of the programming community has not caught up to were Perl is. Things like arrays that know how long they are, so that you can use a foreach command go go through every element. Java is just getting this now (1.5) even though they have had dynamic arrays since the beginning. We all know how useful hash tables are. Why is it that no other 'modern' programming language makes them as easy to use as Perl?

      I don't know what the next generation of programming languages will look like, however it is a good bet that they will be strongly influenced by Perl.

    9. Re:Who would have thought! by smallpaul · · Score: 1

      All of you that say that it is hard to read are:
      a) reading code that wasn't meant to be cute, but was meant to work where nothing else was as practical,
      b) reading code that was written by someone that didn't know perl, or are
      c) reading code written by someone that knows perl a LOT better than you.

      When a technology's proponents start blaming users for not being 133t enough to use it, that technology is probably doomed. The only thing that can save it is the minority who ignore the elitist blowhards and fix the problems that befuddle the masses.

      In my personal experience, people that gripe about Perl are the ones that use it least.

      So they dislike the technology and avoid using it? Diabolical!

      If you really want Perl to thrive (as opposed ot just survive) then you should start by looking at it with a critical eye. You should also listen to the people who have tried it and given up on. Maybe they don't understand how wonderful Perl could be if they would just master it, but they do understand why newbies are choosing to learn Python instead of Perl.

    10. Re:Who would have thought! by Wargames · · Score: 1

      Would you mind posting an example of a Perl program that is "VERY good looking, and VERY easy to understand"?

      I say you have to be a darn good Perl programmer to write VERY good looking and VERY easy to understand Perl code, and I have yet to meet one - I suppose I don't get around enough.

      --
      -- Each tock of the Planck clock is a new world and here we are still life. --
    11. Re:Who would have thought! by dbenhur · · Score: 1

      perl -e 'print "This program is VERY good looking, and VERY easy to understand\n";'

    12. Re:Who would have thought! by Wargames · · Score: 1

      say "I'm a lot better looking than you. Understand. My name is Rexx!"

      --
      -- Each tock of the Planck clock is a new world and here we are still life. --
  14. Perl6? Try Ruby... by Anonymous Coward · · Score: 0, Interesting

    Perl 6 is *insane* .. the kind of thing that is either the work of a genius or
    a madman. Or both.

    I used to really like Perl, but these days I'm writing bigger and bigger
    programs using interpreted languages. Perl is *really* getting on my nerves.
    I'm not waiting for Perl 6, I'm writing all new code in Ruby (or Python if
    Ruby doesn't have the needed 3rd-party libraries).

    Ruby is what Perl *should've* been, and what Python will be in a couple more
    versions (it got popular before they finished designing it, it seems).

    I'm sure Perl 6 will be like getting a blow job from Larry Wall himself, but
    I've had enough of Perl's community and their "cleverness". I want languages
    that help me write programs, not that are good for writing haiku in.

    However there are two things I"m looking forward to: 1) better regular
    expression syntax .. I'm sick of "(?:..)" and other confusing add-ons.. and 2)
    a common runtime between perl, python, and ruby, that way I can use all sorts
    of libraries in my code, no matter what the language I happen to be using.

    1. Re:Perl6? Try Ruby... by kin_korn_karn · · Score: 0, Troll

      flamebait? I'm a fan of perl, and I hate how it's gone in the shitter. I'm sorry I insulted your girlfriend, but remember, I get mod points too..

    2. Re:Perl6? Try Ruby... by Anonymous Coward · · Score: 0

      Having actually been lectured by Damien Conway at Monash.. I would have to say he is a combination fo both Genius and Madman..
      The best lecturer at the Uni but boy does he know a lot about a lot of things and gets off topic very easily :)

  15. Slashdotted. Here's the text by Bingo+Foo · · Score: 5, Funny

    Since the article is slashdotted, I have reprinted the text below:

    $_

    --
    taken! (by Davidleeroth) Thanks Bingo Foo!
    1. Re:Slashdotted. Here's the text by deja206 · · Score: 1

      Too bad I've used all my MOD points, mod parent UP! =)

    2. Re:Slashdotted. Here's the text by WinterSolstice · · Score: 1

      Well, currently it is $!

      -WS

      --
      An operating system should be like a light switch... simple, effective, easy to use, and designed for everyone.
    3. Re:Slashdotted. Here's the text by TheLinuxSRC · · Score: 1

      LOL!!!!!

    4. Re:Slashdotted. Here's the text by Anonymous Coward · · Score: 0

      Can anybody fill us in on the joke?

    5. Re:Slashdotted. Here's the text by Anonymous Coward · · Score: 0

      Can anybody fill us in on the joke?

      TFM can.

    6. Re:Slashdotted. Here's the text by McCow · · Score: 5, Funny

      I can see what everyone is complaining about. Even jokes about Perl are hard to read.

    7. Re:Slashdotted. Here's the text by The+Ape+With+No+Name · · Score: 3, Funny

      use English; #DAMNIT!

      --
      Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
    8. Re:Slashdotted. Here's the text by Anonymous Coward · · Score: 0

      If you knew Perl, you'd get the joke.

      If you don't know Perl, why are you reading these comments?

  16. Why was Perl5 so Popular? by use_compress · · Score: 4, Interesting

    With such bloated and obscure syntax in both the language and regular expressions, why do you think Perl 5 has become so popular? Once you've written a few programs in it, it is ULTRA EASY, ULTRA FAST and not hard to remember. An experienced Perl programmer could probablyl do almost any text processing task in a third of what it would take an expert C++ programmer to do. All of the bloat and lack of orthogonality and "bad design" paradoxically makes Perl 5 a fantastic language to program. I hope Wall doesn't mess this up...

    1. Re:Why was Perl5 so Popular? by Anonymous Coward · · Score: 1, Informative

      Wall won't mess it up don't worry. I've been lurking on Perl 6 lists and ocassionally adding a dime for almost 18 months. What people misunderstand about Perl is that it is a rather hybrid ad-hoc and over inclusive language by its nature. In many ways it's like Linux and OSS in general, it's diverse deep and wide, has a long pedigree which itself inherits from a rich history of shell and Unix syntax. Most of what is going on in 6 is reconciling and consolidating some of this ugly middle age spread. It is the Borg of all languages. As an 'expert' C programmer I took to Perl very nicely. It is a working mans language. Something you use to _get_the_job_done_. And there's always more than one way to do it :)

      Eventually you will all grow to love your new Perl 6 overlords. You will be assimilated.

    2. Re:Why was Perl5 so Popular? by deja206 · · Score: 2, Insightful

      AGREED.

      Actually, after using languages like Perl, PHP & Python, I started to question the reason why we need binaries.

      P.S. I'm yet to try out Ruby.

    3. Re:Why was Perl5 so Popular? by zeroclip · · Score: 1

      YES! Exactly! Perl is GREAT! Once you get into the syntax you can write code faster than any Python zealot.

    4. Re:Why was Perl5 so Popular? by GigsVT · · Score: 2, Interesting

      Writing code is easy. Reading someone else's code is the real test.

      I stick to Bash for most things involving text processing.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    5. Re:Why was Perl5 so Popular? by Garin · · Score: 4, Insightful

      Definitely true. There is only one reason why Perl code is so frequently ugly:

      Perl exposes the mind of the programmer more directly than any other programming language.

      If you are more interested in quick hacks and dirty tricks than writing clean and manageable code, your perl will reflect that. If you are interested in impressing people by compressing seventeen operations into a single line of code, your perl will be an ugly, ugly thing.

      However, if your intention is to write clear, maintainable, understandable code, then this is what you will write. It isn't hard -- in fact I believe that Perl's flexibility makes this a much easier task than just about any other language. Here are a few of my favourite rules for Perl programmers:

      1) Just because you can, doesn't mean you should.

      2) One line of code means one operation or idea. MAAAAYBE 2. See point #1.

      3) If there is a cute, short, hackerish way to do something, and a longer, more boring, more explicit way to do the same thing, ALWAYS pick the boring way. Anyone who looks at your code in six months will be very pleased (instead of ready to kill you). Since Perl is so flexible, this is always possible. As for performance, well, in my experience the slick, hackerish ways of doing things often slow things down more than the explicit-using-more-lines way of doing things.

      --
      In any field, find the strangest thing and then explore it. -John Archibald Wheeler
    6. Re:Why was Perl5 so Popular? by miu · · Score: 2, Insightful
      An experienced Perl programmer could probablyl do almost any text processing task in a third of what it would take an expert C++ programmer to do.

      No expert C++ programmer would do a text processing task in C++. Most experienced programmers would use the scripting language they know best. They might write or use a module written in a compiled language if the task is more complicated than simple text munging.

      --

      [Set Cain on fire and steal his lute.]
    7. Re:Why was Perl5 so Popular? by WWWWolf · · Score: 2, Insightful

      Perl 5 does have its quirks. Yet, the quirks are hardly something that will make coding impossible. Even with its quirks, it's still a language that works just fine for what it does.

      Perl 5 reminds me of an almost regularly cleaned room. You can live there, stay for hours, there's a lot of cool stuff people have brought to the room... do everything you want and have fun. Just don't move the sofa because there's tons of dust under it.

      Perl 6 designers, then, are finding us a new room, move all old stuff from the old room there, and then ask the people where each of the things should be put or would the things look better a few meters to the left, perhaps. And they carry out all of the old newspapers and install one of those automated vacuum cleaners too.

    8. Re:Why was Perl5 so Popular? by ianr44 · · Score: 1

      hmmm, maybe to run all the interpreted languages?

    9. Re:Why was Perl5 so Popular? by Adartse.Liminality · · Score: 1

      I have tried Ruby, never managed to get deep in Perl, PHP is quite decent, Python? uh I don't like a lot of it.But don't trust me, try Ruby, You're for a big surprise(a good one mind you).

      --
      Smokin' & rubying away
    10. Re:Why was Perl5 so Popular? by deja206 · · Score: 1

      Python doesn't look classy to me either. But I'll give Ruby a try for sure.

    11. Re:Why was Perl5 so Popular? by Lozzer · · Score: 1

      3) If there is a cute, short, hackerish way to do something, and a longer, more boring, more explicit way to do the same thing, ALWAYS pick the boring way. Anyone who looks at your code in six months will be very pleased (instead of ready to kill you). Since Perl is so flexible, this is always possible. As for performance, well, in my experience the slick, hackerish ways of doing things often slow things down more than the explicit-using-more-lines way of doing things.

      If anyone is having difficulty overcoming these tendencies, leave a comment with the cute hack. Then at least everybody will know how clever you are. If you want your cake, leave the easy to read bit as a comment instead :-)

      --
      Special Relativity: The person in the other queue thinks yours is moving faster.
    12. Re:Why was Perl5 so Popular? by imbaczek · · Score: 1

      No sane programmer will do text processing in C/C++ unless forced to! (I know I wouldn't.) Besides there's sed for simple stuff and Python for whatever's left. No need to warp my mind around all this $%@!&{} line noise (regexps don't count.)

    13. Re:Why was Perl5 so Popular? by evilad · · Score: 1

      Don't be ridiculous. Perl was always intended as a WORN language.

      let WORN = "Write Once Read Never"

    14. Re:Why was Perl5 so Popular? by fallout · · Score: 1

      "There is only one reason why Perl code is so frequently ugly: Perl exposes the mind of the programmer more directly than any other programming language."

      Classic. So true. So hilarious.

      I'm sending this to my friends.

    15. Re:Why was Perl5 so Popular? by myzz · · Score: 1
      > 1) Just because you can, doesn't mean you should.

      No, no. If it is possible, then it is intended to be used.

      > 2) One line of code means one operation or idea. MAAAAYBE 2. See point #1.

      Or maybe 3... or 4... or 5. oh well, I agree, 10 is usually too much.

      > 3) If there is a cute, short, hackerish way to do something, and a longer, more boring, more explicit way to do the same thing, ALWAYS pick the boring way.

      Programming has to be fun. So the boring way doesn't count. Anyway, the short way assures, that I also have some fun when I sometimes later reread my own code and for every tenth line or so stop glaring at it and saying, WTF THIS IS SUPPOSED TO DO? And after few minutes say... oh it does this...

  17. Too many cooks by ObviousGuy · · Score: 4, Interesting

    While no one would ever accuse Perl of being single minded and focused, until Perl5 it was a fairly coherent language.

    I understand that Perl6 is supposedly an evolution of the language, but there are so many suggestions for so many features and changes that the language itself seems to suffer from the too many cooks problem. With everyone and their brother suggesting features, the language itself becomes a mish mash of these features without a central theme tying it all together. Even if you said that DWIM was the central theme, can you really justify that when WIM is not what the language does because the feature that I'm using was designed by someone who had a completely different idea of what he meant?

    In the past Perl has added functionality that was useful and you can see where the language has its partitions. Base Perl (datatypes, simple arithmetic, simple string manipulation), nested datastructures, regexes, OO, and so on. While admittedly a mess, each addition to the language brought more power and ease. Perl6, OTOH, seems to be adding feature after feature without regard to whether it makes the language easier to use, only more powerful.

    So you end up with a new interpreter that won't run your old scripts without modifying the scripts. At the very least it should automatically default to Perl5 syntax unless otherwise told to use Perl6 syntax. Unfortunately, in the push to evolve, Larry and Damian (and the rest of the lunatics) have foregone automatic backwards compatibility.

    I'll probably migrate, but not for a while.

    --
    I have been pwned because my /. password was too easy to guess.
    1. Re:Too many cooks by Tony+Hoyle · · Score: 1

      To be honest I kinda lost it when they started adding things like CPAN and changed the syntax to look like C++ (:: instead of `). They seemed to be trying to depreciate the report generator too (which was one of the most used features in my early days).

    2. Re:Too many cooks by kinsoa · · Score: 3, Informative

      there *is* a full backward compatibility : Parrot will run your Perl5 code. And if you don't want to run old perl5 code, there will be a script to convert your code.

      and you don't have to care about migration for now - not until the next two years. Perl6 is not ready.

      the "lunatics", as you said, seem to be very serious and competant...

    3. Re:Too many cooks by Anonymous Coward · · Score: 0

      Languages evolve or die.

      COBOL, FORTRAN, etc. are almost dead, save for crufty legacy code you can barely find any maintainers for...

      Perl will advance and will continue to advance. Its intent is to allow the programmer as much power as possible, then let other languages follow up behind it to pretty up the syntax and things of that nature.

      In the mean time, use english & strict and don't complain so much. Upgrading scripts to Perl 6 can be no more than adding 1 line, anyhow, telling it to use Perl 5 instead, and I'm sure there'd be some configuration option to make it do Perl 5 by default if you really were THAT lazy (though it strikes me as FALSE laziness, anyhow...)

    4. Re:Too many cooks by Enonu · · Score: 1

      I call shenanigans. A script that can convert between two different Perl dialects? Such a thing can only be made by God.

    5. Re:Too many cooks by Anonymous Coward · · Score: 0

      Say hello to those lunatics mentioned above :P

  18. Hmmm by Moth7 · · Score: 4, Interesting

    IIRC it's possible to write OpenOffice macros in Perl (Though it probably takes some nasty hacked API to do it). And of course, given how easy it is to embed a Perl interpretter into C apps (possibly moreso with Parrot) then there's really no reason why it can't be used for game scripts.

    1. Re:Hmmm by __past__ · · Score: 5, Funny
      it's possible to write OpenOffice macros in Perl (Though it probably takes some nasty hacked API to do it)
      A nasty hacked API like, say, Perl, you mean?
    2. Re:Hmmm by Bingo+Foo · · Score: 2, Funny

      It's easy really: since the OO macro language is Turing complete, you just write a perl interpreter in OO macros.

      --
      taken! (by Davidleeroth) Thanks Bingo Foo!
  19. From the horse's mouth by ChaosDiscord · · Score: 5, Informative

    If you want the real scoop on the on-going planning of Perl 6, you might want to check out Larry Wall's Apocalypse articles: 1, 2, 3, 4, 5, 6. On the down side, they are dense. Very dense. For that reason, I actually recommend Daimon Conway's Exegesis articles: 2, 3, 4, 5, 6. They provide alot more context on what the changes actually mean to you and why they're good.

    1. Re:From the horse's mouth by Anonymous Coward · · Score: 0

      Ick. Good thing: Perl 6 will finally support labelled arguments and currying. Bad thing: the syntax for both is HIDEOUS compared to something like OCaml.

      I think I won't be throwing my compiler away just yet...

  20. A picture worth 1000 words by Nugget · · Score: 5, Funny
    1. Re:A picture worth 1000 words by ChaosDiscord · · Score: 3, Interesting

      Heh. Still, it's worth noting that this isn't new to Perl 6. Perl's always been a Chimera. Quoth the Perl man page (as it has as long as I can remember), "Perl combines (in the author's opinion, anyway) some of the best features of C, sed, awk, and sh, so people famil- iar with those languages should have little difficulty with it. (Language historians will also note some ves- tiges of csh, Pascal, and even BASIC-PLUS.)" As for why being a freakish blend and a giant mess is actually a feature, I suggest checking out Larry Wall's Second State of the Onion. (It's a long page, but the stuff on the advantages of complexity is all near the top.)

    2. Re:A picture worth 1000 words by Anonymous Coward · · Score: 0

      Hey I'm famous at last - my picture got a mention on /. :-)

      Thanks for posting a link to a copy of my picure rather than the original - my weedy ADSL link couldn't stand the strain.

      Al

  21. why rev a language ? by ehack · · Score: 2, Insightful

    Exactly why does a properly designed language need core revisions every year ? I thought that was what libraries were for!

    --
    This is not a signature.
    1. Re:why rev a language ? by furry_marmot · · Score: 5, Interesting

      Because it's a high-level language with lots of sytactic sugar that made a whole new level of flexibility in programming. You can be loose, sloppy, tight, properly formatted, or write one-liners with equal ease.

      I agree with the main topic that other languages aspired to its expressiveness. The problem, from the point of view of a Perl hacker like me, is that some of them have actually outdone it, primarily by creating similar power, expressiveness, and simplicity but without being so ugly *and* being OO. Ruby and Python are pretty much the motivators for the upgrade.

    2. Re:why rev a language ? by J-Worthington · · Score: 2, Informative

      Maybe I'm missing your point, but Perl certainly isn't having core revisions every year in terms of the language. Perl5 has been around for about 10 years now, and will probably still be pretty widespread in another 5 years. 15+ years isn't a really bad lifetime for a langauge, and it isn't like there are no plans to continue support for Perl5 code. Indeed, they are currently re-implementing Perl5 on top of the Parrot engine, so Perl5 and Perl6 code will be able to interact. This means systems can gradually move from Perl5 to Perl6 if they need to, without needing a full re-write.

    3. Re:why rev a language ? by Anonymous Coward · · Score: 0

      Perl is OO, you insensitive clod!

    4. Re:why rev a language ? by furry_marmot · · Score: 1

      Yes, yes, yes...and I use those features frequently, but...well, you know.

  22. Three cheers for Perl! by Chuck+Bucket · · Score: 4, Insightful

    Why do we use Perl every day? Because Perl scales to solve both small and large problems. Unlike languages like C, C++, and Java, Perl allows us to write small, trivial programs quickly and easily, without sacrificing the ability to build large applications and systems. The skills and tools we use on large projects are also available when we write small programs.

    I'm not a Perl hacker by any means, but after the possibilities are endless, and I don't think Perl will ever die.

    CB

    1. Re:Three cheers for Perl! by mortenmo · · Score: 5, Insightful

      But why would you want a language that can solve both small and large problems? Why not use a good language to solve "small problems" for "small problems", and a good language to solve "large problems" for "large problems"?

      Of course, I would probably argue that Perl cannot solve "large problems" after creating 100k+ line Perl applications. The problem lies that the reason languages like Perl is good for quick and dirty hacks is just the reason they are not that good for large systems that needs to be maintained over longer periods of time with many developers involved.

    2. Re:Three cheers for Perl! by T-Ranger · · Score: 1
      All the "good for large project" languages do differently then the "good for quick hack" languages is force you into using an arbitrary and desigined-elsewhere methodologies. You don't need to do and explicit planning or design because if you dont they compiler will just laugh at you. They force you into producing someone else idea of nice code.

      I don't write maintainable code because doing so allows my holy-grail compiler to work. I write maintainable code because its the right thing to do. But not all the time. Some time a hack is the right thing. Sometimes a hack will save days of "proper" coding. With Perl you have the option of producing pretty code and producing code fast in the same program.

    3. Re:Three cheers for Perl! by rgmoore · · Score: 1

      I'm not so sure whether the problems you have with maintaining large Perl programs are caused by Perl or are a result of bad habits from writing small programs. This may be more of a problem in Perl, both because there are more nasty habits to get into and more programmers who are used to working exclusively on small projects where they can get away with using them, but it's hardly unique to Perl. Nobody says that C is a bad language because it has lots of ugly hacks and different programmers have different styles. Instead they impose standards and code reviews to make sure that their programmers are writing maintainably. There's no reason that the same practices can't be applied successfully to Perl. Perl6 may actually be an improvement on this point; my understanding is that it will make it easier to create pragmatic modules that enforce these kinds of coding standards.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    4. Re:Three cheers for Perl! by Apathetic1 · · Score: 1

      Inside every small problem is a large problem struggling to get out. Not very many projects start out large. When you start to run into the limitations of the "small" language, you have to rewrite everything.

      Perl can be very well written if the time is taken to do it right.

      --

      My username does not make me Apathetic. It's irony, get it?

    5. Re:Three cheers for Perl! by Our+Man+In+Redmond · · Score: 1

      But why would you want a language that can solve both small and large problems?

      So that in the grand Unix tradition, you can learn one language and learn it well.

      Why not use a good language to solve "small problems" for "small problems", and a good language to solve "large problems" for "large problems"?

      I would say Perl is a good language to solve both small and large problems. But then Perl is my main axe.

      Of course, I would probably argue that Perl cannot solve "large problems" after creating 100k+ line Perl applications. The problem lies that the reason languages like Perl is good for quick and dirty hacks is just the reason they are not that good for large systems that needs to be maintained over longer periods of time with many developers involved.

      Writing and maintaining large applications in Perl is similar to writing and maintaining large applications in other languages. The shops where I've worked with large Perl systems broke the big problem down into lots of smaller problems -- in other words we modularized everything, then when there was a problem we could track it down to the module in question and troubleshoot that rather than having to plow through a single stack of code the size of the Manhattan telephone directory.

      Don't get me wrong. For many, maybe most, large applications there may be a better language than Perl to write the application in. (Operating systems and embedded code come immediately to mind.) If it's properly structured, managed and documented, however, there's no reason a large project couldn't be done in Perl -- and such structure, management and documentation should be a part of any large software project anyway.

      --
      Someone you trust is one of us.
    6. Re:Three cheers for Perl! by abulafia · · Score: 1
      Of course, I would probably argue that Perl cannot solve "large problems" after creating 100k+ line Perl applications. The problem lies that the reason languages like Perl is good for quick and dirty hacks is just the reason they are not that good for large systems that needs to be maintained over longer periods of time with many developers involved.

      You can argue that. Then there are those of us who continue to write 100K+ lines of code for serious applications in perl. For a reason.

      Because of your post, I just did a line count. The core of the app I'm writing is about 165K lines. That's not counting the XS written to do a couple of things a little faster, CPAN (which I'm depending on heavily), or the database-level code, of which there is a lot (plpgsql triggers as well as C functions).

      The really cool thing about perl is that it can do anything. The reason why people bash it is that it can do anything.

      I wonder about people who claim perl is unmaintainable in large projects. See,my current favorite gripe is code written by others, that happens to be in Java, and the weird crap that has been done in some cases makes my eyes bleed. Troubleshooting stuff like walking through 9 different classes, guessing the runtime stack to figure out what a "factory" is doing, digging though a few more classes, and finding something that increments a value, wraps it in XML *incorrectly*, and returns it is... entertaining. Then, of course, doing the same thing on the calling method to find that it tries to unpack the XML and use the value in a different calculation that has silly fencepost errors... I'm not making this up. "Enterprise application development environment" means "crap we can't share with the world, because they'd laugh". People attack perl because, say, a line like "$var =~ s/^(?:\w+):\s(.*)/$1/si" looks dense, but when you compare that with implementations in other languages doing the same thing, lord, life is so much better in perl.

      --
      I forget what 8 was for.
  23. Perlman by Michael.Forman · · Score: 1


    I've been waiting with great anticipation for the new perl release for years, having picked it up, while I was a systems adminstrator for Unixops at the University of Colorado. I've since been living and breathing perl, whether it's via Mason in the perl scripts that run my website, as an aid to data analysis in my research, or for one of the many command-line scripts I've written over the years.

    My current favorite is ren-regexp, a utility which allows the renaming of many files on the command line using one or more regular expressions. I look forward to rewriting it with the future additions and modifications to regular expression in Perl 6.

    Michael.

    --
    Linux : Mac :: VW : Mercedes
  24. DOES MAKEOVER INCLUDE PERL NECKLACE? by Anonymous Coward · · Score: 0


  25. Parrot embedded in a message thread by AubieTurtle · · Score: 2, Funny

    (perl[6] == "Great") || die;

    1. Re:Parrot embedded in a message thread by Anonymous Coward · · Score: 0

      correctly, it's:

      (perl[5] eq 'Great') || die;

      a) array indexes start at 0, so the sixth element is [5].
      b) 'eq' is the string comparator, '==' tests for numeric equality.

      -AC

  26. argh by angrylinuxgeek · · Score: 0, Redundant

    and I just learned Perl in class last semester. dammit.

  27. No, Python by Anonymous Coward · · Score: 1, Funny
    Ruby? I think you mean Python. Python has all of the power of Ruby with a much much larger developer base.

    And if you can't get past "the whitespace" thing in Python, then that's too bad; be an Ruby-using elitist.

    Now, without further ado:

    Python! -- Tastes Great!
    Ruby! -- Less Filling!
    Python! -- Tastes Great!
    Ruby! -- Less Filling!
    Python! -- Tastes Great!
    Ruby! -- Less Filling!
    Java! -- Job Security!
    ...

    1. Re:No, Python by perlchimp · · Score: 5, Funny

      Java! -- Job Security!

      I am the lead developer on a 200K line commercial bioinformatics program written in Perl. That's job security.

    2. Re:No, Python by Tyler+Eaves · · Score: 2, Interesting

      I used to use python a lot. Still do, really. I like it a lot.
      I just like ruby more. I find it easier to learn, even faster to code in, and language development is just as fast, if not faster than python.

      --
      TODO: Something witty here...
    3. Re:No, Python by Tony+Hoyle · · Score: 1

      No *that*'s a disaster waiting to happen.

      I guess it's secure if you can predict the disaster early enough and get the hell out of there at the right time (after getting a nice bonus).

    4. Re:No, Python by eln · · Score: 1

      And irony is your upcoming post to Ask Slashdot about the best way to go about finding a new job after having been laid off.

    5. Re:No, Python by Anonymous Coward · · Score: 0

      Python --- by version 3.0, the design will be finished! We promise!

      And oh yeah, whatever you're doing can be done better with a list comprehension (*sproing*).

    6. Re:No, Python by The+Ape+With+No+Name · · Score: 3, Funny

      If that sucker can output it's own code and send and e-mail too then, AND ONLY THEN, is it a true perl program.

      --
      Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
    7. Re:No, Python by Anonymous Coward · · Score: 0

      Yeah, but what do you do if they need a bug fixed?

      We need it fixed today..

      *shudder*

      (And I like Perl!)

    8. Re:No, Python by el-spectre · · Score: 1

      Serious question: Why is perl so big in the bioinformatics realm?

      --
      "Faith: Belief without evidence in what is told by one who speaks without knowledge, of things without parallel." - A.B.
    9. Re:No, Python by perlchimp · · Score: 2, Interesting

      There are a lot of reasons but the short answers are regexes and the fact that non-programmers can get started quickly. Plenty of sharp minds think "If I could only sort throw this text and do this...." Perl lets them do that. You'd be amazed at the biology you can uncover with 50 lines of code and 50 megs of sequence. (If they don't 'use strict' though, plenty of comical things can happen.)

    10. Re:No, Python by Anonymous Coward · · Score: 0

      I would be VERY interested if you have any best practises for large-scale perl programs. If nothing else could I send you a few questions???
      Here is my "vertical" email ;-)
      smackdab949
      yahoo
      com

    11. Re:No, Python by Mr.+Pillows · · Score: 2, Interesting
      I am a bioinformaticist and I don't use perl that much. I have often wondered why perl was so popular myself. I think a lot of it has to do with the misconception that perl is the only language that works with text files. So maybe I should back up for a minute . . . there a part of computational biology that has to go through the uglies of working with raw data in files . . . thus the need to parse through them and reformat them.

      Almost every language has text processing capabilities. Here's a dirty little secret most people don't know . . . regular expressions for bioinformatics work is not as important as people would like you to believe. The fact of the matter is, most of the data bioinformatics researchers encounter is structured data. Simple string parsing and tokenization is all that is needed. Regulars expressions past the most simple are rarely encountered. In fact, a lot of the data a bioinformaticist encounters is in either XML, tab-delimited, or CSV. For the text processing part of my tasks, I have often used awk to blow my way right through a text file. Of course perl can do the same thing, but I'd like to point out that awk is great when so much of your data is in tabular format (we've got databases everywhere in this field). I also find Java's String, StringTokenizer, BufferedReader and Writer mixed with the FileReader and Writer classes to work great with text files too.

      This brings me to my last point. Perl is horrible for some areas of bioinformatics. A lot of people employed in so-called bioinformatics positions spend like 90% of their day parsing through text files. Most people don't know that there are bioinformaticists who spend very little of their day doing that, but instead are developing algorithms and such that usually require a different language. For instance, I'd hate to run a Hidden Markov modeler with the Viterbi algorithm coded in Perl :) Or how about a massive simulation during haplotype reconstructions in perl? Or maybe a support vector machine in perl? Hee, you get the idea. For these tasks C is often chosen. Particularly if one employs parallel programming. I encourage bioinformaticists to explore other languages besides perl so that they have a vast array of expression for the multi-facted charges a computational biologist is expected to handle.

    12. Re:No, Python by perlchimp · · Score: 1

      Funny, I was going to write something about the grizzled biostatician and awk but decided against it.

      There is some truth in what you say. However, bioinformatics is not limited to statisticians and the like. There are loads of bench scientists out there who need to analyze their data and find that Excel is not enough and high end statistical programs are way, way to much. These same people have no idea what a 'Hidden Markov modeler' is or what a Viterbi algorithm calculates and have no interest in a 'massive simulation during halpotype reconstruction' (I have worked in life sciences for 15 years, bioinformatics for 5 and have never heard of any of those things - except for Markov thanks to Slashdot trolls Marque_Off and y77 and I do know a little about haplotype reconstruction but not the 'massive simulation' part ). Likewise, these scientists are not going to be developing new algorithms. For every biostatician out there, there are probably 100 bench scientists with a pile of data on their desk that needs some analysis.

      For these scientists, Perl offers a great deal of power in a form that is manageable and understandable. They do not have to immediately deal with a strongly typed language or classes or object orientation or even compilation. The non-programmer can write something useful to them quickly without the learning curve that too many languages have.

      That is why Perl is popular in bioinformtics.

    13. Re:No, Python by tdelaney · · Score: 1

      Generator expressions are *much* better :)

    14. Re:No, Python by Etyenne · · Score: 2, Insightful

      My biggest Perl project is a 5KLOC Perl module. I don't know if that make me qualified to answer your question, but here's my 0.02$ : best practice for large-scale Perl program are the same as with any language. A few :

      1. Use descriptive name for variables, functions, objects, etc. Stick to a convention here.

      2. Also stick to a coding standard (brace style, ident, etc).

      3. Write good comment, but don't overdo it. Especially true for regexp, where you should describe what you want to match and what constraint you take into account.

      4. The most important: generalize as much of your code as possible into object or package.

      5. A corrolary of 4 is to re-use existing library. Search CPAN and prefer well-known package over more obscure one.

      The only Perl-specific advice I would have is to avoid obscure and lesser-known Perl construct such s compiled regexp, closure, use of local(), etc. If you do use one of these construct, explain the purpose of doing so in a comment, and give pointer to documentation on the subject if appropriate.

      --
      :wq
    15. Re:No, Python by etcpasswd · · Score: 1
      a) Scripting languages are very useful in cases where one needs to develop proof-of-concepts quickly. Perl saves a lot of time in this area.

      b) Engineers in our lab (we're a computational biology lab) can easily write up Perl code (for data analysis etc.) more easily than having to explain it to a software engineer. Their time is definitely better spent on research than mastering the art of software engineering.

      c) We have Perl modules for most of our tasks - graphics, graph visualization, http client etc. All these are available via CPAN, saving the hassle of searching for a particular library.

      We've been working on a project written in Perl for about two years now, and the code is still readable and maintanable. My colleague (an engineer, non-s/w) can follow the entire project. Recently though, we started migrating the project slowly to Java. Ironically, Java code is being much harder to follow. But maybe it has to do with how the code is organized.... The bottom line is, the choice of the programming language doesn't determine the readability of the code.

    16. Re:No, Python by Mr.+Pillows · · Score: 1

      These "bench scientists" you refer to, are NOT bioinformaticists. That needs to be clear. They are primarly wet-lab researchers. Using a computer does not mean you are a bioinformaticist. Computers are used for a lot of things, including basic parsing, which according to you is enough to transform a wet-lab researcher into a bioinformaticist. The core of computational biology is the research and development of algorithms, mathematical models, and computational approaches in the life sciences. The work you describe is merely the basic use of a programming language. If I parse through files that contain small molecule compounds, that doesn't make me a cheminformaticist. If I parse through a file that contains action potentials, that does not make me a neuroinformaticist. Perl is simply popular because, like you say, "bench scientists" employ it in basic tasks.

    17. Re:No, Python by perlchimp · · Score: 1

      You do not need to be a 'bioinformaticist' to need or employ bioinformatics. In my opinion (which is based in large part on observation) so called 'bioinformaticists' are threatened by any tool that allows bench-scientists to easily perform meaningful analysis of their data.

    18. Re:No, Python by Mr.+Pillows · · Score: 1

      On the contrary, bioinformaticists have gone to great lengths to usher in the field of genomics, proteomics, etc. and allow wet-lab researchers to achieve new wonders. This cannot be argued against very easily. Computational biologists put forth these tools so that more meaningful analysis is achieved. If people of computational nature feel threatened, why would we dedicate part of our research to put forth these very "tools" you say we are threatened by? I believe the common consensus is that "traditional" biologists feel threatened by these new approaches to the life sciences. I think there is room for both computational and wet-lab research. In fact, it should be said quite strongly that both are essential to help us usher in more positive discoveries. No one here has said that wet-lab researchers cannot employ bioinformatics software. In fact, that is the whole point, they need to employ it. What has been said is that perl is not necessarily popular for bioinformatics, but instead is popular for simple text processing, which is common in many fields and should not be confused with the core of computational biology.

  28. Ugly code by mr100percent · · Score: 4, Funny
    Neo: Do you always look at it heavily encrypted?
    Cypher: Oh that's not encryption... It's a new Perl script I'm working on...

    The Matrix Bastardization.

    1. Re:Ugly code by panck · · Score: 2, Funny

      Hmm, that suggests another programming language to join the ranks of brainfuck etc: the Matrix language.

      every line of your code contains 80 non-whitespace characters, most of which do nothing and are just there to look cool when streamed vertically in neon green against a black background. This way, when you scroll through your code, you're in the Matrxi!! Awesome!

      The only functional characters in the program are unicode glyphs that you can't find on a normal keyboard, everything else is treated as whitespace -- or rather, Matrix-space -- and actual whitespace characters don't exist, since in the future they have no need of them.

      --
      "What thou shalt not, I shalt did!" -Bart Simpson
  29. Quite possibly very naive question from a non-perl by FatRatBastard · · Score: 4, Interesting

    user...

    Is Parrot something akin to the JVM / .NET runtime engine? If so is the plan for it to be as robust as the JVM / .NET runtime: i.e. could the same type of applications that people are building for Java / .NET be just as easily built with Parrot?

    If I'm reading all of this right Parrot may well become everything Sun wants Java to become / MS wants .NET to become without the "what are those bastards going to do to the platform" stench.

    Of course, if I have the wrong end of the stick here I apologise. Perl isn't my strong suit.

  30. This parrot ain't dead by x3ro · · Score: 2, Interesting

    I'm amused to see that the name 'Parrot', originally coined for an April Fool's joke over at O'Reilly, has now been used to christen the bytecode interpreter for Perl 6. Life imitating art I guess.

    As for the 'extreme makeover' ... I hope it loses a bit of the excessive punctuation ...

    $broken ? fix($it) : s/!@#\$%\^\*//g if $ugly >= $all_hell;
    --
    [ UNSIGNED NOT NULL ]
    1. Re:This parrot ain't dead by Elian · · Score: 1

      Nah. It's life imitating satire. But, then, when doesn't it?

  31. I hope they don't ruin a good thing by 1iar_parad0x · · Score: 1, Interesting
    Programming with regex in a high-level language is going to be odd no matter the syntax. First-Order Logic is odd. The lambda calculus looks odd. LISP looks odd. Languages that are based on fundamental symbolic operations look odd.

    these regular expressions were not "powerful enough for many data-parsing tasks

    I will be the first to applaud Larry Wall and the Perl developers if they can clean up regex. However, I feel tinkering with a notoriously complex thing may make it worse. Or at best, may make more of an ugly thing. What we don't need is the new unreadable way and the old unreadable way of creating regexes. What fun it will be to debug code.

    Frankly, how can you increase the power of regex and minimize the complexity of code. If you make regexes more powerful, you might as well make another high-level language for text processing. Let's hope they can pull it off.

    Frankly, I for one like the power of Perl's regexes and I hope they succeed.

    --
    What do you mean my sig is repetitive? What do you mean my sig is repetitive? What do you mean....
    1. Re:I hope they don't ruin a good thing by Anonymous Coward · · Score: 0

      What we don't need is the new unreadable way and the old unreadable way of creating regexes.

      Already been done. The range I've seen is: POSIX regexes (non-GNU grep), POSIX regexes with GNU extensions (GNU grep), POSIX extended regexes (egrep or grep -E), an assortment of almost-POSIX regexes, Perl 5 regexes, libpcre Perl-compatible regexes, Python Perl-compatible regexes, and KDE Perl-compatible regexes.

      Luckily, the last four are basically the same, because the authors of libpcre, Python and KDE (or possibly Qt, I don't know who's responsible for that bit) decided to imitate the most consistent of the other versions.

      Whatever you might criticise Perl 5 regexes for, when compared with the other sorts I mentioned, they're wonderfully consistent (backslash followed by a letter or number adds any special meaning, backslash followed by anything else removes any special meaning - and if you don't think that's consistent, read the man page for GNU grep and you'll see what I'm complaining about).

    2. Re:I hope they don't ruin a good thing by close_wait · · Score: 1
      I will be the first to applaud Larry Wall and the Perl developers if they can clean up regex. However, I feel tinkering with a notoriously complex thing may make it worse

      What Larry has done with regexes for Perl6 is a work of pure genius. At the base level you can use them in much the same way as in the olden days (with a few minor changes in puctuation), ie same old line-noise. But it now allows you to do something very clever. You can give names to individual regexes: these are called rules; you can reference rules within other rules with angle brackets; rules can be grouped together into a grammar; grammars and rules are analogous to classes and methods; and yes, you can do inheritance with them. So someone writes a grammar for say parsing apache log lines and sticks it in a file somewhere; you can import that grammar, override the rule that recognises dates, and have a new grammar that recognises french day names say. Here's a simple example of a grammar:

      grammar log_entry {
      rule month {jan|feb|mar|....|dec};
      rule year {\d{4}}
      rule date {\d+-<month>-<year>}
      rule ip {\d+\.\d+\.\d+\.\d+}
      rule line { ^<date> <ip> .... }
      }

      Of course theres' a lot more to it than just that. See Larry's apocalyse 5 for more details.

  32. Maybe OT but I don't get it... by mkaltner · · Score: 5, Insightful

    Why does everyone say perl syntax is so damned ugly? Appearantly, they haven't seen C code written by someone with a "I'm a C God - Complex". I agree with some of the other posts here, it's only ugly if you have never used the language before. Write yourself a script or two and you quickly catch on.

    In fact, it's just like ANY other language (programming or spoken at that), it looks foriegn (go figure) until you put a little effort into it and figure it out.

    JM2C

    - Mike

    1. Re:Maybe OT but I don't get it... by hpavc · · Score: 1

      i would agree, perl can be programmed in many different 'styles' as well making the code radically different.

      --
      members are seeing something, your seeing an ad
    2. Re:Maybe OT but I don't get it... by zeroclip · · Score: 1

      PERL is not ugly at all, to a perl hacker like me perl looks and flows better than any poem.
      ( And is understable unlike some lyrics )

    3. Re:Maybe OT but I don't get it... by Anonymous Coward · · Score: 0

      Why does everyone say perl syntax is so damned ugly?

      Heh...Well there's the time I was comparing some crypt() hashes while trying to migrate from SunOS to Linux... Then there was this hash that didn't look quite right. Oh. It was a Perl regex.

    4. Re:Maybe OT but I don't get it... by rgmoore · · Score: 4, Insightful

      I think that a lot of the complaints about ugly code come from two things: excessive use of automatic variables like @_ and $!, and regexps. Reading automatic variables is something that comes with practice (Quick! Do you know what @+ is?) but reading regexps is likely to remain a problem until people start using /x (or Perl6) and comment them.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    5. Re:Maybe OT but I don't get it... by pileated · · Score: 1

      It's not ugly!! It's only ugly to people who haven't taken the time to learn it, just as vi is ugly to people who haven't taken the time to learn it.

      Perl's ugliness just strikes me as a untested/unproven urban programmer myth.

      I also code in Java. Its verbosity was originally as ugly to me as perl seems to be to others. But I no longer think so. They're just different, neither ugly, and both highly functional.

    6. Re:Maybe OT but I don't get it... by OmniVector · · Score: 0, Troll

      because c syntax is generally very strict. whereas perl is lax, and heavily context sensitive with lots of "magic" stuff like <> and $_ which have absolutely no meaning to a person who doesn't know perl.

      and generally i agree. if you can't look at a line and no what it does without understanding the datatype, or what the interpreter will do then it's not a straightforward language. i.e., ugly.

      --
      - tristan
    7. Re:Maybe OT but I don't get it... by pudge · · Score: 1

      Perl is not ugly. Damian -- God love him -- is just trying to hype what he thinks is an improvement. I think Perl is beautiful, as do many others. Not as beautiful as Damian in a swimsuit, but what is?

  33. OH NO! by jbrader · · Score: 1

    Does this spell the end of bad perl syntax jokes???

    --
    You are so boring that when I see you my feet go to sleep.
  34. "Initial construction of the Internet" by Repton · · Score: 4, Informative
    Perl, a high-level programming language that was critical in the initial construction of the Internet, ...

    Perl was first released in 1987. Y'know, I could've sworn the internet already existed back then...

    (especially since Perl was released in a post to alt.sources)

    --
    Repton.
    They say that only an experienced wizard can do the tengu shuffle.
  35. WOw! by Anonymous Coward · · Score: 0

    Perl like that?

    That sroucks, dude!

  36. Learn 5 first by Captain+Tripps · · Score: 2, Informative
    It's a safe bet that it'll be at least 18 months to a stable release for 6, and even longer before it gets significant adoption. From what I've read in the Apocalyses, the core part of the language will remain the same. (One of the goals for the redesign is "Perl should stay Perl.") Much of the new stuff is either extensions to the existing language or redesigns of advanced features like OO. Even for regular expressions, which have seen the most changes so far, Larry has emphasized that existing code can be adapted rather than rewritten.

    Finally, remember that most other Perl programmers will be in the same boat as you are in learning the new language, so Perl 5 should remain well supported for some time to come.

  37. well, duh! by Anonymous Coward · · Score: 0

    It's something in between 'rocks' and 'sucks', and maybe even both at the same time. Because some things, even when they rock, suck.

    But you need srouckness to get that.

  38. Larry, please hurry by Ars-Fartsica · · Score: 4, Insightful
    The first Apocalypse was published in 2001. It is now 2004 and we are patient but perl 6 is starting to smell like vapor.

    Larry, you need to get an alpha out in 2004 (even if all of the Apocalypses have not been published) or I think you are going to see people lose interest in perl 6. In the time between Apocalypse 1 and today, the mono team have basically cranked out an entire development environment of excellent quality.

    Signed, an eight year perl programmer and major fan.

    1. Re:Larry, please hurry by Anonymous Coward · · Score: 0

      Hurry, or what? Perl coders are going to be living under a Python flag? Let's let them get it right. I will demand the same speed and performance that I have come to know and love from Perl. If Larry and friends manage to turn Parrot into some sort of Java Virtual Machine (i.e. runs like a 300lbs legless woman) for Perl, I'm going to be seriously pissed off. Perl6 adoption will not happen for me, if that is the case. 18 months doesn't sound long enough, but then again they have Perl5 to help them, so who knows.

    2. Re:Larry, please hurry by Anonymous Coward · · Score: 0

      ...some sort of Java Virtual Machine (i.e. runs like a 300lbs legless woman)...

      We mock what we don't understand.

    3. Re:Larry, please hurry by Ars-Fartsica · · Score: 1
      Hurry, or what? Perl coders are going to be living under a Python flag?

      No, coders who are ready to start writing modules, tools etc for perl 6 will simply move on or lose interest.

    4. Re:Larry, please hurry by wsloand · · Score: 1

      In the time between Apocalypse 1 and today, the mono team have basically cranked out an entire development environment of excellent quality.

      They weren't designing a language. They were implementing it. There is a difference between design and implementation. Remember, it's like saying Microsoft "innovated" something just by implementing something already known.

    5. Re:Larry, please hurry by castrox · · Score: 1

      I believe it's "taking time" because they decided early to keep ordinary people in the light. Why? Because they would like feedback, or let users catch on the new syntax so the transition gets more smooth. Also to let people know so they can plan their future projects (many aren't really happy with Perl's OO model for example - I know I'm not).

      It's not a small task, you know.

      --
      Fight for your digital freedom, join the EFF *now*: http://www.eff.org/support/
    6. Re:Larry, please hurry by Anonymous Coward · · Score: 0

      Write the modules for Perl 5. 18 months is worth the effort. When Perl 6 comes out, the module is available for both and will have 18 months of testing from the community.

      I seriously doubt there are module coders waiting in the wings to leap to their keyboards the moment Perl 6 arrives, or are stalled because of it. If there are, to them I say, "Get in on the ground floor, start tinkering with Parrot, when Perl 6 hits the shelves you're already ahead of the game!"

  39. python & ruby are fine,but they lack {}'s and by GodWasAnAlien · · Score: 1

    I don't like indentation mandated by the language.

  40. for the naysayers.. by psycho_tinman · · Score: 5, Informative

    A few points to ponder ..

    You've all heard the "you can write unreadable code in any programming language" argument, so I'll spare you the repetition.. (No, wait.. I didn't, did I? ) *grin*

    But also bear in mind that Perl is the first language that I know of that used the foreach construct in the same form as the more sought after languages.. Java has iterators and enumerators, but they introduced a foreach because it is darn easy to understand.

    Perl innovated in regular expressions. Even Jeffery Friedl's Mastering Regex (sic) says that other languages aspire to be called "Perl 5 compatible" when they don't necessarily support all the features of Perl 5.6". Love it or hate it, regular expressions are like the microwave in your kitchen. Once you get used to it, it's darn hard to manage without :)

    I am not going to go into Perl 6 the moment it is released. But I guess that's ok, because I didn't adopt 5.8 the day it was released either. I just think that Larry Wall has made enough good calls in the language so far, to be worth trusting him for another version. Even one that promises to break some of the idioms that I am accustomed to in it's present incarnation. Hey, I didn't like Perl 5 when I first saw it either, but I notice the difference in my productivity when I got the hang of things.

    1. Re:for the naysayers.. by Anonymous Coward · · Score: 2, Interesting
      bear in mind that Perl is the first language that I know of that used the foreach construct

      man awk

    2. Re:for the naysayers.. by Virtex · · Score: 2, Insightful

      Also, man sh

      --
      For every post, there is an equal and opposite re-post.
    3. Re:for the naysayers.. by Our+Man+In+Redmond · · Score: 1
      My favorite Perl feature is "unless". I've amazed a number of people who think that Perl is only executable line noise by giving them a line of code like
      unless ($sandwich =~ /mustard/i) { print "You forgot the mustard on my sandwich again.\n"; }
      because once they think about it for a moment, not only do they know exactly what unless does, they realize that it can make your code more readable. I greatly prefer it to an "if (! $test)" construct.

      There are many great things about Perl, but foreach and unless are right up toward the top.
      --
      Someone you trust is one of us.
    4. Re:for the naysayers.. by Anonymous Coward · · Score: 0

      It was originally from Pascal, no?

  41. Re:The Parrot Vaporware Engine? by J-Worthington · · Score: 4, Informative

    I have a small involvement with Parrot (e.g. I've contributed a few small, insignificant things, mainly fixes for Win32). It's not vaporware, it's just that designing a stable, efficient, multi-threaded virtual machine that runs on a wide range of different platforms isn't an easy task. You can go and do a CVS checkout of Parrot now and play with some of the toy compilers, or if you use Windows grab yourself the Parrot On Win32 compiled version:-
    http://www.jwcs.net/developers/perl/pow /

    The 0.1 release may be coming by the end of this month - and if this release isn't 0.1, I'm pretty sure the next one will be. That means Parrot has objects, some of the threading stuff is in place, JIT is working on various platforms and more. There's a lot of hard work going in by a lot of very good developers (not me!), and I'm confident that Parrot will be completed and will be a hot target for dynamic languages.

  42. Say what? by rewt66 · · Score: 3, Insightful
    "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages..."

    I can't believe that nobody's challenged this statement yet. Somehow I don't think that Lisp or Prolog aspire to Perl 5's expressions...

    1. Re:Say what? by aerique · · Score: 1
      Correct. Typical Perl attitude: forgetting the whole history of computer science and reinventing it in a bad, half-assed way.

      "Worse Is Better" I guess.

  43. Perl brought this on itself by Artifakt · · Score: 2, Funny

    If Perl user's hadn't created the annual Obfuscated Perl contests, people wouldn't say such mean things about how the code looks ... Uh, no wait, isn't there one of those for C too? Well, if Perl had come along after the flaws in C++ were arround long enough to become really apparent, like Python ... Whaddya mean, it did? Uh, If Perl was distinguishable from line noise, people wouldn't say ugly, so there!

    --
    Who is John Cabal?
    1. Re:Perl brought this on itself by wayne606 · · Score: 1

      I dare anybody to write obfusticated Python ... Can't be done (at least in the spirit of the C and Perl cases)

    2. Re:Perl brought this on itself by Disti · · Score: 1

      You're not serious, right?

      Just RTFG: 'obfuscated python'.. It only finds 'about 5,830' pages. Stuff like ->
      ---
      fibonacci = lambda x:map(lambda o:(map(lambda c:map(lambda l:
      o.__setslice__(l[0],l[1],l[2]),([o[2]+3,o[2]+4 ,[o[ 0]]],[0,3,[o[1],
      reduce(lambda x,o:x+o,o[:2]),o[2]+1]])),range(x)),o)[1],[[1,1,0] +
      range(x)])[0][3:]

      print fibonacci(20)
      ---

  44. QE4PG by Anonymous Coward · · Score: 2, Funny

    Extreme makeover, nah.

    Qeere Eye for the Perl Guy.

    1. Re:QE4PG by Anonymous Coward · · Score: 0

      More like 'Programmers Eye for the Perl Guy'

  45. Perl/CGI by bcore · · Score: 1

    They probably meant "the world wide web" instead of the internet, and "rapid expansion" rather than initial contruction.. :)

    Perl/CGI played a huge part in the early days of dynamic web programming.

  46. Mod the parent up by Camel+Pilot · · Score: 1

    I am struggle with some wild-ass C code right now trying fix some old bugs. C can be as ugly as Perl anyday.

    One cool feature of Perl is introspection - or the ability to display the current symbol table of the name space (ie package) you are trying understand (ie %main::).

    1. Re:Mod the parent up by thogard · · Score: 1

      The IOCCC evidence seems to show C as worse:
      such as this roman number generator

  47. Release date: 2020 by thelenm · · Score: 4, Insightful

    I was very excited about Perl 6 when Larry started releasing apocalypses. I really hate to say it, because I'm as big a fan of Perl as anyone... but at the current rate, we're not going to see a full specification (much less implementation) of Perl 6 anytime in the next 15 years. There have been 6 apocalypses in the past 3 years, and there are supposed to be about 30 in all.

    Perl has a long history of being practical and useful rather than theoretically perfect, and it makes me sad to see the trend reversing with Perl 6. It seems like Larry is trying to make Perl 6 everything to everyone. That's one sure way to fail (although TMTOWTDI, of course :-) It's just not useful to anyone if it doesn't exist.

    --
    Use Ctrl-C instead of ESC in Vim!
    1. Re:Release date: 2020 by jamonterrell · · Score: 1

      FTDFIPTWAOMCAAUTPIFMTNENTBA. IWYAIOFTAAIIASATHAEFMYYSUI.


      (From this day forward I plan to write all of my comments as abbreviations until the point is finally made that not everything needs to be abbreviated. If what you're abbreviating isn't obvious from the abbreviation, and it isn't a standard abbreviation that has already existed for many years, you shouldn't use it. )

      --
      I can count to 1023 on my hands. Ask me about #132.
    2. Re:Release date: 2020 by thelenm · · Score: 1

      If what you're abbreviating isn't obvious from the abbreviation, and it isn't a standard abbreviation that has already existed for many years, you shouldn't use it.

      It is, it is, and it has.

      --
      Use Ctrl-C instead of ESC in Vim!
  48. sure by Anonymous Coward · · Score: 1, Informative

    Redundant bitching: Redundant means that the post or something close has already been made earlier in the discussion. Since this was the third post - highly unlikely. Checking the two posts before confirms this.

    As far as the joke goes, it's an old joke by egg troll that seems to have made its way around. If you had a factory that made characters, and it blew up, and there were characters everywhere... that would be Perl code.

    God, someone shoot me for explaining that.

  49. Wall is coool by gtshafted · · Score: 1

    I think it takes big balls to admit that you were wrong and what you made sucks, especially when you add that you will fix what sucks...

  50. Re:Perl... by vt0asta · · Score: 4, Informative

    No, I mean like:

    Doc

    Something a little more thorough.

    http://www.perldoc.com/

    Unit Testing

    Not just wrappers, but something a little more thorough and mature like say from executable to module.

    Unit Testing

    Library Repository

    http://raa.ruby-lang.org/
    ..pales in comparison to...

    http://www.cpan.org/

    Portability

    [Acorn] [AIX] [Amiga] [Apple] [Atari] [AtheOS] [BeOS] [BSD] [BSD/OS] [Coherent] [Compaq] [Concurrent] [Cygwin] [DG/UX] [Digital] [DEC OSF/1] [Digital UNIX] [DYNIX/ptx] [EMC] [Embedix] [EPOC] [FreeBSD] [Fujitsu-Siemens] [Guardian] [HP] [HP-UX] [IBM] [IRIX] [Japanese] [JPerl] [Linux] [LynxOS] [Macintosh] [Mac OS] [Mac OS X] [MachTen] [Minix] [MinGW] [MiNT] [MPE/iX] [MS-DOS] [MVS] [NetBSD] [NetWare] [NEWS-OS] [NextStep] [Novell] [NonStop] [NonStop-UX] [OpenBSD] [ODT] [OpenVMS] [Open UNIX] [OS/2] [OS/390] [OS/400] [OSF/1] [OSR] [Plan 9] [Pocket PC] [PowerMAX] [Psion] [QNX] [Reliant UNIX] [RISCOS] [SCO] [Sequent] [SGI] [Sharp] [Siemens] [SINIX] [Solaris] [SONY] [Sun] [Symbian] [Stratus] [Tandem] [Tru64] [Ultrix] [UNIX] [U/WIN] [Unixware] [VMS] [VOS] [Win32] [WinCE] [Windows 3.1] [Windows 95/98/Me/NT/2000/XP] [z/OS]

    User Community

    A little more world wide and established.

    http://www.pm.org/ ...in addition to the mailing lists.

    So, what were you on about again?

    From the parent parent parent poster. "Ruby has almost all of the power of Perl, with none of the ugliness" isn't quite a fair statement, considering Ruby is lacking or behind on almost everything else Perl is superior at. Ruby is still playing catch up, and depending on who you ask, can also be considered ugly.

    --
    No.
  51. Perl.... by silverhalide · · Score: 3, Funny

    ...is the duct tape of the internet.

  52. Parrot by steveha · · Score: 4, Informative
    I was intrigued by the news of Parrot, the interpreter core. It's a virtual machine, register-based rather than primarily stack-based as some other virtual machine cores have been. This is to take advantage of compiler technology.

    Long-term, Parrot hopes to be at the core of not just Perl 6, but also Python, FORTH, and what-have-you. Then applications could support Parrot, and users could script the applications in their favorite language. Python users could call into Perl CPAN code. That sort of fun thing.

    Parrot's home page is: http://www.parrotcode.org/

    The Parrot FAQ is worth reading. There are some really entertaining sections. One of my favorites:
    Why should I program in Parrot Assembly language?
    [...]
    You get all the pleasure of programming in assembly language without any of the requisite system crashes.


    Another:
    What language is Parrot written in?

    C.

    For the love of God, man, why?!?!?!?

    Because it's the best we've got.

    That's sad.

    So true. Regardless, C's available pretty much everywhere.


    So, my next question was: if they want to become the core of languages like Python, what does Guido van Rossum (the architect of Python) have to say about that? A few google searches later, and I found an interview at linuxfr.org, which contained this:
    DLFP: What do you think of the Parrot project (http://www.parrotcode.org/), which aim is to develop a common virtual machine for interpreted languages, such as Perl 6, Python, Ruby and Tcl ? [Jean-michel Fayard]

    Guido: I wish them well, but I don't think they will succeed. They are vastly underestimating the effort that goes into a virtual machine for any specific programming language. Even languages as similar as Ruby and Python have fundamentally different runtime abstractions, and the difference between Python and Perl is much greater still. (For example, the concepts of strings and numbers are entirely different in these two languages: in Python, numbers and strings are different immutable types, while in Perl they are the same type and are mutable.) I expect Parrot will do a great job of running Perl 6, but a relatively poor job of running other languages. Of course, I'd be happy if I were wrong (except for the brief moment of receiving a pie in the face at OSCON 2004), but I don't expect that to happen.

    steveha
    --
    lf(1): it's like ls(1) but sorts filenames by extension, tersely
    1. Re:Parrot by Our+Man+In+Redmond · · Score: 1

      I never got the impression that Parrot was out to knock the core out of Python. My impression was that you would be able to write a Python interpreter as a Parrot module. Python would still be executable outside of Parrot, but if for instance I wanted to write the guts of my program in Perl but use Python to nail the GUI together, I would be able to do it and run the resulting bytecode on a Parrot VM in Windows, Mac, Linux or any other machine that had one.

      I know that if the Python community suggested that they rewrite Perl's internals so that it ran on top of some Python project, the Perl programmers out there would get a bit, um, excited.

      --
      Someone you trust is one of us.
  53. SNOBOL by Stephen+Samuel · · Score: 2, Interesting
    I haven't seen much of the new perl expressions lately, but they're gonna have to be pretty hot to beat what SNOBOL (spitbol) used to do,
    Spitbol could do things like:
    • stringtomatch "this is some text" skipto("(") $ pre_paren ( funcof(pre_paren)$parenmatch = replacement(parenpatch) )
    In this case, the $ is an immediate assignment of the match from skipto("(") (roughly equivalent to /([^(]*)/ . )
    funcof is then called with the newly assigned variable (pre_paren), and it's result is inserted as an expression to complete the match.
    then whatever matched funcof(pre_paren) is replaced by the results of replacement(parenmatch)

    skipto is a builtin, but funcof and replacement would have to be user-defined (and they can be defined on the fly).

    Perl6 appears to have similar functionality, but (IMHO) I don't think it's going to be quite as nice as the SNOBOL syntax.

    Unfortunately, I'm not good enough at compiler design to write my own spitbol interpreter, or I would.

    The one problem with snobol is that it was created before the idea of structured programming came along, so it is goto-structured... (although somebody then came up with ratbol which was essentially a preprocessor to provide RATional structure to snoBOL)

    --
    Free Software: Like love, it grows best when given away.
    1. Re:SNOBOL by Stephen+Samuel · · Score: 3, Interesting
      omigod... someone just (yesterday) released an up-to-date version of snobol I'm in patern-hacker's heaven.

      Oh, and just to keep on subject:
      SNOBOL is considered to be the parent of unix regexpressions and awk which led to Perl. Unfortunately, the children inherited a much castrated version of snobol's string manipulation capabilities which have only now been reasonably addressed in perl6.
      If nothing else, I suggest that people interested in the history of pattern matching take a good look at snobol.

      --
      Free Software: Like love, it grows best when given away.
    2. Re:SNOBOL by Tsali · · Score: 1

      So does history repeat itself?

      --
      This space for rent.
  54. Re:Quite possibly very naive question from a non-p by J-Worthington · · Score: 4, Informative

    Parrot will be a virtual machine like the JVM and .NET runtime, yes. This means you can call functions and use objects from code written in the various different languages that target Parrot, compile stuff to bytecode that will run wherever Parrot will compile and more. Like .NET and JVM it uses JIT techniques to provide fast code execution.

    The main difference between Parrot and .NET/JVM is that they are more targetted towards statically typed languages. Languages like Perl, Python, etc that are likely to target Parrot are dynamic languages. This isn't just related to dynamic typing, but also to dynamic languages needing their parsers to be available at runtime. You can also do more stuff at runtime that non-dynamic languages would prefer you didn't. Parrot is designed with this in mind, which means it can offer these sorts of languages better performance.

    I have heard things along the lines of JVM and .NET bytecode to Parrot bytecode convertors, but I'm not sure how much speculation that is. I'm not really certain how easy it'd be, though my initial guess is "not very".

    Hope this answers some of your questions.

  55. Perl is a window into a programmers heart by Tikiman · · Score: 4, Insightful

    If the programmer is disciplined and well organized, the code will be disciplined and well organized. If the programmer doesn't value readability, then the code will not be readable. People like to take pot-shots at Perl, but they should really be aimed at Perl programmers.

    1. Re:Perl is a window into a programmers heart by Anonymous Coward · · Score: 0

      "Perl doesn't write bad code. People write bad code."

      If I wanted to troll I'd borrow an argument from the gun-control lobby and point out that the main purpose of Perl appears to be to produce bad code, but that would just be silly.

  56. Re:python & ruby are fine,but they lack {}'s a by Moloch666 · · Score: 1

    I second that. I had to learn Python because I was doing some massive string manipulation and comparison. Perl was spending hours on what Python took 20 minutes with. I'm sure my code could have been better, but I couldn't tweak it anymore, so I read up on Python. Had a working program in a few days. I sure spent more time on Python trying to figure out where various nested loops end.

    --
    Understanding is a three-edged sword. -- Kosh Naranek
  57. Re:python & ruby are fine,but they lack {}'s a by Queuetue · · Score: 2, Informative

    a) Ruby uses brackets or end statements to delineate blocks, not indentation.

    b) Why would anyone have a problem with this? Python code is remarkably easy to read and modify, primarily because there are no block delimiters to deal with. Maybe your editor is faulty?

  58. Re:python & ruby are fine,but they lack {}'s a by rolling_bits · · Score: 1

    Actually with Ruby there are so many ways to lay out the code that {}s are too simple. No, I don't expect you to understand without first trying out Ruby and seeing codes from others. Yes, I am a big fanof Ruby. Python indentation and syntax sucks to much for me.

  59. Re:Too many cooks (RTFA) by a1291762 · · Score: 1

    There is an automatical fallback to perl5 mode.

  60. Obviously, Perl was invented by Al Gore. by Anonymous Coward · · Score: 0

    After he used it to create the Internet, he traded it to Larry Wall in exchange for a blowjob and a bag of crack.

  61. Ever heard of comments? by cliveholloway · · Score: 5, Interesting
    They're great. They help you to remember and comprehend code you wrote a while back. If you start a line with a "#" you can follow it with a comment.

    If you're looking at code *you wrote* for over an hour without understanding it, you only have yourself to blame. Unless you're coding in brainfuck, I suppose.

    tch

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    1. Re:Ever heard of comments? by x3ro · · Score: 2, Insightful

      Comments are like crutches, or a band-aid. Healthy, readable code with sensible naming conventions and a clear structure doesn't need 'em.

      --
      [ UNSIGNED NOT NULL ]
    2. Re:Ever heard of comments? by Anonymous Coward · · Score: 0

      Uhh, if you need a comment to repeat what the code should already express clearly, you've got a big problem..

      Ever seen code like this?

      # dispatch the request
      tmp = r.fixup()
      r.target = target
      r.dispatch(r.target, tmp)

      It should be immediately refactored into:

      request.dispatch()

      The rule of thumb is to CODE CLEARLY so that comments aren't needed. Which is possible, even in Perl, but it doesn't encourage it.

    3. Re:Ever heard of comments? by Flashbck · · Score: 3, Insightful

      I agree that comments are like crutches, as I personally hate having to break my thought process to write a comment.

      On the other hand, even the most readable code takes time to look at and decypher. It is far easier to read that one line comment that you wrote last month and immediately recall what you were doing.

      Comments may be crutches, but I will always laugh at the idiot with the compound fracture in their femur who refuses to use a crutch to get around because he is too proud.

    4. Re:Ever heard of comments? by Bingo+Foo · · Score: 1

      if ( you.need( new comment().repeat( code.express(ALREADY, CLEARLY) ) ) ) { you.possess( new problem(BIG) )

      rule.thumb() = code(CLEARLY)

      --
      taken! (by Davidleeroth) Thanks Bingo Foo!
    5. Re:Ever heard of comments? by curunir · · Score: 4, Insightful

      I'd say Comments are more like Grandpa...

      He can tell you some really interesting stories about times you can't remember, but he slows you down immensely so he usually gets left at the old folks home while you try to get where ever you're trying to go.

      --
      "Don't blame me, I voted for Kodos!"
    6. Re:Ever heard of comments? by Anonymous Coward · · Score: 0

      Genius! not sarcasm, true admiration! I enjoyed that thoroughly.

    7. Re:Ever heard of comments? by ianezz · · Score: 1
      It is far easier to read that one line comment that you wrote last month and immediately recall what you were doing.

      Ok, but the real problem is not what, it is why.

    8. Re:Ever heard of comments? by aiyo · · Score: 2, Interesting

      I dont write comments when writing code. I usually come back the next day and add comments. This way I remember what the code does, but also have given my self time to get out of the train of thought I had. Looking back I can more easily see if I have used bad programming style. Sometimes you just want to write the piece of shit and move on to something more interesting.

    9. Re:Ever heard of comments? by Mr_Silver · · Score: 2
      Comments are like crutches, or a band-aid. Healthy, readable code with sensible naming conventions and a clear structure doesn't need 'em.

      Actually comments are like sex. Even if they are bad, they're better than nothing.

      --
      Avantslash - View Slashdot cleanly on your mobile phone.
    10. Re:Ever heard of comments? by orasio · · Score: 1

      There's at least one dialect in which you don't have to stop your thought process.
      Humane Python, a (former?) part of THE (The Humane Environment), by Jef Raskin (Macintosh anyone?) has some changes that help you write more comments.

      The idea is that you write what you want to do, in clear text, and you insert the snippets of code indented directly in the documentation.
      Looks like:

      ----------
      Blah blah blah
      I need do some stuff with the thingy if the guy pressed the A key
      if (guy.pressedKey("A")){
      thingy.doSomeStuff();
      }
      If the guy pressed some other key, some other stuff should happen.
      if .....
      -------------

      The idea is that you think in your own language, and write some snippets, but your mind is in the comments, as it is easier to write comments than code. Given that yo write everything you think, your documentation will rock, and reading the code or finding bugs, would be really easy. It would take longer, but could make better code.

    11. Re:Ever heard of comments? by Flashbck · · Score: 1

      Granted that this replay is a few days late, but I often add a little about what I was thinking when I write the comment.
      //4AM thinking about random idea solves idea like this

  62. Uh oh... by Anonymous Coward · · Score: 0

    I hope you meant

    ($perl[6] eq "Great") || die;

    because == compares its operands as numbers, with "Great" evaluating to 0.

    aQazaQa

  63. Is this still Perl? by isomeme · · Score: 2, Insightful

    Larry Wall is a god, his core Perl dev team are demigods, and I'm very excited by all the goodies in Perl 6. But I have to wonder...if 6 is going to break so much existing code that it needs a hack to be backward compatible, why not just release a new language? What's the point of holding onto the name Perl but not the reality of running existing Perl code?

    --
    When all you have is a hammer, everything looks like a skull.
  64. Perl: A write only program language by xtronics · · Score: 5, Funny

    It is better to startover than to try and modify a perl script.

    1. Re:Perl: A write only program language by consumer · · Score: 1
      It is better to start over than to try and modify a perl script.

      Sounds like a personal problem of yours. Perl has nothing to do with it.

  65. Should be formatted thusly by Anonymous Coward · · Score: 3, Insightful

    Ninety nine percent
    of the Perl Haikus will not
    Apply anymore

  66. Python Resources. by Anonymous Coward · · Score: 3, Informative
    This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
    • Python - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
    • Win32All - Windows extensions package that includes the excellent Pythonwin editor.
    • wxPython - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
    • Boa Constructor - GUI builder that uses the wxWindows library.
    • Psyco - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
    • Py2Exe - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
    • PyOpenGL - Use OpenGL from within Python
    • Python Image Library (PIL) - Package for easy image loading and manipulation
    • Plone - Web applications, built on top of the Zope framework.

    Abandon Perl! Python is the future!
    1. Re:Python Resources. by dmiller · · Score: 1

      You forgot PyGame - a wonderful game programming API based around SDL.

    2. Re:Python Resources. by k_head · · Score: 1

      How come python does not have something like CPAN. I was looking for a way to map windows drives in python and I could not find anything by googling. I went to CPAN and had it working in 15 minutes. I am trying to learn python but I really regret not having a central searchable repository of code that can be automatically downloaded and installed. For that matter why is it no other language has something like CPAN. It seems so obviously useful. While I am whining.... How come there is no standard database abstraction layer. DBI is so awsome. I really want to have cached recordsets!.

      --
      The best way to support the US war effort is to continue buying American products.
  67. you're only noticing this in perl6? by jbellis · · Score: 1

    Larry Wall never met a feature he didn't like. Ever. It just got to the point where he had to revamp his language's syntax to fit them all in. :P

  68. Perl6 is a mistake by Anonymous Coward · · Score: 0, Troll
    I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.

    One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).

    The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.

    Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.

    On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?

    I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goat.cx. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.

    Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.

  69. Name suggestion by vga_init · · Score: 1
    Well, seeing as regular old perl is a bit populated for some poor folks, I say that the language gets forked; the sophisticated-but-harder-to-understand-and-code-in variant will continue to go on living as perl, and a more lightweight and simplistic cousin can be born. What shall we call it?

    merl

    That's right. merl. You see, 'n' is the first consonant that preceeds 'p', but "nerl" sounds stupid, so we move on to the next reasonable choice (nobody likes the letter 'n' anyway). "merl" sounds more like the name of a cute girl, and since merl would be easier to understand, more forgiving, and less demanding, she would become quite popular among young bachelors churning out code late into the night.

  70. OT, Jackdaw Rookery? by Anonymous Coward · · Score: 0

    Ever read 'King Solomon's Ring' by Konrad Z. Lorenz? Most hilarious description of a jackdaw rookery ever. Konrad had a rookery of young jackdaws he wanted to tag for monitoring. Jackdaws teach each other to hate and despise anything ever seen holding a jackdaw sized black flapping thing. He dons an old devil costume so they won't know it's him. Climbs up on his roof and starts grabbing and tagging. Looks down to see a crowd of townsfolk staring up at a devil on his roof surrounded by a flock of angry black birds. Not as funny when I tell it, so go read the book, it's hilarious.

  71. Design is What Matters by severoon · · Score: 2

    My opinion is that anything that makes programs to design is a Good Thing. One problem I've always had with Perl is that when you sit down to do something significant, you run into all kinds of options. An embarrassment of options, really. Options that allow you to do the same thing several different ways, so there's no reason to choose one way over another.

    This is what makes Perl so great for little knock-off scripts, but it can never be a serious contender for serious jobs because no two people have a reason to agree on how to accomplish any given complex task. Code readability is out the window. Transfer of knowledge goes down as TCO and maintainability goes up. The object of Perl's game was to provide an extremely terse way to do little things...but let's keep in mind that terseness only works to deal with the little problems.

    Having said that, if the new release can maintain Perl's legacy and give us a way to encapsulate terse solutions to small problems, but in a structured, regularized way, then we might just get the thing we need. Done correctly, any big problem can be sensibly solved in the new Perl by breaking it down into a bunch of little problems. Each little problem solved tersely, understandable on its own, connected together with a somewhat less-terse but sensibly high-level structure...sounds like most OO solutions to me and a good thing for Perl.

    sev

    --
    but have you considered the following argument: shut up.
  72. Re:Perl... by Anonymous Coward · · Score: 0

    Well, the only valid point on your list is the large selection of Perl libraries. But that's like saying Windows is better because thousands of programs are available.. depends on your definition of "better" I guess.

    For instance, docs and unit testing are pretty much the same in Perl, Ruby, Python, PHP, Java... I mean ruby has unit testing, and Perl has Test::Unit which works (though not as elegant due to Perl being strongly typed!). I'm not sure what you mean about "wrappers"?? Perl doesn't even ship with xUnit-style testing libraries.

    One great think about Ruby community though, is that it's still small and friendly. The Perl and Python communities are full of people trying to show off.. it gets old after a while.

  73. Re:python & ruby are fine,but they lack {}'s a by Anonymous Coward · · Score: 0

    Indentation is not a reason to hate the language. For example, commercial software companies have style guides that all their code *must* stick to.

    There's no difference here, the goals are the same. Any mechanism that can help to improve readability of code is good. It means that programmers write using a decent layout from day 1 of using the language. If your code ends up in indentation hell, perhaps maybe you should have used some functions and you should restructure your code?

    There are also Python editors that include whitespace and indentation markers (IDLE and Pythonwin) - try one of them if you're having problems with indentation readability.

  74. Why code perl when you can code ruby instead? by Anonymous Coward · · Score: 0

    absolutely no competition. perl is fugly, even perl 6 :)

    1. Re:Why code perl when you can code ruby instead? by trouser · · Score: 0, Flamebait

      Too right, except that you I'm sure you meant Python.

      --
      Now wash your hands.
  75. Re:Quite possibly very naive question from a non-p by WWWWolf · · Score: 1

    Hmm... dynamic language support.

    I wonder if we ever see a Haskell and Lisp compilers that target Parrot - I hope we do. I've found a native-code Haskell compiler but I might prefer Lisp - I just haven't found an open-source native-code Lisp compiler. Parrot might be a small stand-alone app, suitable as a small runtime environment.

    Well, since everything seems to be scalar and list and everyone uses map and grep, Perl is a functional language in a very good disguise =)

  76. along the same 'lines' by BorgCopyeditor · · Score: 0

    Bill Cosby: "I don't understand why people would choose to do cocaine in the first place. So I asked someone, and he said, 'because it enhances your personality.' And I said, 'OK, but what if you're an asshole?'"

    --
    Shop as usual. And avoid panic buying.
  77. Quote-mania by OblongPlatypus · · Score: 3, Funny

    CmdrTaco wrote: "PurdueGraphicsMan writes "There's an article over at Yahoo! about the upcoming version of Perl (version 6) and some of the new features (RFC list). From the article: "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages, "no one pretends for a moment that they're anything but hideously ugly," said Damian Conway, a core Perl developer and associate professor at Monash University in Australia."""

    Four levels of quotes; fun...

    --
    -- If no truths are spoken then no lies can hide --
  78. perl necklace by sewagemaster · · Score: 0, Offtopic

    my girlfriend told me the other day while we were in bed... "come on baby, give me a perl necklace... a facial... a makeover!"

    ...and i did just that

  79. like operator precedence by BorgCopyeditor · · Score: 1
    Perl 6 is *insane* .. the kind of thing that is either the work of a genius or a madman

    So, you're saying that Perl 6 is either the work of a genius or it's a madman? Scary thought.

    --
    Shop as usual. And avoid panic buying.
  80. Re:Quite possibly very naive question from a non-p by fatcat1111 · · Score: 1

    Is Parrot something akin to the JVM / .NET runtime engine? If so is the plan for it to be as robust as the JVM / .NET runtime: i.e. could the same type of applications that people are building for Java / .NET be just as easily built with Parrot?

    On a related note, you can already write Perl that targets the .NET runtime: Visual Perl, from ActiveState.

    --
    How Politicians Lie: http://www.factcheck.org/
  81. Re:python & ruby are fine,but they lack {}'s a by Anonymous Coward · · Score: 0

    semi-OT:

    do you know how to make vim bounce between the beginning and end of a block in Python?

    I miss being able to sit on a "{" and bounce to the "}" by hitting the percent key when I edit Python.

  82. Re:Quite possibly very naive question from a non-p by J-Worthington · · Score: 1

    It's quite possible we'd see compilers for these languages in the future, yes. You just need someone crazy enough to implement it. :-)

    As for functional language style stuff, Perl6 is going further than way, at least in some aspects it is. I've heard curried functions and lazy lists are to be expected. Perl has never had any problems taking the best bits from various paradigms.

  83. perl is a swiss-army-knife by sir_cello · · Score: 2, Insightful


    What more to say ? Any real engineer has a "toolkit" of languages they use to put things together: I find "shell" to be glue, and "perl" to be rapid production of do-anything using CPAN modules. That's perl's niche.

  84. Performance by sbszine · · Score: 2, Interesting

    As for performance, well, in my experience the slick, hackerish ways of doing things often slow things down more than the explicit-using-more-lines way of doing things.

    Amen. I think this is because the interpreter / VM is usually optimised for the most obvious way of doing things. If you try and improve the performance of your code with tricks and shortcuts, you're basically trying to outsmart the Larry and the other internals hackers.

    --

    Vino, gyno, and techno -Bruce Sterling

  85. Re:python & ruby are fine,but they lack {}'s a by raytracer · · Score: 2, Interesting

    Here's an idea: get over it. It isn't that big of deal, and either choice is vastly more readable than perl.

    Let the flames begin!

  86. right...but by cliveholloway · · Score: 4, Insightful

    I'm not sure how "Healthy, readable code with sensible naming conventions and a clear structure" explains to you at a later date why you coded as you did. If you had to write something that looks out of place to deal with some legacy code you inherited, I'm sure you'd psychically pick that up just by glancing at the code. Or perhaps you go round naming vars something like $quirky_flag_to_pick_up_strange_situation_caused_b y_bad_code_in_package_X?

    And what if someone less experienced than yourself has to maintain your code at a later date? Something that may seem obvious to you may be off of their radar.

    If you never have to ask why and no one less intelligent than you ever looks at your code you either are very very lucky, very stupid or unemployed.

    .02

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    1. Re:right...but by x3ro · · Score: 0

      I think your example is quite telling. If, for instance, you need quirky flags that work around a problem casued by bad code in package X, then package X sucks, so don't use it, or if it's your code, rewrite it. Workarounds should never stay in code.

      Of course I'm being a little idealistic. In reality crap code is used a lot because of deadline pressure. But that doesn't make it OK.

      And, at the end of the day, it's nice to have comments, yes. But your code should not be indecipherable without them. You seem to suggest that I'm not thinking of the maintainer of my code, but actually, I think the maintainer is best served if the code is as self-documenting as possible. Then any comments are a bonus -- not a lifeline to save the poor guy/gal from a morass of spaghetti...

      --
      [ UNSIGNED NOT NULL ]
    2. Re:right...but by cliveholloway · · Score: 2, Informative

      The example i gave was off the top of my head. In the real world, for example, we've been dealing with a JavaScript HTML editor that has its own quirks (to say the least :). We do not have the time to learn enough OO javascript to perfect the code we're using. So we've had to hack how it works. Before presenting a page for edit, we have to remove certain elements and then re-insert them after edit. Without comments, we'd be returning to this code at a later date wondering *why* we're hacking it like this. Comments make it absolutely clear.

      In reality crap code is used a lot because of deadline pressure. But that doesn't make it OK.

      You're missing the point. If I can see what a coder *thought* they were doing, I can find their weaknesses easier and help them improve - rather than trying to second guess based purely on the code. I can spot inaccurate assumptions, illogical trains of thought and many other things that just don't jump out quickly from pure code.

      Even if I can read and understand what your code does, if an issue comes up that needs fixing quickly (say, a security issue affecting 60,000 web sites), I need to identify where the issue could be as quickly as possible. By reading comments along with the code, it's a lot easier to spot mistakes made by a developer.

      Here's another example. Let's say I'm chasing down a problem and I come to a regular expression that I think could be the issue. If the coder in question has commented it ( "Grab all URLs on the page that link to external sites", say) and I glance at the regular expression and see it doesn't do what the comment says it does, that sets alarm bells ringing. I can also gain an insight into what they were thinking when they coded the method.

      In an ideal world, everyone would cover every possible issue and everything would be watertight. But, in the real world, I'm often dealing with work by coders with different strengths and weaknesses. And it's a lot easier to coach them on their thinking if I have some idea as to what's going on in their head.

      I didn't mean to sound rude in my last post, but if you were working on my team, you would be expected to comment your code well. If you intend never to work with others and only maintain your own code, you could probably get away without commenting, but i wouldn't recommend it.

      A few months ago I spent 3 days working on what ended up being 20 lines of code that recursively built a menu for a Template Toolkit page from a DB table. Although from reading it, it makes sense, I commented *every* line of those 20, explaining why I did what I did and what issues I was coding to avoid - and what I hit along the way. Even now I find the notes useful. Or perhaps you think you'd remember how and why you created a hashref of arrayrefs of hashrefs of arrayrefs for the data structure - and how that fitted in with the particular template - instinctively?

      When taking on new team members (as we are at the moment :), I would be very wary of considering someone who doesn't comment.

      But that's just me. And what I've found works in building Perl apps over the last 7yrs :)

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    3. Re:right...but by x3ro · · Score: 0
      Although from reading it, it makes sense, I commented *every* line of those 20

      That pretty much sums up what I think the role of comments should be. I have no problem with comments as helpful extras together with clean code and self-documenting names for variables, objects, classes, methods, packages etc. If I sounded like I don't comment, or I don't like comments, I wasn't explaining myself too clearly :) I do actually work as a team (only of about five), not all of whom are permanent (ie we have people coming in on contract sometimes, who have to get up to speed quickly). And I do comment, and document my code.

      What I do have a problem with is where comments are used as a band-aid rather than fixing a structural problem. I am trying to think of an example and if I can find one, I'll post it.

      BTW: your JavaScript HTML editor ... is it cross-browser? We had to write an IE-only one here; so I know what you mean about fighting with ugly problematic technologies ... IE (and 'MSHTML' - shudder) isn't very pretty on the inside ;) And about OO JavaScript ... it's pretty horrific to work with. Instead of separate concepts like 'class', 'object', 'constructor', 'static function', JavaScript makes do with 'function' .. ewww! I really don't want to go there again .. :)

      --
      [ UNSIGNED NOT NULL ]
    4. Re:right...but by x3ro · · Score: 0

      I just re-read my original comment. I was being a bit OTT :) But I've paid. My karma is now officially bad :(

      --
      [ UNSIGNED NOT NULL ]
  87. Re:Channelling Tom Christiansen by Anonymous Coward · · Score: 0

    No, silly. I know more perl than that. I do things like this:

    print STDOUT ("Foo" . "\n");

  88. Re:Quite possibly very naive question from a non-p by Anonymous Coward · · Score: 0
    Link update:

    Visual Perl requires the Perl Dev Kit to create .NET or ActiveX components.

  89. Re:Perl... by vt0asta · · Score: 2, Informative

    Well, the only valid point on your list is the large selection of Perl libraries. But that's like saying Windows is better because thousands of programs are available..

    Not quite analagous, because that also means your definition of "better" for Ruby is like saying MacOS is better because there are fewer programs available.

    For instance, docs and unit testing are pretty much the same in Perl, Ruby, Python, PHP, Java...

    I must have screwed up my terminology. The unit testing I am referring to, is the built in stuff that comes with the Perl build process, the module build process, etc. Perl is second to none in testing. I would agree Perl, TCL, and Java docs are similiar in completeness. When I say complete, I mean documentation on how to embed and extend is available, is thorough, and all the intricacies are spelled out. Ruby, Python, and PHP are lacking. For example, at my command line I can type: perldoc perlxs, perldoc perlapi, perldoc perlembed, perldoc perlguts, and I have 10x more information about the innards and what is going on than the other languages.

    The Perl and Python communities are full of people trying to show off.. it gets old after a while.

    Not sure what you mean by show off. Ruby coders seem to be just as desperate as Python coders to demonstrate how their language is almost as powerful as Perl. When Ruby clutches the title of being the swiss army chainsaw in the industry, I think Ruby too, will have a reason to "show off".

    One great think about Ruby community though, is that it's still small and friendly.

    One awful thing about the Ruby community is that they pipe up about how they are almost as good as Perl whenever Perl is mentioned.. it's offtopic, untrue, and gets old after a while.

    --
    No.
  90. rifles, guns and raw recruits by random_static · · Score: 1

    i thought the usual punishment for confusing rifles and guns was to get the privilege of cleaning out every gun on base with a cleaning kit made for rifles...

  91. We enact the difference by Anonymous Coward · · Score: 0

    a ,Twas we, the k5 O - Your mistake
    a O ascii enactment <|> however is understandable.
    a /|\ players, not our | We credit egg troll
    a | predecessor. /| with the funny.
    a /|

  92. Attention: by Anonymous Coward · · Score: 1, Funny

    a <O I AM NOT
    a ( \ DEAD.
    a X I was just resting.
    a 8===D

  93. Don't forget to sed!!! by Anonymous Coward · · Score: 0
    echo "gcc-3.3.3.tar.bz2" | sed -e '^.*gcc\-\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\-\( [0-9]\+\).*$@gcc's status: major version = \1 ; minor version = \2 ; little-bit-more-performance version = \3 ; maintainance-bugfixes version = \4@'

    open4free

  94. Debian by OverlordQ · · Score: 4, Funny

    *whew* Since I'm running Debian Stable I wont have to worry about learning Perl 6, till Perl 7 is ready to hit the shelves.

    --
    Your hair look like poop, Bob! - Wanker.
  95. Obligatory editor holy-war post by kko · · Score: 1

    Hey, I took the time to learn vi and it's still ugly... Emacs, OTOH...

    --
    No, seriously, I just come here for the articles.
    1. Re:Obligatory editor holy-war post by Anonymous Coward · · Score: 0

      (obligatory response) you need to use vim, not crappy-ass default install vi!

      plain vi sucks. hard. i can't understand how anyone can defend single-level undo, crappy auto indent, etc etc etc. it's junk. how can people program in plain vi? edit config files, sure, but program? damn! masochism.

      ":set nocompatible" long live vim! i love vim! vim forever! vim forever! huzza vim!!!

      VIM MUTHAFUCKAZZZ!!! VIM!!!

  96. perl pickup line by Anonymous Coward · · Score: 0

    $barfly == Open($forme) || Die;

  97. OO Perl? by nounderscores · · Score: 2, Interesting

    I didn't even know it existed. What books/resources should I read if I'm going to stick with perl 5?

    1. Re:OO Perl? by Daerr · · Score: 2, Informative
    2. Re:OO Perl? by fanatic · · Score: 2, Informative
      Damian Conway has a book on Object Orienteed perl.

      The "Programming Perl" book voers it, as does (briefly) the "Perl Cookbook", which is a must-have.

      Most CPAN modules have an OO interface, so it's worth understanding at least a little of it.

      or were you just kidding and/or trolling?

      --
      "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
  98. Perl Expressions Hideously Ugly? by Not+The+Real+Me · · Score: 1

    "Although Perl 5's expressions are the most sophisticated available..."no one pretends for a moment that they're anything but hideously ugly,""

    Nothing new here...

  99. Name change by EduardoFonseca · · Score: 0, Flamebait

    s/perl/python/ig;

  100. Ponie progress by Anonymous Coward · · Score: 0

    There has been no progress in the Ponie project for at least 6 months. Its development is essentially done in a closed environment without external participation. Ponie, Parrot, Topaz - same shit, different day.

  101. Parrot's dead, Jim by Anonymous Coward · · Score: 0

    Parrot will run Parrot code faster than any Parrot VM.

    Wait - I have a new opcode you can throw in:

    BULLSHIT Sx

    example usage:

    loop:
    BULLSHIT "Parrot will be finished in our lifetime."
    BULLSHIT "Parrot will run Java bytecode."
    BULLSHIT "Parrot will be faster than Python."
    BULLSHIT "Parrot will be faster than .Net"
    BRA loop

  102. or you could just use the x modifier by cliveholloway · · Score: 4, Informative
    s/\s+ # at least one space<br>
    \( # open parenthesis<br>
    .*? # as few characters as possible<br>
    \) # close parenthesis<br>
    //gx; # perform on every line and allow comments in regex

    lameness filter won't let me space the comments neatly, but I'm sure you get the idea.

    .02

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
  103. Re:Perl... by Anonymous Coward · · Score: 0

    You Missed IPSO... Nokia Operating system

  104. GNFOS link - WTFII ? by Anonymous Coward · · Score: 0

    Where the fuck is that link to Gay Niggers From Outer Space on Bit Torrent ?

  105. Threads! by yem · · Score: 2, Informative

    Thank god threading is at the top of the list.

    I've been a perl programmer for six years - I still use it daily - but perl5's support for threading absolutely blows. There are plenty of modules for whipping together a multithreaded TCP server, but no reliable way to share a resource such as a database connection pool between those child threads. Have had to put at least one project on indefinite hold due to this failure.

    I assume its that oldskool anti-threading anti-OO attitude. Perl5 still isn't compiled with threading support by default and it breaks a tonne of modules and apps when it is.

    Perl6 can't get here soon enough.

    --
    No, I did not read the f***ing article!
  106. ASCII? Please! by Anonymous Coward · · Score: 0

    "There's been an explosion at the ASCII factory!!!!"

    ASCII Factory?! ASCII is so 20th century! Haven't you heard about the new Unicode operators like @aX+<<Y@b (where X and Y are French quotes (those little >> and <<) which Slashdot can't handle)? I kid you not.

  107. Tough question.... by Anonymous Coward · · Score: 0

    "no one pretends for a moment that they're anything but hideously ugly," Does he mean the lines of code or the programmers themselves?

    Hmmmm... I'm sure he couldn't have possibly meant the new sort syntax he just sent few hours ago to perl6-language mailing list:

    [...] I give up... I can't manage to post an example, because of the stupid lameness filter...

    Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. [it should be turned off in Perl rlated articles] Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Important Stuff: Please try to keep posts on topic. Try to reply to other people's comments instead of starting new threads. Read other people's messages before posting your own to avoid simply duplicating what has already been said. Use a clear subject that describes what your message is about. Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page) Problems regarding accounts or comment posting should be sent to CowboyNeal Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Important Stuff: Please try to keep posts on topic. Try to reply to other people's comments instead of starting new threads. Read other people's messages before posting your own to avoid simply duplicating what has already been said. Use a clear subject that describes what your message is about. Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page) Problems regarding accounts or comment posting should be sent to CowboyNeal Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Important Stuff: Please try to keep posts on topic. Try to reply to other people's comments instead of starting new threads. Read other people's messages before posting your own to avoid simply duplicating what has already been said. Use a clear subject that describes what your message is about. Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page) Problems regarding accounts or comment posting should be sent to CowboyNeal Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Important Stuff: Please try to keep posts on topic. Try to reply to other people's comments instead of starting new threads. Read other people's messages before posting your own to avoid simply duplicating what has already been said. Use a clear subject that describes what your message is about. Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page) Problems regarding accounts or comment posting should be sent to CowboyNeal Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters. Lameness fi

  108. Beauty is in the eye of the beholder... by winkydink · · Score: 2, Insightful

    If it gets the job done efficiently, I couldn't care less how "ugly" the code looks.

    IMHO, Perl 6 is merely an employment continuation program for perl authors and training consultants. 5.8 doees more than everything I need and other languages fill in where perl is lacking (thr right tool for the right job and all).

    --

    "I'd rather be a lightning rod than a seismometer." -Ken Kesey

  109. Portability + Amazing modules (Time savers) by elec29a · · Score: 1
    Even in the win2k leaked source are at least 17 perl scripts...
    I admire the great Portability and if you are looking at www.passport.net there is even a commercial link 2 activestate.com .

    I had made many TK-perl appz (on win XP) compiled with Visual Studio 7, and everything is running fine on *unix and mac.
    (I had less pain in tk-perl then using html+dhtml to be compatible with the above 3 OS.)

    The module section on cpan.org is amazing.. and as a sample php has only made a bad clone with pear.

    Hey and most of it is FREE. - (So stop it blaming on module incompatiblitys)

    Some additional links:

    Komodo activestate.com is in my opinion one of the best editors and debuggers in this world. (Beside the new web package manager is a little bit buggy, but everything else works fine... And be sure to take a look at the great regex evaluator.)

    And of course dont miss Larry Wall "O'Reilly Perl Programming" or Programming Ansi C by Brian W.Kernighan and Dennis M.Ritchie

    Eighter i think you couldn't be a good unix admin without the knowledge and the module section of pe(A)rl.

  110. Did mono team design a new VM ? COPYCATS by Anonymous Coward · · Score: 0

    Of course, design is THE most important part of a good system. Dan is doing a good job .... especially with more than 1000 instructions to the system compared the piddling .NET's instruction set.

    And parrot is portable unlike Novell Mono (which JITs only on x86).

  111. python on the desktop, perl at the server by goon · · Score: 1
    server side

    There's one thing that I dont see on the list (Mod python). But I think that even with MP's inclusion, Python lacks the depth and quality of CPAN for web server integration. There is no simply no comparable resouce for usable tested code in Python like Perls CPAN.

    client side

    Python integrates into gui's better. This something (currently) where perl sucks really (being embedded). Python also runs on windows extremely well. This is somthing Perl via Activestate tries but has yet to pull off. For some everything requires a hammer. For me it's python on the desktop, perl at the server.

    --
    peterrenshaw ~ Another Scrappy Startup
  112. Why a VM? Why not just a straight compiler? by Viol8 · · Score: 1

    If they're really serious about Perl becoming an all purpose mainstream language and not just a mickey mouse lashup for doing scripting why
    don't they just release a proper compiler instead of messing around with technology-of-the-month virtual machines? Yes VMs have their uses but compiled code
    generally beats VMs (even JIT VMs) so why not have that as an option?

  113. Re:Perl... by Hawkins · · Score: 1
    One awful thing about the Ruby community is that they pipe up about how they are almost as good as Perl whenever Perl is mentioned.. it's offtopic, untrue, and gets old after a while.

    That's a really good point. Speaking as a Rubiac, I apologize. The decision to use Ruby seems so obvious to us - it'll make you more popular in school, re-grow hair, give you an Atlas body in just days, etc. . . - that we assume if someone isn't using it, well, they must never have heard of it! At this point, though, and certainly on Slashdot, we've done enough preaching that it's probably safe to assume any given person has heard about it, and made their own decisions already. Shutting up about it now, sir.

  114. Re:Quite possibly very naive question from a non-p by dpb · · Score: 1

    > I have heard things along the lines of JVM and
    > .NET bytecode to Parrot bytecode convertors, but
    > I'm not sure how much speculation that is. I'm not
    > really certain how easy it'd be, though my initial
    > guess is "not very".

    Actually, a JVM -> Parrot converter was already done (well proof of concept) about 2+1/2 years ago now:

    http://www.nntp.perl.org/group/perl.perl6.intern al s/3867

  115. perl ugly? by oohp · · Score: 1

    Huh? Hideously ugly? WTF? I find Perl to be the most beautiful language around. I bet you can't write so cool poems in other languages. Perl was designed to look like natural language. In fact I really like languages that look somewhat like perl (PHP for instance look like a mix of perl and C).

  116. Still uglier than *this* notation by j.leidner · · Score: 2, Interesting
    The new Perl regex notation might be slightly less horrible than the old one, but I think regular expressions are to be rejected altogether, as they make software un-maintainable.

    They should be replaced by something better, such as Xerox' Extended Regular Relation Calculus: Here are some examples.

    The nice thing about it is that it's fully declarative and bi-directional, i.e. a:b can be applied substituting a by b or vice versa (if run backwards), whereas the traditional

    if (/pattern/) { action; }
    pattern-action paradigm that Perl has inherited from awk is only partially declarative (only the pattern).

    Another interesting property is that xfst, one of Xerox' compilers, allows naming and re-use of subexpressions:

    define countryCode "++" [0-9]+ ;
    define areaCode "(" [0-9]+ ")" ;
    define endNumber [0-9]+ ("-" [0-9]+)
    define phoneNumber countryCode areaCode endNumber
    (all without any ugly '$'s :-)
    Abstraction by naming is a powerful feature, as Abelson and Sussman (SICP) and other good elementary textbooks point out.

    Maybe anybody wants to volunteed to build something like this into Perl6 instead?

  117. alt.sources by Per+Abrahamsen · · Score: 1

    alt.sources is (kind of) part of Usenet, which were initially build upon UUCP, and entirely unrelated to the Internet.

  118. Whatever happened to Rebol? by durathor · · Score: 1

    ...wasn't it going to save the net or something ;)

  119. Not equivalent by nniillss · · Score: 1
    Just a clarification: in contrast to the original example, your suggestions also remove the white space. A truly equivalent shorter variant of the original example is: s/(\s+)\(.*?\)/$1/g

    A more concise variant is: s/(\s+)\([^)]*\)/$1/g

    A possibly unintended consequence of all examples (that is best exposed in the last one) is that they do not preserve balancing of parenthesis. To remove only pairs of parenthesis that do not contain other parentheses, use: s/(\s+)\([^()]*\)/$1/g which may be nested.

  120. NOT most sophisticated expressions!!! by Anonymous Coward · · Score: 0

    > Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages

    Hey, you young ones sometimes forget the power of ancient programming languages. Check out APL some time ;)

  121. Re:Quite possibly very naive question from a non-p by Anonymous Coward · · Score: 0

    If you're looking for an open source native code lisp compiler, google for SBCL, CMUCL, or OpenMCL. There's also ECLS and GCL that compile via C. The only modern common lisp system that doesn't include a native compiler of any kind is clisp... For a lisp-head, this whole slashdot discussion is deja vu all over again, with all these people discovering for the first time the idea of a dynamic language with an integrated compiler. Good luck for them...

  122. Object orientation by Theatetus · · Score: 1

    Object-orientation is primarily a design philosophy and only secondarily a language feature. If you want to write object oriented code, make your data structures contain the algorithms that process them -- this is very easy to do in Perl since Perl has first-class functions.

    You don't have to call something an "instantiation of a class" to use it as an object: simply have it contain its own message handling methods and pass it messages.

    --
    All's true that is mistrusted
  123. Maybe they should have wrote Perl to be scalable.. by Anonymous Coward · · Score: 0

    The first fucking time around!

    Larry Wall please put the crack pipe down and create a syntax and structure easy to maintain. Jerking around with Parrots and Ponies is a joke. This is exactly what we need more CRAP to go into the clusterfuck called CPAN...

    Anyone ever try to use perl cpan -e through a restrictive firewall.

    Better yet has anyone trying to get a open source package using Perl to ever compile without access to CPAN?!?!? Fuck PERL in it's fucked ass!

  124. thanks by nounderscores · · Score: 1

    I seriously had no idea that perl could do OO. thanks.

  125. htmlarea by cliveholloway · · Score: 1

    http://www.interactivetools.com/iforum/P15734/

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism