December 2008 Archives

Perl 5 source repository now hosted in git

| No Comments

Perl 5's source code is no longer locked into the odious proprietary Perforce repository where it's been hosted for years. It's now hosted in the git distributed version control system. This is a huge win. The announcement lists a number of benefits:

  • With a public repository and Git's extensive support for distributed and offline work, working on Perl 5's source becomes easier for everyone involved.

  • Because Git is open source, all developers now have equal access to the tools required to work on Perl's codebase.

  • Core committers have less administrative work to do when integrating contributed changes.

  • Developers outside the core team can more easily work on experimental changes to Perl before proposing them for inclusion in the next release.

  • A vast array of improved repository and change analysis tools are now available to Perl's developers.

  • The new Git repository includes every version of Perl 5 ever released, as well as every revision made during development.

Before this move, if you wanted to submit a patch to Perl 5, you had to submit the patch against bleadperl, the main development branch, which was an always moving target. The repository wasn't directly available, so you had to either keep your own repository that got updated with patches as they were applied, or just deal with your local changes getting stomped on.

Now, that's all over. It's butt simple to get the Perl source:

  $ sudo yum install git
  (Your package manager may vary)

  $ git clone git://perl5.git.perl.org/perl.git
  (Time passes as much downloading happens)

  $ ls
  AUTHORS       configure.com    perl.h 
  Artistic      configure.gnu*   perl_keyword.pl
  Changes       cop.h            perlapi.c

That's it. Now you have a copy of everything, and can make patches much more easily.

Thanks to Sam Vilain and everyone else involved in this huge move.

Booking.com puts their money where their infrastructure is

| No Comments

Booking.com, a global hotel reservation service based in the Netherlands, has donated $50,000 to the Perl Foundation to help in further Perl development, specifically Perl 5.10.

As Richard Dice, president of TPF says, "booking.com has demonstrated extraordinary vision and community spirit," but they also know that their infrastructure needs ongoing support. Their IT team is 50+ persons, and Perl is the "language of choice."

Thanks to booking.com for this donation, and let's hope it is part of an ongoing trend. Now, if only TPF could get, say, $5 from every company that used Perl. Think how many programmer-years that could buy to help get Rakudo out the door.

How to spot bad Perl code, 2008 edition

| 1 Comment

Max Kanat-Alexander posted an article called "How Not To Get Hired.". Since I'm in the end stages of finishing my book on geek hiring, I was hoping there would be swell interview horror stories. The first bullet talks about not following instructions in a job ad, but the rest is really a laundry list of Perl practices that nobody should be doing any more, and a few more on what we should be doing, starting with using Moose.

I'm sure there'll be some crabs out there who say "Aw, that's just all common sense," but common sense rarely is. It's well worth a read.

Perl 5.8.9 is out

| 1 Comment

Perl 5.8.9 is available for download. From reading the changelog, it doesn't seem like there's too much earth-shaking in it.

There is a wonderful new utility added. An analogue to perlbug, the new perlthanks program lets you send your thanks to the development team. What a great idea that is.

I love visual representations of progress

| 1 Comment
Rock on, Rakudo dudes.

Perl Mongers at work: PDX.pm adds warn() to Rakudo

| No Comments

This makes me so happy. Eric Wilhelm writes in this use.perl posting

Our December Meeting was a rakudo workshop, where we realized that rakudo had no implementation of warn(). While the implementation that got checked-in by the end of the meeting is not fully compliant with the spec's requirement that warn() throws a certain sort of resumable exception, it does now at least exist, and prints your message on stderr.

While I love any given gathering of Perl Mongers, whether to have a technical talk or just to drink beer, I've always thought that it would be great to have PM groups use their collected talents to add directly to the Perl community. My long-dormant Phalanx project was an attempt to take advantage of that.

Now, PDX.pm has made a concrete contribution to the #1 need of the Perl community today: Getting a Perl 6 implementation out the door.

Bravo to PDX.pm!

Two advent calendars to choose from

| 1 Comment

In addition to the yearly Perl Advent Calendar from Jerrad Pierce, originally started by Mark Fowler, the Catalyst Team have put together their own Catalyst Advent Calendar.

Each calendar gives a new tip or trick or module to use each day. Today's tip on the Perl Advent Calendar is about how to use IPC::Filter to communicate between processes, while yesterday's entry on the Catalyst Advent Calendar discusses how to create PDFs for your web application.

"Higher-Order Perl" available for free download

| 3 Comments

Mark-Jason Dominus' fantastic book Higher-Order Perl is now available for free download at http://hop.perl.plover.com/book/.

MJD notes:

This is better than the bootleg copies available from download sites in at least three ways:

  • It is the complete text of the second printing, which incorporates many minor corrections; the bootleg copies are all bootlegs of the first printing.
  • It does not have a nasty little grafitto advertising a vainglorious bootlegger plastered on every page.
  • It was come by honestly, not stolen from the printer.

Everyone is now out of excuses for not having read it. Go read it now if you have not. You will not be sorry.

CPAN Testers gives module authors new flexibility

| No Comments

The CPAN Testers group do some pretty cool work. According to the group itself, they are

... a group of over 100 volunteers who test as much of CPAN as possible across a plethora of Perl versions and operating systems, which is usually many more environments than authors have available to themselves.

Don't write for Windows, and don't have access to a Windows VM courtesy of Microsoft? At least the CPAN Testers will send you the error report from a failed attempt to build on Windows.

The downside of CPAN Testers is that you may not care about certain configurations. If one of the CPAN Testers mistakenly tries to build Win32::OLE on a Mac system, the author of Win32::OLE isn't going to be very interested. Along those same lines, if your module for Perl 5.8 doesn't degrade nicely for 5.6 or earlier, then you're going to get error reports as well.

Now, the CPAN Testers site gives authors flexibility in how they'd like to tests on their modules reported. I can specify which types of reports (pass, fail, NA, etc) I get, and on which versions of Perl I'm interested. I can set up a default profile and then set up per-distribution profiles as well.

It's fantastic. Anyone who is doing CPAN modules should take a look at this excellent service and its new customizations. Thanks to the CPAN Testers for making it available.

Write your tests before you fix the bugs: A shining example from PHP

| 3 Comments

I went to upgrade our PHP install today, but found that:

PHP 5.2.7 has been removed from distribution

Due to a security bug found in the PHP 5.2.7 release, it has been removed from distribution. The bug affects configurations where magic_quotes_gpc is enabled, because it remains off even when set to on. In the meantime, use PHP 5.2.6 until PHP 5.2.8 is later released.

This is one of those cases of "you write a test for anything that has ever gone wrong." If the PHP guys have any clue at all, they will have written many tests of all the possible ways that magic_quotes_gpc can get set incorrectly, before fixing a single line of source code.

(For those unfamiliar with this peculiar misfeature of PHP, magic_quotes_gpc lets you automagically instantiate global variables based on GET and POST variables, which allows bad guys to muck with your code by passing in parameters that they know will mess with your code when turned into globals.)

Microsoft will support CPAN authors with free access to Windows machines

| 1 Comment

Adam Kennedy's announcement tells the long story, but the short version is this: Microsoft will be providing every CPAN author with free access to a centrally-hosted virtual machine environment containing every major version of Windows.

It will be interesting to see how this plays out. Will CPAN authors use the resources from Microsoft to make sure that our modules work on Windows? I know that I'm especially interested because I want ack to be transparently cross-platform. Anything I can do to help get ack out on Windows boxen, to help Windows programmers know that the command-line can be better than an IDE, is a win.

This is pretty big, and I'm glad to see Microsoft providing this service. I'm especially thankful for Adam putting what I'm sure was a huge number of hours making this happen. I'm glad we have him on our side.

Moving forward with Git and Perl

| 4 Comments

By Nadim Khemir

Perl is very often used as glue to quickly put together a functionality by using already existing components. This is a great use of Perl. Still, I believe that we made a mistake, a few years ago, when we kept being the glue instead for also becoming part of the componnents; this is one of the main reason Python took off, developers learned Python, an otherwise excellent language, to control and integrate into their favorite applications while Perl was still on the outside. I wish Perl was an intrinsic part of more applications.

Among the applications that have Perl bindings, Git is a very interesting one. There is a lot of interest for Git in the Perl community. This is partly due to Perl 5's source code going over to Git.

Pages like this on the Perl 5 wiki tell us that "Like Perl, Git has lots of flexbility, TIMTOWTDI" this matches The way most Perl developers think and may be why a lot of Perl developers are switching to Git. Git is easy to learn. Simple things are simple and complicated things possible. Rings a bell? There are many Perl developers involved in Git. Randal Schwartz even made a presentation on git, and we've seen articles here on Mechanix.

And there are multiple modules on CPAN to handle Git-related functionality. The Git community itself has a Git.pm module that is part of the Git distribution. Git.pm needed some love and I am taking over its maintenance. My hope is to help the Git community and the Perl community as well.

What's in it for the Git and Perl community?

  • Involvement of the Perl community in the Perl component distributed with Git
  • A closer cooperation.
  • Making Perl developer aware of version control systems.
  • Unify, if wished for, the multiple Git modules of CPAN (other are under construction but not on CPAN yet), this would be better for maintenance and for the users.
  • Not directly related but a wish, a CPAN with better versioning strategy.
  • What you need (but you have to tell us. I'll be happy to get input from the Perl community, at nkh@cpan.org, in the form of comments, and patches)

Jakub Narebski has written an RFC for the Perl bindings for the Perl bindings. This is an excellent stating point.

Nadim Khemir is a technical manager and architect at Ericsson Mobile Platform in Sweden. His favorite subjects are process automation and build systems. He can be contacted at nkh@cpan.org and is often seen on #perl-qa.

Lightning talks from outside the echo chamber

| 1 Comment

I'm already tired of the hoohah about "Perl 5 is dead" and the hand-wringing and the useless flapping about what we should do. I'm more interested in what is going on in Perl that none of us have heard of yet.

If I didn't have family and book obligations, I'd gladly take two days off and an 18-hour round trip to Omaha, Nebraska to check out the lightning talks presented by the University of Nebraska at Omaha on Tuesday. Robert Fulkerson posted to the Omaha.pm list:

The Fall 2008 UNO CSCI 2850 (Programming on the Internet) class invites you to an evening of lightning talks on Perl programming, the Firefox web browser and other (mostly) web-related topics.

Lightning Talks are no longer than 5 minutes and can be about anything: a new idea, an evaluation, an observation, a story, a complaint, an explanation, a suggestion, a report of success or failure, a call to action, a description of a technique, technology, or a lament.

Usually we split the talks over two nights, but this semester it's going to be one, big solid night of talks.

Where: Peter Kiewit Institute, Room 252 ( http://tinyurl.com/5g83cb ) When: Tuesday, December 9th, 2008 Time: 6:00 PM until 8:30 PM

Topics

  • Writing a Greasemonkey script for FireFox to make BlackBoard tolerable
  • Obfuscating Perl
  • Connecting Perl to databases
  • Net::SSH::Expect
  • Using BioPerl for sequence analysis
  • Perl Google APIs
  • Acid Test 3
  • Gossamer Forum
  • Perl vs. Python
  • Index a website starting with a single page
  • Dictionary attack using Perl
  • iTunes playlist extractor: C++ vs. Perl
  • Regex Creator
  • Regex Coach
  • History of Perl
  • Software Pirating Debate (Spore, SecuROM)
  • Perl 6 vs. Perl 5
  • Rapid Exploit Development using Perl
  • SSH on iPod Touch
  • Regex usage in Perl vs. C
  • Ubuntu with Conky
  • Perl-XML: XML Made Easy with Perl!
  • Perl Module - GD::SecurityImage
  • Gmail:Checker module
  • Improving Perl program efficiency/performance
  • Subversion Tortoise client search
  • Perl PayPal APIs
  • JQuery UI
  • Talking to LCD projectors using Perl

"Talking to LCD projectors using Perl"? "Rapid Exploit Development using Perl"? "Perl 6 vs. Perl 5" by someone who (I assume) is not part of the core group? Someone get this on tape and YouTube 'em, willya?

I would love to be there. (Plus, then I could go get some Valentino's pizza).

Database access in Perl 6 is coming along nicely

| 21 Comments

Simon Cozens just posted to the Perl 6 internals list:

I just ran this code, which worked with the expected results:

use DBDI;
my $conn = DBDI::DriverManager.getConnection(
    "dbdi:SQLite3:test.db", "", "");
my $stm = $conn.createStatement();
my $rs = $stm.executeUpdate("CREATE TABLE foo (bar, baz)");
my $stm = $conn.prepareStatement(
   "INSERT INTO foo (bar, baz) VALUES (?, ?)");
$stm.setColumn(1, 123);
$stm.setColumn(2, "Thingy");
$stm.executeUpdate();

Merry Christmas, Simon

I love the smell of progress in the morning.

There is no "best" in software

| 4 Comments

Dave Rolsky wrote a fantastic article on the many different criteria on which you can choose your software to use. For example:

Easy to integrate - Some libraries are designed to be integrated with other modules (Catalyst), some want you to embrace their world (Jifty).

Complete - Some libraries come with a complete solution (Jifty) and some require you to put together a bunch of pieces into a whole (Catalyst).

Which is better? The answer, of course, is "it depends." Is the project for in-house use, or will it be distributed? Is it a one-off, where the base install will do most of what you want? Or are you likely to want to extend beyond those constraints?

Most importantly, Dave points out:

I'd like to see people state their priorities up front, and explain why it's important for the work they do. Often this gets left out of the discussion. Without this information, we often end up just talking past each other.

The extension of that is that many people may not even have thought about what their priorities are. Consider how often you'll see a question, such as at Stack Overflow, that asks "What's the fastest way to do X?" Most of the time, the querist hasn't even thought about that "fastest" part; it's just assumed. (For that matter, that's like assuming that the most important part of a new job is how much it pays, but that's a topic for another blog.)

Make sure you know what your priorities are. Question your assumptions. Your project will thank you for it.

« November 2008 | Main Index | Archives | January 2009 »