Skip to main content


In a +1 score to #Perl's great back-compatibility, I've had a script called from procmail that's been 100% reliable for the past 15 years maintaining my email, over many years of regular Perl updates.

A month ago it broke - because procmail. https://github.com/BuGlessRB/procmail/issues/5

But the perl itself still runs absolutely fine.

#perl

reshared this

in reply to Paul Evans

There is a meltdown in the bioinformatics community about #python now for the same reasons. The stuff I wrote 20+ years ago for my PhD in #Perl & #swig still work (after installing a modern version of PerlMagick)

Mark Gardner reshared this.

in reply to Christos Argyropoulos MD, PhD

@ChristosArgyrop I do really wish we - the Perl community - were much much louder about this strong back-compat stuff.

You can update your perl and everything keeps running just as it did.

We really need to be shouting this from the hills.

Mark Gardner reshared this.

in reply to Paul Evans

There is a lot of silent #fafo with compatibility taking place in scientific computing. And containers are not going to save the day: how does one put together a dataflow involving multiple containers in the same machine?
#Perl DOES need to fix some performance issues and incorporate static types to come to the 21st century without breaking stuff, but no one can beat it in terms of reliability
in reply to Paul Evans

@ChristosArgyrop agreed! I still get the shivers from using pyenv! Perl never gave me any grief like that.
in reply to Peter Jakobs ⛵

@pjakobs Yeah I get that. People ask me what is the Perl equivalent of pyenv, and I ask what it does, and they explain and then I wonder "Uhm, I don't know, I've never felt a need to have that in Perl".

They wonder how I maintain different versions of Perl for different things and I say "I dunno, I just use latest for everything and it all works fine". I get these sortof blank stares of disbelief.

Mark Gardner reshared this.

in reply to Paul Evans

my home automation system (fhem) is a huge collection of perl modules. I've been running it for almost eight years now from an old Raspbian to Fedora 40 - without a hiccup.
I only wish there was a stronger concept of multi threading in perl.
in reply to Peter Jakobs ⛵

@pjakobs We have some excellent async/await stuff that I reliably use across lots of my personal code and I'm aware companies do use for real data stuff - sometimes large amounts of it. There was a billion-row Postgres database migration using it, for example.

https://metacpan.org/pod/Future::AsyncAwait

in reply to Paul Evans

the problem with fhem is (and I'm not the architect, just wrote a few drivers) that it massively relies on a central data structure, so everything essentially has to be in one process. Proper parallel threads would probably help, but then again, I guess they would be problematic when it comes to data consistency. await might already be helpful though, for http API calls I guess. Bookmarked.
in reply to Peter Jakobs ⛵

@pjakobs That's exactly what async is for, though. It is all one thread of one process.. You just swap back and forward between what things you're doing. All data structures are shared because there is only one thing going on.
in reply to Paul Evans

I'm aware, but I've seen situations when a single cpu thread was not enough oomph to handle a large event queue, for example. If more comes in than one core can handle in any given time, the order gets less relevant.
I know, this is not a typical perl use case, but it it works pretty reliably.
And - since I'm currently working in JavaScript - perl code is so much prettier and easier to read!

https://svn.fhem.de/trac/browser/trunk/fhem/fhem.pl

in reply to Peter Jakobs ⛵

@pjakobs Ahyeah if you have smaller comput-heavy tasks that need to be asked a question and send back a result but are otherwise stateless in terms of intermediate working, then there are also nice async solutions for that.

https://metacpan.org/pod/IO::Async::Function

in reply to Paul Evans

you know, that's the other cool thing about perl: there are literally thousands of modules by thousands of devs that just write code and don't want all the glory 🙌
in reply to Paul Evans

I mainly manage different #Perl versions with #asdf (https://asdf-vm.com) to test code that has to run in less upgradeable environments elsewhere. $work, for example, susbscribes to #Canonical's #Ubuntu Pro so we're on Perl v5.34.0 of their 22.04 LTS #Linux distribution (“#Jammy Jellyfish”).

But like @leonerd, personal stuff is on the latest.

This entry was edited (9 months ago)
in reply to Christos Argyropoulos MD, PhD

@ChristosArgyrop @pjakobs #!/usr/bin/env perl

is the typical way to call whatever #perl happens to be first in your environment's path

The nice thing about #asdf is it reads a `.tool-versions` file in a given project's directory and will use the specified perl, ruby, node, whatever version via its shim scripts: https://asdf-vm.com/guide/getting-started.html#_6-set-a-version

I used to use #plenv, which is like #perlbrew plus asdf but for Perl only: https://github.com/tokuhirom/plenv

in reply to Mark Gardner

I use plenv in my development environments, and whenever I have a machine that has the misfortune of me being its admin. I specifically use plenv because it supports the .perl-version file so I can commit that to the repo.

I also heavily use Carton so all my libraries are installed in a local/ directory.

My production environment is containerized so I used the perl:latest Docker image.

in reply to Chris (so far)

Also one of the great benefits of my current employment situations is that my production is not only using 5.38 but it’s using feature class extensively.
in reply to Mark Gardner

Experimental just means "we might change or remove it later". if you have no long-term requirements on the code and it only has to solve this-month's problem, using experimental is fine.

You just don't get to complain if next year's update breaks it. Experimental simply means "not covered by Perl's otherwise-excellent back-compat guarantees". I.e. everything you get from most other languages

This entry was edited (9 months ago)
in reply to Christos Argyropoulos MD, PhD

@ChristosArgyrop @mjgardner @pjakobs@mastodon.green I usually set up plenv, rbenv, and pyenv on a new Linux install, but mainly for Perl it's just plenv install <latest>, and at some point plenv migrate-modules <old-latest> <new-latest>

But my Perl workflow is strictly personal stuff these days, so precise project dependencies haven't been a concern.

in reply to Random Geek

@randomgeek @ChristosArgyrop See, I don’t want to have to deal with a different tool and its bespoke configuration file to manage every scripting runtime. So that’s why I advocate #asdf, it has plugins for darn near everything: https://github.com/asdf-vm/asdf-plugins
in reply to Mark Gardner

This is probably a very stupid question, but is #asdf like #perlbrew for multiple different languages ?
This entry was edited (9 months ago)
in reply to Christos Argyropoulos MD, PhD

Yes, plus when you `cd` into your projects’ directory it can put the specified version of one or more language’s runtimes into your path so your project runs the right thing
This entry was edited (9 months ago)
in reply to Mark Gardner

@mjgardner @randomgeek so does it eliminate the need to hardwire a link to an (alias) into the shebang ?
(Again very stupid question, but paths are one of the most painful things in the universe for portability)
in reply to Paul Evans

@pjakobs to be honest I think the pyenv users are crazy. I've been developing in Python for 20 years and I've never used it.

Migrating from Python 2 to Python 3 did break a lot of stuff, but aside from that I seldom have a problem. I suppose third party libraries do sometimes break things, but that's not really Python's fault.

I think the problem stems from the over-introduction of dependencies. I blame java & typescript devs for that culture.

in reply to mcgrew

@mcgrew @pjakobs Python updates are probably the most painful thing about maintaining linux systems, even minor point releases tend to make everything incompatible and require waiting for software updates, so you end up with nonsense like having 5 different python environments to support different system tools because of breaking changes requiring rewrites even in point releases. Major distros "hide" this problem from you but it's BAD with python.
in reply to Raptor :gamedev:

@raptor85 @mcgrew @pjakobs Yeah, people have got so used to the "Oh new software I bet it breaks older stuff" grind from Python (also some other languages), that it's almost become normalised. People have forgotten that it doesn't have to be like that. Perl shows how it can be better.
in reply to Paul Evans

@pjakobs That time I dug out a perl script I wrote 25 years ago and haven't touched since, ran it on some historical data with the *current* version of perl, and it just worked: https://jwz.org/b/yj88

reshared this

in reply to jwz

@jwz @pjakobs Good to know that works. That's exactly the sort of thing we aim for 😀
in reply to jwz

@jwz @pjakobs
Entirely abandoning the perl6 project while perl5 was unchanged for a decade has a lot to do with all this.
in reply to Steve Downey

@Sdowney @jwz @pjakobs Yeah; that whole "Perl 6" distraction was unfortunate, yes. That particular project has now been renamed Raku thus leaving Perl a clear runway to bump the version number up to 7 and onwards someday, so it's at least fixed now.

Though sure that reputation still hangs around far longer... Not a lot we can do about that, besides trying to override it with more positive noises now.

in reply to Paul Evans

@jwz @pjakobs it did have the benefit of keeping all of the people who wanted to make breaking changes occupied, leaving those who wanted to get work done a stable platform to do so with.
in reply to Steve Downey

@Sdowney @jwz @pjakobs A charitable way to consider it, is that it split the group into "make new thing" and "keep existing thing" camps.

In reality I fear the outcome was more that it also created a third camp of "screw this I'm off elsewhere", and a lot of otherwise-good devs just disappeared.

It's certainly a regrettable part of history I wish had not happened. But then you can say that of a lot of historical happenings ;)

in reply to Paul Evans

@Sdowney @pjakobs Yes, exactly! Perl 6 was a perfect honeypot to get those people out of the way. It was the Golgafrincham B Ark of language design. Look, over here, shiiiiiiny.

Mark Gardner reshared this.

in reply to Peter Jakobs ⛵

I think it’s charitable to the #Perl 6 splitters. The Golgafrinchan Ark B group in "The Hitchhiker's Guide to the Galaxy" was mostly harmless 😉 (and useless); the #Perl6 effort was, at best, neglecting #Perl5 compatibility, and at worst, actively throwing bombs at it.

#h2g2

This entry was edited (9 months ago)
in reply to Steve Downey

@Sdowney @pjakobs @jwz If the human race succumbs to extinction via dirty telephone handsets due to a lack of twigils and hyper operators, we will have deserved it.
in reply to Paul Evans

To @leonerd’s first point, #Perl6 was renamed #RakuLang in 2019 after @lizmat finally realized that “#Perl" in the name was "confusing and irritating" to all concerned:

https://news.perlfoundation.org/post/tpf-response-raku-rename
https://github.com/Raku/problem-solving/issues/81

It was not abandoned, @Sdowney.

This entry was edited (9 months ago)
in reply to Mark Gardner

I just noticed Damian Conway’s comment that #RakuLang (then #Perl6) intended to be “a hundred-year [#programming] language”: https://github.com/Raku/problem-solving/issues/81#issuecomment-519776528

IMHO that points to the heart of why the Perl 6 effort was so disastrous for the #Perl community: it tried to create a hundred-year language by burning a decade+-old language for fifteen years.

This entry was edited (9 months ago)
in reply to Mark Gardner

@mjgardner @jwz @pjakobs @lizmat
A COMPLEX SYSTEM THAT WORKS IS INVARIABLY FOUND TO HAVE EVOLVED FROM A SIMPLE SYSTEM THAT WORKED

A COMPLEX SYSTEM DESIGNED FROM SCRATCH NEVER WORKS AND CANNOT BE MADE TO WORK. YOU HAVE TO START OVER, BEGINNING WITH A WORKING SIMPLE SYSTEM

John Gall, Systemantics: The Systems Bible

in reply to Steve Downey

@Sdowney @jwz @pjakobs Perl changed a lot between 5.8 and 5.38. It was just backward-compatable.
in reply to Paul Evans

@pjakobs I've used a lot of different languages over the years, and while a bunch of them had breaking changes once in a while, Python was really the worst of them.

I used to be a professional Python dev and still maintain a few Python projects now. Every single minor version bump breaks at least one of them. And somehow other Python folks finds this normal. It's not, every other language does not need a pyenv!

in reply to Paul Evans

@pjakobs I remember when CPAN would regularly decide that a module needed a newer other module that needed a newer other module that needed a newer CPAN that needed a newer perl. Good times! Good times!
in reply to Steven D. Brewer 🏳️‍⚧️

@stevendbrewer @pjakobs Sure, people write new stuff.

But how often did installing a newer one break something existing so you had to go back to an older version? That's basically unheardof in the #Perl ecosystem. The language, the modules, everything. You are always confident that you can update to newer things to get newer features and know that existing stuff does not break.

in reply to Paul Evans

actually, through this discussion, I wonder:

is that because perl itself is not changing that much at the core, making the whole ecosystem more stable (I remeber I just read an interview with Larry Wall where he said that core changes were few and far between)
or is it because the ecosystem is just better managed than in python?

@stevendbrewer

in reply to Peter Jakobs ⛵

@pjakobs @stevendbrewer Oh no, we're adding more things all the time. 5.36 for example added *loads* of stuff. It's just all far better managed.

Primarily, we have this `use VERSION` mechanism, where files say what version of Perl they're expecting, so any updated features, new keywords, etc... aren't made visible to files expecting older versions of the language.

https://perldoc.perl.org/functions/use#use-VERSION

in reply to Paul Evans

@pjakobs I have found people who try to do this with some horrible inclusion of specific versions of perl libraries also available through the OS(Logitech media server). This ends very badly and is best solved with copious use of rm on the offending extra copies.
in reply to Paul Evans

@pjakobs Not a Python programmer myself (my experience is just hacking on, reviewing, etc. stuff written in it) but I get the impression the problem isn't the language itself but the culture of gratuitously breaking things in module interfaces. On multiple occasions I've encountered situations where the only reason a newer version broke was that someone decided to rename a bunch of interfaces "for consistency". 🤦
in reply to Cassandrich

@dalias @pjakobs Sure but that's still "language culture". The entire culture around Perl is that back-compat is important and breaking things like that is just not on.

I'm not saying it's universally respected, but you'll find that most authors most of the time do that that kind of thing seriously. It's not *just* the core language, it's the entire ecosystem.

in reply to Paul Evans

@pjakobs I'm not making excuses for it, rather noting how difficulty it is to change (because it's bad culture).
in reply to Cassandrich

@dalias @pjakobs One thing I learned by losing the RNCH ("Real Names Considered Harmful") arguments in Google (which eventually got my fired), is that one person - or a small group - can very rarely actually alter the ingrained culture of a far bigger group.

In the case of Python developers, I think the culture is just to "go fast and break stuff", even if that means the code you wrote last week no longer works. It's just considered normal there.

in reply to Paul Evans

@pjakobs This seems to be a common culture among folks who use LPMs, across languages. The Python programs I've seen with long term health & compatibility are the ones that use few or no third party modules.
in reply to Paul Evans

@dalias @pjakobs

Since DLLs and so, some devs have found it perfectly natural to force users into installing and maintaining a huge and messy amount of various libs, versions, files (...) on their computers.

But no other language ever managed to bring even half the mess python does. Just looking for "python" in your filesystem or packages database shows how far they went.

in reply to Paul Evans

I deal with this constantly at work. Python, PHP, Node, Ruby. And you're right, it's not only (or even primarily?) a problem of backwards compatibility in the core language, it's a culture of constant change in the libraries. Nothing is stable.

I actually believe this is Perl's killer feature, and a main reason I choose it.

in reply to Paul Evans

@dalias @pjakobs this sounds a lot like Clojure language culture too. It really spoils a person.
in reply to Paul Evans

@pjakobs I've rarely, if ever, felt the need to use venvs in python, either. It's always felt to me like a tool looking for a problem. Sadly, it's one that's now penetrated the entire culture, to the extent that people use them by default even if there's no actual problem.

It drives me nuts that it's now being made mandatory to use the damn things in Debian. I can't just install a package, and just run my python code that uses it, because... reasons?

in reply to Paul Evans

@pjakobs I know stuff must break in perl upgrades, but I never experienced it when I was a perl dev. Testing was just part of all code in cpan
in reply to Anton Piatek

@sldrant @pjakobs It is very very rare. A big part of why is what we call the Blead-Breaks-CPAN system, BBC.

It checks CPAN modules against upcoming Perl releases, meaning we can know before the actual release, if it causes things in CPAN module tests to break that used to work. Over the past several years of releases I can recall many actual issues that has found and fixed, so users never noticed.

in reply to Paul Evans

@sldrant @pjakobs It's a kind of system that only works because basically everything interesting in Perl is visible on CPAN, so we can just grab everything and run its tests to see. That kind of thing is just not possible in much more distributed "oh just pull random things off gihub" models that some other languages use.
in reply to Paul Evans

@pjakobs Certainly in the “pro” column of a change management trade-off. Is there a downside? Perl never changes drastically? Does it technically get left behind or is this human and generational stuff?
in reply to Paul Evans

I'm an old 90s/2000s Perl programmer. Since then I've come to like Python /as a language/ better and that now accounts for about 90% of my coding, but it can't be ignored that there are some Perl scripts I wrote literally 20 years ago are still running unmodified on modern Perl.
This entry was edited (9 months ago)
in reply to Paul Evans

@pjakobs True. The key being that Perl hasn't really changed (at least not in any way that would really break code) in 20+years.

I never really understood why a language so ostensibly simple and straightforward as Python couldn't do the same.

in reply to Paul Evans

@ChristosArgyrop Maintaining compatibility is proper software engineering, something to be definitely proud of.
in reply to Paul Evans

it does rule pretty hard. I've never once thought about it.
in reply to Paul Evans

Lotus Notes (aka IBM Notes) (aka HCL Notes) and the "Domino" versions of each has been 100% backward compatible since the early 90s.

It has not stopped the products from losing market share.

in reply to Paul Evans

the only personal application i've written to make it to version 1.0 and see distribution was written in perl. i picked perl because i know i won't have to spend the rest of my life keeping track of dependencies.

folks don't realize perl is the duct tape holding the internet together.

Mark Gardner reshared this.

in reply to purple 👊✊💨

@purple Yup. It's very good duct tape. But sometimes duct tape isn't very glamorous; everyone wants the new shiney Neon / LED sign.