17 private links
Perl is a messy, maddening programming language, the “duct tape of the internet.” But at least you can tell it was made by humans.
Perl was once everywhere. Or at least it felt that way. Around the turn of the millennium, it seemed that almost every website was built on the back of this scripting language. It processed massive amounts of text—mechanisms for doing this powerfully and easily were part of the language—and it was even used in bioinformatics, munging and churning through genetic data. Based on one list, the companies that used Perl ranged widely: Amazon, Google, Yahoo, Deutsche Bank, Akamai, Citibank, Comcast, Morgan Stanley, Mozilla. A lot of Craigslist was programmed in Perl.
Even at its peak use, the popularity of Perl was always a bit surprising. Perl is an undeniably messy language. It’s often referred to as the “duct tape of the internet,” with programmers joking that it’s a “write-only” language: You write in it but seldom read it (at least successfully).
There is an amalgamated mashup nature to Perl, all in service of its motto: “There’s More Than One Way to Do It.” Just as there are synonyms in English, Perl has a variety of approaches to writing the same thing. While this is a common feature of programming languages to a certain degree, Perl seems to want to knock you over the head with it. There are multiple ways, for example, of writing conditional statements, from using the traditional “if” to “unless”; to writing an if statement backward in a single line; to even a three-part operator that involves a question mark and a colon. I have a distinct memory, in the early 2000s, of writing code in Perl one day, and the next day not understanding what I had written.
But this clutter and baroque structure are in fact intentional and part of the broader philosophy that underlies Perl. The language’s creator, Larry Wall, was trained in linguistics, and his intention was to become, along with his wife, a missionary involved in rare languages. Wall ended up taking a different path and fully embraced coding. But his deep thoughts around how languages work never left him.
Wall’s perspective seemed to be that an obsession with linguistic purity was overrated. English has words from French, Greek, German, and even Akkadian, betraying its winding history and multifarious origins. We split our infinitives and dangle our modifiers. We have puns, both intended and not. So what’s a little bit of strangeness when it comes to how to write an if statement? Wall viewed evolution as part of the process of language development. There is an organic process going on here, and the final products needn’t be orderly. And so, a broad—and nonjudgmental—approach to language construction is vital, whether it’s a language designed to write scripts or sonnets.
Perl has its “more than one way” to do things and English has its numerous styles and flexible nature, a nature that can contain everything from cooking recipes to haikus, shopping lists to Faulkner. That is the sign of something that is truly open-ended. As Wall once said: “I’m a firm believer that a language … ought to be an amoral artistic medium.” If Perl has any overarching vision or dogma, it’s merely the fact that, perhaps, there shouldn’t be programming dogma at all.
To be clear, I was never a deep user of Perl. Its syntax and messiness overwhelmed its power for me, and when I was introduced to the well-ordered structure of Python, I ran to that language and never really looked back. This might in fact be a hint as to why the language lost its luster. Even in 1998, during its heyday, there were suggestions that Perl’s bloat might lead to a desire to jump to something “cleaner.” Whatever the reason, Perl is no longer as popular as it once was.
Still, I find myself returning to this strange language, and I think it’s because of the humility at its core. We need humility as we recognize that our world is more complicated than we might be able to comprehend, even or especially when it comes to the large technological systems of our own making (AI, cough cough). A single comprehensive theory or model won’t cut it in a world of exceptions and edge cases and raging complications. We need slow, stumbling approaches, and Perl’s evolved pluralism can show us the way.
Perl can even teach us about ourselves. If I had to choose a language that is furthest from Perl, it might be Lisp. Developed around 1960, Lisp is elegant, almost mathematical in its construction. The “Maxwell’s Equations of Software,” as its definition has been described—just to give you a sense of the esotericism. Perl is, of course, not that. It’s organic and sometimes maddening. For all its messiness, in other words, it’s a language of the people.
And that’s the thing about programming languages: They are actually for people; they can’t just be parsable by machines. In the classic textbook Structure and Interpretation of Computer Programs, the authors make this clear: “Thus, programs must be written for people to read, and only incidentally for machines to execute.” Yes, the joke is that Perl is “write-only”—but you can always tell it was written by human beings.
A Perl renaissance is, I admit, unlikely. But perhaps the lesson of Perl is timeless. It asks us to be less precious—and more human—when it comes to programming languages and their design. Only then might we be able to bridge the gap between us and the machines.
I've used Perl 6 for IRC bots. The ease of writing parallel code, nice OO model, multi dispatch, and subsets make it very pleasant to do them in Perl 6. Here's a bot I wrote that listens for GitHub webhooks and reports new commits and PRs: https://github.com/perl6/geth and here's another one that's just a bunch of random features: https://github.com/zoffixznet/perl6-buggable/
I also heard people say grammars are the most note-worthy feature of Perl 6 and people basically use them to quickly hack up a nice little micro-language in which they then attack their problem. Before I came to Perl 6 I was dumb as shoe when it came to writing parsers, but I find it trivial to do with Perl 6 grammars.
Do I like it? Although I'm obviously biased, I love the language. It lets you write beautifully concise, yet still readable, code. It even lets you use much more readable syntax for regexes. Somewhat regretfully, it made it very difficult for me to learn other languages, as in them I end up writing 3x, 4x, 6x the amount of code and I keep getting reminded of Larry Wall saying Perl 6 would be the last language you'd learn. In Perl 6 I can "talk"; in other languages, I write "code".
However, while the language is fantastic, the implementation still has a lot of work to be done to polish it off. It's basically a 1.0 release. Unlike Go, Rust, or Swift, there isn't a giant corporation behind Perl 6 that can just throw money at problems until they disappear. Compared to other languages, some things are still unoptimized and are much slower. I spotted some leakage that makes it problematic for very-long-running (months) programs. About 65 new bug tickets are opened per month. The test suite is pretty sparse in some areas (which is the likely reason for many of the new bug tickets). But... three new core developers joined this January, so hopefully all that will get improved pretty fast.
Someone in the comments also mentioned the baby-sized ecosystem... Since Perl 6 lets you use C libraries without needing to compile anything, people wrote stuff like Inline::Perl5 and Inline::Python that let you import and even subclass stuff from Perl 5 and Python. And that's a bit of a double-edge sword: yes, it's trivial to use libraries from Perl 5 and Python, but it also stunts the ecosystem; no one has enough motivation to re-invent the wheel in Perl 6 when the wheels from other languages are reasonably usable.
I mean, can you get it any more WRONG?! The juvenile logo and awful color scheme of the website. The Christmas release that isn't all release-like. Version 6.c? Why not 6.0? What's with the whole "language" and "compiler" distinctions no one cares about? Why is the first stable release of the compiler not optimized to the max? And why is it called "Perl" in the first place? They should rename it!!
Too little, too late. Is there a need for a new Perl? No, of course not. What is it good for? Nothing. What is its business case? None! What's Perl 6's "Killer App"? Non-existent. Why in the world would anyone use Perl 6?!
SuperCollider is a platform for audio synthesis and algorithmic composition, used by musicians, artists, and researchers working with sound. It is free and open source software available for Windows, macOS, and Linux.
A Vocabulary List of common Turkish Words and English Translations