Hacker News new | past | comments | ask | show | jobs | submit login

Where is Perl the lingua franca?



The nightmare corpse-city of R'lyeh, deep under the waves, far from the glare of the yellow sun.


>> The nightmare corpse-city of R'lyeh, deep under the waves, far from the glare of the yellow sun.

No. That is not Perl. That is C Recursion: https://www.bobhobbs.com/files/kr_lovecraft.html


Perl is preinstalled on pretty much every Linux and MacOS since time immemorial, and it's pretty much guaranteed to stay preinstalled for the foreseeable future.

Python3 is up and coming, and eventually it will get there, but old machines must die before it can reach ubiquity.


It will be a long time before it makes sense to use python where longevity/portability matter.

Python breaks backwards compatibility with old scripts every six months or so. In practice, this means you have to port scripts every time you switch machines. Virtual environments sometimes address this issue, but they are hit or miss.

In contrast, perl scripts from 1999 often work unchanged on clean 2022 OS installs.


> Perl is preinstalled on pretty much every Linux and MacOS since time immemorial

awk, bc, and sh are POSIX base utilities, they are literally preinstalled on every unix derivative.

That doesn't make them linga franca, which is what Scarbutt was asking about.

Hell, ed is a POSIX base utility. Does that make ed's command mode the linga franca of text manipulation? Of course not, the thought is preposterous.


I don't find it preposterous at all.

Yes, I would consider awk and sh lingua francae (?) alongside Perl – but in slightly different contexts, namely low-complexity jobs.

I find Perl slightly more suitable once things get a little complicated, mainly because it's footgun:power ratio is better than awk (few footguns, but also very low power) and sh (many footguns, not that powerful).

I have come across plenty of boxen where bc was not installed, so I don't put that in that bucket.

And yes, if I want to describe text changes in a highly portable way, I will use sed (or ed, depending on context) rather than, say, unified diffs. I could accept an argument that unified diffs are also a lingua franca for more complicated changes, but they are harder to write.


Then what would, in your opinion, make it "lingua franca"?

I took it to mean "so common that it's available almost anywhere" (which is consistent with the context of the comment).

I've found it extremely useful to rely in tools such as the ones you just listed. Specially because they are often present even in light vms were perl might not.


Is not this actually a famous advantage of vim/vi in old editor war?


Yes?

That it is an advantage does not naturally and unfailingly translate into being a linga Franca.


It's the other way around.

"vi" being so common (ie. "lingua franca") is what gave it an advantage.


Is there even such a thing as lingua franca in any given field?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: