Slashdot Mirror


Larry Wall Announces Perl 6

Chris Nandor wrote in to tell us that Larry Wall has announced his vision for perl 6 as part of this keynote at the O'Reilly Open Source Convention. You can read an announcement at Perl.org or read Chris's summary of things (like information about the from-scratch rewrite being planned!)

The following was written by Chris "Pudge" Nandor... Perl Guru, Slashcode Guru, and all around swell guy.

Perl 6 To Be Complete Rewrite (But Not What You Think)

Larry Wall and other active Perl porters and Perl helpers met on Tuesday afternoon at Perl Conference 4.0 and mapped out a what is planned to become a complete rewrite of Perl that will become Perl 6 in 18 to 24 months, with a prerelease targeted for next year's conference.

Perl 5 will not be abandoned, but will primarily be concerned with bugfixes both major and minor.

The meeting for members of the perl5-porters mailing list was the result of an earlier, smaller meeting of Wall, Nathan Torkington, Chip Salzenberg, and others who basically decided that Perl needed to be fixed in certain ways, and that a rewrite was the best way to do it. Salzenberg started the Topaz project two years ago, to reimplement Perl in C++. Though Topaz itself will not be the basis for Perl 6, Salzenberg noted that the lessons learned in the experience will be very helpful to the new effort.

Torkington led the three-hour meeting, starting off by saying what was wrong with Perl. Much of the focus on the problems with Perl centered around how increasingly difficult it was to improve, extend, and embed Perl. A rewrite and redesign are needed, he said, and maybe it is time for a hard change. So while the focus of the effort seems to be on improving the Perl guts and API, the project will also be used as an opportunity to clean out some of the cruft, including bad and seldom-used features.

Some of the primary (and still vague) goals of the effort will be to reimplement the core so it is better, stronger, and faster; improve syntax; add new features where appropriate; have better version and installation management for perl and its modules; and have a clear and automated migration path, which may include a backward compatibility mode. Some old features may be removed, like typeglobs. Others will be improved.

The group hopes to re-shape Perl community, too. Instead of one all-encompassing perl5-porters list, tightly focused mailing lists with a terminal lifespan will be formed. To start off, the mailing list bootstrap at perl.org will be for discussion of the beginnings of the project. Like most, if not all, other new lists, when it has fulfilled its purpose, it will be closed.

Wall said, "Perl 5 was my rewrite of perl ... I think this should be the community's rewrite of perl, and the community's rewrite of the community."

Specifics have not yet been ironed out. A group has been formed to begin the work, which will primarily consist of planning the work to be done. No coding is to be done at this stage, only planning and support. Roles were determined for the group, and then they were filled. They now include the perl 5 maintainer (Jarkko Hietaniemi and Nick Ing-Simmons), the language design pumpking (Larry Wall), the internals design pumpking (Dan Sugalski), the documentation manager (Adam Turoff), the system administrator (Ask Bjoern Hansen), the quality assurance bloke (Michael Schwern), the spokesdroid (brian d foy), the customer relations person (Dick Hardt), and the project manager himself, Nathan Torkington. Other porters, such as Chip Salzenberg, volunteered to consult when needed.

Some of the short term goals of this group are to draft a language specification, start an RFC channel, get feedback, and set up mailing lists, a documentation repository, and a web site. Hansen will be setting up the mailing lists. The bootstrap list will be open to the public, while the list for the intial small group of people will be closed for posting by anyone not on the list. All lists will be readable by the public, through the web, and perhaps through email. Turoff is going to be preparing the notes for the morning meeting, and foy will be posting the notes and the mailing list links on the www.perl.org web site.

228 comments

  1. Hot new feature in Perl 6 by sparks · · Score: 5
    Building on the success of previous versions of Perl, with its famous "line noise as syntax" philosophy, Perl 6 is to borrow heavily from a certain other scripting language and introduce syntactically significant whitespace.

    In keeping with the spirit of Perl, heavy use will be made of default variables in this new system. So for example, the commonly used "print" command will be replaced by:

    And the almost-as-common "if" will become:

    Instead of "foreach" it will be possible to use:

    And lastly, any reference to "$_" or "($_)" can be replaced by:

    So a typical Perl 6 program segment might look like this.

    #!/usr/bin/perl

    (@_){
    {
    ;
    }
    }

    Larry has expressed his gratitude to the Python developers for their initial work in this area.

    1. Re:Hot new feature in Perl 6 by The_Messenger · · Score: 2
      LOL... sure, it'll work. Just sort of throw some mental hints to the stuffed camel on your monitor while you bang on that space bar, and the interpreter will figure out what it needs to. :) That, and Perl 6 will introduce "impressionist" programming. Example: here is my impression of what a database call "feels" like.
      #@%(&) .. #)%*(-#%(#_(_
      )*(@$#::
      *&#$//\\D)(*# Come on baby, CONNECT ';][@_(#';';
      0834#)%(_(_)#9

      Hmmmm... funny, that looks just like Perl 5.

      :)

      ---------///----------

      --

      --
      I like to watch.

  2. Re:Perl makes regexps easier to understand by King+Babar · · Score: 2
    [Note: There may well be syntax errors in the above, as it took me forever just to get everything formatted right. (If you think Perl's bad, try translating Perl into guarded HTML!) I certainly can't run it all through the interpreter to check my translation. And I know there's at least one logic bug in the code.]

    I feel...a module coming on. Except that I'm certain that somebody else has already written a chunk of perl code to slashguard (new verb?) an arbitrary chunk of perl code. And then they probably used slashguard.pl to post the contents of slashguard.pl onto slashdot.

    So, anybody got that URL handy? :-)

    --

    Babar

  3. Re:Programming language design by Signail11 · · Score: 3

    C was based on B, which was designed almost entirely by a single person. K&R literally wrote the book on the pre-ANSI C language. C89 codified most of original C. C99 represents only minor changes to the specification of the language (restrict, long longs, and implicit casts to UDTs in actual parameters being the more important changes). C++ was designed by Stroustroup, but unfortunately the committee made some elephantine changes to the language. STL and namespaces is about the only good things, IMHO, that came out of standardization. The latest ISO C++ standard has certain flaws (limits on access of friends, among other things) that I think severely degrade the usefulness of the language.

  4. Sounds typically hacker factionist by Junks+Jerzey · · Score: 2

    The talk about rewriting Perl in C++ is misguided. C++ is not necessarily better for all projects than C. C++ helps with large systems, yes, but can also provide more portability problems and many more traps for programmers. "Rewrite system X in pet language Y" is the standard hacker move, though it may not have any point whatsoever.

    Just coming off of a large project written in C++, I'm not sure I would do it again. C++ used lightly (variable declarations in for statements), or used with full Object Oriented Design can be a boon, but is just so much rope for you to hang yourself if just look at C++ as a language with lots more features.

    This is irrelevant, of course, and I see myself starting a C vs. C++ battle, so I'll shut up. The bottom line is that rewriting an existing, working, and reliable program in another language--for no real reason--doesn't make sense.

  5. Re:Perl appears to me to be a "dirty" language. by Piers+Cawley · · Score: 1

    You've not played with mod_perl much have you?

  6. Re:What I want in Perl6 by johnnnyboy · · Score: 1

    I have to agree Perl's OO implementation is pretty bad but it does work though.
    Large projects are difficult to do with perl because of this.

    I think a redesign would be an excellent idea.
    Maybe bring the keyword class.

    --
    "If a show of teeth is not enough, bite ... but bite hard!"
  7. Re:This might finally cause me to learn Perl by jason_aw · · Score: 1

    > prototype ... in perl ... translates it into
    > VBscript asp's

    *vomit* :-)

    Seriously, /why/ would you want to do that? I mean, presumably it's some Dilbert-style management decision, but which MS marketing scam was it they fell for?

  8. Perl makes regexps easier to understand by DragonHawk · · Score: 2

    Your example of some Perl code:

    s#<(?!$okay_tags)([^>]*>)##gi;

    The problem isn't so much Perl as the syntax for regular expressions. They are designed to describe patterns of characters in as little space as possible. Perl actually helps things. For example:

    # Remove any HTML tag in the submitted code
    # that is not in the list of okay HTML tags.
    $submitted_code =~ s
    # search for ...
    {
    < # start of HTML tag
    (?!$okay_tags) # do NOT match $okay_tags
    [^>]* # any number of characters EXCEPT the HTML close
    > # end of HTML tag
    }
    # ... and replace with nothing
    {}
    # globally, ignore case, eXtended regexps
    gix;

    You can write bad code in any language. Perl is just about the only place you can write clear, well-commented regexps.

    [Note: There may well be syntax errors in the above, as it took me forever just to get everything formatted right. (If you think Perl's bad, try translating Perl into guarded HTML!) I certainly can't run it all through the interpreter to check my translation. And I know there's at least one logic bug in the code.]

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.
  9. Re:Perl appears to me to be a "dirty" language. by Camel+Pilot · · Score: 2

    O.K. a Perl anti-zealot

    Now if your concerns are aestetic and are bothered by the overuse of symbols I doubt there will be any change in Perl 6 that will convince you.

    For example the data type differentiators ($,%,@) are kinda central to the language. And like almost any unfamiliar language dialect, it looks odd at first glance. Symbols are symbols and all languages are built from symbols. Take an uninitiate and give them some C++ code, Perl code, Pascal Code and and maybe some Greek and ask them which is more intuitive and aestetic - to them it would all look like line noise.

    You could look at this way Python enforces indention style with mandatory whitespaces. Perl enforces variable nameing style with a built in variable naming convention ( $ -> scalar data, @ -> arrays, % -> hashes).

    BTW, your original complaint about Perl's loose typing is also true with Python. For alot of programming chores its a feature not a deficiency.

  10. Re:This might finally cause me to learn Perl by miracles · · Score: 1

    The problem here is the example is slightly more advanced (and obfuscated) than it needs to be.
    if he had written something like:

    $test="many words";
    $test=~s/many/few/gi;

    then you might figure out that we're looking at a method to substitute text.
    it's practically the same as what he wrote but just a bit easier on the eyes.

    people think perl is more confusing than c++ probably because when you become adept at programming in perl, you start using various shortcuts that make the code look like gibberish but function the same way. the problem is that for some odd reason a perl programmer will never show a beginner a decently formatted, light script but rather some horrible looking script using typeglobs and arrays of hashes of arrays.... must be some sort of pride issue.

  11. Re:Perl appears to me to be a "dirty" language. by speek · · Score: 2

    I suppose it's true that if I were a typical perl programmer (ie - stupid) I would find writing writing that Java code over and over again pretty tedious, and I would prefer the one-liner approach to everything.

    Fortunately, I'm not, so I don't write the same code over and over again. I write it once, and make use of it for years on end. It's called good program design - maybe you should try it.

    --
    First, make it work, then make it right, then make it fast, then, make it bloated!
  12. Re:why i love perl by jason_aw · · Score: 1

    use constant FOO => 'bar';

    HTH, HAND.

  13. Re:Perl appears to me to be a "dirty" language. by stripes · · Score: 2

    That isn't because of the type system being too strong in Java, it is the lack of the concept of a tuple, or of multiple return values and simaltanious assignment.

    The language Dis is very strongly typed, but it has a tuple type, and you could do this:
    int z, z;
    string y
    x,y,z = function();
    Or you could so long as 'function' was declared to return 'tuple(int,string,int)'.

    Yes, that would require a 'rowFetch' for each kind of row, but I'm not sure that is a bad idea.

    There are other strongly typed languages with 'vartype' escape hatches, which let you have the advantages of strong types when you want them, and the advantages of weak types when you want them, with the disadvantage that the compiler is more complex, and you might have to maintian code from someone who used weak types everywhere....

    P.S. Dis is really a cool language. It has full GC so objects with cycles won't hurt it (like they do Perl, at least Perl5), but reference counts so non-circularly referenced objects have a predictable destruct time allowing you to use the C++ style "resource allocation is object creation" idom which makes exception handling and the like so much less painful. Alef is similar in some ways, and has some other intresting concepts.

  14. Re:Compatibility. by alleria · · Score: 1

    open my $fh, $path or die $!;

    Hmm, gotta try that. What about the amount of stuff on CPAN that might break if the glob is removed? What's the current stance on that?

  15. Uhhh... by tswinzig · · Score: 1

    "No... The question is, which version of perl will it run in."

    Why would you need it to run in anything but Perl 6?

    --

    "And like that ... he's gone."
  16. Re:why i love perl by Saucepan · · Score: 3

    You don't actually need an explicit return:

    sub foo { "bar" }

    This is actually how "use constant" works internally: it fakes up a subroutine that (implicitly) returns the requested value.
    Since the subroutine is defined at compile time, and the compiler sees that it returns a constant value, the constant value is inlined in place of the subroutine call.

    So, constants work and are exactly as fast as you'd expect, even though it may seem odd to people without backgrounds in functional languages that a constant is really a special case of a function, but with a built-in performance hack. :)

  17. Re:M$ supports ActiveState (Perl for Win32) by smallpaul · · Score: 1

    ActiveState did not port Python to Windows. Python has run on Windows for almost a decade. As far as I know, it has run on Windows since versin 1. ActiveState does support some platform-specific enhancements to Python for Windows and other platforms. ActiveState also supports platform-independent extensions to Python.

  18. You know what also really helps... by ph43drus · · Score: 1
    Getting an editor with good syntax highlighting, like vim. I find perl regular expressions are really easy to read when the special characters are highlighted differently in a regex. That, and the rest of the syntax is easier to pick out too.

    Jeff

  19. Wasting time on speed by Anonymous Coward · · Score: 2
    I hope 'faster' is not in fact one of the top three, or even top twenty, design goals. Right now, $2,000 worth of Linux/Intel server can handle CGI-driven sites that do tens of thousands of page views a day without rolling interpreters into Apache or optimizing the CGIs. (I build such sites in Python, which is by most accounts roughly comparable in speed to Perl--Perl believers would probably say slower.) By tuning the software, performance gains of up to an order of magnitude can be wrung out. Relatively small increases in hardware budget also have dramatic effects on your performance ceiling.

    If a "preview release should be available by next summer," significant amounts of production software can't be expected until 2002 at the earliest. By that time, current software will perform 3-5x faster on equivalent hardware.

    Given Perl's huge installed base, I have no doubt that there are dozens, hundreds, maybe even a few thousand programmers who could benefit from a faster Perl two years from now. But for the majority of the world, the speed that matters is programmer productivity. I hope the Perl 6 team focuses on that.

  20. Re:My wish list by belg4mit · · Score: 1

    I'll give you the binaries. The rest can already be done, and while TMTOWTDI is the motto. You'll find people reluctant to replace INTERNAL functionality at the drop of a hat. See the debate over ??= http://www.perl.com/tchrist/defop/defconfaq.html

    --
    Were that I say, pancakes?
  21. Re:wow... by The_Messenger · · Score: 1
    I know, I know... my bad jokes always get lost on people. :) I'm well aware of (and intimately aquainted with) the laziness that Larry refers to in his Big Three -- the kind of laziness that says, "Hmmm, why don't I spend an hour coding a script that will save me four hours of manual work over the next month? More time for Quake... sounds great!" This same laziness allows us to lots of cool stuff in Perl with very little work. Others in this discussion call Perl a "dirty" language, but I find a certain elegance (of an admittedly elitist variety) in being able to type ten lines of noise, unintelligible to the Perl/regexp/Unix newbie, which magically performs the same magic as fifty lines of C. Am I saying that we should stop using C and all run to Perl? Of course not. But there are also tasks for which Perl is vastly superior. Just like there are for C, C++, Java, FORTRAN, Ada, Python, Ksh, and PL/I. (Maybe not Pascal, though... /me ducks) "A place for everything, and everything in its place."

    ---------///----------

    --

    --
    I like to watch.

  22. Re:sitting in the office by sandler · · Score: 4

    PHP isn't really a competitor to Perl in the CGI space. PHP is embeded in an HTML page, whereas a Perl CGI is more likely to be in the backend, or at most generating HTML. There are HTML::Embperl, ePerl, and maybe other embeded perl options, but probably the way most people use Perl is not comparable to PHP.

  23. Re:Perl appears to me to be a "dirty" language. by Piers+Cawley · · Score: 1
    Don't see how it's misleading since the nature of perl is to make everything a string unless otherwise specified.

    Err, that's not even vaguely true.

  24. wow... by The_Messenger · · Score: 2
    A complete rewrite? This, from the man who advocates laziness in programmers? :)

    The problem I have is that Perl interpreters seem to be pretty low on most companies' upgrade lists. My current employer still runs 5.005, on both AIX and Solaris. If I can't convince them to upgrade to 5.6, 6.0 seems right out. "There's a chance of older scripts breaking, right? 5.005 works for us now, right? So why bother?" Bah. It sucks that businesses are run by businesspeople. ;) Oh well, I've seen worse... a web hosting company (which advertises on Slashdot, btw) runs 5.004 on Linux boxen. It somehow seems worse that Linux people not be up-to-date on this stuff.

    Question for anyone who knows: which version does /. use?

    It sucks that any cool new things I could do with Perl 6 are pointless if I can't use them at sites with older interpreters. I think the next Slashdot poll should be,

    Which version of Perl?

    [x] 5.6, the latest and l337est
    [ ] ($version < 5.6) || ($version > 5.0)
    [ ] ($version < 5.0)
    [ ] Whichever comes with Red Hat 6.2
    [ ] Uh, ActiveState 95?
    [ ] I use Python, fool!
    [ ] CowboyNeal, painted blue, thinking about the number "1", eating a rare steak


    ---------///----------

    --

    --
    I like to watch.

    1. Re:wow... by The_Messenger · · Score: 1
      Thank you, citizen... so why aren't you using 5.6, Rob? Does it break Slash? Worried about the new char? Don't have a need for bugfixes/new features? Or is just "too new" to be trusted on such a big-time site? (And while that may sound sarcastic, it wasn't meant as such.)

      As long as I'm interrogating you, Rob, here's another question: why haven't you bought your Mac-luser GF a G4 cube yet? With your dough, certainly you could find a way... what, she isn't worth it to you?? Wait 'till Sarcasta hears about this... ;p

      ---------///----------

      --

      --
      I like to watch.

    2. Re:wow... by drew · · Score: 1

      i still use perl 5.005 since you can't compile vim with the "--enable-perl-interp" option with perl 5.6

      being one version behind the current isn't all that unreasonable, especially when the current version involves major changes that other projects may need to catch up with. at least they're not still using 5.003 or something

      --
      If I don't put anything here, will anyone recognize me anymore?
    3. Re:wow... by jason_aw · · Score: 1

      > A complete rewrite? This, from the man who advocates laziness in programmers

      Yes: it fits rather neatly with that philosophy, in fact.

      It's a special kind of laziness that's Good in programmers. The kind that makes you put that little bit much more effort in *now* because you know that in a few (days|weeks|months|lifetimes) you'll be able to reuse that code, or maintain it more easily, or whatever...

      I know what you mean about the outdated interpreters :-/ How well does the perl compiler thingy work these days, does anybody know?

    4. Re:wow... by Ranger+Rick · · Score: 1
      The perl compiler has worked OK on linux for a while now, but just recently with 5.6.0 I was able to get it to work on HP-UX, so they've obviously made some changes.

      Yay!

      :wq!

      --

      WWJD? JWRTFM!!!

    5. Re:wow... by hwolfe · · Score: 1

      You think that's bad? My isp is still using php 2, and has no plans of upgrading. That and no cgi access are my only two complaints about them, though. Well, that and sometimes crappy nslookup results when trying to track down e-mail spammers...

    6. Re:wow... by pudge · · Score: 2

      It is simply a matter of testing. We have not fully tested it, and it is not a high priority. We are planning to have bender, the development Slash, run on perl 5.6 (and in some future release, it might even require perl 5.6). But I wouldn't necessarily count on it happening, just because the priority for it is relatively low. There have been some accounts of breakage with some of the modules Slash uses (mod_perl, for instance), but I cannot say if anything in particular is broken.

    7. Re:wow... by TheDude[40oz] · · Score: 2

      A complete rewrite? This, from the man who advocates laziness in programmers? :)

      Yeah - he's lazy enough to have the public do most of the work as far as figuring out what to keep, get rid of, modify, etc. He's letting us do the harder work of figuring out what to change, while in his laziness, he and other developers will actually only do the implementation. Seems like a perfect lazy-man's plan to me :)

      --
      TheDude
      Smokedot
      Drug Info, Rights, Laws, and Discussion

      --
      TheDude
      Smokedot
      Drug Info, Rights, Laws, and Discussion
    8. Re:wow... by pudge · · Score: 2

      Slashdot uses perl 5.005_03.

  25. Re:Perl appears to me to be a "dirty" language. by Cat+Mara · · Score: 1
    I personally love coding in Perl for that exact reason, that there are tons of ways to do everything. It also makes for entertaining conversation with friends to see how different people solved the same or similar problems in different ways.

    This is a questionable feature of Perl, IMHO. While I hate "fascist" languages that insist on you doing things their way and their way alone, Perl's looseness can lead to maintenance nightmares. Few people will have the time to learn all of Perl's multifarious ways of accomplishing a single task; therefore it's possible to have two Perl wizards in the same organisation whose working sets of favoured Perl idioms don't overlap much. If one wizard leaves and the other undertakes to maintain their scripts, the maintainer is going to have some fun deciphering just what the hell the other wizard was up to. Now, all languages are going to have this problem to an extent (e.g. witness how something as trivial an unfamiliar indenting style in a C program can throw you off), but Perl amplifies it to a perverse degree.

  26. Re:This might finally cause me to learn Perl by nil · · Score: 1

    But what would your comment say? For instance, would you indicate in your comment that this code will *not* properly handle HTML comments or Javascript content?

    IMO, this is the evilness of perl: it leads you on to think that the trivial hack is actually a correct solution.

    --
    - '()
  27. Re:What ever happened to C++ "Perl 6" rewrite by slickwillie · · Score: 1

    If they were really cool, they'd write it in PERL.

  28. Re:Rewriting Unix commands in Perl? by Starselbrg · · Score: 2
    Actually, to write a basic cat, all you have to do is:

    print while <>;

    --
    Got HTML? Want LaTeX? Try html2latex
  29. A script language, barely alive... by tapin · · Score: 2
    "We can rebuild it. We can make it '...better, stronger, and faster...'"

    Now all I want to know is if those funky Lee Majors sound effects are going to happen any time I access a page with a .cgi extension...

    1. Re:A script language, barely alive... by Pfhreakaz0id · · Score: 2

      My ASCI interepretation: beuwwahhhhwahhweewummwummm.... bummmmwwahhwahhhweewummwuummwummm... Thank you, I'll be here all week!
      ---

  30. Re:Well... by panache · · Score: 1

    My understanding of what Larry was saying during the keynote was that the way that he plans on maintaining compatibility with Perl5 is by building an internal representation of the script, converting that to the new syntax, and dumping it back out to disk. Apparently there is a module currently on the CPAN that does something similar to this already: building the symbol table, and dumping it out to disk. Having this capability seems to be how he feels he can make (relatively) large changes to the syntax of the language without breaking all of the existing code. He also mentioned that this would almost certainly not work for 100% of the existing code, but if they could get it to 85% or so, that would be an acceptable solution.

  31. You mean Perl Power Tools? by Christopher+B.+Brown · · Score: 4
    The Perl Power Tools: The Unix Reconstruction Project appears to be as complete as it's going to get.

    The " Doneness" listing indicates that virtually all of the commands are done, and the last date that something was updated was in June 1999.

    It may well be effectively complete. I don't think PPT has taken the world by storm, though...

    --
    If you're not part of the solution, you're part of the precipitate.
  32. Hrmmm by Anonymous Coward · · Score: 1

    Will they rewrite Perl in Perl?

  33. Re:Perl appears to me to be a "dirty" language. by panache · · Score: 1

    Actually, during the Q and A session with Larry after his announcement, someone asked if Perl would ever have any strong typing. Larry's response was that the hooks for that already exist, and having a pragma that turned on type could be something that would be considered for Perl6. The suggestion that he made for the new pragma name (obviously in jest) was 'use bondage and discipline'

  34. Re:Structures and n dimensional arrays by panache · · Score: 1

    Actually, Perl does this without a problem. It's just a matter of using references to your advantage. As an example, here is a three dimensional array: $array[0]->[0]->[0]. Any structure you make in C, I can make in Perl. For a lot more details, I would suggest reading the perlstruct pod page that comes with Perl, or take a look at a few of the examples in the Perl Cookbook. You just have to think in a Perlish sort of way.

  35. Re:This might finally cause me to learn Perl by Shoeboy · · Score: 4

    Hey, I like my C++ short and terse too, but I don't care for entire subroutines mostly written in punctuation.
    This is a myth. You can right perfectly readable and maintainable perl. I currently prototype web pages in perl using cgi.pm and hand it off to an asp developer who translates it into VBscript asp's and cleans up the user interface. The guy had close to zero perl experience when he started, but was able to read an understand my perl almost immediately.
    You can write unreadable perl, and that's a godsend for 1 shot scripts, but you can also write very readable perl. It's a language of acceptable subsets.
    --Shoeboy

  36. Re:Perl appears to me to be a "dirty" language. by EvlG · · Score: 5

    I really think that one of the reasons that the Perl modules are SO useful is due to the lack of strong typing ala Java.

    A PERFECT example of this is the DBI library. In Perl, it's simple. You can even do

    ($id, $firstname, $lastname) = $sth->fetch_row();

    In Java, with the JDBC, you have to do this:

    (assuming rs is a ResultSet object)
    int id = rs.getInteger(1);
    String firstname = rs.getString(2);
    String lastname = rs.getString(3);

    (forgive the syntax if it isn't 100% correct; you should be able to understand the point though.)

    The point? Because of Perl's lack of strong typing, it's a hell of a lot simpler to get what I need done: extract a userid, first and last name from a database.

    Lots of other modules are like this as well. The result? A looseky bound language that makes it really simple to put different modules together to get something done. In my years of experience in using C++, this is pretty difficult to do: everyone does the data storage differently, leading to a variety of problems. This is still true in Java, but to a much lesser degree.

    This is why Perl will never be burdened with strong typing.

  37. Re:Perl appears to me to be a "dirty" language. by randombit · · Score: 1

    Still, Slashdot did post a "benchmark comparison" study a couple months ago, which found that text parsing "as written by experienced, competent programmers" in C didn't hold up against Perl's text parsing.

    That would depend on whether or not Perl's regex code is as good as / better than the POSIX regex(3) functions. And if glibc's regex(3) isn't as good as Perls code, they (they being the GNU folks) need to steal it from Perl ASAP.

    I agree that it's a little weird to benchmark something against its parent. Maybe what they meant is "PERL handles text better than YOU."

    Given the correct modules, Perl also programs Perl better than I do. :)

  38. Re:Perl appears to me to be a "dirty" language. by maraist · · Score: 2
    You've not played with mod_perl much have you?



    I guess I should really qualify these things. Every other person asks me this. Yes I've used mod_perl, and I've even found better solutions ( such as FastCGI ). This was really the type of general purpose solution I was talking about. The PHP comment had to do with how quickly you get get a dynamic web site up. A Cold Fusion engine referred to a potentially higher throughput engine.



    -Michael
    --
    -Michael
  39. Re:Rewriting Unix commands in Perl? by mlong · · Score: 1

    >that some people were going to rewrite all of >the Unix commands

    Why? You want cat, you do:

    open(FILE,"somefile.txt");
    while()
    {
    print $_;
    }
    close(FILE);

    You want ls, you can do:

    opendir(DIR,"somedir");
    while($filename=readdir(DIR))
    {
    print "$filename\n";
    }
    closedir(DIR);

    For *most* unix commands, it's simple to do it in your perl script with just a few lines.

    --
    //m
  40. Structures and n dimensional arrays by kevin805 · · Score: 2

    Perl is great, until you work with C for a while, come back, whip up a quit solution involving multidimensional arrays, find it doesn't work, and spend half the day trying to figure out the right syntax to get it to work with references and all.

    Also, structures would be nice. It's easy to do using hashes, but it's a pain to type. I'd suggest the dot notation, but it would break concatenation. Are there any symbols left for this?

    1. Re:Structures and n dimensional arrays by elflord · · Score: 1
      Also, structures would be nice. It's easy to do using hashes, but it's a pain to type. I'd suggest the dot notation, but it would break concatenation.

      THey already have a structures package. I've never tried it though, so I don't know how it works. Perl is good for what it's good at. But it's not good at everything.

  41. You don't want to upgrade to 5.6.0 by tilly · · Score: 2

    Trust me on this.

    Wait for 5.6.1 (which will be out fairly shortly).

    If you must use the new features, then figure out how to get the current development version of Perl and use that.

    Otherwise you will get burned.

    (Hint to the wise. Saying that *.0 releases are stable is a marketing label. This is definitely the case with 5.6.0.)

    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
  42. LOL!! (nt) by The_Messenger · · Score: 1
    nt

    ---------///----------

    --

    --
    I like to watch.

  43. First Ilya, now Tom? by bodin · · Score: 1

    Ilya left perl5porters.

    I don't see Tom Christiansen mentioned here. Has he left too?

    And what about Sarathy?

    1. Re:First Ilya, now Tom? by pudge · · Score: 2

      Sarathy is still involved (as mentioned on use Perl). I personally expect Tom to be involved with Perl, and would be surprised if he left. I have a sneaking suspicion that Ilya might be involved with it, too. He was at the meeting on Tuesday and seemed intrigued.

  44. Re:Lack of grammer by Municipa · · Score: 1

    Good point.. also, (cheap) computers are much faster than we need them to be now anyway, so I guess even if it's marginally slower, few people really care.

    Though, true, the web is mainly text, but I never thought of the web so much about text manipulation, that is, not more so than pulling data out of a database and reformatting it is about text manipulation (which it is). Before the web, was Perl used for this sort of thing as well?

    For crawlers and all sorts of web bots, the web is about text manipulation. For serving up web pages, which often contain static data, I guess Perl is fast enough too.

  45. Well... by Ex+Machina · · Score: 2

    Will perl 5 source be 100% ok with perl6 or will i have to rewrite code?

    1. Re:Well... by The_Messenger · · Score: 1
      Yeah, but I see where he's coming from.

      When I verbalize version numbers, I almost never say the "point" (or "dot"). Slackware 7.1 is "Slackware seven-one" and Java 1.3 is "Java one-three". And I've discovered that I also drop the zeroes when talking about Perl 5.005 ("Perl five-five"). I can see how someone could get in that habit, and while meaning "5.005", they type "5.5". And taking this even further, yes, it's possible that Perl-core got into this habit.

      So don't be too quick to shoot him down as a blathering idiot with no idea what he's talking about... it's not like he's a Mac rumour site! Bwahahahaha!

      ---------///----------

      --

      --
      I like to watch.

    2. Re:Well... by pudge · · Score: 3

      Yes, there is. Most of the core Perl developers call "5.005" "5.5".

    3. Re:Well... by ananke · · Score: 1

      i hope not. i already had problems with changing from 5.5 to 5.6.
      i run obsidian webmail on couple of my servers, and it just will not work with 5.6, had to downgrade
      [http://www.obsidian.co.za btw]

      --
      --- d'oh
    4. Re:Well... by yomahz · · Score: 1
      That's funny cause they're wrong too!
      --

      A mind is a terrible thing to taste.

      --
      "A mind is a terrible thing to taste."
    5. Re:Well... by yomahz · · Score: 2
      I looked on perl.com's website and 5.5 was the development version of 5.6 (surprise) so that makes your point wrong, and the guys original point even stupider.


      --

      A mind is a terrible thing to taste.

      --
      "A mind is a terrible thing to taste."
  46. Re:You... by The_Messenger · · Score: 1
    Sure, but you can't even troll adequately! Shame, shame...

    ---------///----------

    --

    --
    I like to watch.

  47. Re:Perl appears to me to be a "dirty" language. by Broccolist · · Score: 3
    I agree that weak typing in Perl is a good thing. But you make it sound like it's a panacea, which imho it isn't. The thing about strong typing is that though it slows down initial development time and is generally a pain, every so often it helps you catch an obscure type-related bug at compile-time. When you have a 500k-line project in constant evolution, catching those bugs is much more important than saving a bit of initial development time. In a 500-line perl script, the initial development time is more important. So the strength of a language's typing is really a tradeoff.

    Also, strong typing can be more efficient. When you say getInteger(), the compiler doesn't have to waste cycles trying to figure out if it's an integer, string, float, etc.

    BTW, C++ allows you to emulate weak typing where it's appropriate, using operator overloading. Say I've created a SpecialInt class that contains an int, plus does some other special stuff I need for some reason, I can make it interchangeable with an int, like this:

    class SpecialInt
    {
    public:
    SpecialInt(int i);
    operator int() const;
    /* ... more stuff */
    };

    void f()
    {
    function_that_takes_a_SpecialInt(5); /* legal because of the constructor that takes an int */
    int bar = foo; /* legal because of the operator int overload */
    }

  48. Ouuuuu! by idistrust · · Score: 1
    Ouu! Makes me feel like I'm a lobster and Larry Wall is dipping me in butter

    --

    --Ask a silly person, get a silly answer.

  49. Re:M$ supports ActiveState (Perl for Win32) by ultrabot · · Score: 1
    Direct financial support was for ActiveState, the folks that ported Perl to the Win32 platform, and continues to port Python for Win32 as well. In fact, it's noted that ActiveState will be in VStudio 7.0 on the front page.

    This might explain the name ActivePerl (and ActiveState). Nobody likes the word "active" more than Microsoft.

    --
    Save your wrists today - switch to Dvorak
  50. Re:Perl appears to me to be a "dirty" language. by Nicolas+MONNET · · Score: 2

    It's simple: Perl parses and compiles regular expressions at compile time. In C it has to be done at runtime. Now, compiletime == runtime in Perl for the most part ... except if the script persists, as in mod_perl or fast_cgi or any daemon for that matter, as opposed to plain old CGIs and commands.

  51. Change... by EEEthan · · Score: 3

    Change is scary. But it sounds like this change will be pretty transparent to programmers; perl will continue to get faster and better, still stay easy to use, and Larry Wall is still a little crazy. Well, it sounds like everything is right in the world.

    1. Re:Change... by zorgon · · Score: 2
      Ooh. Message for the perl gods then:
      call it something else...please
      Wasn't it just a few months ago that Larry Wall was saying he was going to leave Perl alone for a while? I welcomed that, this is a bit more ominous. Great to develop a 'new thing inspired by perl' but if it's not perl, don't call it perl...

      WWJD -- What Would Jimi Do?

      --

      I am quite civilized, and I should be brought a beer immediately. -- Bruce Sterling

    2. Re:Change... by pudge · · Score: 2

      I don't think it will be very transparent. I think a lot could and perhaps will change. Now, your old programs will still run, under perl 5 or some comaptibility mode in perl 6. But perl 6 will be different.

  52. Sure... by BMonger · · Score: 2

    Sure... I just go and buy myself some Perl books for the "old" version and then they have to go and make a new one. :)

    1. Re:Sure... by Tyrannosaurus · · Score: 2
      At least (according to this article, anyways) you've got 18-24 months to bust the binding on those books before they can be tossed. :)

      And I'm sure Larry & gang will be much nicer than Microsoft, which deems all you've ever learned to be obsolete when the next rev is released.

      --

      ---
      Gort! Klatu Barata Nikto!
  53. Perl uses smarter text algorithms than most people by cpeterso · · Score: 2

    Perl's text algorithms were designed and coded by experts and optmized over time. The adhoc regex function Joe Coder writes will NOT be nearly as smart. Thus Perl can be [much] faster than C in some instances.


  54. Community's perl? by TheDude[40oz] · · Score: 1

    "[the] community's rewrite of perl, and the community's rewrite of the community."

    This should be interesting. I assume this means everyone will be able to go to the perl mailing lists & suggest things to change for perl 6? That'd be useful, and I'd assume many people will do this. If it actually goes down this way, I wonder how different perl will be in version 6. Will perl change to accomodate people who like python, or c, or will it just be perl with new p- & c-like features, or just a very different perl? Any way it comes out, I have a feeling it will be a better perl because of Wall's attempt to get the community to make perl better.


    --
    TheDude
    Smokedot
    Drug Info, Rights, Laws, and Discussion

    --
    TheDude
    Smokedot
    Drug Info, Rights, Laws, and Discussion
    1. Re:Community's perl? by TheDude[40oz] · · Score: 1

      You make it sound like everyone cannot go to the perl mailing lists now ... they can.

      Well, that's not what I meant, but yeah, it does sound like that's what I was saying. I just think it could work out great having perl users and developers worldwide involved in creating perl 6. I'm sure there'll be problems with things someone wants integrated, but most don't, but overall, I think this could work out really well for perl.

      --
      TheDude
      Smokedot
      Drug Info, Rights, Laws, and Discussion

      --
      TheDude
      Smokedot
      Drug Info, Rights, Laws, and Discussion
    2. Re:Community's perl? by pudge · · Score: 2

      You make it sound like everyone cannot go to the perl mailing lists now ... they can. It is harder now, and yes, the barrier of entry is intended to be lower for perl 6.

  55. Re:Upgrade path by Sir+Robin · · Score: 1

    I've upgraded a few scripts, but not all that many. As far as using the new functionality, in new scripts, you betcha! I have a really hard time going back to Perl4 and not having references, hashes of hashes [...], arrays of arrays [...], etc, etc. Perl5 lets you do much more complex data structures than Perl4. If you *have* Perl5, it's well worth your time to learn to *use* Perl5.

    --
    My /. ID is only 5,210 away from Bruce Perens's.
  56. i agree, good point by The_Messenger · · Score: 1
    I would mod you up if I hadn't already posted.

    ---------///----------

    --

    --
    I like to watch.

  57. Re:Compatibility. by alleria · · Score: 1

    The possible removal of typeglobs (from above) is kinda disturbing, I have to say. But if they make files, formats, and a few other things first class, it should be okay. (I hope).

  58. Original on: use.perl.org by ajs · · Score: 3

    The above is also found in it's original form at use.perl.org. use.perl.org is a great site, and also based on Slash (the slashdot.org engine).

  59. why i love perl by BlueLines · · Score: 3

    First of all, here's a list of things i don't like (just so you know i'm being fair):

    1) The lack of constants: The only way to do constants is to create a subroutine that returns whatever value you want to be constant, ie: sub foo{ return "bar";}

    --
    --BlueLines "The cost of living hasn't affected it's popularity." -anonymous
    1. Re:why i love perl by elandal · · Score: 1

      > use constant FOO => 1;

      Is same as
      sub FOO { 1; }

      > *PI = \3.1415927;

      Assign reference to an anonymous variable into a typeglob. Not a constant either, and according to the article, typeglobs may be removed.

      Perl really doesn't have a way to declare a constant other than by creating a subroutine that consists of returning an anonymous variable - either with usual sub foo { bar; } or use constant foo => bar;
      I think that subroutine call that obviously (to the interpreter) does nothing but returns the same value every time it's called is optimized into an effective anonymous variable.

      But, as none of these really produces a constant - an immutable variable initialized in declaration - we can only hope it'll be added.

    2. Re:why i love perl by Abigail · · Score: 2
      Perl really doesn't have a way to declare a constant

      And neither does C for that matter, but you never hear someone complain about that. Pascal does have constants though.

      Of course, you might argue that C has

      # define FOO 1
      well, that isn't C, that's the C preproccessor. And you can use the same C preproccessor with Perl; just use the -P option.

      -- Abigail

    3. Re:why i love perl by Nicolas+MONNET · · Score: 1

      sub foo { 'bar' }

      T's not that hard, isn't it? Think of it as "substite foo by bar". Now it makes sense. Slightly better:

      sub foo () { 'bar' }

      FWIW, YMMV, IANAL, FSCK.

    4. Re:why i love perl by Kickasso · · Score: 1
      const int foo = 10;
      int bar[foo];

      This is invalid C but valid C++. Which is, kinda, a form of complaint (why C doesn't have true constants? My language will!)
      --

    5. Re:why i love perl by Imperator · · Score: 2

      use constant foo => "bar\n";
      print foo; # or foo() under strict 'subs'

      --

      --

      Gates' Law: Every 18 months, the speed of software halves.
    6. Re:why i love perl by Iron_Slinger · · Score: 3

      You can also use the following.

      use constant FOO => 1;

      I believe the following also works. Check out "Advanced perl Programming" from the only Publisher out there for more info.

      *PI = \3.1415927;

      I've had probs with the last though.

      IS

    7. Re:why i love perl by afc · · Score: 1
      Your Perl may be good Abigail, but your kung fu sucks, 'cause:

      const int foo = 0;

      Is valid ISO (ANSI, if you will) C, and we all know everybody uses ANSI C, right ;-)?
      --
      --
      Information wants to be beer, or something like that.
    8. Re:why i love perl by _marshall · · Score: 1

      "You can also use the following.
      use constant FOO => 1;"


      This is fundamentally the same as an inline subroutine. Try this with your local perl interpreter:

      use constant FOO => ( "I", "like", "foo", "bar" );
      print FOO


      works like you would think. FOO is interpreted as a list and printed that way.

      But try this:

      print FOO[1]

      You get a "subscript on subroutine" error. The reason for this, is if you've ever taken a glance at the source code for constant.pm, your "constant" is loaded into your scripts namespace (more or less) as an inline subroutine. It's the exact same as saying:

      sub FOO{ return ( "I", "like", "foo", "bar" ) }

      So, In order to get the correct value you need to say:

      print ( (FOO)[1] )

      PS: sorry for the perl rant, but this needed some clarification :)


      --
      Homer: "No beer, No TV make Homer something something";
      Marge: "Go crazy?";
      Homer: "Don't mind if I do!"

  60. Re:This might finally cause me to learn Perl by prizog · · Score: 4

    Here's a regexp I saw in some perl yesterday:

    s#<(?!$okay_tags)([^>]*>)##gi;

    Think it's unreadable? What about this sentence:

    "Cette phrase en francais est difficile a traduire en anglais." (From Douglas Hofstader's "Metamagical Themas")

    The point is, it's impossible to read anything until you know the language. I know that the above perl reads "zap all html tags not in the list of ok tags. " (Of course, I have the benefit of knowing what the context for the line was).

    So, yeah - perl is ugly unless you know it.... just like any other language. Also, I think C++ uses all the punctiation that perl does, just not as often :)


    -Dave Turner.

  61. Re:sitting in the office by paTroll · · Score: 1

    ok.. so i don't know much about php.. you caught me..

    but there are other competitors, and that is what my post was about.. the "spirit" of competition in the cgi sector..

    (i'm a c++ guy now, though.. i eat better than i did when i did perl/cgi)

    patroll

    --
    Will the real Richard Stallman please stand up?
  62. Re:Perl appears to me to be a "dirty" language. by maraist · · Score: 2

    >Err, that's not even vaguely true.

    I am going to assume that you've dealt with the perl core code, so I'm not going to debate with you. But to defend myself to others, let me say this: Scalars are a dynamic type which encompases integers ( in optimized cases ), floating point, strings and references ( which are the basis of most perl complex datatypes, including objects ). When in doubt, perl makes something a string. To my knowledge, DBI reads come in as strings ( I could do a test, but frankly I don't care enough ). Flags in the scalar object specify if it is currently in int/float/string/pointer form, and it's possible to flip flop around in most directions ( even from a pointer ). Because of this, you can always treat the scalar as a string. Hense my comment.

    I think your biggest reaction had to deal with the defamation of perl sophistication, perhaps likening it onto something like COBOL, which uses pseudo-ASCII numbers ( 4 bit digits, if I recall ).

    -Michael

    --
    -Michael
  63. Re:Rewriting Unix commands in Perl? by pudge · · Score: 2
    Hm.

    print while <>;

    How about one better?

    print <>;

  64. Re:Lack of grammer by Nicolas+MONNET · · Score: 2

    Wrong, Perl excels at text manipulation and the web is mainly...text. Try doing text manipulation in C or Java and see how much more quickly it can be done in Perl.

    C does'nt really have to suck at string manipulation, it just happens to, thanks (or no thanks at all) to the crappy, insecure, C library.

    It's a shame nobody cared to spec out a standard text handling library in C? Or it has been done but I'm not aware of it. I know of DJB's effort ... as used in Qmail ... it's funky though, and not exactly standard by any means.

    C++ is k3wl in that respect, but I used to get a bit alarmed at the the ASM code I was getting ... oh wait that was a long time ago. 68k assembler. Duh. Nobody does that anymore. Oh forget it.

  65. Re:Perl appears to me to be a "dirty" language. by eastern · · Score: 1

    Eric Raymond's typically well-argued Why Python? piece in the May 2000 Linux Journal has this to say about Perl Syntax: Larger project size seemed to magnify some of Perl's annoyances into serious, continuing problems. The syntax that had seemed merely eccentric at a hundred lines began to seem like a nigh-impenetrable hedge of thorns at a thousand. ``More than one way to do it'' lent flavor and expressiveness at a small scale, but made it significantly harder to maintain consistent style across a wider code base. And many of the features that were later patched into Perl to address the complexity-control needs of bigger programs (objects, lexical scoping, ``use strict'', etc.) had a fragile, jerry-rigged feel about them. He makes a strong case for (more or less) abandoning Perl for Python, specially for new programmers. Since the world needs a lot more programmers than there are now, the learning-curve argument is probably the strongest one against Perl (only in a Perl vs. Python context though). Specially when it comes from Eric Raymond!

  66. Re:Perl appears to me to be a "dirty" language. by Abigail · · Score: 2
    Actually, the example doesn't show at all that you can only do that due to the lack of strong typing. Strong typing doesn't forbid list assignment! I could well imagine a weakly typed language with a syntax like:
    (int $id, string $first, string $last) = $sth->fetch_row();
    Or a strongly typed language that has functions returning tuples and has tuple assignment.

    -- Abigail

  67. Larry Wall interview at conference on TechnetCast by paulydavis · · Score: 1

    http://www.technetcast.com/tnc_program.html?progra m_id=85

  68. Re:what are these "unused features"? by Nicolas+MONNET · · Score: 1

    I've never used pack.

    XS is hmmm .. well quite complicated, never got around to use it. I used to extend TCL with C procedures, and even without dynamic libs it was a breeze.

  69. Why is Topaz being dumped? by Julian+Morrison · · Score: 1

    (no text, see the title)

  70. Re:Recipe for disaster... by Abigail · · Score: 3
    What'd be really great is if 'use strict;' were the norm

    If you put export PERL5OPT='-Mstrict' in your profile, then it will already happen.

    -- Abigail

  71. Re:M$ supports ActiveState (Perl for Win32) by Abigail · · Score: 3
    ActivePerl is just the version of Perl for Win32 that was compiled by Activestate. Perl compiles out of the box on Win32, for multiple compilers even. Unfortunally, most Win32 users don't have a compiler, or don't know how to compile. Hence the popularity of precompiled versions (something the Perl community usually doesn't recommend - you won't find a long list of precompiled Unix versions on CPAN for instance). ActiveState is not the only one making precompiled versions of Perl available; it's just the most marketed.

    -- Abigail

  72. Besides... by tswinzig · · Score: 2

    You just KNOW there's gonna be a perl script that will convert your old perl scripts into your new perl scripts. The only question is... will it be a one-liner?

    -thomas

    --

    "And like that ... he's gone."
    1. Re:Besides... by GrenDel+Fuego · · Score: 2

      No... The question is, which version of perl will it run in.

  73. Re:Come on; Read Me, Please... by Yardley · · Score: 2

    Hi. Read this: http://www.kuro5h in.org/?op=displaystory&sid=2000/7/18/122257/231. Please don't b-slap me; this is important! Mkay?

    --

    --

    --
    He lives in a world where those who do not run the client software of the omnipresent meme are unacceptable.
  74. Re:My wish list by jason_aw · · Score: 1
    • perlref: Perl references
    • perldsc: Perl data structures
    • perlol: Perl lists of lists
  75. Straight From Larry Wall's Mouth by Anonymous Coward · · Score: 3

    I'm at the perl conference right now (using their wireless connectivity which is pretty cool), and I saw Larry Wall's keynote speech. He said "I hope we have 100% compatability with all Perl 5 scripts, but I don't think that will happen [with Perl 6]. If we have 100% compatability with 80% of the scripts out there, that's good in my opinion. If we have 95% compatability with 100% of the scripts, that's good. As long as we're in the ballpark, it's ok. You have to break a few...umm..somethings to make an omlette."

    .anonymous coward.

  76. Re:My wish list by jason_aw · · Score: 1

    Ah well, that failed to work, didn't it? :-)

    Those were supposed to be links to the appropriate pages on perl.com. I'm sure you can find them or look at the local versions...

    Ho hum.

  77. Re:sitting in the office by Yakman · · Score: 1
    Does PHP happen to have an standard interface to databases, like Perl has? No?

    PHP4 does as part of the 'pear' library (kinda like perl's CPAN).

    It's one up on perl though, because (since it's small at the moment) all the pear modules come with PHP itself, you don't need to download/install them from an external source.

  78. Re:Perl appears to me to be a "dirty" language. by Shoeboy · · Score: 2

    I've never much cared for the way variables are declared and used in Perl (scalars?). Too much use of symbols, not enough grammar.
    Hmm... I like it. When the language has built in support for complex datatypes it's useful. Take T-SQL for example:

    DECLARE @bob varchar(255)
    SELECT @bob = max(bob) FROM tbl_bob

    It's unfathomably useful to be able to tell at a glance whether you're dealing with a variable or an attribute of a tuple.
    Perl is the same way. I find it nice to be able to tell at a glance whether I'm using a scalar or a list.
    --Shoeboy

  79. Re:Larry Wall DOES Announce Perl 6 by slickwillie · · Score: 1

    I forget the exact details (it was posted here quite a few months ago), but doesn't Microsoft, the master of vaporware, somehow influence the Perl development group with a hefty financial arrangement?

  80. Re:Perl appears to me to be a "dirty" language. by Cheeko · · Score: 1

    I personally love coding in Perl for that exact reason, that there are tons of ways to do everything. It also makes for entertaining conversation with friends to see how different people solved the same or similar problems in different ways.

    I might just be biased on this from the heavy amount of web developement I do, but I'm anxiously awaiting the new version. I just hope it won't require 100% rewrite of my old scripts.

  81. Perl 6 by ACK!! · · Score: 1

    Ok, Perl is faster and better and its a complete re-write?!?

    Yeah right. All I know is that you are never going to get all three things right the first time off. It may be faster and a complete re-write or better and a complete re-write but come on. Larry Wall may be wired tight for coding but I will believe the perfect perl when I C it.

    --
    ACK /ak/ interj. 2. [from the comic strip "Bloom County"] An exclamation of surprised disgust, esp. i
  82. Re:Upgrade path by Chelloveck · · Score: 1
    Just out of curiosity: how many perl programmers here upgraded old perl scripts to use Perl 5 features when Perl 5 came out?

    I didn't attempt a wholesale upgrade of my Perl4 scripts. If it ain't broke, don't fix it! However, once I got Srinivasan's Advanced Perl Programming and figured out how to really make use of all those cool new features, my scripts take serious advantage of Perl5's new features. In particular I make heavy use of references and complex data types, and I love the IO::Socket and Net::* modules!

    Perl6 had better not break 99% of the legacy Perl4 and Perl5 code out there. I'd hate to have to convert a ton of scripts! But if it introduces useful new features I sure won't be shy about using them.

    --
    Chelloveck
    I give up on debugging. From now on, SIGSEGV is a feature.
  83. Re:Perl appears to me to be a "dirty" language. by jason_aw · · Score: 2

    (ack. I'm sure IE was written to piss vi users off. Pressing Escape shouldn't clear the text box, FFS)

    > about a kajillion different ways to do the same
    > thing
    Otherwise known as "There's More Than One Way To Do It", one of the central mantras of Perl :-)

    The way I see Perl is that if you have a messy mind, you'll create crappy perl. If you've got a focussed mind, you'll create focussed perl. You impose the discipline on perl, it doesn't impose the discipline on you. It's the most direct and natural way I've ever seen for transferring thoughts to real code. (Painting By Numbers doesn't count).

    > language-based improvements
    I don't see what improvements there could be.

    When I learnt to program in BASIC, I felt there were things missing, although I only had a vague idea of what they were. I moved on to C and found lots of the gaps filled, but still that nagging feeling something was missing.

    I found perl, and I've *never* thought "Hrm, I wish Perl did " or "Why does it do it like that? It'd be much better like ?" about Perl...

  84. Re:Perl appears to me to be a "dirty" language. by __donald_ball__ · · Score: 1

    > I really think that one of the reasons that the > Perl modules are SO useful is due to the lack of > strong typing ala Java.

    > A PERFECT example of this is the DBI library. In > Perl, it's simple. You can even do
    > ($id, $firstname, $lastname) =$sth->fetch_row();

    > In Java, with the JDBC, you have to do this:
    > (assuming rs is a ResultSet object)
    > int id = rs.getInteger(1);
    > String firstname = rs.getString(2);
    > String lastname = rs.getString(3);

    That's a very misleading argument. You're comparing the functionality offered by a 3rd party perl module with the functionality offered by the standard JVM. A better example would be to compare perl's DBI/D modules with, say, the castor project (http://castor.exolab.org/). Using castor, one can serialize complex objects to and from a SQL data source without doing all of the work by hand.

  85. Re:This might finally cause me to learn Perl by totierne · · Score: 1

    So how easy is it to convert vbscript to perl automatically?

    Working in parsing for Oracle I just know the answer is, you could do 50% of this easy 70% with 1years development effoort .. 75% with 2years development effort.. SIGH

    open source: resistance is futile.

  86. Re:Perl appears to me to be a "dirty" language. by Our+Man+In+Redmond · · Score: 2

    I find Perl especially aesthetic, especially those dollar signs -- the ones in front of the multiple digits on the checks my employer gives me for writing Perl code.
    --

    --
    Someone you trust is one of us.
  87. Re:My wish list by swb · · Score: 1

    The speed part comes not from execution, since Perl scripts run about fast as compiled binaries, but from saving from doing the recompilation each time you run the script.

  88. Re:This might finally cause me to learn Perl by Leto2 · · Score: 1
    but if you put a comment next to it saying what it does, it's not hard to understand.

    Rule #1 in programming: Never use a comment to explain how your code works instead of what it does or why it does it. It's much better to write the code so that the _working_ is obvious, and it's a waste of time to explain badly written code.

    Ivo

    --
    <grub> Reading /. at -1 is like driving through Cracktown in a convertible that is stuck in 1st
  89. Re:Perl appears to me to be a "dirty" language. by Shoeboy · · Score: 2

    I bet you like hungarian notation, too, you moron.
    Don't complicate the language with functionality that belongs in the class/object browser.

    Class/object browser? My copy of vi doesn't have this thing.

    --Shoeboy

  90. Type-checking in Java by oops · · Score: 1
    I'd suggest that Java doesn't enforce type-checking as strongly as people think. eg. if I extract an object from a vector:

    Object o = list.get(i);

    then to do anything useful I have to cast that object o into the object type I believe it to be. Of course there are various solutions to this (templated Java etc.) but the problem exists in vanilla Java.

  91. Re:Larry Wall background by Nicolas+MONNET · · Score: 2

    Yeah I noticed that a few months while browsing p5p's archive ... and I was quite shocked. Larry Wall was commenting on a poster's obfuscated perl and told him that it took him only a split second to figure out what it meant ... "but you have to keep in mind that I won the IOCCC both times I entered". Hell, me thinks he's been playing a bad joke on us for all that time ...

  92. Rewrite allready done... by hoetzel · · Score: 2

    see www.python.org :-)

  93. What I want in Perl6 by devinoni · · Score: 1

    Perl has always been nice to do short, but powerful code. Even large projects can be done with Perl. However what I detest most about coding in Perl has always been how to implement OO. It would be terrific if there was a more elegant way to implement OO. Perl's OO seems like it was simply a graph on top of the modules system.

    1. Re:What I want in Perl6 by GeekBird · · Score: 1

      I really don't want to see Perl become an OO language. If you want OO, and its attendant overhead, use Java. But for useful text crunching without having to "class"ify everything, plain sequential Perl works fine. There is no reason for me do object crap in order to parse out a chunk of text and stuff it into a database.

      Readable Perl is very easy to write if you are a good programmer - it's called comments. Large projects should be planned, anyway, so you will have your major comments/docs before you actually code a line.

      --
      use Sig::Witty;
  94. Re:Lack of grammer by torpor · · Score: 1

    I used to have a very large and handy string handling library for C in my toolkit, but lost it during a disk crash some years ago.

    I have often wondered if anyone has ever started a project to build a good quality text/string handling library for C - anyone know?

    Might be handy to bang some stuff together.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  95. Re:Perl appears to me to be a "dirty" language. by Sebastopol · · Score: 1

    It can be very very dirty, but it depends on the mortality of the script. And dirty isn't such a bad thing. ;-)

    If I know the script is going to be used by many people, I avoid all the cute little tricks that Perl allows. I hate to do it b/c I get off on being a slick programmer, but even I forget what the heck my scripts do after six months.

    However, if I'm writing scripts on the fly for myself, I try to exploit the least verbose syntax forms. To quote a former programming mentor "You know you're done when you can't remove any more redundant code..." If I start to use the script frequently, I'll comment heavily.

    Question is, how radical will the changes be? I mean, I don't use sockets or Tcl, I just stick to Perl basics, so will it affect (effect?) me? (grammer nazi, please indicate the proper verb.)


    ---

    --
    https://www.accountkiller.com/removal-requested
  96. Perl background by ajs · · Score: 5
    I see a lot of standard "I don't like Perl 'cause it's ugly" and "Perl is line noise" sort of comments that I've been seeing since before anyone had ever heard of the language (back in '91). The following links are places that y'all should prowl before trying to discuss what perl "should be". You certainly don't have to like the language, but before discussing the things that make the language usable you should understand what it's TRYING to do.



    Enjoy!
  97. Re:This might finally cause me to learn Perl by HeghmoH · · Score: 2

    I've been speaking French about as long as I've been learning Perl. I understood the French instantly. I still don't really comprehend the Perl.

    --
    Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
  98. Recipe for disaster... by Carnage4Life · · Score: 2

    This is the reason I believe Perl needs work before being used for anything serious. The above example though contrived shows one of the dangers of Perl. In a strongly typed language if I do

    String ssn = rs.getFloat(4);
    String firstname = rs.getString(2);
    String lastname = rs.getString(3);
    float cash = rs.getString(1);

    I will get an error or thrown Exception for trying to convert a float to a string without a cast while in Perl this error will be allowed to silently propagate through the system causing wasted time later glancing at line-noise-like syntax trying to track down a bug that is due to the typelessness of the language.

    PS: Automatic initialization of variables thus causing typos to be treated as variables is another pet peeve of mine. Besides that Perl is really good at quick-and-dirty text manipulation which is what it excels in.

    1. Re:Recipe for disaster... by maraist · · Score: 2

      Hehe.. Isn't this why all database fields should be declared as text? Laugh.. All kidding aside. I've rarely ever had fields in a DB that perl cared about. It was almost always a medium to read from a CGI form and write to a DB ( validating fields there ) or reading from the DB and displaying on the screen. I'm sure there are cases that the information is more sensative, but I've never encountered one.

      Another point of view is that because strings are so versitle in perl. It wouldn't matter if you read it in as a string, float or int, since it could easily internally type-cast to the appropriate type when used. The worst that would happen is that you'd convert a string to a zero, which should signal a warning somewhere.

      As for initialization.. YOU MAKE BAD PERL JUJU, since you obviously don't use -w. If you did, then you'd know that it's impossible to use a variable without first initializing it. Perl allows you to make the command line -e '...' without any type checking, but allows you to be anal man with -w and "use strict". Trust me, when I started using -w, I'd get really pissy because I loved the default case of undef becomming an empty string. Now I have to
      $str ||= "";
      everything that I know is printable even when null.

      -May you do good things with Perl

      --
      -Michael
    2. Re:Recipe for disaster... by dirt · · Score: 2
      While the rest of your argument is pretty solid,
      PS: Automatic initialization of variables thus causing typos to be treated as variables is another pet peeve of mine.
      Always, always, always, use strict; and run with -w, at least for anything more than 20-100 lines long. What'd be really great is if 'use strict;' were the norm, and 'no strict;' were the exception, in Perl6... but then probably only 20% of older code would fly, and -e would be horrid.

      ---
      --

      ---
      You are not what you own -- Fugazi, "Merchandise"
    3. Re:Recipe for disaster... by Our+Man+In+Redmond · · Score: 2
      I'm not sure what your point is here. Since there are no floats or strings as such, only scalars, you'll never have a type mismatch. In the example you give above, I assume the correct code would be something like
      $ssn = $rs[1];
      $firstname = $rs[2];
      $lastname = $rs[3];
      $cash = $rs[4];

      but that would be both inefficient and probably wrong. I say "probably" because unless you have an $rs[0] element your variables are all going to be off by one position -- a mistake you could just as easily make in C. This should become evident as soon as you start seeing people with no (actually, undefined) cash with social security numbers of "Fred" and names like "Flintstone 225.62". And it's inefficient because it'd be much easier to say
      ($ssn, $firstname, $lastname, $cash) = @rs;

      No subscripts to worry about there, and I may have been staring at Perl code too long, but to me it doesn't look like line noise.

      If you're relying on typing as a first check of the validity of your data, admittedly that's something that Perl doesn't do. However it would probably take about ten minutes of looking at the regular expression of Programming Perl to see that, for instance, you could check the validity of a Social Security number with
      $ssn =~ /^\d\d\d[ -]?\d\d[ -]?\d\d\d\d$/ or die "Bad SSN ($ssn)";

      assuming that the database application you're getting the SSN from isn't already doing it for you.
      --
      --
      Someone you trust is one of us.
    4. Re:Recipe for disaster... by rgmoore · · Score: 1
      What'd be really great is if 'use strict;' were the norm, and 'no strict;' were the exception, in Perl6... but then probably only 20% of older code would fly, and -e would be horrid.

      There's no particular reason why you couldn't handle this. For instance you could have strict be the default unless you're running -e, and set it to ignore use strict when it sees it and strict is already on. One of the nice things about Perl is that Perl people aren't generally zealots about the evils of having the language do things the right way automagically, so nobody would throw a fit over making things work that way.

      Sure some scripts that won't run under strict would break, but A) they should be running under strict anyway and B) it would take about 2 seconds to add a no strict to the front of them. Neither of your objections is serious enough to be a real roadblock to making strict the default mode, and hopefully the writers will see it that way when it comes time to code Perl6.

      --

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

  99. Re:Perl appears to me to be a "dirty" language. by Seth+Finkelstein · · Score: 2
    Too much use of symbols, not enough grammar.

    The way I've expressed this thought is:

    "Perl is APL on LSD"

  100. My wish list by swb · · Score: 1

    A way to generate binaries, if only to gain some speed.

    Sane ways to implement complex data structures. I often dream at night about being able to do records in Perl like in Pascal.

    I'd like to have an array hold a collection of hashes. I'd like a hash that could return arrays as values, and a way to tie() them to db files. And I don't want to screw around with references. I'm a lame programmer, so I usually just store arrays in my hashes as join()'d scalars, which means I'm constantly winding and unwinding them.

    1. Re:My wish list by swb · · Score: 1

      I'm not talking about replacing functionality, I'm talking about adding functionality. I don't see how adding something along the lines of pascal-style records (record.variable) or some other method for defining structured data types takes away from the obfuscationist technique currently used in Perl.

      Yes, I have a bunch of Perl books, yes my eyes glaze over when I start trying to do complex data types in Perl because they insist on this fuzzy, glue-a-bunch-of-scalars-and-call-it-a-complex-data -type technique and it just becomes hard for me to comprehend and looks even harder to maintain.

      My workaround has always been to develop my own structured data types that WILL fit into a Perl hash or array. I've done it often enough that I generally reuse my own functions for winding my complex data types into scalars and back out again. Perl's regex capabilities make this not that difficult, but at the same time my programs (do I have to call them scripts?) that make heavy use of complex data structures with large data sets pound the snot out of the boxes I run 'em on. Partly this is due to my sloppy use of memory but also due to the fact that my code wastes so much time winding and unwinding my data structures to fit into the scalar space they need to go into.

      I know that inside Perl someplace ANY complex data type is going to have to have this done for it, but I'd imagine that a fast, well-written routine is always going to be better than the techniques I use AND it could have a sane, easily understood syntax for accomplishing it.

    2. Re:My wish list by Christianfreak · · Score: 1
      There's a perl compiler availiable but it doesn't help much with speed if I understand correctly. Its someone on perl.org

      Never knock on Death's door:

    3. Re:My wish list by otis+wildflower · · Score: 2

      The speed part comes not from execution, since Perl scripts run about fast as compiled binaries, but from saving from doing the recompilation each time you run the script.

      Then why not add the ability to serialize a compiled script (last stage before execution) and feed it back to Perl (or, even smarter, add a magic header so you can execute it like a 'binary' using the MISC executables kernel mod in Linux like JAVA)? You lose late-binding features (and have to code around that) but there are many scripts which don't care about that, or which do runtime stuff explicitly...

      Your Working Boy,

  101. Re:This might finally cause me to learn Perl by Municipa · · Score: 2

    I agree with Shoeboy, Perl isn't that hard to read. I'm not even a Perl-Master or anything. Perl is one of the easiest languages I've ever had the pleasure of learning, you can start writing useful programs in about a day. Sometimes it's hard to read the regular expressions, and most of the time, when I'm reading code, looking for bugs, I glance past the regular expressions, keeping note that there was one, if I don't find a bug, I then go back and examine them. They're easy to pick out, once you spend a week or so on them, they aren't so hard to decipher.. that's actually how I learned regexps, by looking at an parser which I knew worked and I had the original data file handy. An O'Reilly book or the Perl Documentation page at your side helps too.

  102. Re:Perl appears to me to be a "dirty" language. by pudge · · Score: 2

    Perl MAY have strong typing, but it would certainly be optional.

  103. Re:Perl appears to me to be a "dirty" language. by kurioszyn · · Score: 1

    Faster than C ? You realize that perl was written in C. It might be faster in text processing if compared to some naive C code but that's pointless. In efect you are comparing algoritms which of course has nothing to do with C vs Perl.

  104. Re:Uhmm by gaudior · · Score: 1
    Funny?!

    Only if you are 13 years old, and still giggle when someone says 'tits'.


    --

  105. Re:Perl appears to me to be a "dirty" language. by LostOne · · Score: 1

    Actually, effect may be used as a verb. It means "to cause to happen". For example, one can "effect a change" to make a change happen.

    --

    If it works in theory, try something else in practice.
  106. perl isn't that bad by patreides · · Score: 1

    I enjoy perl at times when bash gets too long or slow, and when C segfaults because I'm playing with strings too much. Perl can handle both arithmetic (which bash has to do special, and annoyingly) and powerful string manipuilation, and I like the opportunities the builtin data types allow, especially the hashes.

    I learned perl after writing a huge iterative perl script that colorizes finger based on graduating class of a user. The home directories on my school's machine are sorted by class, so I used that information. The script was incredibly slow, bottlenecking from tons of cuts, ifs and inaccurate greps, but was good for diagnosing periods of high system load, then it wouldn't even run :-) So I learned perl and rewrote it, and it works as fast as finger does, even though I'm probably not doing things very efficiently (I know I should use some pipes and fewer system() calls).

    --
    # debian/rules
    1. Re:perl isn't that bad by patreides · · Score: 1

      gaahhh!!! I meant shell script at the beginning of the second paragraph!!
      And yes, I did preview.

      --
      # debian/rules
  107. Re:Perl uses smarter text algorithms than most peo by sillysally · · Score: 1
    Why isn't Perl regex code in a library usable by C++ users ?

    oh good God, you are not cut out to be a Perl coder. Let me get this straight: in addition to readability/maintainability, portability, and performance, you value modularity and reusability? Just where do you get off questioning the great Larry Wall?

  108. Re:TO MODERATORS by Enoch+Root · · Score: 2
    I've got enough to last me a lifetime, really... Which is the entire point. :) (Barring a bitchslap, of course.)

    --Enoch Root, the Human Karma Torch

  109. Re:This might finally cause me to learn Perl by ajs · · Score: 2

    Why put a comment next to it? Why not in the regexp?

    s{
    < (?# Match the beginning of the tag)
    (?!$okay_tags) (?# Match all non-ok tags)
    .* (?# Match anything after them)
    ?> (?# But only until the first >)
    }{}gxi;

  110. Re:Compatibility. by maraist · · Score: 2

    Most likely there will be pragmas that turn on the new syntax.

    For example.. The new regular expression package can only be used by typing
    use re;

    Most likely there will be a requirement to say
    use 6.0;
    To make sure of the new engine. The older engine will probably be linked out for use in compatibility scripts. For example. the use of '&' in a reg ex makes the entire perl engine react differently; Likewise, finding a module that makes use of the new syntax would affect which interpreter / library is loaded in memory.

    I hope that they find a clean way of doing this. A rewrite really should not feel like bolted on code.

    --
    -Michael
  111. Re:Perl appears to me to be a "dirty" language. by sillysally · · Score: 1

    what don't you like about hungarian notation? I'll bet you don't even know it.

  112. Re:Richard, the PR guy by Ranger+Rick · · Score: 1
    Dick Hardt runs ActiveState (the Win32 perl guys). At last year's conference they handed out bumper stickers that said "If you don't know perl, you don't know Dick." :)

    :wq!

    --

    WWJD? JWRTFM!!!

  113. Re:This might finally cause me to learn Perl by Shoeboy · · Score: 1

    Seriously, /why/ would you want to do that?
    Because I can't code an attractive and usable UI to save my life, but I can specify the database interaction and function of a page. That's why.
    --Shoeboy

  114. Re:Perl appears to me to be a "dirty" language. by sillysally · · Score: 1
    that is not a good point. that point could just as easily be made about assembly langauge, i.e. it's a point about the mind, not about perl. perl is an ugly unreadable language, moreso than many other languages.

    it is possible that it's the price of power and expressiveness: perhaps nobody can invent a language that does as much that does not come out looking ugly and unreadable. But that does not alter the fact that Perl is ugly and unreadable.

  115. Re:Larry Wall background by sbryant · · Score: 1
    Larry Wall - home page unknown, EMail address unknown

    There's a reason for that. Larry Wall is in fact Weird Al. Same shirts, same glasses, same silly grin! I bet you've never seen both of them together. Al is Larry with a wig.

    Actually, Larry's homepage isn't unknown. It's here.

  116. Re:This might finally cause me to learn Perl by Alan · · Score: 1

    Well, actually the hard part about the above is the regex, not the perl. In fact, the only part of the line that is perl is "$okay_tags" and perhaps the ";" at the end. The rest comes from the wonderful world of line nois^W^Wregular expressions.

    Perl also makes regexs *easier* to read, and it allows you to do things like split up a regex onto multiple lines and so forth...

    HTH

  117. Re:Perl appears to me to be a "dirty" language. by sillysally · · Score: 1

    are you kidding? it's "affect", not "effect".

  118. Re:Perl appears to me to be a "dirty" language. by maraist · · Score: 2

    Actually, Perl 5.005 allows typed variables. I tried designing with it, and it really gets combersome.

    # Class A; Class B inherits Class A

    my A $obj1 = new B;
    my B $obj2 = $obj1;

    I liked it because of the supposed optimization of the pseudo hashes, but I found myself typing 3 times as much to do incredibly simple tasks. Personally I like building OO libraries ( makes my work easier down the road ), but the "bolted on" perl OO model takes a lot more work when an attempt is made to be clean and concise, which you need to do every now and again.

    That said, I definately agree with you about how powerful perl is when it comes to data manipulation such as in databases. I can throw together a complete CGI/DBI web site in minutes, for prototyping, then go back later and structure all the function calls when there's time.

    -Michael

    --
    -Michael
  119. Re:Perl in C++ by Ranger+Rick · · Score: 1
    No, Topaz, which was Chip's attempt at rewriting the perl engine in C++, is/was written in C++. :)

    It was unofficial, and it sounds like it's going to be (somewhat) abandoned.

    :wq!

    --

    WWJD? JWRTFM!!!

  120. Just like libc by Sludge · · Score: 2

    I think they should call the new Perl version gperl2, just so they can follow suit with the confusing libc5->glibc2 shift.

  121. Re:Perl appears to me to be a "dirty" language. by torpor · · Score: 2

    Hey, no fair! Firstly, I'm not a Python zealot. I don't even really know Python too well yet.

    My point was, I just don't find Perl to be particularly aesthetic, and was wondering if anything is going to be done to fix that in the rewrite...

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  122. Re:bleh by gaudior · · Score: 1

    The camel was chosen as the cover animal by O'Reilly (www.ora.com) for the first 'Programming Perl' book.
    --

  123. Larry Wall background by ccoakley · · Score: 2
    Larry Wall - home page unknown, EMail address unknown

    Grand prize in most well-rounded in confusion (1986/wall.c)

    Most Useful Obfuscation (1987/wall.c)

    From ioccc.org

    And you people WONDER why it's hard to read PERL code?

    And yes, I have written readable PERL code. I have also written a regex script to parse my VB code and alter function parameters as a global find and replace... If you can't read regex, you won't be able to read well written PERL code that uses it. I find that most people who accuse PERL of being dirty and hard to read simply can't read regex.

    --
    Network Security: It always comes down to a big guy with a gun.
    1. Re:Larry Wall background by gorilla · · Score: 2

      Not that unknown. Start with www.wall.org

  124. Re:Perl appears to me to be a "dirty" language. by torpor · · Score: 2

    The way I see Perl is that if you have a messy mind, you'll create crappy perl. If you've got a focussed mind, you'll create focussed perl. You impose the discipline on perl, it doesn't impose the discipline on you. It's the most direct and natural way I've ever seen for transferring thoughts to real code. (Painting By Numbers doesn't count).

    This is a good point, well received.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  125. Not necessarily transparent by josu · · Score: 1
    So while the focus of the effort seems to be on improving the Perl guts and API, the project will also be used as an opportunity to clean out some of the cruft, including bad and seldom-used features.

    I welcome it.

  126. M$ supports ActiveState (Perl for Win32) by cps42 · · Score: 3
    Direct financial support was for ActiveState, the folks that ported Perl to the Win32 platform, and continues to port Python for Win32 as well. In fact, it's noted that ActiveState will be in VStudio 7.0 on the front page.

    As another aside, I'd say this is a Good Thing (tm) for those of us that have to admin PC's running Linux, Solaris, Win2K, WinNT, and Win98, Sun boxen, and Mac's all in the same campus. That's the advantage of Perl. And thanks to M$ for finally supporting something that someone else wrote without trying to take it over. They should get credit where credit is due.

  127. Re:sitting in the office by Phrogman · · Score: 3

    Depends on what you mean here. I use PHP scripts to present information drawn from my mysql database as webpages definitely. But I also use it to publish static html pages, create text files, ftp files from one server to another, verify data values in my database etc - all tasks that could have been done in Perl (and perhaps more effectively) but which I have done using PHP simply because I am more familiar with it than I am with Perl. In this sense, it is a competitor with Perl, in the sense that most sysadmins will not be writing their maintenance scripts in PHP, no it is probably not in competition with Perl.

    Overall I find PHP scripts are easier to decipher when you return to them 6 months later to make a change, I think it has a simpler syntax and some very logical improvements over some aspects of Perl, and for these reasons I prefer it. Mind you there are some older scripts written in Perl that I still occasionally have to tweak, but most of these have been replaced by PHP scripts whenever the need arose.

    --
    "The first time I got drunk, I got married. The second time I bought a chimpanzee, after that I stayed sober" Arian Seid
  128. Re:Perl appears to me to be a "dirty" language. by Chiasmus_ · · Score: 2

    Yes, I realize that PERL was written in C. I also realize that nasm (the assembly compiler) was written in C, and that C itself was written in C.

    Still, Slashdot did post a "benchmark comparison" study a couple months ago, which found that text parsing "as written by experienced, competent programmers" in C didn't hold up against Perl's text parsing.

    I agree that it's a little weird to benchmark something against its parent. Maybe what they meant is "PERL handles text better than YOU."

    --
    "Beware he who would deny you access to information, for in his heart he deems himself your master."
  129. Re:This might finally cause me to learn Perl by Yunzil · · Score: 1
    s#]*>)##gi; Think it's unreadable? What about this sentence: "Cette phrase en francais est difficile a traduire en anglais." (From Douglas Hofstader's "Metamagical Themas") The point is, it's impossible to read anything until you know the language.

    Disagree. Even though I don't know French, I could get the general idea out of the French sentence. The Perl code looks like someone put both palms on the keyboard and pressed a bunch of keys. :)

  130. Compatibility. by Christopher+Thomas · · Score: 3

    Will perl 5 source be 100% ok with perl6 or will i have to rewrite code?

    The impression I get from the article is "mostly compatible":

    So while the focus of the effort seems to be on improving the Perl guts and API, the project will also be used as an opportunity to clean out some of the cruft, including bad and seldom-used features.

    You'll probably be ok, but no promises, assuming they don't change their minds during the next year or so (remember, they're just _entering_ the planning stage now).

    1. Re:Compatibility. by pudge · · Score: 2

      Well, many things on CPAN _will break_ with perl 6. This is assumed. I apparently did not emphasize that enough in the original piece. Work will be done to make perl 5 stuff run in one way or another, but there will be breakage (probably would be greater between 5 and 6 than between 4 and 5).

    2. Re:Compatibility. by pudge · · Score: 2

      Yes, well, that's the point. Filehandles already are, for the most part. In perl 5.6 you can do:

      open my $fh, $path or die $!;

      Formats, well, formats might go away entirely from the core and move to a more manageable, easy-to-use, sensical module.

  131. Re:Perl appears to me to be a "dirty" language. by sillysally · · Score: 1

    whoops! of course, at a glance I saw the parenthesized word, not the alternative. sorry.

  132. Re:This might finally cause me to learn Perl by prizog · · Score: 1

    I chose that as an example of "incomprehensible" Perl. But it's only incomprehensible if you don't know Perl. In Perl, all regexps are read from left to right.

    So if you're trying to read mine, you should first check out the first character: "<". It's not a metacharacter - it's an angle bracket. Why? Because this script dealt with HTML. Next bit: "(?" When you see the '?' after the '(', the manual says "you should stop and \"question\" exactly what is going on."

    Then there's a "!" to give meaning to the "(?". Everyone knows that ! means "not". And that should give you a fair idea of what's going on - we're trying not to match something. It's a little more complex than that, but that's because it's got a complex job.

    OK, next bit: A variable - containing what we're trying not to match (in this case, the descriptive variable name tells us that we're not matching okay tags. The "<" (earlier) tells us that we're matching some tags, so it must be the not OK tags). If you had the script in front of you, you would see that the variable was in the form foo|bar|baz|fred|barney. So, there are a bunch of okay tags we're trying not to match.

    Next bit: ")". Emacs will tell you what it matches (in case you couldn't tell yourself).

    Etc. I did the hard part, you do the rest :).

    Before I saw this, I assumed that the job (the sub Police_html) would be done with a traditional parser. For an exercise, I tried to write one... My buggy parser (it let <blink> through if <b> was allowed) was around 20 lines, in more-or-less C programming style - no regexps. It was no more readable, and it didn't do the job right.

    Perl lets you do things quickly and easily that would be ugly and long with other languages. If you think the above code is ugly, don't compare it to the English "Remove all HTML tags not on a whitelist", but to the equivalent C.


    -Dave Turner.

  133. Perl appears to me to be a "dirty" language. by torpor · · Score: 2

    Over the years, I've hacked around in Perl, never really caring much to fully learn it properly in the same way that I've learned C/C++/Java and more recently, Object Pascal (Delphi). I've got 4 pretty good Perl books on my shelf, and haven't really even bothered to get more than a few pages in ... using them mostly as references for when I inherit a Perl project from some other poor soul.

    It always comes off to me as being a sort of a 'dirty' language in that there are about a kajillion different ways to do the same thing - and I've never much cared for the way variables are declared and used in Perl (scalars?). Too much use of symbols, not enough grammar.

    The limited Perl I have written has filled me with nothing short of a maniacal desire to become a darned good Python programmer.

    I understand that Perl ties a lot of the web together, and it definitely has its uses, but my initial reaction to the news that Perl was getting a rewrite was "about time, coz it's a gnarly language" ... I guess however, that this rewrite will address the engine more than the language itself, no?

    What language-based improvements will this rewrite address, any of you Perlverts know?

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    1. Re:Perl appears to me to be a "dirty" language. by elflord · · Score: 1
      BTW, your original complaint about Perl's loose typing is also true with Python. For alot of programming chores its a feature not a deficiency.

      Python knows the diff between a string and a number, perl treats them as the same. BTW, python also can tell you whether a number is a double or an int ( without resorting to regular expression checks ). Python is dynamically typed, but not typeless.

    2. Re:Perl appears to me to be a "dirty" language. by elflord · · Score: 1
      The argument isn't for a better DB interface but how to handle arbitrary data-types. A good reasoning for this is that I might not care how the database was designed. Was it a 32bit int or 64bit ( possibly 32/64 bit date stamp, etc ). Changing the database means changing the Java / C code.

      Not at all. There are ways to circumvent strong typing in OO languages. For example, you can have a data type that has a bunch of aggregates ( string, double, int ) and an overloaded constructor that initialises the right aggregate, then an accessor method that returns the right one. It's not that hard to do, in fact this kind of trick comes up a lot when you're accessing any kind of external data.

    3. Re:Perl appears to me to be a "dirty" language. by maraist · · Score: 2

      Theoretically, you could link to the perl reg-ex library. You could also use it's kick-ass memory manager ( due to double indirection ) to help prevent massive memory cluttering due to allocs and frees for all the tiny strings. But at that point, you'd be using perl. And what's the point, since it's quicker to code and debug a perl program than a C one. Dynamic systems, such as web pages require a development environment with a fast turn-around time.

      My point is that perl had a nich back in it's day, and that way string parsing. It's libraries were optimized to do so. Many of the types of optimizations ( such as self modifying code, in the case of variable substitutions for reg-ex's or even the eval '' statement ) are hard to do in a low level language. Not that it isn't possible, but just that to do so would take an enormous amount development effort, which doesn't fit into the web-model.

      Perl isn't really the best web-model for most situations either. A heavily loaded web site would be better used by a massive C-engine with customizable pages. Or a PHP/ASP setup might get pages out the door faster ( especially with new developers ). But Perl is a very good general purpose tool for text processing ( as well as other fields ).

      --
      -Michael
    4. Re:Perl appears to me to be a "dirty" language. by elflord · · Score: 1
      With dynamic typing, you might basically test your program every 30 lines coded.

      You can do safety checking in C++ too.

      In addition in C++ there are many bugs that are related to memory allocation,

      The benefits of perl's ref counting drop substantially when you introduce more complex data types.

      type casting

      Not really a problem in C++. This is more of a C issue. You don't need unsafe casts in C++. Keep in mind that in C++, you do at the very least have to be explicit about your casts.

      or other bugs with no equivalent in Perl or a dynamically typed langage.

      Dynamic typing provides its own set of risks. The main disadvantage with static typing is inflexibility, but you can partly circumvent this with dynamic binding.

    5. Re:Perl appears to me to be a "dirty" language. by elflord · · Score: 1
      Plus you do to many things in a different and longer way. So it's not 500k lines of Perl vs 500k lines of C++ with more bugs in C++. It's really 50k of Perl (or Smalltalk, or Lisp) with few bugs, vs 500k lines of C++ with many bugs

      Forgot to respond to this. This really depends on what you're doing. I doubt you'd need 10x as muych C++ code unless you're writing C in C++. There are some cases wehere perl has a big advantage, but for some things, C++ will not be much longer and it will be cleaner ( eg GUI code ).

    6. Re:Perl appears to me to be a "dirty" language. by Chiasmus_ · · Score: 3

      Another reason Perl holds the web together is that even though its benchmarks suck for number-crunching, it out-performs both Java and C (Yes, C, and I found that unusual) when it comes to parsing text. In fact, if I remember the "Benchmark" story on Slashdot from a couple months ago, Perl was six times faster than Java for text-based stuff.

      And since the web's content is so heavily text-based (because plain text is a universal standard, HTML is text-based, and because most pages' content is text), it's easy to see why PERL dominates.

      Different tools for different jobs. If you want to write a first-person shooter or operating system, use C. If you want to write a script that converts newlines in text files between \r\n and \n, PERL would probably be the best choice. If you want to write an ASCII game, I'd go with QuickBasic 5.

      In conclusion, PERL rules, and if this upgrade is good, that's cool, and if it isn't, no one is going to force us to upgrade our interpreters.

      --
      "Beware he who would deny you access to information, for in his heart he deems himself your master."
    7. Re:Perl appears to me to be a "dirty" language. by Yamao · · Score: 1

      Says the substitute Grammar Nazi: you are perfectly correct.

      --
      Be nice to your friends. If it weren't for them, you'd be a complete stranger.
    8. Re:Perl appears to me to be a "dirty" language. by Stephen+Samuel · · Score: 2
      It's kinda like when I figured out that FORTH implemented on a 6809 assembly could be 'faster' than native Assembler -- It's not that you could (oxymoronically) do something faster than it could be done -- It's that the "standard way" of doing things is slower than a well designed special implementation.

      For the FORTH case, the 'faster' result would come where you had a program that consisted almost entirely of lots of calls to short subroutines That's what FORTH (as a threaded language) is all about. In standard assembler it would normally be implemented as:

      call sub1
      call sub2
      call sub3
      ....
      In forth, as a threaded language, it would be implemented as a list:
      ( &sub1, &sub2, &sub3 ....)
      In 'standard' assembly, each subroutine would return to the main routine which would then call the next subN. In forth, each subroutine would simply Jump to the next subroutine in the list:
      JMP [REG:Call_list++]
      On the 6809, this would be implemented by pointing the secondary stack pointer at the threaded list, and doing a
      RET SP2 (secondary stack)
      This effectively saves the one instruction per subroutine call (!!!!). Not much of a savings, but if you're calling lots of short subroutines, it can add up.

      Similarly, perl does lots of string manipulation-type work in ways that are fundamentally different than the way that 'standard' C does them. Just like the 6809 example, there's nothing to stop you from doing things the PERL way, it would simply take

      • a rethinking of the way you do things,
      • being willing to risk confusing any maintainer who looked at your code.
      • a willingness to abandon all/much of the standard code base built up over time
      • a willingnes/ability to train everybody who came after you.
      As somebody else said -- by the time you do all that, you'd be programming perl in C. In that case, why bother to do it in C at all?
      --
      Free Software: Like love, it grows best when given away.
    9. Re:Perl appears to me to be a "dirty" language. by slycer · · Score: 2

      It always comes off to me as being a sort of a 'dirty' language in that there are about a kajillion different ways to do the same thing

      But that's the whole point of PERL.. :-)

    10. Re:Perl appears to me to be a "dirty" language. by hal200 · · Score: 1
      THIS got a 2?!? Reads like flamebait to me. Now excuse me while I heat a cup of Java by the warming glow of your post...

      Speaking as a typical (non-stupid) perl programmer, good design and code reuse are not the sole domain of Java, as much as Sun might like you to believe...Write Once, Run Anywhere, my ass!

      In fact, I'd go so far as to say that the Perl community promotes code reuse (via the CPAN) more successfully than any other programming community I've ever seen. Why do you think writing CGI/DB scripts is so easy in perl? CGI.pm and DBI. Whenever I start a project, one of the first things I do is to visit the CPAN and see what is out there I can use to make my life easier. Most of the time I find modules that are of sufficient quality to make my job dead easy.

      Now, if you want a good example of poor design, take a good long look at the Swing API...The most inconsistent bass-ackwards toolkit I've ever seen...And I LIKE Java.

      --

      I just want to take over the world...Why does that automatically make me EVIL?

    11. Re:Perl appears to me to be a "dirty" language. by sandler · · Score: 2

      Perl is never going to become a strongly-typed language, if that's what you're gunning for. This is part of what makes quick scripting in Perl possible. You don't have to make your code impossible to read, either. "use English" if you like clearer default variables, for example, and don't rely on $_. But I love that I can quickly and easily parse a web form or a data file without having to start malloc'ing and casting my way around.

    12. Re:Perl appears to me to be a "dirty" language. by maraist · · Score: 2

      Don't see how it's misleading since the nature of perl is to make everything a string unless otherwise specified. DBI and JDBC are similar from what I understand.
      The argument isn't for a better DB interface but how to handle arbitrary data-types. A good reasoning for this is that I might not care how the database was designed. Was it a 32bit int or 64bit ( possibly 32/64 bit date stamp, etc ). Changing the database means changing the Java / C code. In Perl, I don't think I've ever had to change a line of code because I've redefined types for table columns.
      This allows me to quickly get a proto-type database up ( possibly with all text fields ), then later optimize the row lengths. More importantly, if the DBA needs to lengthen a VARCHAR, he can do so without risk of affecting the perl code. The only issue that should ever come up is the formatting of the resultant HTML.

      Arguably, you could create a Java DB interface that returned everything as a pointer to type "Object", then use to_string for display purposes. I think that we'd all agree, however, that this would be undermining Java and bad programming practice.

      --
      -Michael
    13. Re:Perl appears to me to be a "dirty" language. by jason_aw · · Score: 1

      > don't find Perl to be particularly aesthetic

      Well, I've never seen poetry written in Python :-p

    14. Re:Perl appears to me to be a "dirty" language. by King+Babar · · Score: 2
      I really think that one of the reasons that the Perl modules are SO useful is due to the lack of strong typing ala Java.

      A PERFECT example of this is the DBI library. In Perl, it's simple. You can even do

      ($id, $firstname, $lastname) = $sth->fetch_row();

      In Java, with the JDBC, you have to do this:

      (assuming rs is a ResultSet object)
      int id = rs.getInteger(1);
      String firstname = rs.getString(2);
      String lastname = rs.getString(3);

      Perl modules are beautiful things, but the example you cite isn't evidence that strong typing is bad, only that type inference is good. In a strongly-typed functional language like Haskell, it would be clear from the type of, e.g., rs.getString() that it returns a string, hence any variable that gets that return value is...wait for it...a string. So none of those type annotations would be necessary, and, given a decent tupling syntax, the Java code would look like the Perl, modulo typographical conventions.

      Indeed, Perl is essentially performing a lot of type inference ("guessing?") behind the scenes, which works gloriously well except when it doesn't. ;-)

      Now, if you want my personal pet peeve about Perl's Dorkiest Feature, I would say it is the bass ackwwards default of having to say "my" everytime you want a lexical scope, rather than saying, say, "packaged" for the rare time when you really do want a pacakage (or global) variable. My, my, my how the code gets cluttered up...

      --

      Babar

    15. Re:Perl appears to me to be a "dirty" language. by Camel+Pilot · · Score: 1

      "Perl is never going to become a strongly-typed language"

      Yikes I hope not! However, Python is not strongly-typed either.

      Keep in mind that the parent post to this discussion is the obligatory First-Python-Zealot-Post-in-a-Perl-Thread post and is designed to create heat.

  134. Re:Perl uses smarter text algorithms than most peo by Ranger+Rick · · Score: 1
    Oh, you mean this?

    Oh, sorry, that's C. C++ can't use C, can it? ;)

    :wq!

    --

    WWJD? JWRTFM!!!

  135. Larry Wall DOES NOT Announce Perl 6 by sandler · · Score: 4

    He announced his vision for Perl 6. Please try to keep the headlines from being completely misleading....

  136. Re:Good! by Another+MacHack · · Score: 1

    There's nothing inherently Wintel-specific about COM or DCOM, it's just that that's where 99% of it happens to be implemented. I have a COM-freak friend who gets trigger happy whenever anyone talks about COM as being MS-specific. "It's publicly documented" he begins to froth...

  137. Re:Get this! by Genghis+Troll · · Score: 1

    I will CRUSH you and your stupid, plastic,
    transforming toys!

  138. YAY! .. wait.... huh? by wrenling · · Score: 1

    The article clearly states that a preview version will be available some time NEXT summer.

    Not even all the modules are upgraded for me to use in 5.6 yet.. let alone thinking about Perl 6.

    Sorry, but the article title et al. are rather misleading, guys. How about 'Perl 6 Dev Plans announced' instead?

    --
    Check out Magic Firesheep!
  139. Re:This might finally cause me to learn Perl by Pentagram · · Score: 1

    I'm just starting Perl (~chap#2 O'Reilly) and I don't have a clue what your Perl statement says. Mind you, I could have a stab at the French translation: a phrase in French is difficult to translate in English - and my French is worse than my Perl :)

    How about a little experiment: let's have an experienced Perl hacker write a paragraph in obfuscated Perl and also a paragraph of almost random alphanumerics. Then we could have a straw poll of non Perl-learners to see if they can recognise which is which :)

  140. Good! by Ex+Machina · · Score: 1

    When will the COM+, SOAP, OpenGL and ASP+ support enter beta!

    1. Re:Good! by daytrip · · Score: 1

      I just pulled down activeperl's release (for unix no less) which contained a SOAP implementation.

      So one could argue that since it ships with a (decent) version of perl, it is in there. COM+ is an awefully platform dependent technology, no? I think that's what modules are for.

      -js

  141. Re:Choose two by gilroy · · Score: 2
    Blockquoth the poster (italic-quoting the original article):
    Larry promises that Perl 6 will be "better, stronger, faster"
    This is very much like NASA's promise of "faster, better, cheaper" , although they usually get only one or two right.
    Actually, it sounds like they should be calling this "bionic Perl". :)
  142. Re:Rewriting Unix commands in Perl? by drinkypoo · · Score: 2

    If you need perl on a rescue disk, you can replace the commands with perl scripts (since perl is there anyway) and save some space.

    And yes, I know I'm reaching.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  143. Re:Programming language design by Tower · · Score: 1

    How are namespaces one of the 'good things'?

    --
    "It's tough to be bilingual when you get hit in the head."
  144. Perl dirty? Use Unicon! by phliar · · Score: 1
    Assuming this isn't just flamebait...

    there are about a kajillion different ways to do the same thing

    Nothing wrong with that as such (or perhaps I should say "per se"...)

    and I've never much cared for the way variables are declared and used in Perl (scalars?). Too much use of symbols, not enough grammar.

    Amen!

    This is a plug for Icon. You can do everything you can in Perl in Icon - with sane and human-readable syntax. Things are slightly different there; see the article from the Linux Journal.

    To download this object-oriented, very high level language with garbage collection, X11 support, POSIX stuff (networking, file/directory manipulation etc.) go to the Unicon web page. It is available for Unix (Linux, FreeBSD etc.) and Windows-NT. It is, of course, free.

    -s

    --
    Unlimited growth == Cancer.
    1. Re:Perl dirty? Use Unicon! by torpor · · Score: 2

      It wasn't flamebait (at least I didn't intend to flame), and thanks for the link to Icon.

      Something to digest this evening.

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  145. Lack of grammer by Municipa · · Score: 1

    I always thought the lack of grammer and use of symbols made Perl code cleaner, more compact.

    Also, I always thought it was strange that Perl ties so much of the web together. I think this happened just because a lot of early web enthusiats were good perl programmers, not because it's specifically good at the job. Perl is good for CGI.. but I don't know why anyone make a Perl web server. Does anyone know if mod_perl/PGP is quick for running sql querries and pulling back the data? I'm sure it's fantastic for parsing the results, but I'd think a C interface to the data would be quicker.

    1. Re:Lack of grammer by Anonymous Coward · · Score: 1

      I think this happened just because a lot of early web enthusiats were good perl programmers, not because it's specifically good at the job.

      Wrong, Perl excels at text manipulation and the web is mainly...text. Try doing text manipulation in C or Java and see how much more quickly it can be done in Perl.

      Does anyone know if mod_perl/PGP is quick for running sql querries and pulling back the data? I'm sure it's fantastic for parsing the results, but I'd think a C interface to the data would be quicker.

      Mod_perl is very quick. Look at slashdot, imdb.com, or deja.com to see if it's quick enough for you. C might be a little quicker but you'd need to learn a lot more webserver internals to be any good with it. In most cases, mod_perl is more than quick enough. So is PHP.

    2. Re:Lack of grammer by Municipa · · Score: 1

      My point about static data was that text or binary or whatever, it's static so perl isn't going to be faster dumping out unmodified ascii values than dumping out anything else, is it?

  146. Re:sitting in the office by orabidoo · · Score: 2
    it has been my impression that perl has been slipping.. losing its position as "the best for cgi

    you could more accurately say that CGI has been losing its reputation as the best (or normal) way to do dynamic webpages, and *that* is a great thing in itself, since CGI (one fork/exec per page, yay!) sucks rocks. Perl has very good support for the CGI model, wiht the CGI.pm module, and mod_perl for Apache has two very good CGI emulations (Registry and PerlRun, with different tradeoffs in how much faster they are, and how much cleaner they require your code to be). However, emulating CGI is *NOT* the only, or the best way to use build dynamic pages with Perl.

    The web-dev world has already pretty much come to the conclusion that URLs must be mapped to their content, not to a directory of scripts. As usual with Perl, There Is More Than Way To Do It; you have modules to embed stright Perl code into html pages (Embperl), modules that implement a higher-level componentized model (HTML::Mason, Apache::ASP, the Templating Toolkit, and others), and buzzword-compliant modules that go the XML/XSL way (AxKit).

    As for perl6, I don't think it'll have a very direct impact in the way people do web development with perl. Perl 6 is going to be a complete rewrite and cleanup of the language, possibly with changes as fundamental and far-reaching as those between perl 4 and perl5. It will reorganize the whole perl world, not just the "perl on the web" part of it.

  147. Re:Rewriting Unix commands in Perl? by Municipa · · Score: 1

    What benefit is there to having all the Unix commands written in perl?

  148. you're half right by Anonymous Coward · · Score: 1
    The advantage here is not the lack of strong typing. Strong typing could be cool in Perl (use strong?); strong typing is stupid in C++; awesome in ML.

    The advantage you cite:

    ($id, $firstname, $lastname) = $sth->fetch_row();
    In Java, with the JDBC, you have to do this:

    (assuming rs is a ResultSet object)
    int id = rs.getInteger(1);
    String firstname = rs.getString(2);
    String lastname = rs.getString(3);


    has more to do with Perl's low-level support for complex types - in this case, tuples. In Java you need to pull in, one by one, fine-grained data objects. In perl, as you note, you can just pull in a tuple of (id,fname,lname), and reference the members of the tuple individually.

    This is not to say that you should be creating var names on the fly.
    use strict

    But there are cooler things that perl could be doing with typing. What you desire is a glue language - Perl's great for that. If we did more complex typing (dynamic checking of tuple size & types), then Perl would be even more useful as a large-scale development language.
  149. Programming language design by daytrip · · Score: 3

    This should be interesting to watch develop. Since this one is going to be design by open source, I wonder if they'll ever be able to release an upgrade.

    It seems that the past has shown that language by committee ends up over-burdoning the language. Are they're any previous examples of language design by committee that worked? It seems that all of the successes programming languages have made have been because of one or two evil geniuses who were able to see a project to completion, design to code.

    I wonder if it's just revisionist history, but weren't c, c++, python, perl, and tcl all works of very small teams (excluding the standardization committees).

    This should prove to be a great example for university programming language courses.

    -js

  150. thanks to python!!! by idlmx · · Score: 1

    Go python, does anyone notice that Perl 6 is going to borrow a lot of things from python? Another score for python! :-)

    --
    Time does not wait.
  151. Upgrade path by sandler · · Score: 2

    Just out of curiosity: how many perl programmers here upgraded old perl scripts to use Perl 5 features when Perl 5 came out? I know that where I work, most scripts are run with perl 5 but are written (with the exception of the occasional chomp) in Perl 4 syntax. Are people fully utilizing new functionality?

    1. Re:Upgrade path by King+Babar · · Score: 2
      Just out of curiosity: how many perl programmers here upgraded old perl scripts to use Perl 5 features when Perl 5 came out? I know that where I work, most scripts are run with perl 5 but are written (with the exception of the occasional chomp) in Perl 4 syntax. Are people fully utilizing new functionality?

      I am so old that I straddle the Perl 4/5 boundary. :-) And the answer is, oh, Deity, yes, I use new functionality. Real datastructures in Perl 4 were basically painful, but the references of Perl 5 made almost everything doable; see the perlref manpage.

      --

      Babar

  152. what are these "unused features"? by patreides · · Score: 1

    I'm always paranoid that when someone prunes a language they'll take out something I always use. I hope those guys are careful. How about a slashdot poll, What's your least-favorite perl function?

    Joke responses:
    * making it into jewelry
    * CmdrTaco can't type! haha!
    * (number of choices) + 1

    --
    # debian/rules
  153. Rewrite of PERL... by suwalski · · Score: 1

    A rewrite of Perl would be nice, as long as compatibility could be addressed. I imagine that in the new version there would be some compatibility glitches to work out.

    Either way, as cool as Perl is, I know (and I'm sure everyone else knows too) that there are parts of the code that could be optimized in the rewritten version.

    I'm curious. Maybe a few cool new data processing functions could be added too? I know There's a couple of array functions I wouldn't mind that are present even in VB! Kickass.

  154. Re:This might finally cause me to learn Perl by Starselbrg · · Score: 3

    I believe your example could be written much more clearly. This:

    s|<(?!$okay_tags).*?>||gi;

    should do the same thing, and is more readable. You can make any language obfuscated, especially when the language is flexible.

    I mean, honestly, can you think of a faster way to "zap all html tags not in the list of ok tags"? It may be a little hard to read when you are done, but if you put a comment next to it saying what it does, it's not hard to understand.

    --
    Got HTML? Want LaTeX? Try html2latex
  155. Re:This might finally cause me to learn Perl by Alex+Farber · · Score: 1

    s|<(?!$okay_tags)[^>]*>||gi; is faster

  156. Re:Perl uses smarter text algorithms than most peo by kurioszyn · · Score: 1

    Yeah. That just proves my point. Perl text processing libraries use optimized algoritm (written in C of course)

  157. Don't be fooled! It is a trick! by Dast · · Score: 3

    O'Reilly is funneling massive kick backs to Larry Wall in exchange for making millions of O'Reilly Perl books obsolete. This way they get to "totaly rewrite" the books and sell them to you again all over again. Think of the children!! ;) Or something.

    --

    This sig is false.

  158. Re:They'll never do a total rewrite of Python by Genghis+Troll · · Score: 1


    You are a great man, indeed!

  159. Perl is fine without compiler type-checking by jslag · · Score: 2
    This is the reason I believe Perl needs work before being used for anything serious. . .I [expect to] get an error or thrown Exception for trying to convert a float to a string without a cast


    String ssn = rs.getFloat(4);

    float cash = rs.getString(1);


    These are the errors? You're still thinking in Java if you can't see that the perl equivalent would simply be


    ($ssn, $cash) = @results;


    which presents no float / string conversion problems.


    in Perl this error will be allowed to silently propagate through the system causing wasted time later glancing at line-noise-like syntax trying to track down a bug that is due to the typelessness of the language.


    The only way this bug (confusing the order of results returned by the SELECT) will creep up to get you is if you don't unit test your methods...

  160. Re:Larry Wall DOES Announce Perl 6 by pudge · · Score: 2

    Microsoft gives money to ActiveState to make Perl work better on Windows. ActiveState employs some key, core perl programmers.

  161. sitting in the office by paTroll · · Score: 2

    I think the perl 6.0 rewrite will be beneficial for the perl community. not only in terms of organization, but also to help perl hold on to the cgi market. with all the other options, php, et. all, it has been my impression that perl has been slipping.. losing its position as "the best for cgi" not that that's a bad thing.. by any means.. i'm glad the others have come into being to challenge perl, because that challenge will end with (1) perl becomming even better, or (2) perl yielding to one of the challengers. religious affiliations aside, both of those endings mean better things for cgi programmers everywhere.

    --
    Will the real Richard Stallman please stand up?
  162. Re:This might finally cause me to learn Perl by miracles · · Score: 1

    I see what you mean, all i'm saying is not everyone needs their first taste of perl to be incomprehensible. I've been writing perl scripts since perl4, therefore i understood your example, but why shouldn't we bring in rookies with lighter scripts?

    I'm also a big proponent of PHP. Everyone i show php to comments on how easy the syntax of the language is and how easy it is to just basically code with it. All i can think afterwards is "If you like and understand PHP, then you'll like and understand Perl". But this wouldn't happen if i showed them some fsck'd script i've written that uses the most confusing methods of doing things in PHP.

    all i'm saying is let's try to bring the rookies in a bit slower, just so people don't end up running to python because they think it's easier (when in fact that strict spacing thing sucks).

  163. Rewriting Unix commands in Perl? by FattMattP · · Score: 2

    This is kinda off-topic, but I remember about six to twelve months ago that some people were going to rewrite all of the Unix commands (cat, ls, chmod, and others) in Perl. Has anyone else heard of this project? Does anyone know what happened to that idea? I thought it was interesting, at least.

    --
    Prevent email address forgery. Publish SPF records for y
  164. This might finally cause me to learn Perl by devphil · · Score: 4

    I have avoided learning Perl for a couple of reasons. One of them (not the most important reason, obviously) is that the syntax looks vaguely like a memory dump. You know that Dilbert joke where Dilbert instructs Ratbert to dance on the keyboard so that Dilbert will have more bugs to fix, but in doing so Ratbert creates a web browser instead? I think it was written in Perl.

    I'm really hoping Perl 6 will give us some more readable syntax. Hey, I like my C++ short and terse too, but I don't care for entire subroutines mostly written in punctuation.

    Yeah, I know that syntax is a lame reason to like or not like a language, but I'm the one who has to stare at it. It's the little things that make the difference.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  165. Plug by Alex+Farber · · Score: 1


    Get your daily Perl news shot at Nandor's site http://use.perl.org