Most active commenters
  • skywhopper(5)
  • pavel_lishin(4)
  • lysace(3)
  • PunchyHamster(3)
  • pjmlp(3)
  • em-bee(3)

←back to thread

Perl's decline was cultural

(www.beatworm.co.uk)
393 points todsacerdoti | 134 comments | | HN request time: 0.851s | source | bottom
1. jordanb ◴[] No.46175337[source]
I always found the Perl "community" to be really off-putting with all the monk and wizard nonsense. Then there was the whole one-liner thing that was all about being clever and obscure. Everything about Python came off as being much more serious and normal for a young nerd who wasn't a theater kid.
replies(21): >>46175493 #>>46175513 #>>46175630 #>>46175714 #>>46175715 #>>46175932 #>>46176421 #>>46176502 #>>46176561 #>>46176760 #>>46176895 #>>46177183 #>>46177249 #>>46177277 #>>46178169 #>>46179976 #>>46180300 #>>46180433 #>>46180626 #>>46182489 #>>46197026 #
2. simonw ◴[] No.46175493[source]
This made me smile given Python's love of Monty Python references - the cheese shop etc.
replies(1): >>46175642 #
3. lysace ◴[] No.46175513[source]
Perl is a sysadmin language. There's "always" been this tension between sysadmins and developers.

In my mind (developer back then) I'd amateur-psychoanalyze all of that nonsense as some kind of inferiority complex meant to preserve the self image. Needless complexity can be a feature!

And now we are all developers!

replies(3): >>46175535 #>>46176256 #>>46190957 #
4. MrDarcy ◴[] No.46175535[source]
In the 2000’s Python was also a sysadmin language.

Edit: But I see your point, Google SRE’s around the late 2000’s reached for Python more than Perl.

replies(2): >>46175539 #>>46175916 #
5. lysace ◴[] No.46175539{3}[source]
(90s) Yes, but it developed.
replies(1): >>46176135 #
6. pavel_lishin ◴[] No.46175630[source]
I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards. Obscure, non-intuitive oneliners, syntax that feels like it was intentionally written to be complicated, and a few other things that feel impossible to understand without reading the docs. (Before everyone jumps on me - yes, as a developer, I should be able to read documentation. And I did. But until I did so, what the code was doing was completely opaque to me. That feels like bad language design.)

Some of it I recognize as being an artefact of the time, when conciseness really mattered. But it's still obnoxious in 2025.

The whole thing reminds me of D&D, which is full of classes & spells that only exist in modern D&D because of One Guy who happened to be at the table with Gygax, who really wanted to be a wuxia guy he saw in a movie, or because he really wanted a spell to be applicable for that one night at the table, and now it's hard-coded into the game.

replies(10): >>46175952 #>>46175994 #>>46176043 #>>46176170 #>>46176215 #>>46179499 #>>46180661 #>>46180866 #>>46184592 #>>46208093 #
7. tmp10423288442 ◴[] No.46175642[source]
I appreciated them at the time I encountered them (mid-2000s), but they were definitely a bit cringe in their frequency and shamelessness. I wonder if younger people even know Monty Python anymore - by my time, I think people had mostly forgotten about Hitchhiker’s Guide to the Galaxy, even if 42 survived.
replies(3): >>46175815 #>>46175874 #>>46176179 #
8. ◴[] No.46175714[source]
9. Insanity ◴[] No.46175715[source]
I don’t know about the wider Perl community, but I listened to some interviews from Larry Wall and he just came across as a nerdy guy having fun with what he’s doing. I quite liked listening to him.
replies(5): >>46175930 #>>46175974 #>>46176269 #>>46176534 #>>46177741 #
10. edoceo ◴[] No.46175815{3}[source]
The kids these days have factored 42 to 6,7 (said with some inflection and hand waving)
replies(1): >>46176349 #
11. rightbyte ◴[] No.46175874{3}[source]
Dude it is not cringe. It is silly.

Pretending to be a all serius grown ups language is cringe.

replies(1): >>46176168 #
12. oncallthrow ◴[] No.46175916{3}[source]
I think Perl is still more popular even today than Python as a sysadmin language. Late 2000s it certainly was. Maybe Google was different, but across the industry more widely Python was barely used, Perl was used everywhere.
replies(1): >>46175985 #
13. c0brac0bra ◴[] No.46175930[source]
My anecdotal experience was with perl guys who were ex-military, irreverent, and fly-by-the-seat-of-your-pants. The Java and .NET guys were straight laced and nerdy.
14. PunchyHamster ◴[] No.46175932[source]
Perl made a mistake, the language was invested in depth of expression and that, in a programming language, just leads to a 1000 ways to write same thing where like... 2 of them are actually nice to read.

Pyton was ("was" was used here on purpose) the opposite, the whole "one way to do a thing" and insisting on more clean code even if more verbose.

You could write nice looking Perl code but you had to choose to do it, while Python pushed you in that direction from the start.

As much as I dislike using whitespace as flow control it also does make sure the code is always indented reasonably even if it is a newbie just starting in the language.

It didn't help that Perl, just like other languages after (PHP, JS, Python too), had a "curse of the newbie language", with many people starting with it (as at the time it was kinda only sensible choice for webpages before mod_php did a revolution in how most webpages are hosted), with no training and just winging it, which in language that puts no limits on what user can do and no guidance on what they should do... leads to that ugly one liners and line noise as a code scripts.

replies(2): >>46176850 #>>46177678 #
15. phil21 ◴[] No.46175952[source]
It’s interesting to me how brains work.

Perl has always “flowed” for me and made mostly intuitive sense. Every other language I’ve had to hack on to get something done is a struggle for me to fit into some rigid-feeling mental box.

I understand I’m the weird one, but man I miss Perl being an acceptable language to pound out a quick program in between “bash script” and “real developer”.

replies(6): >>46176326 #>>46179351 #>>46180790 #>>46181485 #>>46182182 #>>46183310 #
16. riffraff ◴[] No.46175974[source]
I was never a perl programmer, but this was my impression of basically every perl programmer I have interacted with.

Also, I think Larry Wall's "Diligence, Patience, Humility"[0] is among my favourite articles about programming.

[0] https://www.oreilly.com/openbook/opensources/book/larry.html

17. lysace ◴[] No.46175985{4}[source]
My experience:

Sysadmin-driven companies (typically Sun-based) often used Perl.

Developer-driven companies used other languages running on cheaper X86 Linux.

18. altairprime ◴[] No.46175994[source]
> Some of it I recognize as being an artefact of the time, when conciseness really mattered

It was an artefact of bursting out of those constraints, but honoring them still. The roots of perl as a “more capable, less restrictive” sed/awk means that it must support `perl -pi.bak -e oneliner file`, just like sed did — and so from that core requirement forward, everything it did, does. By the heyday of Perl5 era, conciseness was not a requirement, but the sed-compat roots remained a focus of the language’s creator.

19. petre ◴[] No.46176043[source]
Yup, Perl is something clearly out of Unseen University, err I mean Berkeley linguistics dept.

I liked it, thought the sigils were a cute way to singal that something is a variable. When you work with deeply nested data structures, dereferencing arrays and hashes that sort of changes and becomes kind of annoying. Nowadays I like Ruby. Compared to it, Perl does feel like spells mixed with C and Posix stuff. But if I want to feel smart, I'll write some code in Scheme, thank you.

20. calmbonsai ◴[] No.46176135{4}[source]
As someone who lived through that transition, we used Perl extensively to sysadmin ~30 Solaris and Irix workstations and it was superlative at that.

At that time, Guido was still working at CNRI locally to us in Reston, VA and we had several discussions at the local Pyggies (Python User Group) on transitioning over to Python for that work. We were a (mostly) C++/Java shop, but Perl fit into all the other "crevices" beautifully.

Python just didn't have enough library support for all of our "swiss-army chainsaw" demands. Still, it was very apparent at the time it would eventually get there and I was enamored with its "one right way" of doing things--even at the bytecode level.

21. sph ◴[] No.46176168{4}[source]
I agree but don’t forget that the average programmer nowadays is a strait-laced corporate entity, whose personality is Node.js stickers on a macbook, like everybody else in their team.

They forget that Perl and co. were written by people that had one too many tabs of LSD in the 70s, sporting long hair and a ponytail.

replies(1): >>46176765 #
22. tasty_freeze ◴[] No.46176170[source]
It isn't bad language design that you need to study the language before you can use it. I look at haskell programs and it looks mysterious to me because I haven't spent any time studying it, but I'd not thing to say it is bad language design.

Yes, one can write obscure perl code and some love perl golfing. In the same way there is an IOCCC which delights in unreadable code, it doesn't mean that the C language should be relegated to the dustbin. The answer is to write readable code, no matter which language is in use.

replies(3): >>46176228 #>>46176348 #>>46179783 #
23. culebron21 ◴[] No.46176179{3}[source]
As a foreigner I hadn't known Monty Python when I started learning the language and reading the docs, and I haven't noticed any of those. I guess they came across as just noise.
24. lo_zamoyski ◴[] No.46176215[source]
The term "surrogate activity" comes to mind, specifically, activities of no real value that some people like to waste time on to feel better about themselves.
replies(1): >>46179577 #
25. harpiaharpyja ◴[] No.46176228{3}[source]
Seems like the essential criteria is not whether you can write opaque code in it, but rather whether the language enables you to accomplish most tasks using clear, readable code. They aren't mutually exclusive.

Hopefully I am paraphrasing you correctly.

26. lo_zamoyski ◴[] No.46176256[source]
> some kind of inferiority complex meant to preserve the self image

Or, as the kids say, a flex, but without the sexy connotations.

(Incidentally, I am also reminded of a great quote attributed to Morphy:

"The ability to play chess is the sign of a gentleman. The ability to play chess well is the sign of a wasted life.")

replies(1): >>46176462 #
27. ascendantlogic ◴[] No.46176269[source]
Individuals are rarely (not never, but rarely) the full problem. Groups of people are what cause feedback loops and cultural reinforcement like the author describes. Sometimes this is a virtuous reinforcement cycle but more often than not the well gets poisoned over time.
28. pavel_lishin ◴[] No.46176326{3}[source]
Was Perl one of your first languages by any chance? I freely admit that I've only been poking at it for a few months; maybe by this time next year, I'll be boggled at the comment I left, like it was written by a different person.

> in between “bash script” and “real developer”.

One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!"

replies(3): >>46176560 #>>46176599 #>>46180507 #
29. pavel_lishin ◴[] No.46176348{3}[source]
But I can look at most Python code and be able to understand what it does. With perl, I have to look up so much.

- Why is there a `1;` on a single line in the middle of this file?

- What is `$_`?

- This parallel execution manager doesn't actually seem to define what code needs to run in parallel in any specific way, how does this work?

- What is this BEGIN block at the start of this Perl file? Why is that necessary?

- What's going on with qx, qw, qq?

- What does chomp do when it's just on its own line, with no arguments given to it?

replies(6): >>46176524 #>>46176543 #>>46176615 #>>46176802 #>>46178354 #>>46179799 #
30. GPerson ◴[] No.46176349{4}[source]
Did you come up with that? If so, bravo!
replies(1): >>46177297 #
31. OptionOfT ◴[] No.46176421[source]
I actually think it works when you are in the ecosystem fulltime for a good while.

But having to interact with it once in a while is always a hurdle. The same with bash. Do I use [ or [[? Where does the semi-colon go? if then fi, but while do done (and not elihw). -eq or =? Functions have () but no parameters.

I'm sure those things make sense when all you write is Bash / Perl, but it's daunting.

Now, Python can get pretty far out there too with Meta-programming, and JavaScript can get confusing with prototyping. And Ruby (especially RoR) takes the crown, where they resolve variables at the moment the line executes. Makes debugging blocks really hard.

The less magic in code the better.

replies(2): >>46176909 #>>46181282 #
32. chihuahua ◴[] No.46176462{3}[source]
That quote is not very convincing to me. Both parts of it are questionable.

Just being able to play chess is not a very high bar at all. Most 6-year-olds can learn it in an hour. Are the Chess hustlers at Washington Square Park all Gentlemen?

I don't see being able to play Chess well as any kind of deficiency. It could be that it's just someone's hobby. It doesn't have to mean they spiraled into madness, Bobby Fisher style.

(I can play chess, but not well, so I personally don't care about either half of that quote as it applies to me)

replies(2): >>46182198 #>>46184348 #
33. ErikCorry ◴[] No.46176502[source]
The syntax problems are just surface. There are some real problems underneath:

Poor performance of the single implementation.

A single implementation.

Leaky ref counted GC, but 'luckily' the syntax for references is so clunky that nobody does anything complicated enough that it really matters.

Bolted on object oriented features that never got the love they needed at a time when oo languages were sweeping the world.

Most of the wizards decamping to a new language (Perl6) that was 'developed' for years without an actual implementation to keep them grounded.

replies(1): >>46176876 #
34. tasty_freeze ◴[] No.46176524{4}[source]
Again: python syntax is more akin to what you are used to, and so it feels more comfortable to you.

$_ is inscrutable if you haven't studied perl, but the same thing would happen to anyone who sees a python decorator for the first time. what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't). The different quoting operators are also trivial to learn. In comparison, yield from python is also simple syntax but the semantics are much more involved.

BEGIN? Take 60 seconds to read what it means. And if you knew awk, you'd not have to do that, as it was directly lifted from awk.

replies(6): >>46176821 #>>46177405 #>>46179761 #>>46180293 #>>46180674 #>>46181535 #
35. ErikCorry ◴[] No.46176534[source]
Larry should be remembered for the development of "patch" more than perl. Without the concept of fuzzily applying patches to modified source files you can't have "git rebase" or "git merge".
36. montroser ◴[] No.46176543{4}[source]
Yeah, it's true that Perl did not have as a design goal that a complete newcomer should be able to intuitively understand the code without having any prior exposure to the language. There is a little bit of a learning curve, and that was completely expected by Perl's creators. Yes, you have to learn about the idioms above, but they became second-nature. For many of us, the model clicked in our heads and the terseness was worth it. You could express a lot of functionality in very few characters, and if you had invested in learning, it was very quick to grok because common patterns were reduced to familiar abstractions in the language.

And yet, as the industry grew and all sorts of people from all sorts of backgrounds converged in this space, the tolerance and appetite for funky/terse waned in favor of explicit/verbose/accessible. It's probably for the better in the end, but it did feel a little bit like the mom-and-pop store on the corner that had weird pickled things at the register and a meemaw in the back got replaced by a generic Circle K with a lesser soul.

replies(1): >>46176650 #
37. phil21 ◴[] No.46176560{4}[source]
Yep, first language I learned. And since I was somewhat early to the Internet thing, I found IRC when I was about 14 years old and actually learned from a lot of the folks who have authored books on Perl or are at least (were) well known in the community.

It certainly was the major factor in how I connected the dots!

Haven’t really thought about it until now, but I suppose having Larry Wall and Randal Schwartz telling you to RTFM guides your early development in a certain manner.

I certainly have never considered myself a developer or programmer though. I can pick up enough syntax to get a quick hack done or start a MVP to demo my ideas, but I leave the “big boy” dev stuff to the professionals who can run circles around me.

replies(1): >>46176587 #
38. Asooka ◴[] No.46176561[source]
I never interacted with any of that, to me Perl was always "Bash with text processing built-in and no string interpolation pitfalls". I reach for it when I need to write one to two page long utility scripts. Python is too willing to deprecate features (plus the whole 2 to 3 fiasco burned me badly), so I only use it for things I know I will maintain. Perl is for writing a shell script that will run unchanged in perpetuity.
39. alsetmusic ◴[] No.46176587{5}[source]
Not the person you replied to, but I thought the same thing. Perl was my first as well, and it certainly shaped the way I think about coding. It made Python feel too rigid and Ruby feel familiar. There's something to be said for the restrictions of an environment when you're learning how to operate in a domain that seems to shape future thinking.

I'm sure there are people who started in a language and later found something that made more sense. I'm just reflecting on what I've found in my experience.

replies(2): >>46177392 #>>46185928 #
40. asa400 ◴[] No.46176599{4}[source]
> One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!"

I wish bash was the thing that was dying. As an industry, we need to make better choices.

replies(3): >>46176791 #>>46179587 #>>46185194 #
41. EgregiousCube ◴[] No.46176615{4}[source]
Honestly, $_ and "what does a function do when I don't supply any arguments?" are really nice in Perl, and not that difficult to understand. I think a lot of languages could use a 'default variable'.
replies(1): >>46179831 #
42. asa400 ◴[] No.46176650{5}[source]
> And yet, as the industry grew and all sorts of people from all sorts of backgrounds converged in this space, the tolerance and appetite for funky/terse waned in favor of explicit/verbose/accessible. It's probably for the better in the end, but it did feel a little bit like the mom-and-pop store on the corner that had weird pickled things at the register and a meemaw in the back got replaced by a generic Circle K with a lesser soul.

This is an amazing point that I haven't seen anyone else make about languages in this way.

As someone who got into the industry right after Perl's heyday and never learned or used it but learned programming from some former Perl power users, Perl has a pre-corporate/anarchic/punk feel about it that is completely opposite to something like Golang that feels like it was developed by a corporation, for a corporation. Perl is wacky, but it feels alive (the language itself, if not the community). By contrast, Golang feels dead, soulless.

43. baxtr ◴[] No.46176760[source]
I loved Perl and all the obscurity. It felt like black magic back then. It should have become what python is today.
replies(1): >>46177092 #
44. aaronbrethorst ◴[] No.46176765{5}[source]
I’m going to go out on a limb and guess that Larry Wall, a devout evangelical Christian and the child of a pastor, was not turning on, tuning in, or dropping out in the 1970s.
45. skywhopper ◴[] No.46176791{5}[source]
There’s nothing that can replace bash for what it does. People have been trying for decades. You’ll be happier if you accept that bash can and will happily coexist with anything and everything else, which is exactly why it will never go away.
replies(2): >>46177247 #>>46178366 #
46. skywhopper ◴[] No.46176802{4}[source]
You’re mad that you have to look up what keywords do in a programming language you aren’t familiar with? If you think Python is always clear, I can guarantee you (as someone with relatively expert grasp of Bash, Ruby, Go, and once long ago, Perl) that no, it isn’t always obvious.
47. skywhopper ◴[] No.46176821{5}[source]
Given python’s love for string-leading sigils, the previous commenter should be quite comfortable with the idea of obscure single-letter operators that dictate the interpretation of the following tokens.
48. skywhopper ◴[] No.46176850[source]
That is the story that Python tells about itself. Meanwhile, folks who don’t use it every day are constantly learning that it’s only true within a single version of Python, but that over the years there will be multiple, incompatible ways to do niche wild rare stuff like … iterating over a map.
replies(1): >>46177648 #
49. mr_toad ◴[] No.46176876[source]
> 'luckily' the syntax for references is so clunky that nobody does anything complicated enough that it really matters.

That made me laugh. Unlike actually working with Perl references, which made me want to cry.

replies(1): >>46182724 #
50. ahartmetz ◴[] No.46176895[source]
I've always found Perl just plain ugly, too clever about some things (like iterating over regex matches on stdin or something) and really dumb about other things (variable syntax, the god-awful OOP system). Python is clean and pretty in comparison and usually well thought out. If the communities were reversed, I'd still prefer Python: I just read the documentation in 99% of cases, I very rarely need to interact with the community. Python, as the article says, is mostly not a language for fans - it's mostly for auxiliary tasks.
51. skywhopper ◴[] No.46176909[source]
You realize you can learn all of this easily online, I hope? Sure it turns out that a scripting language maintaining compatibility with scripts from 40+ years ago has some confusing aspects. That’s the price of such incredible staying power.
replies(2): >>46180072 #>>46201872 #
52. librasteve ◴[] No.46177092[source]
actually Perl was what Python is today - the go to scripting language
53. librasteve ◴[] No.46177183[source]
> Perl has always “flowed” for me and made mostly intuitive sense. Every other language I’ve had to hack on to get something done is a struggle for me to fit into some rigid-feeling mental box

That is just how I felt about Perl (4 years full time dev in the 2000s) and how I now feel about https://raku.org (aka Perl6). Anyway, I tried to gather some fellow feelings here about 18 months ago:

https://rakujourney.wordpress.com/2024/05/22/perl-love-notes...

It is sad that Perl became so despised after the error of preannouncing a non-compatible upgrade. I understand that people couldn't wait. But Raku is here now and it is worth a second look imo.

54. skydhash ◴[] No.46177247{6}[source]
CLI usage revolves around text and bash is a meta layer above that. Given curl, jq, and awk, you can create a quick MVP client for almost any api. Doing the same in Python and Go is much more involved.
replies(1): >>46181636 #
55. lamontcg ◴[] No.46177249[source]
> I always found the Perl "community" to be really off-putting with all the monk and wizard nonsense.

Rubyists vs. Pythonistas isn't any better.

Programming languages as counter-cultural lifestyle choices is pretty "cringe" as the kids say.

replies(3): >>46177626 #>>46179031 #>>46180346 #
56. overfeed ◴[] No.46177277[source]
> I always found the Perl "community" to be really off-putting with all the monk and wizard nonsense

The Perl community introduced the world to the first language module repositories via CPAN. No more manually hunting down tarballs off FTP servers

As a language, Perl is extremely expressive, which is amazing for one-off scripts, and awful for code that's meant to be shared and/or reread. For pure text-munging, Perl is still unbeaten, when using Perl-Compatible regexes in other languages, I feel the language getting in my way.

You can write easy-to-read Perl (TIMTOWTDI, and all that), but it doesn't force you like Go (small language size) or Python (by convention and culture, on what counts as 'Pythonic')

replies(1): >>46179789 #
57. edoceo ◴[] No.46177297{5}[source]
6-7? No, my kid says it about a thousand time a day. Then, for some unknown reason they follow it with 41! WTF! I've shouted 42! many times and have tried to inform the child of the significant cultural and scientific importance of 42. Which, IIRC, factors to 2,3,7.
replies(2): >>46180608 #>>46180804 #
58. AndrewDavis ◴[] No.46177392{6}[source]
> There's something to be said for the restrictions of an environment when you're learning how to operate in a domain that seems to shape future thinking.

When at University the academic running the programming language course was adamant the Sapir–Whorf hypothesis applied to programming language. ie language influences the way you think.

replies(2): >>46179275 #>>46179537 #
59. BrenBarn ◴[] No.46177405{5}[source]
It's not just a matter of "read the docs", though, because languages can differ in how many distinct concepts/constructs they employ. Python has gradually added more over the years but still I think is well short of Perl in this regard.
60. zbentley ◴[] No.46177626[source]
> Rubyists vs. Pythonistas isn't any better.

Eh, in different ways. Ruby people often felt a little smug/over-emotive about how much joy using their tool could bring programmers. TFA is spot on about Perl: Perl folks often felt cliquish, arrogant, defensive. Python people are at times patronizing or overly dismissive.

And in all of those communities the biggest difference was how many people in the community had those dysfunctions, versus the rest—the vast majority of each language’s users who were using it, sharing techniques or code, answering questions about it without being jerks.

Where Perl fell down for me was that its community and people I knew who used it had a much higher chance of evidencing those crappy behaviors. More bad apples—not many in the grander scheme, but enough more to be noticed.

61. PunchyHamster ◴[] No.46177648{3}[source]
...that's why I used "was". Current direction of the language mostly goes against the "Zen of Python".
replies(1): >>46180066 #
62. dragonwriter ◴[] No.46177678[source]
> the whole "one way to do a thing"

There’s a whole lot of words popularly excised (as you just did) from that line of the Zen to create a false polar opposite to Perl’s TMTOWTDI that was never actually part of Python’s philosophy.

The actual line from the Zen of Python is: “There should be one—and preferably only oneobvious way to do it.” (omissions in italics).

replies(1): >>46191498 #
63. wlonkly ◴[] No.46177741[source]
Larry was (and presumably is, but I'm out of that loop) a gem. The Weird Al of programming languages. Hilarious and kind.

But those who remember the regulars of, say, efnet #perl (THIS ISN'T A HELP CHANNEL), there was a dearth of kindness for sure. I was probably part of it too, because that was the culture! This is where the wizards live, why are you here asking us questions?

Like cms, I'm also hesitant to name names, but the folks I'm thinking of were definitely perl-famous in their day.

There were also a bunch of great people in the community, and they helped me launch my career in tech in the 90s, and I have close internet friends from that community to this day (and great memories of some who have passed on). But there were definitely also jerks.

replies(1): >>46186383 #
64. jamal-kumar ◴[] No.46178169[source]
oh yeah you're right and this is coming from someone who still likes/uses perl once in a while for text manipulation stuff that awk/sed won't cut it for. try going into your terminal and typing in

  man 3pm Errno
And you get this code snippet:

           my $fh;
           unless (open($fh, "<", "/fangorn/spouse")) {
               if ($!{ENOENT}) {
                   warn "Get a wife!\n";
               } else {
                   warn "This path is barred: $!";
               }
           }
man is that ever from a different time... but let me tell you if you can pull off some of those awk/sed or perl one liners you can do some pretty useful things with less resource allocation than you would be spending if you had written that in python, which becomes important if you're running it over and over on terabytes of data or on limited hardware
65. inkyoto ◴[] No.46178354{4}[source]
To be able to fully comprehend Perl (even without having to embrace it), one needs a fiddle.

Perl and some of Perl's quirks will make more sense once you realise that it is deeply rooted in UNIX command line utilities, UNIX conventions and some UNIX shell defaults, except when it is not, i.e.

  - What is `$_`?
$_ follows the spirit of shell variables (such as $*, $@, $! etc., heavily used in Korn, Bourne flavours but not the C flavours), but was repurposed or – more likely – picked from a pool of vacant characters with the help of a dice roll. Kind of like how ancient Egyptians built the pyramids with the help of sophisticated cranes and machinery and then vapourised their tools with high-particle beams to leave future generations guessing «how on Earth did they manage to do that». This is one of the main criticisms of Perl.

  - What is this BEGIN block at the start of this Perl file? Why is that necessary?
Perl started out as an improvement over «awk», and BEGIN is an awk construct where it is used frequently, e.g. awk 'BEGIN { IFS=":" } { … do something … }'

  - What does chomp do when it's just on its own line, with no arguments given to it?
It follows the standard convention of UNIX utilities that expect the input to come from the standard input stream (file descriptor 0 or <file-in in the shell) when no input file name has been specified. So, when no <FILE1> given to chomp, it chomps on the standard input.
66. keernan ◴[] No.46178366{6}[source]
>it will never go away

Chet Ramey became the primary maintainer of Bash in the early 1990s and is the sole author of every bash update (and Readline) since then. That would be an enormous task for a team of 100, no less a team of one.

I've become quite a fan (after struggling mightily with its seemingly millions of quirks.

67. Ferret7446 ◴[] No.46179031[source]
I don't think "Pythonista" was a thing in the 2000s. Python is very old and only became more of a "fad" relatively recently.
replies(2): >>46179850 #>>46181765 #
68. alsetmusic ◴[] No.46179275{7}[source]
I only recently learned about this, maybe a month ago. It made a lot of sense to me.
69. SoftTalker ◴[] No.46179351{3}[source]
I think if you were a sysadmin and used to shell scripts, sed, awk, grep and xargs then perl probably made more sense than if you were a programmer from a more traditional language coming into the perl world.
replies(4): >>46179667 #>>46179913 #>>46180251 #>>46180331 #
70. kamaal ◴[] No.46179499[source]
>>I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards.

Those days were different. You could say what people are doing in months to years today, in many ways people back then were doing in days to weeks.

Pace and ambition of shipping has not only faded, that very culture is non existent. You don't see people building the next Facebook or Amazon these days, do you?

I remember managers asking Java programmers how much time it would take to get something done, and get timelines on months and years. They would come to us Perl programmers and get it done in a week.

The era didn't last long. I would joke around our team saying, ideally a Java programmer with 10 years experience was somewhat like like a Perl programmer with 1 year experience. This was one of the big reasons, most of these enterprise coders wanted Perl gone.

replies(2): >>46180878 #>>46182355 #
71. algernonramone ◴[] No.46179537{7}[source]
Seems somewhat related to Iverson's 1979 Turing Award lecture, "Notation as a Tool of Thought" (https://www.eecg.utoronto.ca/~jzhu/csc326/readings/iverson.p...)(https://news.ycombinator.com/item?id=25249563)
replies(1): >>46183808 #
72. __patchbit__ ◴[] No.46179577{3}[source]
People summit Qomolangma. (with logistics)
73. BobbyTables2 ◴[] No.46179587{5}[source]
Indeed. If I had to download and install bash … I wouldn’t!

I write bash scripts only because I can rely on it being there.

74. aorloff ◴[] No.46179667{4}[source]
If I am familiar with sed, awk, grep and xargs, was I a sysadmin ?
replies(1): >>46180141 #
75. ◴[] No.46179761{5}[source]
76. AlexCoventry ◴[] No.46179783{3}[source]
When I was choosing between learning python and perl in the late 90's, it was the context sensitivity of perl expressions which really squicked me. To me, that was the critically bad language decision in perl. You can make context-sensitive expressions in python (using operator overloading, for instance), but you have to go out of your way to do it in one way or another. In perl you can easily do it by accident, and it can result in serious bugs. It seemed masochistic, to me.
77. cjs_ac ◴[] No.46179789[source]
CPAN was inspired by CTAN, the Comprehensive TeX Archive Network.
78. nmz ◴[] No.46179799{4}[source]
If you think that's bad, try learning python or a verbose language while not speaking english, all of these words like while, for, if, else, break are just gibberish and your code just reeks of some weird mish mash of broken english and broken <mother tongue>, I have a hypothesis that terseness favors universality, if you don't speak english, something like $_ is equal or easier to grasp, it honestly just looks like terse and weird math.
replies(1): >>46183714 #
79. partomniscient ◴[] No.46179831{5}[source]
$_ was one of the things that put me off perl, because the same syntax meant different things depending on context.

The Pragmatic Programmers had just started praising Ruby, so I opted for the that over Perl, and just went with it ever since. Hated PHP and didn't like Python's whitespace thing. I never Ruby on Rails'd either. That said my first interactive website was effectively a hello world button with cgi/perl.

But trying to learn to code from reading other peoples perl scripts was way harder than the (then) newer language alternatives.

Now I'm over 50 none of that is nearly as important. I remember being young and strongly opininated, this vs. that - its just part of the journey, and the culture. It also explains the current FizzBuzz in CSS minimisation post. We do because we can, not necessarily because we should.

80. AlexCoventry ◴[] No.46179850{3}[source]
It was definitely a thing.
81. Suppafly ◴[] No.46179913{4}[source]
>I think if you were a sysadmin and used to shell scripts, sed, awk, grep and xargs then perl probably made more sense than if you were a programmer from a more traditional language coming into the perl world.

This, it was very unixy and felt like a natural progression from shell scripting. I think that's why a lot of early linux adopters were so enamored.

82. chrisandchris ◴[] No.46179976[source]
I have never worked (in Prod) with Perl, but my introduction to programming was with PHP and all I know IMHO is that PHP was/is so easy to start with. One of the reasons I picked PHP over other languages.
83. bigstrat2003 ◴[] No.46180066{4}[source]
Python has never actually followed the Zen of Python, which is one of my gripes with it. For example, "explicit is better than implicit" is a bad joke given how Python implicitly treats non-boolean types as booleans.
84. bigstrat2003 ◴[] No.46180072{3}[source]
The point is not that such quirks are impossible to learn; the point is that they make the language extremely unpleasant to use.
85. tsimionescu ◴[] No.46180141{5}[source]
If you are familiar with all of these but not C or Java or some other "traditional" programming language, then yes, I think anyone would guess you were a sysadmin. This was the type of background GP was talking about - people familiar with shell scripting but not any other programming language, who come by Perl for the first time.
86. npsomaratna ◴[] No.46180251{4}[source]
That makes a lot of sense. After 30+ years of programming, I still have to do a search (or use an LLM) to do anything useful with sed, xargs, etc. Perl never really clicked with me either.

On the other hand, I was able to easily pick up just about any "tradional" language I tried--from Basic and C in the 80s all the way to Dart and Go more recently.

87. somat ◴[] No.46180293{5}[source]
With regards to BEGIN

The only reason AWK needs a BEGIN is due to it's implied data loop. As far as I know perl has an explicit data loop and as such needs no BEGIN.

Oh god, perl has an implied data loop mode doesn't it. Sigh, now I am reading perl manpages to find out.

Update: of course it does, -n or -p

88. pjmlp ◴[] No.46180300[source]
Strange, maybe because of being a 70's kid and a D&D nerd, that kind of stuff is exactly why I liked Perl in first place.

That and Perl giving me a reason to do safe programming in UNIX with a managed language that exposed all the UNIX API surface, and only switching back into C when I actually needed some additional perf, or low level stuff not fully exposed in Perl.

Then again, I am also a fanboi of Haskell, C++, Scala, Idris and similar "wizard" languages.

89. pjmlp ◴[] No.46180331{4}[source]
As somone that switches between both roles, when doing DevOps (aka sysadmin in 21st century) even though there is more stress regarding dealing with infrastructure, there is a certain peace of mind being away from Scrum, Jira, milestones, and other stuff, versus plain shell scripts, sed, awk, grep and xargs, VMs up and down.

Or doing a plain set of scripts into a repo, instead of endless arguments how fit a module implemenents the onion and hexagonal architectures, clean code, or whatever is the trend in this year's architecture conferences.

replies(1): >>46181421 #
90. pjmlp ◴[] No.46180346[source]
This will keep happening until we start programming computers with some kind of AI style driven interfaces, and even then maybe not.

Humans are tribal, and HR only hires for specific bullet points, thus everyone wants to assert they are on the right tribe when they need to go job hunting.

91. zaphirplane ◴[] No.46180433[source]
First time I read something like that about Perl. Is this personal experience during the Perl peak period or extrapolation from phrases
92. MayeulC ◴[] No.46180507{4}[source]
At least you have bash scripts. Most of my coworkers write tcsh scripts :|

(And yes, I have been pushing for bash or posix sh).

93. antonvs ◴[] No.46180608{6}[source]
> 41!

That’s a very big number!

94. tails4e ◴[] No.46180626[source]
I liked perl, it was the first language I used daily as a HW engineer. When I moved to python more recently what I missed the most was how easy it was to do a one liner if with regex capturing. That couldn't be done in python for a long time. I think the walrus operator helps, but it's still not quite as concise, but it's closer
replies(1): >>46182259 #
95. pasc1878 ◴[] No.46180661[source]
This is it. I wrote largish systems in perl using its OO things and that was good.

The one thing I could never ever get was using a regex - not the regex itself but the line to actually use it.

Python was so much easier as it was simple define the regex and then use a function on it. I suppose I should hjave spent a few days to write some wrapper in perl - doing those few days would have saved me time overall.

As for one liners I was originally an APL programmer so not a problem. But it is just bad style to write a one liner much better to write it in a maintainable form and split up the operations so they can be seen.

Nowadays I ddon't use lambdas if possible - much better to have a named function you can refer to.

replies(1): >>46181146 #
96. thaumasiotes ◴[] No.46180674{5}[source]
> what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't).

OK, I had never heard of the syntax, but in its own defense it does exactly what you'd guess, the same thing it does after an "if".

These are equivalent statements:

    preloop:
      if condition:
        do_more_stuff()
        goto preloop

    while condition:
      do_more_stuff()
and these are also equivalent:

    preloop:
      if condition:
        do_more_stuff()
        goto preloop
      else:
        wrap_it_ip()

    while condition:
      do_more_stuff()
    else:
      wrap_it_up()
replies(1): >>46183779 #
97. chamomeal ◴[] No.46180790{3}[source]
If you’re in the market for fun hackable tool that sits between “bash script” and “real developer” I highly recommend checking out babashka.

It lets you write shell scripts with clojure. Babashka itself is a single executable, so no JVM bulk or startup time. And the built-in libs include all sorts of nifty utilities. Parsers, servers, excellent async stuff (but IMO clojure might have the best async story of any language out there so I’m biased), http stuff. All macro-able and REPL-able and everything. It’s a scripting dream, and when it’s time to be an adult, you can throw it on the JVM too!

replies(3): >>46182061 #>>46183082 #>>46184820 #
98. inkyoto ◴[] No.46180804{6}[source]
67 and 41 are the TikTok / Gen Z speech.

67 stands for «whatever», «I don't care», or, cyclically, 67!

41 is an expression of shock or disbelief – «that's wild», «no way» and stuff like that.

99. 59nadir ◴[] No.46180866[source]
> I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards. Obscure, non-intuitive oneliners, syntax that feels like it was intentionally written to be complicated, and a few other things that feel impossible to understand without reading the docs.

Perl 5 is to me a classic scripting language (as opposed to an actual programming language), for both good and bad. I've always viewed Perl scripts with exactly that perspective and I find them fine/good. In contrast, I find Python to be a mediocre scripting language, an okay-ish programming language from a syntax perspective and a bottom-5 programming language in pretty much every other regard.

100. colinstrickland ◴[] No.46180878{3}[source]
> Pace and ambition of shipping has not only faded, that very culture is non existent. You don't see people building the next Facebook or Amazon these days, do you?

Do you not? The pace of anthropic/Claude tool development is pretty bonkers, AI hype reminds me of the 90s a lot.

101. finaard ◴[] No.46181146{3}[source]
> Python was so much easier as it was simple define the regex and then use a function on it. I suppose I should hjave spent a few days to write some wrapper in perl - doing those few days would have saved me time overall.

That's funny. I avoid python whenever possible, but one of the things I hate the most is how it is doing regex. I find the way it works in perl (both for search/replace and in conditionals) just intuitive.

102. forgotpwd16 ◴[] No.46181282[source]
>I'm sure those things make sense when all you write is Bash

Not really. Bash is known to be incoherent (due to legacy). You eventually getting accustomed to its quirks but they still remain absurd and may unexpectedly bite you someday. Perl code can, and perhaps will (it's humorously referred to as a write-only language afterall), get hard to read but at least is more robust.

103. znpy ◴[] No.46181421{5}[source]
As another “devops-y” guy (I’m essentially a sysadmin, but i accept whatever job title is trending right now) i agree on everything. It’s nice to see (from a distance) all the bs developers have to endure on a daily basis knowing it doesn’t affect me much.

Also… a lot of that complexity is essentially self-inflicted.

I must say however: “devops” is completely different from what old-school system administration used to be.

104. signal11 ◴[] No.46181485{3}[source]
I agree. Perl made sense as a “step up” in the world of *sh and awk.

Also the culture wasn’t hostile to me as a newcomer. The Perl books I read encouraged not writing overly terse, cryptic code, and I got helpful answers via mailing lists.

I still use Perl sometimes if my command pipeline gets too complicated.

105. crote ◴[] No.46181535{5}[source]
> BEGIN? Take 60 seconds to read what it means.

Yes, that's exactly the problem: it's additional mental load you have to read up on.

Have 60 of those small oddities in a file, and suddenly you're spending an hour dealing with Perl quirks rather than actually debugging that obscure script a retired coworker wrote a decade ago. A 5-minute fix turned into a 65-minute fix, solely because of Perl.

Most programming languages use more-or-less the same constructs, and the few per-language oddities are usually fairly obvious from context. In practice this means someone familiar with any programming language will to a certain extent be able to read, debug, and patch small issues in code written in any other programming language. Perl's obscure and dense syntax makes this virtually impossible. Give a buggy Python script to a developer who daily-drives Javascript and they can probably fix it. Give a buggy Perl script to that same Javascript developer, and they probably have absolutely no clue what's going on.

In practice this turns Perl into technical debt. It has very few natural niches where it is genuinely the best, so experienced Perl developers are quite rare to have around. Any script written in Perl will most likely have to be read by someone who isn't an experienced Perl developer - which is significantly harder than a script written in just about any other language. The result is that any Perl scripts you have lying around are basically a grenade waiting to go off: they can't be maintained, so they should probably be replaced.

106. QuadmasterXLII ◴[] No.46181636{7}[source]
Throw in nc and a while loop, and you can have a server too!
107. zweifuss ◴[] No.46181765{3}[source]
I can remember perl vs python flame wars ca. 2002.

Also, the early 2010s are not that recent: https://books.google.com/ngrams/graph?content=Pythonista%2Cp...

108. erpellan ◴[] No.46182061{4}[source]
You might also enjoy Janet https://janet-lang.org/
replies(1): >>46204785 #
109. dxdm ◴[] No.46182182{3}[source]
It's been a while, but I found for me personally, that Perl flows while writing it, but stops flowing when reading the same code after some time has passed. It was good for getting things done once, but no fun to maintain and adapt - at least the way I was using it decades ago. I moved from Perl to Python and never looked back.
replies(1): >>46182819 #
110. hylaride ◴[] No.46182198{4}[source]
The quote, if originally from Morphy, is from the 1800s, though. So it's the context of the quote that matters.

Either way, it's not meant to be taken so literally!

111. rs186 ◴[] No.46182259[source]
Good for you, not for anyone else reading the code or yourself 6 months later. Seen too much of that.
replies(1): >>46185574 #
112. petit_robert ◴[] No.46182355{3}[source]
>This was one of the big reasons, most of these enterprise coders wanted Perl gone

I see some people disagree with you, but reading this reminds me of this anecdote :

My brother has a very high IQ score, but poor social skills. He once found employment in one of the very early companies developing websites in our area.

There was a process requiring to manually check hundreds of links for validity, which took large amounts of time to do (as in several developper hours weekly), and was error prone at that. The details are fuzzy as this happened some 30 years ago or so, but essentially he found a logical way to do the thing without error in 15 minutes.

The other developers went on a rampage to dismiss the solution, for fear of looking like idiots, and even though the solution was provable, my bro go fired, and went on to become a mechanic. What a shame though.

So, your comment rang a bell.

Also : I make a living developing and maintaining a handful of custom made SaaS for small clients on a LAMP stack (Linux Apache Mod_perl Postgresql). Very thrifty.

Little money, but loads of fun as far as I'm concerned

113. derbOac ◴[] No.46182489[source]
Python for awhile had its own cultural issues. I guess, coming from more of a C and lisp background, the stuff you're mentioning seemed playful and fun to me and I didn't get the sense anyone expected to write performance critical code in it anyway.

Python forums in contrast to me included neverending justifications for why whitespace and indent formatting was critical and this kind of odd (to me) imperfect type system implementation, like the whole thing was some toy language pretending to be more than it was (in the sense that if you wanted something more complete in language or performance you'd go elsewhere).

Perl just seemed to know its place and not take itself too seriously.

Things changed though. I haven't touched Perl in years but use Python all the time. I never understood why Python got the traction it did given its performance limitations compared to some other languages (except as part of a broader trend for people to use whatever language they leaned in introductory comp sci) but I do think I understand why people stopped learning Perl.

114. petit_robert ◴[] No.46182724{3}[source]
Strange, for me it's the opposite.

Just yesterday, I moved some 100 lines of code using a hash quite a few times from the main module to a function using a reference to the hash.

if %args is the hash holding the data, '$args{key}' tells me the value of 'key' in the main module.

a reference to the hash passed to the function is noted like so : '$args = \%args';$args->{key} tells me value of 'key'

All I had to do to adapt the code was to replace '$args{' with '$args->{', done by the time I typed the replace command in my editor.

Funny that it just makes sense to me, must be something with the brain's wiring.

115. klipt ◴[] No.46182819{4}[source]
LUKE: Is Perl better than Python?

YODA: No... no... no. Quicker, easier, more seductive.

LUKE: But how will I know why Python is better than Perl?

YODA: You will know. When your code you try to read six months from now.

https://wiki.python.org/moin/PythonCdFun

116. tootie ◴[] No.46183310{3}[source]
I wrote a ton of Perl 5 and also found it very intuitive and powerful. I think the notion that Python is "more readable" is true, but also less useful of a metric than it would seem. Python is still gibberish to a new coder and requires training and experience to master. Perl requires somewhat more effort to acclimate to, but ultimately is much more expressive and much closer to real-world software engineering problems. Once the incremental effort is made, Perl is (or at least was) a better Python.
replies(1): >>46183939 #
117. jhbadger ◴[] No.46183714{5}[source]
That was the idea of APL (and its successors like J and K) -- make programming a math notation rather than pretend to be a human language (generally English, but there have been programming languages with keywords in Chinese and Russian, among others).
118. martinflack ◴[] No.46183779{6}[source]
It could've easily been defined that the else branch runs if the while condition never had a true value at all. In fact, I think that's more intuitive.
replies(1): >>46184004 #
119. jodrellblank ◴[] No.46183808{8}[source]
Reading the YCombinator link there's a mention of APL and a comment by dTal[1] which includes saying:

> "A lot of the mystique of APL is because it's illegible ... nothing more than a DSL for 'numpy-like' code. .. same demo, using Julia and the result is (in my opinion) much more legible: ... let n=sum(map(

sum() in Julia is more clear and more readable at a glance than +/ in APL, but the APL version is a combination of two things. + which is a binary addition function, and / which is reduce, a higher-order operator or meta-function. sum() in Julia doesn't lead you to think about anything else except what other builtins exist. The APL notation leads you to wonder about combining other commands in that pattern, like times-reduce is ×/ and calculates the product of an array of numbers. From the notation you can see that sum and product are structurally related operations, which you can't see from names sum() and product(). Then you change the other part by wondering what plus does if used with other higher functions, like +\ (scan) and it's a running-sum across an array. (i.e. "+\ 1 1 1 1" gives "1 2 3 4", the sum so far at each point).

So the notation isn't just about readability, it's a tool for thinking about the operations. Different notations enable you to think about different things. If we imagine there was no sum() then you might write:

    sum = 0
    foreach (n in numbers) { sum += n }

    product = 0
    foreach (n in numbers) { product *= n }
and whoops that doesn't work; this notation brings to the focus that sum has to start with 0 and product has to start with 1 to get the right answer and you can wonder mathematically why that is; APL notation hides that just like it hides the looping. Different notation is a tool for changing the what people think about - what things we must attend to, cannot attend to, and what new things a notation enables us to see. dTal's next reply:

> "the power of abstraction of APL is available to any other language, with the right functions. ... there's nothing to stop anyone from aliasing array-functions to their APL equivalents in any Unicode-aware language, like Julia (oddly, nobody does)."

Maybe nobody does it because if you can't take the patterns apart and put them back together differently without an APL engine behind it, is there any benefit? Take an example from APLCart[2]:

    {⍵/⍨∨\⍵≠' '} Dv      # Remove leading blanks [from a character vector]
In C# that task is str.TrimStart() and I assume it's a loop from the start of the string counting the spaces then stopping. Calculating length - num_of_spaces, allocating that much memory for the new string, copying the rest of the string into the new memory. I wouldn't think it was do-able using the same higher order function (\ scan) from a running sum. What this is doing to achieve the answer is different:

          {⍵≠' '} '   abc   def'       # make a boolean array mask
    ┌→──────────────────────┐          # 0 for spaces, 1 for nonspaces
    │0 0 0 1 1 1 0 0 0 1 1 1│    
    └~──────────────────────┘
          {∨\⍵≠' '} '   abc   def'    # logical OR scan
    ┌→──────────────────────┐          # once a 1 starts,
    │0 0 0 1 1 1 1 1 1 1 1 1│          # carry it on to end of string
    └~──────────────────────┘
          {⍵/⍨∨\⍵≠' '} '   abc   def'
    ┌→────────┐                        # 'compress' using the boolean
    │abc   def│                        # array as a mask to select what to keep
    └─────────┘  
Now how do I remove the leading 0s from a numeric array? In C# I can't reach for TrimStart() because it's a string only method. I also can't assume that there's a named method for every task I might possibly want to do. So I have to come up with something, and I have no hints how to do that. So I have to memorise the TrimStart() name on top of separately learning how TrimStart() works. That notation gives me a clear readable name that isn't transferable to anything else. In APL it's:

    {⍵/⍨∨\⍵≠0} Dv      # Remove leading zeroes [from a numeric vector]
That's the same pattern. Not clear and readable, but is transferable to other similar problems - and reveals that they can be considered similar problems. In C where strings are arrays of characters, you aren't doing whole array transforms. In C# strings are opaque. In APL strings are character arrays and you can do the same transforms as with numeric arrays.

Which part of that would you alias in Julia? I suspect you just wouldn't write a trimstart in this style in Julia like you wouldn't in C#. You wouldn't think of using an intermediate boolean array.

It's not just about "readability", the APL notation being concise and self-similar reveals some computy/mathematical patterns in data transforms which "giving everything a unique English name" obscure. And APL notation hides other patterns which other notations reveal. i.e. Different notations are being tools for thinking differently about problems, Notation as a Tool for Thought.

[1] https://news.ycombinator.com/item?id=25258819

[2] https://aplcart.info/

replies(1): >>46185139 #
120. jgalt212 ◴[] No.46183939{4}[source]
For me it's not so much that Python was more "readable" than Perl. I've found pretty much any language other than XSLT more readable than Perl.
121. thaumasiotes ◴[] No.46184004{7}[source]
What are you trying to say? It is defined that way. And the example I provided above makes that completely explicit.

But here, from the official documentation:

> if the expression is false (which may be the first time it is tested) the suite of the else clause, if present, is executed and the loop terminates.

https://docs.python.org/3/reference/compound_stmts.html#the-...

122. astrange ◴[] No.46184348{4}[source]
Morphy, who is probably the greatest chess player to ever live, would probably know.
123. em-bee ◴[] No.46184820{4}[source]
a different approach is to replace bash altogether and switch to modern shells like fish, elvish, murex, nushell (not stable yet afaik) or oils (very interesting approach, it has a bash or sh compatible mode and another one with a more modern and cleaner syntax).
124. em-bee ◴[] No.46185139{9}[source]
this is why i like how operators work in pike:

+ - * / and other operators work not only on numbers but on strings, arrays and other types and all have an intuitive application.

on strings and arrays for example, + is concatenate, / is split, * is join, - is filter (with static values).

125. em-bee ◴[] No.46185194{5}[source]
i think this is changing. in recent years, alternative shells that break with bash syntax like fish or elvish and others are gaining in popularity. oils is of particular interest because it has an sh/bash compatible mode and thus provides an upgrade path away from bash.
126. tails4e ◴[] No.46185574{3}[source]
My code wasn't written to be hard to decipher, and it wasn't a goal to get everything on one line by any stretch, I just didn't like an if with regext was 2 lines minimum in python, it felt inelegant for a language that is pretty elegant in general
127. pavel_lishin ◴[] No.46185928{6}[source]
> It made Python feel too rigid and Ruby feel familiar.

That's so funny to me; I like Python, and dislike Perl & Ruby. Something about Ruby rubs me the wrong way - I could name a few things that I think are _objectively_ bad decisions in the language's design, but it's mostly about an aesthetic preference that's just a matter of taste.

128. oofbey ◴[] No.46186383{3}[source]
Maybe in retrospect instead of “this isn’t a help channel” it should have said “go to #perl-help for questions” or made #perl be an open forum and moved the wizard discussion to #perl-experts?
129. lesostep ◴[] No.46190957[source]
I think it's a sysadmin thing to have a little bit more wimsy in the code.

Administrative work by nature leaves you a bit bored, if you do it right. So you sometimes pick something up just to play with.

I can't speak about every sysad experience, but in mine a lot of scripts tend to be in a "make once, remember for ten years" category, and even a bit of creative naming can help a long way.

Working with a larger codebase with "creative" code, on the other hand, is frustrating. And if you don't have to write code, you might as well go take a walk, "monitoring" isn't in your job description.

130. PunchyHamster ◴[] No.46191498{3}[source]
And the Perl way is opposite, which is what my point was? I'm not sure what you want to say here
131. darepublic ◴[] No.46197026[source]
In community college our perl professor was often late. One time he just didn't show up. I remember him once saying something like job security involved writing indecipherable code so none of your coworkers could understand it. There was a tinge of bitterness in his remark. Our exams were essentially obscure perl puzzles where we had to read the code and determine the output, some kind of coded phrase.
132. radiator ◴[] No.46201872{3}[source]
You can learn them now, but you will forget them soon. That was the point, I believe.
133. chamomeal ◴[] No.46204785{5}[source]
Wow that IS cool!! Almost sounds too good to be true lol. Green threads? Repl? Event loop? One <1MB binary? What the heck!!
134. busfahrer ◴[] No.46208093[source]
While I'm not a fan of Perl per se, I find it fascinating. One of the reasons for that is that its creator, Larry Wall, is a linguist by trade. This shows in a lot of ways, for example by the fact that, like natural languages, Perl has context: A variable can behave differently whether it is used in a scalar context or an array context. At the same time stuff like this is responsible for Perl's reputation as a write-only language, a cliche which has at least some merit to it.

I can highly recommend reading at least the first chapter of Programming Perl, it's highly insightful even if you don't plan to write or read any Perl.