Hacker News new | ask | show | jobs
by bjornjajayaja 1844 days ago
I’m surprised you don’t mention Perl in this list. It’s the de facto Unix scripting language and frankly more suitable to the task than others.

Perl on the command line is beautifully concise; it’s easily embedded into CI/CD pipelines because the q, qq, etc escaped quotes; it has best-in-class regex support; calling external utilities equally concise with qx or back-ticks; etc etc.

Personally I tend to favor C/C++ for the main event and Perl for everything else on the systems side.

JavaScript is obviously ubiquitous on the front-end but it feels very clumsy. Not a huge fan of that on the back-end system it’s just too weird to do simple stuff like “parse a file” or “rip through a directory tree” or call a shell command.

2 comments

Ruby is a better Perl; it's closer to Perl than e.g. Python, it has fewer footguns but is also very expressive. It also has alternative quotes, backtick, shellescape etc. for ad hoc shell integration though you're better off learning IO.popen and others to take the shell out of the equation.
Subjectivity aside: the fact stands that Perl is the most ubiquitous scripting language on Unix and the de facto standard. You’ll find it by default on many container environments as well—but hell if you’ll find Ruby. ;)
On most of my Linux systems Perl is only installed as a dependency of debconf or git.

I’m sure the Linux kernel community is still using it, but FreeBSD even managed to remove it from the base system.

It’s still ubiquitous… “standard”?

Perl is frustrating. Having variables in scalar, hash and arrays is not do bad. But having the strange syntax to use them is so annoying. Coming from other languages it always takes me a day to get back in the habit. I'd gladly never touch Perl again.