News for hackers. Stuff that matters.
Re:Not Your Grandfather’s Perl by btilly on Thursday September 08, 2022 @04:33PM (#32771709)
Due to poor coding practices (eg monkeypatching) and a weaker testing culture (by default Ruby does not run unit tests when installing libraries) I've found Ruby to be substantially less reliable than Perl.

However the world has moved on to Python. So I curse every time I again have to look up how subprocess works for what I'd do in Perl with backticks.

Re:Not Your Grandfather’s Perl by int_19h on Thursday September 08, 2022 @10:24PM (#32774580)
Re:Not Your Grandfather’s Perl by btilly on Thursday September 08, 2022 @10:52PM (#32774753)
The documentation for that says, "Specifically, Windows is not supported."

My use case was for scripting git operations. And the list of target environments included Windows.

So no, that wouldn't have worked for me.

Re:Not Your Grandfather’s Perl by cutler on Friday September 09, 2022 @01:19AM (#32775588)
To be fair to Python subprocess is not simply a substitute for backticks in Perl or Ruby. It's supposed to protect you from some of the more obscure problems which can happen with shell expansion.
Re:Not Your Grandfather’s Perl by thenipper on Thursday September 08, 2022 @11:16PM (#32774888)
Check out plumbum: https://plumbum.readthedocs.io/en/latest/

It supports mac, Linux and windows.

Re:Not Your Grandfather’s Perl by fomine3 on Thursday September 08, 2022 @11:53PM (#32775113)
TIL (as a light Perl user alternative to awk) CPAN runs test on install. Is there any other language package manager runs tests by default?
Re:Not Your Grandfather’s Perl by liveoneggs on Friday September 09, 2022 @08:52AM (#32778525)
that is super dangerous, just like some other dangerous parts of perl where it can run code during the compilation phase
Re:Not Your Grandfather’s Perl by btilly on Friday September 09, 2022 @10:26AM (#32779656)
A lot of languages allow the running of arbitrary code on install, so it is not particularly dangerous that Perl allowed it.

However you have no idea how many bugs got caught because the test run uncovered platform specific bugs. This is exactly what gave Perl a good name for being portable. Doubly so given that Perl always did this, starting back in the 1980s.

Re:Not Your Grandfather’s Perl by zaphar on Friday September 09, 2022 @12:58PM (#32781833)
Even better is cpan testers who will run your cpan package on the widest variety of platforms I have ever seen. To my knowledge no other package ecosystem will do this.