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.""

61 of 408 comments (clear)

  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 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.

  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 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.

    2. 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...
    3. 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.

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

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

  4. 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
  5. 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.

  6. 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 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

    3. 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.

    4. 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.).

  7. 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
  8. 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 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.

    3. 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.

    4. 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.

    5. 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
    6. 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.

  9. 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.

  10. 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 McCow · · Score: 5, Funny

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

  11. 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 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
  12. 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
  13. 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.
  14. 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?
  15. 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.

  16. A picture worth 1000 words by Nugget · · Score: 5, Funny
  17. 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.

  18. 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.
  19. 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.

  20. 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.

  21. 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.

  22. 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 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.

  23. 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...
  24. 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.

  25. "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.
  26. 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.

  27. 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.

  28. 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.

  29. 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.

  30. 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!
  31. 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.
  32. 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
  33. 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.

  34. 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.

  35. 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 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!"
  36. Perl: A write only program language by xtronics · · Score: 5, Funny

    It is better to startover than to try and modify a perl script.

  37. 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
  38. 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.
  39. 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