Perl 6, the Bird, and Hacking with Damian

Today was a long day for me. First, I was up early to ensure I could spend some time taking care of things in my office before class at 9:00am. Second, eight hours of Advanced Perl Best Practices with Damian Conway. Third, a special San Diego Perl Mongers presentation of Sex and Violence: Social and Technical Lessons from the Perl 6 Project, again with Damian Conway. I am exhausted and I think I have Perl leaking from my ears.

Today was also a very good day. I learned a lot, and had a great time doing so. While I’m already familiar with most of Perl’s best practices and the reasons for using them, there are always many things to be learned any time Damian speaks. For example, I’ve always been one to use a single method as both accessor and mutator. However, now I’ve seen a good argument to use separate methods. Granted, I could have just read the book, but who has time for that?

One thing I will recommend: try to avoid flipping the bird to your instructor, even accidentally, particularly if you’re sitting in the front row and he’s standing only six feet directly in front of you. Shortly after this incident, I had a conversation with a friend in New Zealand. He gave me an explanation of the gesture and congratulated me for executing it in such a public forum (and getting a few laughs).

Even after my faux pas, I had the distinct honour to do a bit of hacking with Damian after class. My coworker voiced a concern I’ve also had in the past: inside-out modules, in this case Contextual::Return, do not work with Data::Dumper. So what did they do? They immediately started looking for a way to make it work. Initially, I merely stood back and watched; however, I’m proud to say I did have some input into the final implementation. Essentially, we came up with the following method to make it work.


{ local $Data::Dumper::Freezer = 'Contextual::Return::FREEZE';
  Dumper $return_value;
}

It’s perhaps not the most convenient way of doing the job, but it’s not bad for something that for most people is a debugging tool.

After a short break for some rolled tacos at Nico’s, it was back to the auditorium for Damian’s presentation to the Perl Mongers. As always, he had us rolling with laughter while at the same time learning quite a lot. The primary focus of the talk was the social and technical lessons learned by the core Perl 6 development team over the last seven years of the project. The lessons can be applied to any project—or in fact any group of people—be it Open Source or within a company. While useful, I was most excited by what Damian shared of Perl 6 itself. The design is amazingly clean and elegant, and I’m really looking forward to using it in my own projects. One thing that really has me excited is junctions. These look like an awesome way to develop parallel code cleanly and intuitively (at least for me).

I have one more day of class tomorrow, one I’m really looking forward to. Damian will explain to us exactly how it is he can be so productive, even while traveling. I expect to be overwhelmed with information and it will likely take me all weekend just to absorb it, and even longer to put what I learn to use. Next year I sure hope we have him back to teach us all about Vim.

When a Problem Comes Along, You Must Parse It

(With apologies to Devo.)

I attended the first of three courses taught by Damian Conway today, Advanced Parsing with Parse::RecDescent. This was, effectively, the Parse::RecDescent tutorial as presented live by Damian. I’ve read the tutorial, and it’s quite good, but it’s hard to beat instruction from the man himself. Not having used the module on too many occasions, the course served to clarify a few concepts of the grammar used by Parse::RecDescent.

Now I see problems in a new light—for better or worse. This evening, I joined my boss to debug a problem we’ve been seeing in our compute cluster. I joked that I could just whip up a grammar to track down the problem for us. I must resist my usual urge to apply my new, shiny tool to all problems. I mean, it’s bad enough I use the Perl hammer for everything, right?

Today’s course left me with nostalgia for the compilers course I took in college. As my partner for that long ago class reminded me, it was filled with “late nights and Mountain Dew.” Ah, good times.