OSCON 2007: Perl Lightning Talks

It’s time for one of my favorite OSCON traditions: the Perl lightning talks. These five minute speed talks run the gamut from incredibly boring and disorganized to amazingly good. Last year, Audrey Tang gave a particularly good one. In fact, my head is still spinning from it.

Seventeen talks this year, in a span that only allows sixteen. No break for us.

Vani Raja talked about YUI CSS. This appears to be some kind of Yahoo style sheet stuff for HTML. I’m not sure how this differs from any other style sheet out there, but she seems very proud of it. I’m guessing it’s just a set of pre-written styles that page designers can mix and match in their web sites. Oh, and apparently Nate is her hero.

Okay, now it’s time for “How Long Is Five Minutes?” by Schwern. He seems very concerned about how long five minutes is and how often he ruins his tea. Why is this important? Well, if you don’t know how long five minutes is and how much you can do in those five minutes, how can you know how much you can do in a half hour, an hour, a day, a week?

Schwern managed to get himself two slots of lightning talks. This second one is a very rapid combination of three talks. First up is a plug of the new Perl 5 wiki. He wants this to be the encyclopedia of Perl 5. As an aside, someone in my Perl Mongers group who already wants to have a wiki-thon at our next meeting. Next, we got to stand up a lot as he asked questions about our demographics. Apparently we in this room are not representative of the US at large. In any case, a survey of this information has been put up at perlsurvey.org. Finally, we’re supposed to blame Schwern. Larry has gone off to Perl 6, so Schwern is taking the responsibility of being the one who people can go to if they want to do something in Perl 5. In other words, we get to blame him for giving people the go ahead. (That was amazingly hard to type up in the five minutes Schwern was allotted.)

Ask Bjorn Hansen wanted to present qpsmtpd, which is something he threw together in Perl to implement features he wanted in qmail. In fact, Perl hackers can easily write plug-ins for the system, which is a pretty cool idea. It looks pretty nifty, I may take a look at it, if only to toy with it as a game.

Andy Lester talked about ack, an awesome way to grep trees of source code. He gave this talk last year, and I’ve been enamored of it every since. It even made it onto the Perl Advent calendar last year. He’s also set up Perl 101 (dot org), to help n00bs avoid asking n00b questions on IRC or on mailing lists. He needs help making it awesome. His third topic is Google Code. Use it instead of SourceForge, because it is awesome. Period.

Andy got a second slot, after being harassed by the audience on IRC and iChat, he jumped into his Perl-is-a-programming-language-not-a-scripting-language rant. A scripting language implies that it is less capable. Say program, not script! Dammit. Andy is an angry, angry man.

Rebecca, standing up in front of Programmers Anonymous, talked about the similarities between Open Source projects and non-profit organizations that use volunteer labor. When someone shows up and wants to help out an Open Source project, why not have a list of small things to be done that anyone can sink their teeth into.

Eric Wilhelm, who we may know from the Internet, talked about Test::Harness 3.0, which he’s come to recently as a way of parallelizing test code. TAP has evolved. In comes TAP::Parser (which will be used in Test::Harness 3.0… I think… I found that part hard to follow). This is apparently a five minute version of the talk Ovid will be giving at YAPC::EU. He’d like us to help improve the documentation and tests for TAP::Parser. Convenient link: testanything.org.

Eric continued with a second talk. Well, he promptly ducked under the table as he mentioned Module::Build. CPAN is great, but you need to upgrade it before installing. Then there’s a huge upgrade install dance. But soon (real soon now), CPAN will go back to being a one-liner and will do everything right automagically.

Julian introduced MoveMyData.org, which isn’t coded yet. However, it’s a great idea. So many different social networking sites exist (Blogger, Flickr, etc.), and they don’t interoperate at all. This is the solution. A way of moving data between social networks and making sure it’s backed up and always under your own control, not under their control. Very cool, and something I’ve always thought should be done. It’s one of the reasons I maintain my own blogging software, in fact.

Tim Bunce gave a quick talk about DBI, as he usually does. This time it’s about DBI 2 for Perl 6. The JDBC API is a great example of what he wants to do, so he’s going to steal (that is, borrow, now that Java is Open Source) what they’ve done. He continued to give some examples of how it should work and how it would look, but then he got gonged. Good stuff, though.

Second talk by Tim, DashProfiler and lightweight code instrumentation. It seems he does a lot of web service work these days, so he spends a lot of time writing code to help him make this faster. This is an instance of Tim writing code to find out what needs to be made faster. I like this. It’s very magical (read: Perlish). Just use it and it does what it does.

Tim, take three. He condensed yesterday’s 45 minute talk about Gofer into five minutes. I attended that session, so I mostly zoned out during the lightning talk. It’s another way of optimizing the infrastructure behind web services.

Michael Potter (who introduced himself at the end) wanted to talk about Open Sourcing Message Definitions, that is to say he wants a better way of getting data exchange formats into the Open Source or standard or something. I don’t know. It was short, sweet, and to some point I didn’t get.

John Rockway stood up to teach us how to create a blog using Catalyst in 5 minutes. Of course, he used slides, instead of typing it out himself. So mere mortals probably couldn’t create a blog in only 5 minutes. I’m not entirely sure Catalyst has ever been used to create anything other than a blog. That’s my biggest problem with most web frameworks. They look like they’re only useful for the fun stuff, and it’s non-obvious how to use them for other kinds of sites. That’s a bit harsh, but there are too many frameworks for me to play with all of them to see if I can use it. Oh, and I think some of the developers of Catalyst (which was a fork of Maypole) forked it off into something else again.

John continued to plug Angerwhale, an actual blog application he wrote in Catalyst. I really didn’t pay attention. I’m not sure I like Catalyst, and I’m quite sure I don’t need to fill my head with yet another blog application. Although, it is a blog application written in Perl, so I may eat my own dog food and try it out.

Someone who didn’t identify themselves stood up to talk about SVN::Notify::Mirror. No idea what he said, as I wasn’t listening.

Last, and most certainly not least, Pudge got up to perform Perl, in a Nutshell. Of course, everyone has probably already seen this on YouTube already (and if you haven’t, why not?!), but it was awesome to see live.

OSCON 2007: Domain Specific Languages in Perl

As a programmer who spends most of his time writing code that helps other people to write code, I’m pretty interested in domain specific languages. In fact, I have a couple of modules we use at work that use them. That’s how I ended up in Domain Specific Languages in Perl, presented by Jesse Vincent of Best Practical.

Domain specific languages (DSLs) are languages designed for specific programming tasks. A couple of well-known examples of DSLs are SQL and regular expressions. However, today, Jesse is talking to us about “Englishy” DSLs, which he’s been very interested in lately. Additionally, these are DSLs that are internal to Perl. Instead of parsing a DSL and executing it, they are instead implemented by playing with Perl’s syntax and taking advantage of Perl’s parser (and having all of Perl’s features available in the DSL).

The two main goals when implementing a DSL in Perl are,

  1. Does it feel good?
  2. Can we actually do it?

The first big DSL is Jifty::DBI, an object-relational mapper for Jifty. For the folks at Best Practical, it was a fun learning process in tweaking Perl to look the way they wanted it to while still declaring the database schema in an intuitive, pretty way.

The Template::Declare module is flat-out awesome. I’ve seen it before, and I’ve never taken the time to play with it. How stupid have I been? Coding HTML templates in Perl is cool, and something I would happily do (I don’t really like writing HTML).

As if that weren’t enough, in comes Jifty::Dispatcher. Modelled after Mason’s (auto|d)handler files, it will manipulate web application requests and take care of dispatching processes. I really like the DSL used here. It’s very declarative, removing the infrastructure entirely, which is something I’m very interested in doing in my code right now. I must be getting old; I’m more interested in telling the computer what to do, rather than how to do it, these days.

Testing web sites is ugly, and it sucks. That’s what Test::WWW::Declare is for. It’s a beautiful module. Sessions, flows, declarative statements to define the web flow. So very awesome.

I can tell that the Best Practical folks have seen Damian Conway’s Sufficiently Advanced Technologies talk. The moral of that story is, write what you want to see, and only then figure out how to make it work in Perl.

I’m sold. As soon as I get home, I’m going to work on porting my start-up company’s web site with Jifty. Jifty is, well, absolutely nifty.

At the end, Jesse showed us his own domain specific language to define his slides. It’s awesome. I want it for my own talks.

OSCON 2007: WxPerl

Eric Wilhelm of Scratch Computing taught a session on wxPerl, a set of bindings for GUI development in Perl, which uses the native widget library of each OS to build the GUI. Whenever we build a GUI at work, from a simple dialog box to a complex application, we tend to use Tk. It would be nice to move to a cross-platform, native-looking GUI library.

Why build applications for the desktop? Speed. Network latency over long distances pushes the limits of people’s patience. Computers are getting so powerful, why not use those resources?

Why use Perl? Well, because it’s Perl.

Good documentation for wxPerl is difficult to find. Apparently someone needs to create a US mirror of the wiki. However, the C++ documentation is quite good.

Eric has created a few helper modules (most of which are on the CPAN) to make life for wxPerl developers a bit easier. He’d like to move more in the direction of Smalltalk, with more interaction and cleanliness between the code and the GUI. It’s still in the works.

One thing I really like is his phrase, “needs more Perlin’.” This means that something needs to be more like Perl. That is to say, it needs to keep easy things easy and make hard things possible… with a slick syntax.

OSCON 2007: Machine Learning Made Easy with Perl

The key lesson of this session, presented by Lino Ramirez, is that it’s all about empowering people. Perl gives us the power to empower people.

I really enjoyed the video of a tae kwon do match as a real-world analog of software development. Try one technique, see the result (get hit); try another technique, see the result (get knocked down); ad infinitum.

There are three phases: preparation, modeling, and implementation. These phases are not linear in nature. One moves between phases as necessary to design the solution.

PDL was demonstrated in the modeling phase. Brad was pretty happy when one of the slides contained a web site address for information on PDL, which happened to be a web server at his job.

As he delved into the case studies, I started to zone out, so I have little to say about his examples of machine learning and Perl in action. I wanted to enjoy this session more, since I’ve often wanted to get back into using neural networks and other machine learning techniques in my code. Unfortunately, I just found it too difficult to follow his case studies. Still, I have some good pointers for packages that will help me sprinkle some machine learning goodness in my code.

I like his conclusion: “Perl excels at empowering people in all three phases of the development of a machine learning application.” Perl is awesome for rapid application development, which in turn gets solutions to people who need them faster.

OSCON 2007: Perl 6 Update

It’s time for that perennial event known as the Perl 6 Update. What will Larry tell us about Perl 6 this year? He probably won’t be announcing a release date (we should be so lucky). Unfortunately, Damian Conway couldn’t be at OSCON this year, so this session won’t be nearly as entertaining as it has been in years past. On the plus side, Larry informs us that Damian did write the slides… now he just has to interpret them.

New features include adverbial typing, such that class and module names can include adverbial modifiers. These specify things like author, authorities, and versions. The syntax is a bit scary, but they can be aliased.

Perl 6 now has inline comments (yay!). It’s typically Perl, too. The syntax is #{inline comment}, instead of the usual C-like syntax.

Wait, what’s this? Built-ins no longer default to using the $_ variable? How will I write confusing code now?

The zipper/yen operator has been renamed to Z. This is good for me, as I’ve never been very good at memorizing Vim’s digraphs.

The min and max operators now have infix versions. Strange at first, but it looks like it could be useful in some situations ($foo min= $bar).

Ranges are really lazy. So lazy they can be unbounded: for $i (1..*)... (to infinity and beyond!).

The power of the new file test operators demonstrate quite well how useful Perl 6 will be. It takes TIMTOWTDI to levels few Perl coders could ever have imagined.

There’s a MAIN subroutine now. It’s like we’ve stepped back 30 years to be C programmers again. The power it gives the programmer to define command line processing is very cool, though. Perl 6 will even call USAGE for you, if you’ve happened to define it.

Perl 6 has real repeat (do..while) loops now. Real, as in all the loop control statements work.

As if postfix control statements weren’t confusing enough. Now they can be nested! say $foo if $bar while $baz. Actually, I can’t tell you how many times I’ve wished for this.

Continuing the theme of parallelism, Perl 6 will make it easy to parallelize map and even do atomic locking on serial statements. I appreciate that Larry managed to change his slide to mirror what Simon Peyton Jones talked about in his keynote this morning. Very apropos.

Fixed-length arrays? Seriously, what is this, Java? Well, at least it allows you to define array bounds as “eh, whatever.” I especially like the “whatever whatevers” operator (**).

POD lists are dramatically cleaned up. Thank goodness. No more =over or =back. Nested lists! Tables! Bigger! More markup! Better! Includes! More awesome! Really! Useful! POD!

Honestly, I can’t wait to move to Perl 6. I can already see a lot of my code getting a lot shorter. Imagine, entire job control systems that fit in one screen of code!

OSCON 2007: DBD::Gofer

Lunch is over and I’m sitting in the first of two mid-afternoon sessions I’ve chosen on Perl technologies. The first one with Tim Bunce, the extremely knowledgeable author of DBI. He’s presenting DBD::Gofer, a stateless proxy driver for DBI.

This session is very much like other sessions I’ve attended. It’s essentially a brain dump of as many features Tim can squeeze into the alloted time as possible. It’s almost too much to follow. It’s certainly too much to take notes. Fortunately, he’s told us the slides will be available on-line.

From the description of the session, I had hoped DBD::Gofer would scratch an itch we have at work. Essentially, we need to ensure data finds its way into a database, even if the database may not be available. We have a custom solution at the moment, but it would be great if we could replace it with a packaged, maintained module. However, it appears that, while DBD::Gofer makes an excellent proxy, it wouldn’t fit our needs.

Examples have included connection pooling and load balancing, often to reduce load on the main database server. It’s apparent from the use cases that this module was developed for use by heavily trafficked web sites (its development was sponsored by Shopzilla.com). It’s design is modular, so perhaps it can be extended to do what we want. I won’t know until I’ve had a chance to look at the distribution.

Some interesting things for the future are HTTP caching and JSON, effectively turning DBI into a web service. This is cool. I can see this opening up a lot of possibilities as more applications are constructed from individual services, complete in their own right.

Webmastering SanDiego.pm

As of tonight, I am the new webmaster for the San Diego Perl Mongers. This is pretty exciting for me. I have a vision for what I want the SanDiego.pm “web community” to be, and I hope I’m able to achieve it.

My first order of business was to create a public calendar for our group. Now anyone can subscribe to our calendar to find out when we’re having meetings or any special events. Not only that, using Google means less work for me.

I have much more in mind, which I’ll be sure to announce here and in my use Perl journal. Of course, I don’t intend to run this web site in the dark. I’m open to any and all suggestions. I want this to be a community effort on the part of SanDiego.pm.

I Dream in Perl

Most people awake on Sunday morning to thoughts of brunch, church, or football.

Not me.

I awake with Perl in my head. Sigils, modules, and regular expressions snaking their way through my dreams. I have to climb out of bed and make my way to the computer before it’s gone. I have to prototype this code before it stops making sense. I have to commit these arcane symbols to disk before they fade away like so many other hazy, indistinct dreams.

I have to seek help.

The Three Days (and One Night) of Damian

The San Diego Perl Mongers held a special meeting last night. Damian Conway is in town this week and dropped by to present one of his seminars. Dr. Conway regaled us with tales of Sufficiently Advanced Technologies; some fictional, some he himself has contributed to the CPAN, some we wish would have remained fictional. Unfortunately, my wife was sick and couldn’t make it. She really wanted to find out why I spent the entire week of OSCON 2006 (and the following month) raving about this Damian mad man.

Anyone who has attended one of Damian Conway’s seminars, tutorials, or keynotes will most likely have noticed that aikido will make an appearance once in a while. And for anyone who hasn’t, I highly recommend tracking Damian down. But not in that creepy stalker way. That’s just… creepy. Anyway, Damian knows a bit of aikido (or at least one move). He plucked a good friend of mine, Dan Risse, from the audience to demonstrate a “come-along” move. There was, as with most of Damian’s demonstrations, a good reason for this. I was wildly amused. In fact, I kind of have the itch to practice aikido again.

Sufficiently Advanced Technology is a pared down version of the API design tutorial I attended at OSCON. Memories of the Girl from Ipanema came flooding back to me.

I mentioned that Damian is in town. For the second year in a row, he will be presenting two of his courses over three days at Qualcomm. Fortunately for me, I now work for Qualcomm (I didn’t when he was here last year). I will, of course, be in attendance all three days. By the end of the week I should know much more about Perl Best Practice and Advanced Module Development Techniques.

Needless to say, I’m excited. Hopefully I won’t require psychological counselling.