The joy of Perl
How Larry Wall invented a messy programming language -- and changed the face of the Web.
Skip to CommentsTopics: Amazon.com, Entertainment News
Larry Wall smiles when he recalls the message that Yahoo co-founder David Filo sent him several years ago, shortly before Yahoo was to go public. Yahoo, wrote Filo, could never have been started without Perl, the all-purpose programming language Wall invented. So would Larry like to buy some cheap, pre-IPO stock?
Back in early 1996, at the absolute height of Silicon Valley Internet IPO madness, such an offer was akin to asking if you would accept a dump truck delivery of solid gold ingots on your front lawn. But for Wall, money has never been a primary motivation. Though widely acclaimed as the author of one of the most valuable tools for hackers anywhere, Wall lives modestly in suburban Mountain View, Calif., tooling around town in a well-worn 1977 Honda Accord. Perl itself was never about money — Wall created the language to solve a programming problem he faced during his day job, and from the get-go he made sure that the source code to Perl would be freely available. People are always allowed to tinker with Perl — regardless of whether they use it to construct a multibillion-dollar Internet directory company or just to get a survey form working on their own home page.
Still, Wall may be frugal, but he’s not stupid. He accepted the offer and bought some Yahoo stock for his 14-year-old daughter — enough to pay for her college education. A better example of the Internet’s old “gift economy” ethic could hardly be imagined — give unto the Net, and you shall receive.
Larry Wall likes to call Perl a “humble” language. In his soft-spoken voice, he describes Perl as if it were a meek, obeisant servant, existing only to “let you bend it to your uses.” The legions of Perl hackers who swarm the Web are less modest: Perl, they declare, is the indispensable duct tape, or glue, that holds the entire Web together — not just Yahoo, but Amazon and a million other sites. Without Perl and Larry Wall, Perl’s advocates argue, the Net would be but a pale shadow of its current self.
Wall has played an important role in spurring forward not only the Web’s evolution but also the burgeoning free software/open source movement responsible for so much of the Internet’s structure and plumbing. But even though his peers hail him as one of the “paramount chiefs and wise elders” of free-software culture, Wall’s version of leadership is utterly self-effacing — a character trait that sets him apart from some of the other leaders of the movement.
The son and grandson of preachers, Wall is himself a religious man. His mission, says his friend and close Perl collaborator Tom Christiansen, is to act on his belief “in people working together. He projects his inner vision of selfless work for mutual benefit onto Perl.” But he won’t allow himself to be drawn into the petty “religious” wars that plague the world of programming — the endless disputes over such issues as whether one programming language, or operating system, is inherently better than another. Such flame wars are a favorite hobby for hackers who are fond of declaiming in terms that allow no wiggle room — ambiguity being foreign to the fundamental either/or, yes/no, zero/one digitalness of the computing universe.
But Wall and Perl are all about wiggle room, about messy imperfection and fuzzy creativity. After all, duct tape is valuable not because it offers a perfect solution to your plumbing problems, but because it gets the job done. Perl, to some eyes, may not seem elegant. But that’s not Wall’s concern. His humble goal is to be useful, to help people do what they need to do — to facilitate the interconnection of programming languages, hardware platforms, assorted software universes and people working together into one cosmic entity.
Which, if you think about it, is what the Web is all about, too. It’s no accident that Perl, which Wall first invented more than a decade ago, didn’t really start to explode until the Web took off in 1994. The Web is a hacked-together, messy, ad-hoc creation that requires fast thinking and faster reaction times. Perl is a Web hacker’s best friend.
“I try to get the right amount of levity and gravity simultaneously,” says Wall, sitting in the moderately cluttered living room of his Mountain View home. He’s talking specifically about Perl, but his attitude is built into the infrastructure of his daily life. Wall has Caller ID hooked up to his computer, which he has instructed to emit unique sounds for each incoming call. What good is Caller ID, asks Wall, if you have to walk all the way over to the telephone to see who is calling? Likewise, pressing his doorbell sets off a sequence of dialogue from a Wallace and Gromit claymation cartoon, and when his dryer — hidden away in the garage — finishes its cycle, a whistling sound shoots through the entire house.
Wall’s professional background is as a system administrator, rather than as a software engineer. “Sysadmins” tend to take a utilitarian attitude toward programming and technology — they focus on keeping balky networks running, solving pressing problems now, hacking on the fly. Wall’s whole life as a programmer has been devoted to solving those kinds of problems — Perl is just the most recent tool in his personally crafted arsenal. Years before he dreamed up Perl, he had already achieved hacker renown by writing “rn” — a program for reading Usenet newsgroups.
Rn was an early prototype for what is now called the free software or open source model for software development — in which far-flung programmers collaborate across the Net on improving products whose code remains accessible to all. Wall wrote the rn program, released the source code to the Internet and then started work on an upgraded version that incorporated suggestions and bug fixes from fellow hackers all over the then-fledgling universe of cyberspace.
But back in the mid-’80s, it wasn’t easy to distribute upgrades across the Net. Often, people would be connecting via slow 300- or 1,200-baud modems, and they simply could not fling megabytes of source code back and forth in the carefree manner that is now commonplace.
So Wall wrote a tiny program called “patch.” Patch took a compact new code upgrade and applied it to old source code. Patch could bring that old code up to speed, and was even smart enough to take into account changes that had been hacked into the old code.
As hackers go, Wall is a reasonably circumspect man, but that doesn’t mean he is unfailingly modest. “Patch,” says Wall, “changed the culture of computing.”
“I’ve believed for years that patch is his single most important contribution to the open-source culture, though it’s never attracted the kind of notice that his bigger, sexier projects, like Perl or rn, have,” says Eric Raymond, one of the most vocal leaders of the open source movement.
“Patch may just be the most successful hack of all time,” says Raymond. “Larry effectively created, or at least critically enabled, the modern style of highly distributed development exemplified by Linux.“
Perl came after patch. On the surface, it’s a completely different beast, a highly complex “scripting” language aimed at programmers who need to write short bursts of code that automate tasks, connect incompatible programs and systems and otherwise solve persnickety problems. Perl’s inception dates to 1986, when Wall worked as a system administrator for a subsidiary of Burroughs. At the time, he was engaged in a “secret project for the NSA” that involved synchronizing information exchange between computers in Santa Monica, Calif., and Paoli, Pa. But the NSA didn’t just want the information synchronized — it also wanted reports generated about each exchange, and none of Wall’s existing tools seemed to fit the task. Getting everything together required a jury-rigged solution, a hack, that eventually became Perl — the Practical Extraction and Report Language.
“I realized at that point that there was a huge ecological niche between the C language and Unix shells,” says Wall. “C was good for manipulating complex things — you can call it ‘manipulexity.’ And the shells were good at whipping up things — what I call ‘whipupitude.’ But there was this big blank area where neither C nor shell were good, and that’s where I aimed Perl.”
From that point on, Wall focused his spare time and energy on exploiting the need for a language that could connect the dots across all the big blank areas in the computing universe.
“People are always looking for the interstices,” says Wall. “They are always looking for the new ecological niches. And the speed with which you can move into those ecological niches is really important, because the first person into a niche is often the winner.”
Perl was a winner. Wall ensured that Perl’s particular strong points — text processing, flexibility and a vast tool kit of built-in features for quick-and-dirty problem-solving — made knowledge of Perl essential to programmers in a hurry: people like David Filo and Jerry Yang, the two Stanford University graduate students who created Yahoo. They found Perl indispensable. They used it to generate their Web pages, write the code for their data-collecting Web robots and maintain their database of Web addresses.
“We relied on it a lot,” says Filo. “Because of the quick development time, you could do things really fast.”
Yahoo’s experience was far from unique, says Tim O’Reilly, founder and CEO of the computer book publishing company O’Reilly & Associates. Not only does O’Reilly publish the bestselling Perl computer books, but it also hired Wall three years ago to be a full-time evangelist for Perl.
“Perl is great for winging it,” says O’Reilly. “Perl is much more accessible than a traditional programming language, and I think that that was a key part of what enabled people to start building and envisioning the Web. It let the amateurs in — you didn’t have to be a professional programmer … Even though Perl can be difficult and has a reputation for sort of being obscure, it also is pretty accessible for the kinds of things that people want to do. You can throw things together quickly and get work done.”
Comments
0 Comments