15 ms·
Perl is dying
- thesuperbigfrog 7y agoThe current state of Perl 5 for Python fans: ---- Perl 5: I'm not dead! TIOBE: 'Ere! 'E says 'e's not dead! Internet: Yes he is. Perl 5: I'm not! TIOBE: 'E isn't? Internet: Well... he will be soon-- he's very ill... Perl 5: I'm getting better! Internet: No you're not, you'll be stone dead in a moment. TIOBE: I can't take 'im off like that! It's against regulations! Perl 5: I don't want to go off the chart.... Internet: Oh, don't be such a baby. TIOBE: I can't take 'im off.... Perl 5: I feel fine! Internet: Well, do us a favor... TIOBE: I can't! Internet: Can you hang around a couple of minutes? He won't be long... TIOBE: No, gotta get to Reddit, they lost nine today. Internet: Well, when's your next round? TIOBE: Next year. Perl 5: I think I'll go for a walk.... Internet: You're not fooling anyone, you know-- (to TIOBE) Look, isn't there something you can do...? Perl 5: I feel happy! I feel happy! ---- But seriously, Perl 5.30 just came out in May. It's not dead yet.
- dfsegoat 7y agoI do know somebody who is using perl for a RESTful api backend for a line of business app. I was pretty fired up to find that, if only for nostalgia (haven't used it myself since undergrad studies required it [bioperl])
- dano 7y agoThis seems like a nod to python. :-) I started using Perl in the late 80s as a replacement to complex sed and awk scripts, but switched to Python in 2010. I still remember the day that mod_perl hit me, boom! Scaling inside Apache.. 1999 was a lifetime ago.
- sleepybrett 7y agoThat's my primary use case for perl 'when it gets a little to complex for bash, just use perl'. Which is what perl was initially designed for. I never made the switch to python as it seemed to have more aspirations than that. I always thought that people who took perl further than 'great for sysadmin type tasks' were a little nuts.
- bloak 7y agoWhat's the alternative to Perl for the sort of file conversion and text processing that can be done with a Perl script of about a hundred characters that I can type in and edit on the command line? Or if I want a 100-line script that will work in 2029 the same as it works today and won't require any stuff to be installed first? I don't like Perl, but since it's there, it works, it runs quite fast and I'm familiar with it, I'll probably continue using it for my own stuff for as long as I continue to use a computer, which is likely to be at least a couple of decades beyond 2023.
- user5994461 7y agoMaybe awk for text manipulation?
- DominoTree 7y agoLiterally the reason AWK was created
- baldfat 7y agoAWK has been and will forever been under appreciated. It is a fantastic tool. I always preferred it to Perl myself.
- 52-6F-62 7y agoI use it multiple times a week for printing/copying tabular data from space-delimited files. It's not the most arcane usage but it would probably take several lines to do what awk does in one. I don't even know much awk! Learning any bit of awk is worth every moment of the investment. cat somefile.txt | awk '{ print $1 "\t" $2 }' On mac I pipe to `pbcopy`. Saves me several minutes each time.
- keithnoizu 7y agoI don't use it quite that frequently but awk/sed is a strong addition to the toolbox.
- bryanrasmussen 7y agoLarry Wall is 65 years old. I'm willing to bet someone is still using Perl in 2024 (just to be polite)
- geofft 7y agoIsn't Larry Wall primarily using Raku?
- bryanrasmussen 7y agoI didn't say anything about primarily. I mean I have languages I don't use anymore, except on the odd times when I know they're the best solution. on edit: anyway I guess my point really is the language will not be extinct until the last human user of it no longer uses it all. I don't think it is gone within 4 years.
- voidfunc 7y agoIts not dead, but how much new code is being written in Perl? I generally measure th health of a language by how much contemporary use it gets. I used to write Perl but I do not take it out of the tool chest anymore and I see very few Perl codebases in the OSS world.
- nerdponx 7y agoI just don't see a reason to use it nowadays. Python is more verbose, but it's also easier to read and debug, and its tooling and package ecosystem is less chaotic. And for small stuff, I just have Zsh, which is a perfectly suitable Perl replacement.
- forinti 7y agoIt's always there in every Linux distribution. And Oracle seems to like it as they include lots of perl scripts with their products.
- shakna 7y ago> I used to write Perl but I do not take it out of the tool chest anymore and I see very few Perl codebases in the OSS world. It's still haunting under the covers of many a proprietary app. It handles all the database processing for a fairly modern program I reverse engineered last year (so we could transfer from it to a new program without having to manually re-enter the 2.3million record database). Heck it was only a couple years ago that macOS used Perl for string processing in libc. [0] (I believe it now forks to sh instead.) [0] https://news.ycombinator.com/item?id=18920122 https://news.ycombinator.com/item?id=18920122
- z3phyr 7y agoThe OSS world, all the glitter, is just an iceberg to the ice continent of the software industry as a whole. There is still a lot of new mainframe code written today. And a lot of glue scripts are still written in perl at various software houses
- msla 7y agoThe OSS world is all glitter? Huh, I guess all of those ancient Apache installations running mod_perl are more glamorous than we thought. Ditto the busybox shells on a million embedded systems, but I guess that's a bit beyond most here.
- factorialboy 7y agoBooking.com might keep it alive for a while
- stephen82 7y ago...and cPanel craigslist (https://www.craigslist.org/about/thanks) imdb (https://help.imdb.com/article/imdb/general-information/what-software-are-you-using-to-run-imdb/GH25HF4NB3C2KP9E) Companies who use Perl within London http://london.pm.org/advocacy/ 2018 sponsors (https://act.yapc.eu/lpw2018/) 2019 sponsors (https://act.yapc.eu/lpw2019/sponsors.html)
- phs2501 7y agoCalling Perl (released 1987) "one of the first" programming languages is an extremely revisionist view of history to put it lightly.
- psim1 7y agoOnce I got to that part, I took the article for satire. I'm still not sure whether it is.
- user5994461 7y agoCorrected. You're the second person pointing this out.
- unpythonic 7y agoSaying that Perl was one of the first languages is silly of course. It's nowhere near as old as LISP, FORTRAN, and C. However, Perl is the first of its kind. Prior to Perl, one would have to hack together in either Bourne or C-shell a series of commands all strung together, poorly. Grep, sed, awk, and a slew of utilities were strung together poorly with any specialized manipulations coded in and compiled from C. Perl was the first popular language that gave us first class data structures (arrays and hashes) along with the programming structures we were familiar with in C. The inline regex support obviated the need for sed and awk gymnastics to the relief of many. All of the crazy things in Perl that drive so many people nuts today were derived from the shell scripting that everyone was familiar with at the time. Error codes in "$!", that seems familiar, if you're used to /bin/sh. Perl's syntax which mapped shell script idioms directly into language features made these conversions a breeze. Perl was the first and best at being able to convert these awful shell scripts into something which was maintainable. This was also Perl's primary downfall. Because it was so easy to use, lots of people who were not first-class programmers were able to write a lot of not-so-nice scripts which made later programmers sad and angry. It was a victim of its own success.
- magduf 7y agoCalling it "extremely revisionist" is absurdly generous even. Calling it "one of the first" programming languages is just flat-out wrong. Lots of other languages were around for many years or even decades before: COBOL, FORTRAN, Pascal, C, Algol, LISP, just to name a few. The idea that Perl is "one of the first" is just plain insane.
- glofish 7y agohaving read the article I agree with only one point that the author makes: once Perl is removed from the default installs, it will lose one of its advantages, being there and working by default. People will likely shy away from installing an additional programming language. The other topics there have been rehashed many times before and are little more than extrapolations and exaggerations - how could a language ever go extinct ... if anything COBOL demonstrates that languages do not go extinct.
- msla 7y ago> The other topics there have been rehashed many times before and are little more than extrapolations and exaggerations - how could a language ever go extinct ... COMIT, TRAC, JOSS, FOCAL, and a few dozen assembly languages all would wave, but they're a bit dead at the moment.
- user5994461 7y agoWikipedia has a list of major programming languages by generation: https://en.wikipedia.org/wiki/History_of_programming_languages#First_programming_languages https://en.wikipedia.org/wiki/History_of_programming_languag...
- base698 7y agoI used to write perl 20 years ago and haven't touched it in 15 years. I thought it already was dead, then alas I got a job where it still exists in massive undisturbed quantities of thousand line functions and scripts with no structure. It feels the same as the anthropologists must have felt when finding an Amazonian tribe completely untouched by the modern world.
- eloisant 7y agoI hate to be this guy, but Ruby on Rails is not a language, and Ruby the language was first release in 1995.
- icedchai 7y agoAlmost nobody was using Ruby in 1995. Perl, however, was everywhere.
- pkd 7y agoAlmost nobody was using Python in 1989 either. Clearly it's a mistake on the part of the writer and not some deliberate attempt at judging when a language became popular.
- user5994461 7y agoAuthor here. I put Rails instead of Ruby deliberately. I'm not sure if Ruby is significant enough to stand on its own, guessed not.
- icedchai 7y agoRuby was barely a blip on the map until Rails showed up.
- pkd 7y agoThanks for clarifying. But that seems a bit unfair and arbitrary. Rails definitely boosted its popularity but Ruby itself is quite potent without it. Stripe has its systems written in Ruby without using Rails, for example. If we apply the same standards for Python, shouldn't we track its popularity by when NumPy(Numeric) came into being? (1995) This is supremely pedantic though, and I don't really care about arguing it here, so :shrugs:
- deleted 7y ago[deleted]
- gist 7y ago
- efa 7y agoKind of stupid article. Perl will be dead because there are less searches on it and Apple is deprecating all script interpreters (not singling out Perl) and RedHat has announced that python is not setup out-of-the-box. Bold predication - in 2024 there will still be plenty of Perl running.
- jhbadger 7y agoAlthough not AWK! Apple has to keep it to still adhere to POSIX (which is still a relevant classification to many big buyers in government and enterprise). Maybe this will cause an AWK renaissance...
- user5994461 7y agoPOSIX is mentioned. Removing it can't be an issue or Apple and RedHat wouldn't be removing perl/python. There's gotta be something we're missing out. RedHat is specifically targeted to government and enterprise. They would be aware of that.
- xemdetia 7y agoThe thing that RHEL is trying to fix is to prevent customers from being tied to the system python/perl and should install a version that works for them and the application they are trying to run. People installing random modules into the same perl/python as is used for system startup/critical software has always been a problem but it is also one of those things that makes having a long term LTS nearly impossible because you can't separate the user needs vs. the distribution needs and trying to fix anything turns into backports to weird ancient versions. This way distros can package and update the things they need independently from everything else and not disturb the user, and also provide a more comprehensive suite of packages that also don't disturb the system space. This is similar to how Amazon Linux is setup a bit. A better example is a user I should be able to install python 3.7 and use it, even if the system libraries for the core packaging is based on python 2.x. Traditionally most users would just build their system scripts on python 2.x (because it is there), which means that if you upgrade the distro from RHEL X to RHEL Y (which brings a python 3.x) you break a user's environment. This was a constant problem when you were trying to go through the RHEL 5-6-7 upgrade paths among other things. It hopefully will be resolving the issues of people and packaged software using weird old versions because it is there and breaking when something changes. My favourite example is having to write in ancient bash just to support MacOS which still ships bash 3 something. In a shorter version, the interpreters are still there and buried, just not on $PATH and given to the user as a what they should use. (This is opinion based on how I have seen people abuse systems and try to upgrade them over the years).
- cesarb 7y agoThis article immediately reminded me of the classic "BSD is dying" meme. For those who haven't seen it yet, https://everything2.com/title/BSD+is+dying https://everything2.com/title/BSD+is+dying explains it, and several of the points listed there might also apply to this article: "[...] there is always someone who is more than willing to defend it", "easily knocked down facts", etc.
- jumpingmice 7y agoI immediately mentally inserted “Netcraft confirms” before the title of this submission. Glad I’m not the only one afflicted with this meme.
- user5994461 7y agoIgnoring the trolling aspect for a minute. There is actually a real discussion to be had on how BSD (or any software) continues to be developed and maintained, with support for current hardware It takes a lot of work to keep software going, both developers and time. Wondering where it comes from. If it's free it's not getting money from users to finance that; if the user base is dwindling it also means there are few developers or other-company employees to work on it.
- tartrate 7y agoAny language put into the same relative popularity graph of other languages each with faster growth will always show up as diminishing.
- user5994461 7y agoAre you implying that COBOL and Delphi are fast growth languages?
- tadzik_ 7y ago> That makes one wonder about who else is still using Perl? if any? Can’t remember the last time I’ve heard about it. Perl, like many other languages, has its own bubble. I'm using Perl daily at work. I used Python for a while, but the Perl job market was just too nice to pass. I have a backlog of clients interested in Perl work longer than I can handle, and they don't mind my requirements because they have no one to replace me with. Is that a sign of a dying language? Probably yes. But to be honest, if it's about to become the next COBOL then I'm looking at a lifetime of profitable work with little to no competition :) BUT: > Nothing personal with Perl. Just doing stats Perhaps a little bit of research could help your point as well. The CGI example you mentioned is broken, but is also using a module (CGI.pm) that's been bad and wrong for so long that even Perl, with its eternal love for backwards compatibility has removed it from Perl Core. That's a sign of Perl's marketing problem, yes, but it's hardly a real indication of a language that's too old to care about fixing itself.
- michaelanckaert 7y agoI have the same experience. A healthy portion of my time (25% is my estimate) comes from Perl freelance work. The amount of 'legacy' systems that run Perl and need maintenance is staggering. If it weren't for the current Python hype (AI/ML and devops), I'd have more project that require Perl than Python.
- matt-attack 7y agoWhat’s the replacement for generating HTML fragments? And what’s the replacement for collecting params? I’ve used CGI.pm for both of those things.
- ergothus 7y agoI've not used Perl as my primary language in over a decade, but it remains my favorite. I never used CGI.pm for generating HTML...the idea of using functions for tags seemed unneccusarily dense when HTML is a string and Perl is well suited to handling strings. Later I shifted to templating modules like HTML::Template and Template::Toolkit. I assume those are long defunct, but vfb the point is that they offered better functionality than CGI.pm For parsing params, yes, I used CGI.pm.
- shadowgovt 7y agoPerl was great when it came out, but there's a lot of better alternatives available ("better" in terms of robust language definition and diminished likelihood of a typo leading to a sound-but-incorrect program, which seem to be two things that developers value more over terseness in an era where IDEs assist with editing in verbose languages). I suspect perl will always have a place (there are a million shell scripts out there handling issues people need solved), but it'll have a place like COBOL does; useful where it already exists, but not something you learn until and unless you need to edit a perl script.
- collyw 7y agoI dunno, for certain task I think Perl is unmatched. Anything that would take more than a loop in bash to accomplish, but bash style work.
- forinti 7y ago> For example, it doesn’t support functions with arguments, Well, you can name your arguments if you want to. You can use hashes. Or you could just get a bunch of unnamed values. I like this flexibity. I also like that you can make the language evolve without having to add syntax (something Java is suffering from).
- shadowgovt 7y agoModern IDEs make syntax addition cheap. One of the primary advantages of perl is its terseness, but that advantage diminishes in an era of IDEs converting a few keystrokes into a hundred characters of (better self-documenting) code.
- Amorymeltzer 7y agoThis was mind-bending for me too. It seems like the author is just arguing that since the syntax is different it's worse? The flexibility in Perl is nice, and while references can be a real PitA, a weird assertion to just make.
- Ultimatt 7y agoOne day my comment on the article might get approved showing that the syntax is also "modern" since like 2008! 2014 was formal support in the core of the language with `use feature 'signatures'` in version 5.20
- virusduck 7y agoI still use it every day!
- GlitchMr 7y agoThere is no bug with `\r\n`. I checked the provided example, fixed `\N` to be `\n` (this bug causes a compilation error, so it would be noticed during compilation). The hex output is as follows. 00000000: 436f 6e74 656e 742d 5479 7065 3a20 7465 Content-Type: te 00000010: 7874 2f70 6c61 696e 3b20 6368 6172 7365 xt/plain; charse 00000020: 743d 4953 4f2d 3838 3539 2d31 0d0a 0d0a t=ISO-8859-1.... 00000030: 5041 5241 4d3a 0a PARAM:. Note the 0d0a0d0a sequence following the character set. This is `\r\n\r\n`, as it should be.
- user5994461 7y agoThis was running on Linux? That's odd. The bug works on Python. Wondering how Perl does the formatting to end up with \r\n. Either way, still puzzling there is a typo in the official example.
- lazyjones 7y agoYou can find similar examples with just \n in the official Apache docs on CGI: https://httpd.apache.org/docs/2.4/howto/cgi.html https://httpd.apache.org/docs/2.4/howto/cgi.html The solution for this puzzle is that mod_cgi will simply convert LF to CRLF silently. (more precisely: it parses the headers the script outputs in a relaxed way and lets the server write them in a correct format later)
- GlitchMr 7y agoThis is directly executed (without HTTP server involved, yes, it's possible to run CGI programs directly in shell) program on Linux.
- adrianmonk 7y agoIn Perl, "\n" has a similar kind of platform-specific behavior like it does in some other languages (such as C). Its output is more or less defined as "whatever is appropriate on this type of machine". It's useful for printing for the console or writing to a text file that will be used on the local machine, but not for everything. If you're building a message to go on the wire as part of a protocol that needs certain specific characters, and if you're trying to write portable code, then you shouldn't use "\n" (or "\r"). This is actually covered in the "perldoc perlop" documentation under the "Quote and Quote-like Operators" section (available at https://perldoc.perl.org/perlop.html#Quote-Like-Operators https://perldoc.perl.org/perlop.html#Quote-Like-Operators): > All systems use the virtual "\n" to represent a line terminator, called a "newline". There is no such thing as an unvarying, physical newline character. It is only an illusion that the operating system, device drivers, C libraries, and Perl all conspire to preserve. Not all systems read "\r" as ASCII CR and "\n" as ASCII LF. For example, on the ancient Macs (pre-MacOS X) of yesteryear, these used to be reversed, and on systems without a line terminator, printing "\n" might emit no actual data. In general, use "\n" when you mean a "newline" for your system, but use the literal ASCII when you need an exact character. For example, most networking protocols expect and prefer a CR+LF ("\015\012" or "\cM\cJ" ) for line terminators, and although they often accept just "\012" , they seldom tolerate just "\015" . If you get in the habit of using "\n" for networking, you may be burned some day. So, arguably it is a bug to write it that way, but not exactly a fault of the language since it is providing a facility to do something useful and also explicitly warning you against using it for something else. One way to think of "\n" is that it's similar to localized strings. In both cases, you have a need to let the system render something differently depending on context (platform or user location/language/etc., respectively). It's helpful to have that abstracted away, but you should realize that magic is happening and that you generally shouldn't use it for machine-to-machine communication.
- robinhouston 7y agoI love Perl. I first used it in 1994, around the time the early versions of Perl 5 were released. It’s hard to overstate what a breath of fresh air it was compared to the incumbent languages at the time, which were either very low-level (mainly C, and increasingly C++, at least in the Unix world) or else brittle and limited (various flavours of shell script, sed, awk). Perl was a joy to use. Things that would have needed dozens of bug-prone lines of C could be done in just a few characters. Regular expressions and associative arrays were first-class language features! And, with the advent of Perl 5, there was enough scope for structuring code in a modular way that it wasn’t insane to write pretty large and serious programs. The culture was delightful too. In those days it was centred on Usenet and mailing lists, and the general attitude was freewheeling and fun. When the first user group was set up in London, where I was living by then, I signed up immediately. That’s still the most fun I’ve ever had hanging out with programmers, and Perl was the glue that bound us together. At some point I joined the developers’ mailing list (perl5-porters), just to see what they were up to. After a while I started to contribute: bug fixes at first, and later language features. That was fun. So, Perl has been a big part of my programming life. But I haven’t really used it in anger for about 15 years. I still write Perl one-liners on the command line for ad hoc data processing, and actually I think Perl is still the best available tool for that, although younger coders tend not to be familiar with it any more. But as for writing real programs? The world has moved on. There are newer languages that have taken the good ideas from Perl, but without so many confusing idiosyncrasies. Perl 6 is another story, one that I didn’t have much part in. It’s a fun bundle of ideas, and maybe some of those ideas will spread and be useful elsewhere, but I doubt it will ever catch on itself. I’ll always love Perl, but I doubt I’ll ever write another serious program in it – except maybe out of nostalgia.
- kbenson 7y ago> Nothing personal with Perl. Just doing stats. Very poor stats if you're extrapolating the time a market participant will be reduced to zero by looking at relative market position without also examining absolute usage. That is, it's possible for something to have less relative market position but be increasing or static in total usage if the total market is increasing fast enough. That doesn't indicate something is dying, but it looks the same in graphs, and extrapolating from those lines won't show you what you think it is. Is Perl in that situation? Probably not that much (but somewhat, I would argue), but if you're going to make a case on statistics, don't do a crappy job of it...
- rongenre 7y agoPerl has a well-deserved reputation as a "write-only language".
- oldmanwillow 7y agoAny language you haven't taken the time to understand is write only. This is such a lazy trope.
- collyw 7y agoI have seen absolute rubbish written in Python (which is supposed to be like pseudocode) and I have seen beautifally written Perl. It's 90% down to the individual writing the code. Perl just has a lot of syntactic sugar which can make it look like line noise to someone that doesn't understand it.
- daotoad 7y agoSo the story goes. Care to relate some examples that show how it is worse than any other language? I’ve seen mind-curdlingly horrible Perl of several varieties (novice, mad genius, and the biggest ugliest balls of mud you’ve ever seen), yet nothing has yet touched even the hem of the horrors I presented over-architected Java ravioli with acute patternitis.
- bingcat 7y agoI'm not sure using a very outdated CGI example as an illustration of why Perl is dying is all that convincing. It says in the source article "you probably don’t want to use CGI for modern web development", then explains all the reasons why not, pointing you to modern frameworks such as Catalyst, Mojolicious and Dancer. Not saying Perl doesn't have challenges with its popularity, but this isn't a very good case as to why it's dying.
- user5994461 7y agoIt's just a basic example to show what the language looks like. Same in the 3 languages straight from the textbook and stack overflow. Basic CGI script to show all GET request parameters. If you were writing an HTTP API, you would probably do something very similar although not running over CGI.
- bingcat 7y agoOk but why not choose an example to show what the language looks like today, vs >10 years ago? Perl CGI is deprecated, so if anything using an example this outdated proves the opposite of your point. Surely a more constructive comparison might be looking at a 1 page app in Mojolicious vs Flask, Express, etc?
- Ultimatt 7y agoFor example the -signatures example on https://mojolicious.org/ https://mojolicious.org/
- gist 7y ago> That makes one wonder about who else is still using Perl? if any? Can’t remember the last time I’ve heard about it. I don't even get statements like this. And what does 'heard about it mean' anyway. Interesting I just pulled up another quick and dirty test compliments of HN Search (Algolia): Last Year Story Titles: Perl: 301 Python: 3,360 Java: 3,931 Ruby: 687 Ruby on Rails: 105 HTML: 214,423 Bitcoin: 1,398 Blockchain: 1,622 Adding Bitcoin and Blockchain I was just curious. But imagine if I wanted to prove popularity by using 'last year in Hacker News' in titles. It would appear that Python was 'more popular' than Bitcoin or Blockchain. No question it's less popular than it was years ago for numerous reasons. Not sure the methodology used (google trends) tells the complete picture.
- wvenable 7y agoHow many of those Perl story titles are some variation on "it's dead/not dead" though?
- UncleEntity 7y agoI would guess a bunch were about perl 6 since it was the new shiny.
- emilper 7y agoHow many stories were about BASH ? Everybody working on Linux is using BASH so it should have a very high score.
- mulander 7y ago> Perl – 1987 > Python – 1989 > Ruby on Rails – 2005 Ruby itself is 1995. In 2005 when Rails was coming out Perl had it's peak according to Tiobe: > Highest Position (since 2001): #3 in May 2005[1] > That makes one wonder about who else is still using Perl? if any? Can’t remember the last time I’ve heard about it. Duckduckgo? [2] Sure, Perl is loosing popularity but I don't think it's anywhere near dead or extinct. [1] - https://tiobe.com/tiobe-index/perl/ https://tiobe.com/tiobe-index/perl/ [2] - https://github.com/duckduckgo?language=perl https://github.com/duckduckgo?language=perl
- Klonoar 7y agoBooking.com also still has a ton of Perl I believe.
- lazyloop 7y agoBut Perl does have functions with arguments, by all definitions. https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Signatures https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#S...
- jlokier 7y agoIndeed, Perl does have named function parameters, the same as almost all modern languages - and I highly recommend using them. (I use them throughout my code, except for modules that should stay compatible with very old versions of Perl.) But folklore is a thing. Many people learned Perl before named parameters, and to be fair they took about 20 years to arrive (and are still called "experimental"!). People don't like to change now. I think most people writing new Perl code still use the no-named-arguments idiom, just because it's old and familiar. Which makes code look more arcane than it needs to, to outsiders, unfortunately.
- crazybigdan 7y agoI really like perl. I started writing it in my university for sys/admin stuff and then went down the rabbit hole and investigated most of the nooks and crannies of the language. I like all the special symbols. I have no issue with reading code that I wrote five months previously. I like that it does not limit what I want to do programmatically. In fact I recently snuck some perl code into production at my company a month or so ago: we needed an android app to post data to a backend where it could later be analyzed. Super simple. I wanted to get it out the door as fast as possible and due to the fact that it will be retired before the end of this year, I choose to write the backend in perl using MongoDB and Mojolicious. Then I saw that MongoDB is retiring their driver for perl[1]. I still went forward, but it was yet another reminder of the state the language is in. It saddens me that perl does not get more love. It is a fantastic language but I can not justify teaching others it, or encouraging them to learn about it. [1]: https://www.mongodb.com/blog/post/the-mongodb-perl-driver-is-being-deprecated https://www.mongodb.com/blog/post/the-mongodb-perl-driver-is...
- phlakaton 7y agoThis article displayed a malware ad to me, unfortunately. Flagging accordingly.
- user5994461 7y agoAuthor here. Screenshot? Wordpress is showing ads automatically on all blogs, I might be able to pay and disable them if they are really as horrific as that.
- zippergz 7y agoI got this too. It redirected me to a fake Mac "system warning" page twice in a row. Sorry, I don't have anywhere handy to host a screenshot.
- user5994461 7y agoYou mean opening the page got you redirected? Without any user action? That is shady as f*. If WordPress is really doing that, the next article will be about wordpress distributing malware.
- phlakaton 7y agoYes, and with a pop-up designed to look like a Mac modal. You know the kind. :-(
- ping_pong 7y agoI understand Perl is still very popular, but I have always hate Perl with a passion. I felt it was just a bunch of arbitrary rules that you had to memorize vs a more naturally intuitive language. For example, if I remember correctly, Perl supported both "&&" and "and", with 2 different precedences. And the line of code that broke me was something similar to $a = $src[$src] At first I thought it was a bug, but then I realized that there must be two different variables called src, one was a scalar and the other was an array (I think that's what it's called it's been 15 years since I've used it). Anyway at that point, I decided I hated Perl and would never use it again.
- biztos 7y agoDon't most programming languages have a few idioms that really annoy newcomers? I've been using Perl since the 1990's so when I see something like your example, my first thought is "oh no, somebody who doesn't know Perl wrote this Perl code!"[0] I recently learned Python and while I think I'm pretty OK at it, I still have WTF moments from time to time. Like: > from datetime import datetime # WTF? and yet standard! I'm often tempted to rant about semantics and documentation culture in Python but then I remember hey, lots of people have similar criticisms of languages I know better, so maybe I should just give it some time. I'm not saying you should have liked Perl, but in the programming landscape of 15 years ago you were passing up one of the most important things powering the Web. [0]: never name two variables of different types the same thing; never use $a as a normal variable because it's sometimes Special.
- otabdeveloper4 7y agoNo, it just (code)smells that way.
- tiborsaas 7y agoWhen will it go away? Simple. It will be dead when the last line of Perl goes out of production. I've just found a comment under a Rust video on YouTube that someone is still stuck with Fortran at work.
- JoeAltmaier 7y agoMy sister is retired, but consulted with an old company she used to work for in IT. She found a comment in a header file from the 1980's. Which she wrote. So yeah, code can hang around.
- seamyb88 7y agoNever used perl but I've tinkered with (Neo)vim under the cover, which is close I think? If so, it seems like a real nice language.
- wiremine 7y agoA lot of comments seem to be equating dying with dead. So, let's agree that Perl is _not_ dead. Is it dying? it isn't as popular as other languages, and it isn't being used for as many new projects. Therefore, you could say it is dying a slow death like a lot of languages before it. It will continue to be used in existing code bases for decades to come, but like Cobol it likely isn't going to be the go-to language for most projects. Will Perl 6 change the trend? Maybe? I don't think we know enough to rule that out. If it _is_ dying, I often wonder if it was a self-imposed death. If Perl 6 hadn't been delayed so long, we might be living in a world where Python didn't become the go-to language. But was that ever a real possibility? Could we have gotten to Perl 6 as "easily" as we got to Python 3? Anybody have an opinion on that?
- keithnoizu 7y agowhat is a dead language exactly. Is COBOL dead, it had a version update just a few years ago.
- wiremine 7y agoI think there's two types of dead: 1. Dead as in hasn't received an update in years. 2. Dead as in very few people use it for new greenfield projects.
- cafard 7y ago"For the young readers who may have never heard of it. Perl was a popular programming language about 30 years ago." 1989 would have been the Perl 4 days. Perl 5 is twenty-five years old. I don't write much Perl these days, unless for something inconvenient to do in Python. I have nothing against Perl, I just find that the young are much more likely to know Python.
- tolmasky 7y agoOff topic, but this blog loads an ad that disguises itself as a star-rating and comments indicator, which when clicked on takes you to this Mac security phishing site (at least on Safari).
- jasonrhaas 7y agoOther than C++ in high school, Perl was one of the first languages that I learned. At the time I was working on Unix systems in a closed off, secured area with no access to the internet. I was doing systems work, and the only tools I really had at my disposal was what was on the servers I had in the space with me. If I was lucky I got a system with a modern Linux OS on it like Red Hat, but sometimes I had to work on a Solaris UNIX system that was pretty bare bones. The options for scripting were either bash or perl. After some digging around I found some scripts that other engineers wrote in Perl. Mostly using it for text replacement, regex, and basic server functions. I was intrigued by the weird syntax and very powerful one liners, so I got some books and taught myself basic Perl. I started writing some quick scripts and it made me feel like I had a super power. Most of all, Perl was fun with all the different ways you could do things. It was like a puzzle. Fast forward to my first "real" software job. Most of the code case was written in Python, so I started learning that. I wrote a couple scripts in Perl to do some basic text stuff that I thought would actually be less elegant in Python. While I thought I was quite clever, the other engineers immediately jumped on me and told me to never write any Perl code again. Something about "hard to maintain", "too many ways to do it", etc. After that I never wrote any "real" code in Perl, but I kind of want to write some clever, convoluted Perl code just because I can.
- perlgeek 7y agoAs somebody heavily invested in Perl (just check my nickname, and I've written books about Perl (though Perl 6, not Perl 5)), my impression is that the size of the Perl community is rather stable. In an overall growing market of programmers and projects, this means a decline of relative market share. Sources: * Every four years I organize a German Perl Workshop, and the attendance is roughly the same each year (80-120 people) * Take a look at the commit stats of the Perl 5 interpreter at github, looks pretty stable over the past years: https://github.com/Perl/perl5/graphs/contributors https://github.com/Perl/perl5/graphs/contributors * Just general, unquantified impressions from Perl communities I vaguely follow (twitter, Perl questions on Stack Overflow, some IRC channels etc). * Work use of Perl and and hiring for Perl positions
- eruci 7y ago> "Perl was a popular programming language about 30 years ago" That's inaccurate. Perl was released 30 years ago. It was quite popular by 2000, or about 20 years ago. That said, something dies when it is no longer useful. Perl is quite useful and still comes bundled up with any modern Linux system.
- juangacovas 7y agoAnd if sometime in the future Perl is no longer included by default, it will be installed "by dependency" just when you install packages like rsnapshot, CSF firewall, etc. and probably a big bunch of tools that nobody would guess are written in Perl (or some tools of the package)
- vernie 7y agoIf only that were true.
- hiram112 7y agoPerl is by far the most 'fun' language I've ever programmed. Once you get familiar with a lot of the idioms, it is extremely powerful, and the amount of processing you can do in a line or two of perl would take 10 lines in Java and 20 in C. And 15 years ago, these were the languages it was competing against. That being said, I rarely use it anymore, and the reason is that once you stop using it daily, you quickly forget all the quirks of its syntax and its powerful idioms, and often I can't even read it without having to Google for help. And that is why it is dying - there are too many ways to do things. Compare this with Python, which I've never really used as a day to day language, but every few months have to deal with some smaller project written in Python. I can jump in and get work done immediately because there are so few ways to do things. It is mostly just iterating through dictionaries, whereas Perl pushes you to think of everything as a regex or text.
- tzs 7y ago> Perl is by far the most 'fun' language I've ever programmed. Once you get familiar with a lot of the idioms, it is extremely powerful, and the amount of processing you can do in a line or two of perl would take 10 lines in Java and 20 in C. And 15 years ago, these were the languages it was competing against. On top of that, if you found some exception or special case later that you needed to add support for...it was usually just a quick tweak to the Perl program, but often half a rewrite in Java or C. This meant (and still means in a lot of cases) that when you need to do processing on data whose format is not well specified and so you expect to not get it right until a few iterations, doing it in Perl can often be a lot faster than most other languages.
- cypherpunks01 7y agoDoes Amazon still use Perl/Mason for site template rendering? There was still a surprising amount of Perl there when I interned in '08/09
- paxunix 7y agoYes it does, but not for everything, and there's certainly less new work being done with it. It's impressive that much of that code just works and no one has touched it in a long time. A lot of breakage in that space is due to new people with no perl familiarity coming in and making changes--the pool of people that understand how that stuff works is shrinking. (Source: This morning I worked on some perl/mason at Amazon and my team owns many thousands of lines of it).
- godisdad 7y agoPerl is dead like punk is dead.
- dekhn 7y agoI stopped using perl in '95 when I tried to make a multidimensional array and the syntax was nearly impossible to figure out. Switched to Python and was happy to see that the Numeric library was released that gave matlab-like array behavior to python. I know some folks in the bioinformatics community who still write CGIs in perl and I really have to wonder why.
- jlokier 7y agoThe Perl syntax to access a multidimensional array will be familiar to programmers in any other mainstream language: my $array = [ [1, 2, 3], [4, 5, 6] ]; say $array->[1][1]; # Prints 5, as you'd expect. It's really not that arcane.
- zwieback 7y agoWe're still actively maintaining a whole bunch of TCL code, which is much farther down the list. I never like Perl I remember it's heyday, just through sheer inertia it'll be around for a while.
- DaOne256 7y agoThe only big Perl project I know is FHEM, a free smart home server that supports lots of IoT protocols and hardware.
- segmondy 7y agoWhat does it mean for a programming language to be "dying" or dead? If the language is being maintained and bugs fixed, is that dying? Can a language be complete? If it's not gaining new feature, does that mean it's dying? Is it the number of users that matters? What if a language has 10,000, 100k or 1 million happy users is that not enough? If I wrote a custom language for me and a few friends or companies and there's 100 of us using it, no one would declare the language dying. So why do we use number of users? Is it dependent on the number of available jobs? new Books, articles, or library/modules published? I'm not so sure, but I'll like to know what makes a language a dying or dead language.
- arh68 7y agoIf we found a planet with 350 billion humanoids, we'd say Earth is dying. Until the last program is written, and the last machine to run that program stops.. can't really say it's dead.
- jlokier 7y agoTL;DR some people say there's demand for work in Perl and it pays well, others say they can't find Perl work, it doesn't seem to be advertised, and they have moved on to other things as a result. A curious bifurcation. I keep hearing about how there is demand for good Perl programmers, especially ones who know other things too, because there's so much Perl out there which needs maintenance, modernisation, or conversion to something else. Well, I've read and written more Perl than maybe I should have spent the time doing. I'd describe myself as an expert. (I even have source for the Perl interpreter open in my editor at the moment.) However, I have used many other tools as well, so I haven't stayed in touch with Perl-using companies much. Yet, when I go searching, I don't see much work around if I search for Perl. When people talk about demand for experienced Perl developers/freelancers etc, I can't convince myself it really exists. Take a look in the HN "Who's Hiring?" monthly posts. Search for Perl this month: Out of ~800 positions, exactly 1 is for Perl, and Perl is mentioned in passing in only 2 others. HN is biased towards startups, but still. Elsewhere, on the Perl-specific job sites there are a few jobs shown these days, many are "not currently hiring", and the dates reveal they are keeping old ones in the list, perhaps to hide the fact that there's only a handful in the last month. It's really not much. On other more generic job/contract sites, searching for Perl yields far fewer options, compared with almost every other listable skill I looked at. It is quite striking. Perl is mentioned in job descriptions, but not usually as a primary skill. I have seen other people say the same kinds of thing: One person says there is plenty of work for good Perl developers, another replies that they can't find any and where are these jobs, and nobody answers, or they are referred to a website that has hardly anything on it any more. Curiously, from speaking with people who work at companies that have large Perl codebases that are still being worked on, and which are hiring, this could be down to job marketing, rather than skills actually required. Job/contract adverts from those companies either don't mention Perl, or mention it only in passing "DevOps... expert in Kubernetes, AWS, Terraform, etc. ...able to write scripts in Bash, Python or Perl". Yet talking to people who work in those same companies, reveals Perl is something they need and look for, but they aren't mentioning in their job ads. I wonder why. In contrast, as far as I can tell, Python is a superstar in the job market right now. It's one of just a few top skills for high day-rate gigs (along with DevOps), and this surprises me in a way, because although Python is perfectly usable, and very well supported, it's not amazing, it's quite slow, and its standard library is messy and inconsistent too. Yet, about half of the best paid contracts I see have Python as the primary skill. There are easily 20x as many roles listing Python as the main skill, compared with Perl mentioned even in passing. So I'd say, Perl looks almost dead and buried in the jobs advertised market at the moment. I've considering removing Perl from my resume because I think it might be starting to be a liability, a "does this make me look old" sort of thing. I use enough other things that it's not that important to me, but it's a bit of a shame. After all, as a freelance/consultant I have a substantial personal library to bring to the table, and it's a shame when I can't use it. I can't quite decide if there is a hidden Perl-hiring market (that I haven't connected with because I've been doing other things for a few years), or if the people who say Perl developers are in demand are under a bit of an illusion, getting repeat work from the same places and not realising it's inside a small community bubble.
- krychu 7y agoPerl won’t be extinct anytime soon due to its quality. Those who know it treasure it for the unmatched performance. Performance of turning ideas into reality. Ideas way beyond sysadmin and reporting stuff. Perl as a language, ecosystem, and community is well and kickin’. My 2 cents.
- arh68 7y agoPerl 5 is like the jQuery of the server-side. Way better than what came before it, and only just a little worse than what came after. (IMHO) I kinda miss em both.
- smitty1e 7y agoAs long as GNU autotools relies on Automake, Perl has some life left in it.