logoalt Hacker News

plorkyeranyesterday at 9:30 PM11 repliesview on HN

> grep (global regular expression print), awk (Aho, Weinberger, Kernighan; the creators’ initials), sed (stream editor), cat (concatenate), diff (difference). Even when abbreviated, these names were either functional descriptions or systematic derivations.

If you asked someone unfamiliar with unix tools what they thought each of these commands did, diff is the only one which they would have even the slightest chance of guessing. It's ridiculous to complain about "libsodium" and then hold up "awk" as a good name.


Replies

DSMan195276yesterday at 11:28 PM

Yeah this definitely falls into the category of "I use them so they feel natural", there's nothing amazing about those names.

The underlying problem is that you now run into so many named things (utilities, libraries, programs, etc.) in a day and they all have to differentiate themselves somehow. You can't name every crypto library `libcrypto` for obvious reasons.

show 1 reply
QuercusMaxyesterday at 11:40 PM

https://en.wikipedia.org/wiki/Libiberty was always my favorite ridiculous name. It was named so you can link it with -liberty.

show 3 replies
bee_rideryesterday at 10:41 PM

I’m not sure I like awk, sed, or cat, I think these are just names we’re used to, not good really. diff seems ok.

grep almost has an onomatopoeic nature to it… like, it sounds like you are grabbing or ripping the patterns out of the file, right?

show 2 replies
mojubayesterday at 9:40 PM

However once you learn that sed means stream editor, you won't ever forget it. libsodium is forgettable.

show 6 replies
kazinatortoday at 3:22 AM

cat is arguably from catenate, which is the smarter, shorter version of concatenate. By default, unadorned catenation is a joining (literally "making into a chain"), which is always together/with, so the con prefix is redundant. If you ever need a derivative of catenate that means splitting apart, you can coin discatenate, where the dis then plays an essential role.

Also, why is it that people are gregarious when they congregate, and not congregarious? Or why didn't they just gregate? There was such a Latin cognate verb without the con attached.

i_am_proteusyesterday at 11:26 PM

So few of us use physical tapes these days, but the "tape archive" (tar) remains ubiquitous.

Not entirely unserious: "awk" is a good name because it is three characters to type "rg" is better than "grep" because it is two fewer characters type

show 2 replies
nonameiguessyesterday at 10:33 PM

It also seems wrong? libsodium explains the logic in its name right on its about page. It's a fork of NaCL (the chemical formula for sodium salt), which itself is a plain acronym for "networking and cryptography library." Google doesn't seem like a good example, either. Wasn't that meant to be an allusion to the very large number googolplex, as in Google exists to tame the unfathomably large amount of information on the web? The author may or may not like those names, but they have a logic just like grep and awk do.

show 1 reply
1vuio0pswjnm7today at 12:16 AM

Nitpick: Correct me if wrong but I think cat is catenate not concatenate

IMHO, the best names are the ones that are easiest to type. I have read several accounts of authors choosing names for this reason

I sometimes rename other peoples' executables (cf. libraries), not the ones in the traditional UNIX userland, but the ones with goofy names.^1 I will rename them to something I find easier to type and less annoying. I create symbolic links with the original names if I think they will be required^2

With own software, I give every program a number, the source file is named according to the number and the executable name is a short prefix followed by the number. All names are the same length. I have a text file that lists what each program does if I forget

I put a description in a comment at the top of each source file as a sort of header. Then I can do something like

   head src/???.l  
for a list of descriptions

1. Needless to say, Arthur Whitney's software does not get renamed. No need, he gets it

2. I will also rewrite the argument parsing and "usage:" output if it annoys me

The best way to determine what a program does is to read the source. This is one reason I prefer to compile programs from source instead of using "binary packages"

I also think the names that are chosen for so-called "tech" companies are routinely quite silly, but that's another discussion

thaumasiotestoday at 2:50 AM

> It's ridiculous to complain about "libsodium" and then hold up "awk" as a good name.

Awk is short, easy to pronounce, and difficult to confuse with anything else. It's nearly as perfect as a name can be.

> If you asked someone unfamiliar with unix tools what they thought each of these commands did, diff is the only one which they would have even the slightest chance of guessing.

You seem to have confused the concept of a "name" with that of a "description". The whole point of names is that they aren't descriptive.

https://en.wikipedia.org/wiki/Arbitrariness#Linguistics

gowldtoday at 12:06 AM

awk is short for awkward, like awkword, for awkwardly manipulating words (text).

KingLancelotyesterday at 9:57 PM

[dead]