• Update your copies of DateTime::TimeZone

    Liz Cortell writes in with important updates to your time modules:

    Whether travelling, calling overseas or maintaining software, time zones are always a headache. DateTime::TimeZone has seen a couple of changes this month.

    0.70, released December 3, was changed to incorporate Hugo Chavez's declaration of a new time zone for Venezuela.

    0.71, released today, "Fixes a major bug in the generation of time zone data. This bug affected any time zone that has more than one rule (most of them) and currently has no DST changes (many of them). An example would be America/Caracas. The symptom would either be mistakes about the current time zone or bogus exceptions when trying to create a local date."

  • Stop worrying and learn to love Perl 6

    Andy Armstrong graciously provides his take on Perl 6. I've even left those crazy Brit spellings. -- Andy

    Perl needs Perl 6 and the wider Perl community needs to understand why.

    When I first got into computers I worried, briefly, that everything I learnt would inevitably be outmoded. I don't want to scare anyone unduly but there will come a time when Perl 5 is outdated. Slow, ugly, verbose, arbitrary: it will become all of those and worse.

    That is the fate of all languages. At least I hope that's the fate of all current languages. These days if I really want to scare myself I need only imagine that the current state of the art is is a good as it ever gets. If that doesn't worry you try to imagine a parallel universe in which our understanding of computers hit a glass ceiling any time in the past fifty years. Imagine COBOL as pinnacle of language design, 64k as a generous helping of memory, punched cards baby! Happy days, certainly, but I'm glad we were able to leave them behind.

    As more of the world depends on computers there's a growing force that slows change. The enemy of evolution in language design is the installed user base. In the case of a successful language like Perl millions of people may now be affected by an incompatible language change. The Perl 5 Porters must always balance the needs of the future with those of the past and that places an upper limit of the rate at which Perl 5 can mutate.

    What to do? How do you move forward if you're constantly looking over your shoulder? You take advantage of a fortunate property of software: that it is possible to simultaneously care for and conservatively develop the current active branch of a language and forge into the future with a clean new version. Two siblings: the elder healthy, but constrained by responsibilities, the younger relatively free and able to learn from the elder's mistakes without repeating them. Perl 5 and Perl 6.

    "But Perl 6 is taking too long..."

    But Perl 6 is taking too long to mature. More than seven years is embarrassing, right? Not really. Perl wasn't really the Perl we know and love until Perl 5. For the first ten or so years Perl was a lesser language. Sure, the step from Perl 5 to Perl 6 will be bigger than the step from 4 to 5. The jump from 4 to 5 was in its time the biggest seismic shift the Perl world had seen. There's a trend there; the steps are getting bigger all the time. There was no significant dynamic language movement when Perl 1 entered the world. Perl 6 is gestating in a rather different environment.

    Perl 5 is not yet decrepit. Rumours of its death greatly exaggerated (or imagined). Perl 6 doesn't yet need to come of age so it makes sense for it to continue to mature in a relatively protected environment. As long as Perl 5 remains viable it's sensible to give Perl 6 the space it needs to grow because when its time comes it's going to face stiff competition from its elder and from Ruby, Python and others.

    Rather than impatient foot tapping, Perl 6 needs the help and nurture of the Perl community. The Perl 6 development process is transparent and open. Anyone with something useful to contribute will be welcomed. If you self-identify as a Perl person then Perl 6 is in part your responsibility. And if you can't usefully contribute then, please, quietly reflect on the debt of gratitude you owe to those who do. They're working to guarantee your future.

    Perl 6 is not a liability

    Perl 6 is not a liability. There's no need to be defensive about it. Paul Cory would like to rebrand Perl 6 into the shadows. That's the kind of Stalinist revisionism favoured by corporations that realise that their "next big thing" has become an embarrassing albatross. It's a response to Perl 6 that the circumstances do not require.

    Here are his reasons:

    1) It emphasises the "inadequacies" of Perl 5.

    All languages have inadequacies, imperfections, miss-features, cruft. Perl 5 is no different. Fortunately, instead of brushing them under the rug, the Perl 6 team is actively seeking to right those wrongs. A question: would you rather use a language that's maintained by people who are a) in denial about its inadequacies or b) actively developing a new language based on recognised shortcomings? I hope that's a rhetorical question.

    2) It makes the development community look unorganized, at best. People comparing at the development pace of Python, Ruby and PHP to Perl 6 are likely to come to harsher conclusions about the community's focus, viability and competence, based on Perl 6's seven-year, and counting, gestation period.

    Those hypothetical people are wrong and I don't want to be part of a community that panders to their views. The Perl 5 Porters are doing a great job of continuously improving Perl 5 within the constraints that popularity brings. The Perl 6 team are laying the foundations for the next generation of Perl. Perl 5 and Perl 6 have a mutually beneficial relationship: features, tools and ideas are traded freely between the two groups. It's healthy, responsible and creative.

    Python and Ruby have, to their credit, somewhat similar splits between far sighted strategic development and tactical improvements to the current language generation. PHP is a bizarre bazaar that does not provide a model other language communities should emulate.

    3) It creates uncertainty: what happens to Perl 5 when Perl 6 finally drops? How much new stuff will I have to learn? How will my existing code work, or not, if I upgrade? Why should I invest time in Perl 5 if Perl 6 is just around the corner, and will be far superior?

    Learning to deal with an uncertain future comes with the territory of computing. Continual improvement necessarily means that things will change.

    Perl 6 is visible proof that we have vision. Perl 5 is visible proof that we can maintain an extremely high quality programming language. These facts combined should give observers confidence about the health of Perl. As a community we certainly need to work to allay fears and calibrate expectations. But let's not start by hiding one of our greatest assets, ok?

    4) It creates frustration inside the community. Perl 6 has been "coming soon" for 7.5 years now. It's hard to remain excited about something that long with no payoff.

    Welcome to the world of free software. Instead of waiting for Godot we can go and meet him half way; help him carry his load. Let's be explicit here: if Perl is part of your life or career and you're tired of waiting for Perl 6 help make it happen.

    You don't have to contribute code to help. Learn more about Perl 6 so you can explain it to others. If you find it hard to learn make it easier for others: write an article that explains some of the important points, give talks, learn so you can teach.

    5) The story is confusing: Pugs? Haskell? Parrot? Two development tracks? I thought this was about Perl? Yes, I have an idea of what those things are, but most folks outside the community (and a fair few inside, I'd wager) don't know, don't care, and shouldn't have to.

    If the story is confusing we need to tell it more clearly. That doesn't justify changing the underlying technical narrative.

    In a commodified world criticism and spending discretion are the consumer's only levers. We crave influence over the things we consume. In the absence of direct influence over a product's design we use criticism as a proxy for control. We hope that they'll make the next version better as a result.

    Criticism is still valid in the free software world but it's importance is de-emphasised. You can criticise or you can help. In fact you can criticise and help.

    It's important that Perl 6 is not immune from scrutiny but if you're frustrated that it's taking a while then volunteer. The Perl 6 team is small at the moment; small enough that a few well placed contributions can make a real difference. Let's not default to bitching about it when we have the opportunity of contributing to its success.

    Why not make 2008 the year you do something for Perl 6?

    Andy Armstrong has been developing Perl programs and following the language's progress since Perl 4.036. He has released more than thirty CPAN modules and is currently working to help both the Perl 5 and the Perl 6 teams to implement parallelised execution of their test suites

  • One view of what we've done in Perl 6

    Patrick Michaud provides us with this brief recap of Perl 6. Patrick and I are going to be working on the Perl 6 development dashboard in the next few days to try to get a "what's done" and "what's needed to release" story to tell. -- Andy

    Andy Lester asked:

    Is there any way we can say "Here's what we've done and here's what's left?" At least that's a story I can tell. At least that kind of leaves us with "See, you can see the shape of the house and the roof is on, and we're working on the wiring and the plumbing."

    I probably can't tell the full story of "Here's what we've done", but I think I can give an outline for one. Apologies in advance for any factual errors or omissions here -- many parts of the "story" occurred before I became an active participant of Perl 6 development. Also, this shouldn't be taken as an official story of the Perl 6 community or development team, it's just my answer to the question that Andy posed.

    First, we have a Perl 6 language specification, as given by the synopses. People who have looked and played with the language given by that specification seem to really like it. We can't say that the specification is complete or frozen, because as we work on implementing the language we're finding places where the spec needs improvement. Some people express that the answer is to freeze the specification so we can get at least one implementation working; I entirely disagree with that. It's important that we retain flexibility to continue to improve the specification in response to things learned from the implementation(s).

    We have at least one substantial Perl 6 implementation, known as Pugs. In fact, it's the experience of writing and using Pugs that has prompted important changes to the language specification. Pugs is available from pugscode.org.

    There's is another implementation of Perl 6 being done for Parrot, called "perl6". Parrot is a virtual machine intended to support Perl 6 and other dynamic languages, such as Python, Ruby, PHP, and the like. Some people may feel that Parrot is an unnecessary distraction from Perl 6, but it's clear that Perl 6 will need some sort of virtual machine under it, just like Perl 5 has. Early in the Perl 6 development, the available virtual machine options were basically: reuse the Perl 5 VM somehow, try to use another VM, or build a new one. Early efforts at writing Perl 6 on top of Perl 5 didn't appear to be working out so well, thus when I started development in 2004 I was advised by the design team to start afresh with Parrot, and that's the approach that perl6 has taken.

    Having a virtual machine isn't sufficient -- we also need tools for building programs for that virtual machine. For a couple of years we've had a grammar engine to build parsers in Parrot, and that seems to be working well. Within the past few months we've also completed a code generator for abstract syntax trees (part of the "Parrot Compiler Toolkit") and a simple transformation language ("Not Quite Perl"). The completion of these tools appears to have boosted development speed on Parrot languages, including Perl 6, PHP, Python, etc., by at least an order of magnitude. The tools are also dramatically widening the scope of people who can productively participate in compiler development. We still need work on documentation and tutorials for the new tools so that we can increase the pace of development even further, and that's a primary focus for me at the moment.

    We have an implementation of Perl 6 on Parrot called "perl6". There has been an implementation of Perl 6 on Parrot for over a year now, but progress on it had stalled because we needed improvements to Parrot and to the compiler tools. As of mid-December those improvements are now complete, and within the past two weeks the perl6 compiler has been completely rewritten to make use of the new Parrot compiler tools. Even though the new implementation is only a couple of weeks old, we already see huge gains in the quality and extensibility of the compiler, and in the ability for others to participate in its development. Because the current implementation is so new, I'm reluctant to hazard a guess as to an anticipated pace of development going forward, other than to say it should be much faster than what has been. I do tend to think that we'll be reaching the "workable implementation" stage in a matter of weeks instead of months or years.

    Lastly, there is a substantial suite of tests written for Perl 6 language features, currently held in the Pugs repository. These tests are about to undergo substantial review and revision for correctness, completeness, and cross-compatibility among the implementations that are in various stages of development.

    Looking to the future

    Looking to the future and what I expect to see happen in January 2008:

    • some sort of working (perhaps primitive) perl6 installation where a person can download a tarball, build perl6, and type something like "perl6 foo.pl" to execute a Perl 6 program.
    • documents and publications describing the architecture of the perl6 compiler and how the various Parrot compiler tools fit together
    • substantial progress on reorganization and development of the official test suite
    • implementation of more Perl 6 language features

    As for me, my primary focus has always been on getting a working Perl 6 implementation on Parrot. To me, Perl 6 is not just an interesting research project -- it has a clear deliverable. If we complete a usable implementation of Perl 6, we succeed; if we don't, we fail. It's that straightforward to me.

    However, it's also important to have Perl 6 in a reasonable timeframe, and I agree with others that we're certainly pushing our luck there. Many people say that the long development time for Perl 6 has caused it to miss its window of opportunity. Time will tell if this is true, but personally I don't think this will be the case. Yes, Perl 6 has taken far longer than any of us imagined, but Perl 6 and Parrot are also poised to do things that many of us hadn't even dreamed about when we first started. And that's what keeps me working on Perl 6 even when it seems to be taking so long to get to the goal. I find Perl 6 to be such a profound and fundamental improvement in programming that I think the extra time we're all spending at the front end will have an impact and reap rewards measured in terms of decades. So while the delays are hard to take, the end result is worth it to me.

    Patrick Michaud is the pumpking for the Perl 6 compiler. He holds a Ph.D. in Computer Science and was formerly a Professor of Computer Science at Texas A&M University-Corpus Christi. He is currently a software developer and consultant focused on open source development and applications, including Perl, PmWiki, and Linux.

  • Why Perl 6 needs to be deemphasized and renamed

    Paul Cory has contributed what I hope is the first of many guest editorials on Perlbuzz. -- Andy

    Recently, Andy Lester wrote about the zombie question that haunts Perl: Where is Perl 6? One of the questions he posed was:

    "And to everyone else, who is willing to help in this task, to help keep the fires of anticipation burning in the public?"

    My advice would be to not keep the fires of anticipation burning in the public. For the good of the language, Perl 6 needs to be deemphasized in public, and, in addition, renamed.

    How Keeping Perl 6 Front-of-Mind Hurts

    1) It emphasizes the "inadequacies" of Perl 5.

    2) It makes the development community look unorganized, at best. People comparing at the development pace of Python, Ruby and PHP to Perl 6 are likely to come to harsher conclusions about the community's focus, viability and competence, based on Perl 6's seven-year, and counting, gestation period.

    3) It creates uncertainty: what happens to Perl 5 when Perl 6 finally drops? How much new stuff will I have to learn? How will my existing code work, or not, if I upgrade? Why should I invest time in Perl 5 if Perl 6 is just around the corner, and will be far superior?

    4) It creates frustration inside the community. Perl 6 has been "coming soon" for 7.5 years now. It's hard to remain excited about something that long with no payoff.

    5) The story is confusing: Pugs? Haskell? Parrot? Two development tracks? I thought this was about Perl? Yes, I have an idea of what those things are, but most folks outside the community (and a fair few inside, I'd wager) don't know, don't care, and shouldn't have to.

    Basically, the more we push Perl 6, the more we Osborne ourselves.

    How Keeping Perl 6 Front of Mind Helps

    I got nothing. Honestly, I can't think of a single positive for trying to keep public anticipation burning.

    How Deemphasizing Perl 6/Changing its Name Helps

    1) Allows us to focus on the strengths and successes of Perl 5.

    2) Allows us to tell the development and improvement success story of Perl 5, which is as good as that of any other scripting language.

    3) Removes uncertainty that can be used against Perl when companies and developers make decisions about which language to use.

    4) Finally, by changing Perl 6's name, to something like PerlNG or PerlFG, we can get away from the "It's just a 1 point upgrade," problem and have a basis for which to talk about it as a "research project." That allows us to both avoid talking about delivery dates, and allows to talk about how cool stuff from PerlNG is finding its way back into Perl 5.

    5) Gets us away from all the negatives listed above.

    How Deemphasizing Perl 6/Changing its Name Hurts

    1) It might be harder to get folks to work on PerlNG if it's not "just around the corner." I happen to think that can be overcome with inside-the-community marketing.

    For the record, I greatly appreciate all the work that folks have put into Perl 5 and Perl 6. Nothing here should be taken as a criticism of how the actual development gets done, nor of the talent or the commitment of the developers.

    I don't question the desirability of Perl 6 either. I can see how, when it's finally finished, it will be an improvement over any language available.

    However, from a Communications standpoint, it's obvious that there are significant problems in communicating about perl to the world at large. Perl 6 has been a Public Relations disaster, one that has made it harder to attract developers, other contributors, users and companies.

    Again, from a Communications/PR standpoint, our goal should be to stop shooting ourselves. And that means taking the public focus off Perl 6 as much as possible.

    Paul Cory is the Webmaster for the Wake County Public School System in Raleigh, North Carolina. He started using Perl nine years ago to automate some particularly tedious Website updates, and has progressed to the point where Perl glues the entire system website together.

  • Make vim support Perl 5.10

    The new say function isn't supported by the perl.vim file that ships with vim. Nick Hibma, the maintainer, tells me it will be updated in the next version of vim. In the meantime, you can hack your local vim files by adding the following line to your ~/.vim/syntax/perl.vim file:

    syn keyword perlStatementFiledesc
     binmode close closedir eof fileno getc
     lstat print printf readdir readline readpipe rewinddir
     say select stat tell telldir write
     nextgroup=perlFiledescStatementNocomma skipwhite
    

    Even if you haven't upgraded to Perl 5.10, you can use Jim Keenan's Perl6::Say module to add the say function.