A Monastic Look at Perl
(this article is also available in Tilde Zine Issue 9)
Perl was created in 1987 by Larry Wall1 who described it as “a language for
getting your job done.” In 1991, when Programming Perl was first
published, Larry Wall’s man page for perl went a little more in-depth,
describing it like so:
Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It’s also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). It combines (in the author’s opinion, anyway) some of the best features of C, sed, awk, and sh, so people familiar with those languages should have little difficulty with it. (Language historians will also note some vestiges of csh, Pascal, and even BASIC-PLUS.)
Later, Wall expanded this list of inspirations to “C, sh, csh, grep, sed, awk, Fortran, COBOL, PL/I, BASIC-PLUS, SNOBOL, Lisp, Ada, C++, and Python” — he borrowed bits from these “because the various features of these languages ruled rather than sucked.” Unlike Python’s “one obvious way to do it”, perl’s motto is TMTOWTDI “There’s More Than One Way To Do It”. Learning to get the same results with different code is one of the steps to becoming a Perl Ninja.2
In the early 90s Perl became the language of the dynamic web because it was a “Glue Language” to glue together Unix commands, it was only natural to use it to glue websites together with CGI scripts. But I’m not here to present a chronology of Perl over the years, I wasn’t there for it, anyhow it’s been done. I remember some time the late 1990s when I was first trying to become a “real programmer”3 that I picked up some “Learn Perl in 24 hours” book, and not having much success in 24 hours put off the whole thing for nearly 20 years. I’ve since learned to hack perl a bit and landed a job where it’s used extensively. When you dig into what’s available in the perl ecosystem there are multiple templating systems, folks who write perl like it’s a shell script, or C or Java or even Javascript, all cloistered away into their specific niches, mixing and matching their tools as needed. There is even a weekly coding challenge that proves TMTOWTDI with community submissions
The title of this article alludes to the Perl Monks Community, which is themed after a monastery, ranking members through monks, initiates, and saints. The comparison of hackers to other devotees is not new, the Commodore had the “Guru Meditation Error,” there’s also programming koans and coding koans, and the Tao of Perl or even Zen of Perl. Not to mention somebody else’s essay about The Cathedral & The Bazaar, the references are everywhere; for example In [Steven Levy’s “Hacker’s”][6] many people are referred to as “gurus,” their workspaces are called “monasteries” and the people who operated IBM mainframes were referred to as a “Priesthood,”
and those privileged enough to submit data to those most holy priests were the official acolytes. It was an almost ritualistic exchange.
Acolyte: Oh machine, would you accept my offer of information so you may run my program and perhaps give me a computation?
Priest (on behalf of the machine): We will try. We promise nothing.
Larry Wall has never hidden his Christian faith, it’s been referenced in his excellent speeches, but he’s no fire-and-brimstone bible-thumper4, he discusses a variety of ideas with wit, joy, reverence, and irreverence. I’ve found these talks to be infinitely fascinating. He connects a lot of different ideas and ideologies, it’s clear that Perl’s “glue” was born from Wall’s personal adhesiveness, his willingness to find the best part of everything and steal like an artist.
You may be familiar with Wall’s Famous “Three Virtues of a Programmer”: Laziness, Impatience and Hubris; but in his second “State of the Onion” — delivered at the 1998 Perl conference — he expands on that with three virtues of community5
[The three virtues of a Programmer] are virtues of passion. They are not, however, virtues of community. The virtues of community sound like their opposites: diligence, patience, and humility.
They’re not really opposites, because you can do them all at the same time. It’s another matter of perspective. These are the virtues that have brought us this far. These are the virtues that will carry our community into the future, if we do not abandon them.
Basically, we just have to stay the course. Friedrich Nietzsche6 called it “a long obedience in the same direction”, which is a good snappy slogan. But I like the full quote too:
The essential thing “in heaven and earth” is … that there should be long obedience in the same direction; there thereby results, and has always resulted in the long run, something which has made life worth living.
The passions that drive us must be tempered and honed. Diligence, Patience, and Humility are like older monastic tenets, are virtues that cultivate a mindfulness that TMTOWTDI7 applies to more than just code, and a grace that comes from recognizing that we don’t all share the same thought processes and experiences to do things in the same “one obvious way.” There might not even be one obvious way — once you’ve begun working diligently you’ll find many more solutions and aspects to a problem than you initially imagined. If you think you know everything already you’ll soon be humbled, and that’s life.
-
Ninjas are sort of like Monks, right? ↩
-
No True Programmer puts Sugar on their Porridge ↩
-
He probably read the contents instead of weaponizing the book ↩
-
Community is something I’ve always been interested in. ↩
-
See? Larry’s not holding a grudge against the dude who famously said “God is dead,” we can all learn from people we disagree with. ↩
-
There’s More Than One Way To Do It, remember. ↩