So you use Perl, and you probably know that it was brought to you by "Larry Wall and a cast of thousands". But do you know these people that make up the Perl development team? Every month, we're going to be featuring an interview with a Perl Porter so you can get to know the people behind Perl. This time, Simon Cozens, www.perl.com editor, talks to Nathan Torkington, a long-time Perl developer and a mainstay of the Perl community.
Who are you and what do you do?
I'm Nathan Torkington. My day job is a book editor for O'Reilly and Associates. Before that I was a trainer, working for Tom Christiansen. Perl folks might know me as co-author (with Tom) of The Perl Cookbook, the schedule planner for The Perl Conference (and this year the Open Source Convention), or as the project manager for perl6.
How long have you been programming Perl?
Since the early 90s. I forget exactly when I first started programming in Perl. I think it was toward the end of 1992, when I was working with gopher and the early web. Back in those days we didn't talk about "the web", we were just trying to set up a Campus-Wide Information Service. I took the plunge and pushed for (and got) the www as the basis for the CWIS, even though Gopher was more mature and had more stuff on it.
Using the CERN httpd and line mode browser, I worked on interfacing a bunch of data sources to the web. Perl was, of course, the language for that. I did work with SGML, comma separated files, and even used oraperl once or twice (I feared and loathed Oracle, though, it was only once or twice!).
So I got into Perl with the web. When I moved to the US in 1996, I worked as a systems administrator at an ISP. There I rapidly became the Perl guy, writing admin scripts and CGI applications for in-house and customers. When I left in 1998, we were using mod_perl and had a bunch of good Perl programmers.
What, if anything, did you program before learning Perl?
I first learned Commodore BASIC when I was 8 or 9, then 6502 assembler. I learned Pascal on the IBM PC, as well as C and 8086 assembler. At university they taught us Pascal again, then Modula-2 or Modula-3 (whichever it was, it was with a MetroWerks Mac IDE that kept crashing). Through Pascal, and their eventual reteaching of C, I got the hang of pointers (yes, I wasn't a very GOOD assembly language programmer if it took me about six years to learn pointers and realize why my programs would sometimes die).
What got you into Perl?
The web. After I'd written a few programs, I really enjoyed it. The language was fun, and the culture good. It was so thrilling to be able to do something in 5 minutes and 20 lines that used to take two days in C. In some ways I miss that fun--over the years (and especially writing the Cookbook) I've learned so much about how to do things in Perl that there's not much discovery of fun new features any more. And I'm so used to being able to do things in 5 minutes and 20 lines that I'm no longer delighted when I can do so--I expect it!
Why do you still prefer Perl?
It can do everything I want to do, and I already know it. If I wasn't a Perl programmer, I'd probably be happy in Ruby or Python. But so long as there's Perl, I see no reason to become as familiar with those languages as I am with Perl.
That's not to say I think everyone should program exclusively in Perl. My friend Jules was the one who learned a lot of languages. He was writing extensions for Microsoft COBOL in 1992, and has done significant projects in C++ and Java. He works at a contracting company where the projects don't always lend themselves to Perl. I'm totally cool with that.
What sort of things do you do with Perl now? What was the last Perl program you wrote?
When I became a trainer, I was glad to stop being a full-time programmer. Since then I've begun to miss using Perl. These days I only write utilities and basic web applications. For instance, the last few projects I've written have been:
- A small web-based database system for keeping track of the books I'm editing--author addresses, status, number of chapters to go, etc. That was a CGI program with home-grown templates and a DBM database.
- Some small tools to unmangle Framemaker files for the Perl Conference proceedings.
- A translation of a Python PDF-generating library to Perl. That's incomplete, because I struck Python code I need to research.
What coaxed you into the development side of Perl?
The feeling that I should know more about it. In some ways it's probably insecurity--"sure, you know all stuff about the Perl language, but can you tell an SV from an SUV?" So I started probing at the fringes of the internals.
Do you remember your first patch?My first (and probably only ;-) real patch was to comment toke.c, the tokenizer. The code that works out where double-quoted strings and regular expressions end was a lot of fun (and by fun I mean "pain") to work out. Although I know a lot of low level (data structures) and high level principles about how the internals work (compile to op tree, interpret), I'm still missing a lot of the middle ground that would actually enable me to fix bugs.
What do you usually do for Perl development now?Nothing, I'm a manager :-) I'm slowly herding Larry towards finishing the Apocalypses, and from that will spring perl 6. For Perl 5 I'm more behind the scenes. I'm often asked to nag or poke or otherwise get results from others.
Talking of Perl 6, how do you think the project's going so far?
Last year I'd naively hoped that we'd have an alpha for TPC, but
that's not happening. Instead, we have the start of Larry's
pronouncements. And while perl6 has been slower than we expected,
perl5 has received a shot in the arm! Jarkko's patching like a
madman, there are new internals hackers springing up, and there are
cool new modules (
etc.) coming out every week.
That's not to say that we're all blocked on Larry, though. We know the large shape (and a lot of the details) of how the internals will work. Dan's specing those out in Perl Design Documents, and your fair self has implemented a few of the projected perl6 syntactic features with patches to Perl 5. (You can download the Perl 6 emulator and play about with Perl 6.) If you haven't already seen Marcel Grunauer's page of Perl6-like modules, check it out!
So there's a lot of activity in perl6 as well as in perl5.
Finally, what's the best thing about Perl, and what's the worst thing about it?
Best thing? The way that it values programmer fun as much as anything else. Perl delights in being a language that is supposed to be fun. Having seen many people burn out, fun is a good thing. Fun is what keeps you sane, keeps you interested, keeps you going.
What's the worst thing? Probably the internals. They're ugly and resemble nothing so much as a Lovecraftian horror. We really want perl6 to have much nicer innards. Ideally it'll be almost as simple to program in perl6 innards as it is to program in perl6 itself. That's one of the main reasons to have perl6--a cleaner core.