pleroma.debian.social

pleroma.debian.social

I keep solving problems with Perl. Send help?

@jmtd At this point, you're beyond help.

@jmtd Err... Now I'm kind of hoping that you'll stay far away from my problems... 🙃

@jmtd I used to do that. Very rarely now though, which is a shame as I'm a closet perl fan. It's still a fantastic tool for many jobs though!

(This isn't helping is it?)

@sxa I might write a blog post about this

@jmtd My most common use of perl is "perl -p -i -e 's/something/something else/g' file.txt"

I've seen people use "sed -i" but since that's a GNU-specific option, and most UNIX- based systems also have perl, I tend to gravitate towards that instead ;-)

@sxa yum perl pie. I uesd to do that a lot :-) The starting point of my modern perl scripts is invariably the core loop that -pie provides (while(<>) {...)

@jmtd I do remember thing "Oh hell, no!" when they decided to introduce thread support into the language though ;-)
As if perl code wasn't already difficult to keep readable!

@sxa @jmtd Unpopular opinion: Well-written Perl code is easier to read than most Python code.

@kittylyst @jmtd I agree that it can be readable, particularly with adequate comments which I feel are super-critical in , although from experience I definitely think that perl makes it an awful lot easier to write unintelligible gibberish ;-)

Interesting that you feel that way about though - I typically consider that a bit better, although do you think it's because non-sw-dev types are writing python code and don't consider maintainability?

@sxa @kittylyst @jmtd In my experience, not many devs, regardless of background, consider maintainability, regardless of language. There's just a lot of that in Python now because there's a lot of Python now, and I would expect in JavaScript too.

@sxa @kittylyst for me, and it could be that my experience is not more widely representative: I generally find Perl programs to be self-contained, and Python ones to have a dependency hell to navigate. That really impacts their readability and maintainability. Oh, and a Perl script written 20 years ago generally works today; the same can not be said for Python.
replies
1
announces
0
likes
0

@jmtd if it works for your problems, great ! We have support groups.

@jmtd @kittylyst the python 2 -> 3 switch was very problematic. Although in terms of deps I've definitely worked on things that have issues with cpan deps but perhaps less pervasive than other languages 🤷

@sxa @jmtd

when they decided to introduce thread support into the language

I had to look it up. That was in 1998, wasn't it?

@jmtd Back in my InfoSec days, I used Perl…A lot. It did, and I’m sure still does, everything I needed.