I miss it. I’m too rusty to be effective with it anymore, but it’s the most pleasant to use and productive language for me for small stuff. Best community there ever was as well, mostly C and Unix system programmer types.
Perl first commit: a “replacement” for Awk and sed
171–180 of 261 posts
Re: Perl first commit: a “replacement” for Awk and sed
#172Earlier quoted context omitted.
Moreover, as often as people joke about the readability of Perl code, that's entirely a function of the developer. I've easily written tens of thousands of lines of Perl, and not a single person has complained about difficulty reading or maintaining that code. Why? Because I apply all the usual best practices for code hygiene that apply to any language. Frankly, I think most people are just repeating a meme they hear…
absolutely a response to perl. “TOOWTDI” has been an expression in the python community for a long time :)
https://packaging.python.org/en/latest/overview/
OCI (Docker) Containers were invented to overcome the problems inherent with deploying Python applications.
Re: Perl first commit: a “replacement” for Awk and sed
#173Earlier quoted context omitted.
Python killed the game.
Unfortunately. Ruby should have been Perl's natural successor. Python is the VHS of scripting languages. For a start it doesn't have a decent answer to Perl or Ruby's one-liners. Then there's the crippled lambda implementation. Python is a sad case of worse is better.
This is by design. Readability is core to the design and philosophy of python. One liners are cool and fun to write, but trying to decipher someone else's incredibly dense bash or perl one-liner is absolutely awful.
Re: Perl first commit: a “replacement” for Awk and sed
#174Earlier quoted context omitted.
My livelihood depends on a large set of Perl scripts, and I bet I'm not the only one in that position. It's perfect for gluing things together and then not breaking for decades, while other languages come and go. It's kind of the new COBOL that way.
I make money off "old" systems; I'm spending time with Perl too. Lots of legacy systems out there.
Re: Perl first commit: a “replacement” for Awk and sed
#175When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was glued together in one of these with a series of grep, awk, sed, ls, test, commands glued together. Anything more complicated was written in C and called from one of these things. Perl in one stroke collapsed the programming of C, text manipulation, the capabilities of all of the Unix utilities, an…
> Yes, awk and sed were replaced by Perl, I still use awk and sed semi regularly. I haven’t used Perl in over a decade.
Same. Awk and Sed are delightful little tools that have aged exceptionally well.
Re: Perl first commit: a “replacement” for Awk and sed
#176When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was glued together in one of these with a series of grep, awk, sed, ls, test, commands glued together. Anything more complicated was written in C and called from one of these things. Perl in one stroke collapsed the programming of C, text manipulation, the capabilities of all of the Unix utilities, an…
> Automation was glued together in one of these with a series of grep, awk, sed, ls, test, commands glued together. Anything more complicated was written in C and called from one of these things. This doesn't sound that horrific to me. It's the classic Unix approach of building small tools that do one thing well, and composing them in novel ways to solve problems. For any problem that can't be solved this way you wri…
Re: Perl first commit: a “replacement” for Awk and sed
#177The funny thing is Perl is now arguably more obsolete than sed and awk.
That might be true culturally, but it's not true technically. Once you know a bit of Perl (including some command line switches like -e, -n, -a, -l, -p, and -i) you will be able to do just as easily everything you used to do in awk and sed, but with a more powerful foundation so you have the flexibility to go further.
Re: Perl first commit: a “replacement” for Awk and sed
#178Earlier quoted context omitted.
What's a good resource to be proficient in perl for shell scripting? I write a lot of bash for better or worse. I wonder if perl would be a better choice sometimes.
If you can't manage it with Shell scripting you should take a look at Python. I've written Perl for many years but in the end switched to Python because the internet and resources you can find are much more quantitative and qualitative than those for Perl. Especially now when Google doesn't seem to return older results anymore.
Re: Perl first commit: a “replacement” for Awk and sed
#179Earlier quoted context omitted.
awk is a fantastic command line application that is useful for filtering, basic computations and transformations that other basic utilities (e.g. cut, sort, etc.) + grep don't (readily/easily) provide. I suppose it might be a bit archaic these days, but for someone familiar with it, it's often faster to compose an awk command than to write even a very quick/short script in, e.g., python or perl, for certain things.
>awk is a fantastic command line application that is useful for filtering, basic computations and transformations that other basic utilities (e.g. cut, sort, etc.) + grep don't (readily/easily) provide. All true. But awk is also a programming language, not just a command line application or utility. It has conditionals, loops, regexes, file handling, string handling, (limited) user-definable functions, hashes (associ…
Great book. I read it after it was so enthusiastically endorsed here on HN. A lot of people said it was worth reading just to take in the excellent technical writing style of Brian Kernighan.
I would offer a strong second to that.
Re: Perl first commit: a “replacement” for Awk and sed
#180Earlier quoted context omitted.
Yeah so many people shooting themselves in the foot by failing to take advantage of this powerful tool - as you say especially for stuff that you might have otherwise used an overly-complex bash script for.
I once went looking for something like Ansible that was implemented in Perl. Does such a thing exist? I think declarative system orchestration got popular well after perl's popularity declined. In any case, I did not find anything.