Live data from Hacker News

Perl's decline was cultural

beatworm.co.uk

361–370 of 472 posts

Re: Perl's decline was cultural

#361
post #64

Earlier quoted context omitted.

Perl's binary brings with it the ability to run every release of the language, from 5.8 onwards. You can mix and match Perl 5.30 code with 5.8 code with 5.20 code, whatever, just say "use v5.20.0;" at the start of each module or script. By comparison, Python can barely go one version without both introducing new things and removing old things from the language, so anything written in Python is only safe for a a fragi…

> By comparison, Python can barely go one version without both introducing new things and removing old things from the language Overwhelmingly, what gets removed is from the standard library, and it's extremely old stuff. As recently as 3.11 you could use `distutils` (the predecessor to Setuptools). And in 3.12 you could still use `pipes` (a predecessor to `subprocess` that nobody ever talked about even when `subproc…

> Can you show me a real-world package that was held back because the code needed a feature or semantics from the interpreter

That is not what I was getting at. What I was saying is that, if you write code for perl 5.20 and mark it "use 5.20.0;", then that's it, you're done, code never needs to change again. You can bring in newer perl interpreters, you can upgrade, it's almost certainly not going to break.

You can even write new code down the line in Perl 5.32 which wouldn't be possible in 5.20, and the 5.20 code wouldn't be valid in 5.32, but as they're both declaring which version of the language they're written in, they just seamlessly work together in the same interpreter.

Compared to Python's deliberate policy, which is they won't guarantee your code will still run after two minor releases, and they have a habit of actively removing things, and there's only one version the interpreter implements and all code in the same interpreter has to be be compatible with that version... it means a continual stream of having to update code just so it still runs. And you don't know what they're going to deprecate or remove until they do it, so it's not possible to write anything futureproof.

> in 2.7, surrounding parentheses are not redundant,

That is interesting, I wasn't aware of that. And indeed that would be a thorny problem, moreso than keeping a print statement in the grammar.

Fun fact: the parentheses for all function calls are redundant in perl. It also flattens plain arrays and does not have some mad tuple-list distinction. These are all the same call to the foo subroutine:

    foo "bar", "baz"
    foo ("bar", "baz")
    foo (("bar", "baz"))
    foo (("bar"), "baz")
    foo (((("bar")), "baz"))

Re: Perl's decline was cultural

#362
post #357

Earlier quoted context omitted.

But isn't this everything? All of computing is a struggle for me at least, all followed with confusion and "Why did they make this, this way?"

But is it all equally a struggle? Some things are definitely more of a struggle than others. Remember xfree86config? We used to have to manually configure our screen resolution in a shitty text file. I even remembered that you had to specifically add a line to tell it you had a 3 button mouse. This was in the late 90s, maybe early 00s. Way after it was sane to have to do that. And I specifically remember when they fi…

One of those many cases where X = X.

Re: Perl's decline was cultural

#363
I always thought of Perl as write friendly... And Ruby as Perl++.

I feel it only gained any web traction in the sense that it was widely available and already there in the early cgi-bin approach.

On the last comment, I've taken to using Deno/TS for most of my shell scripting type tasks these days. In general it's worked very well for me.

Re: Perl's decline was cultural

#364
post #126

Earlier quoted context omitted.

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 documen…

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”.

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.

Re: Perl's decline was cultural

#365

Earlier quoted context omitted.

> 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.")

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…

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!

Re: Perl's decline was cultural

#366

I always thought Perl faded because it's write only and more readable alternatives showed up. Why did it have to take over the world anyway?

> Why did it have to take over the world anyway?

Because it was there, mostly. In a UNIX world where text was everything, it was well suited to quick and dirty solutions (that then morphed into long-term technical debt). Most alternatives at the time were not there by default as they either were commercial or otherwise didn't have any ecosystem to expand it's utility (like CPAN - without it Perl would likely be like awk - a fully capable language, but only used for one-liners 99.999% of the time).

Re: Perl's decline was cultural

#367
post #8

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.

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

Good for you, not for anyone else reading the code or yourself 6 months later. Seen too much of that.

Re: Perl's decline was cultural

#369

For me it wasn't cultural. Perl was my first language because I wanted to make interactive websites and that was the most common way to do it in the late 90s. Shortly after, everyone switched to PHP because mod_php was much faster than Perl CGI scripts.

mod_php was distributed w/ Apache httpd, so it was "already installed". mod_perl needed to be installed manually, so it posed immediate friction, if not a complete freeze-out, depending on the situ. I believe that was why PHP became popular.

Re: Perl's decline was cultural

#370

Rather than its "decline was", Perl's existence is cultural. All programming languages (or any thought tools) are reflections and projections of the cognitive values of the community who creates and maintains them. In short, the Perl language shares the structure of the typical Perl dev's mind. A shift to Python or Ruby is fundamentally a shift to a different set of core cognitive patterns. This influences how proble…

This is interesting to me, as someone moving from a company that uses C++ to one that uses Rust. It feels like the whole culture of the former company is built similarly - no guardrails, no required testing, or code review, minimal "red-tape".

In effect, the core principles of the company (or at least, the development team of the company) end up informing which programming language to use.

Post reply on HN