News for hackers. Stuff that matters.
Re:Greppability is an underrated code metric by sshine on Tuesday September 03, 2024 @03:32AM (#41432278)
How many other UNIX commands did the Swedes adopt into their language?

I know that they invented "curl". Do you tar xfz?

Re:Greppability is an underrated code metric by scbrg on Tuesday September 03, 2024 @04:12AM (#41432518)
We do tar, for xfz I think you have to look to the Slavic languages :)

Anyway, to answer your question:

  $ grep -Fxf <(ls -1 /bin) /usr/share/dict/swedish 
  ack
  ar
  as
  black
  dialog
  dig
  du
  ebb
  ed
  editor
  finger
  flock
  gem
  glade
  grep
  id
  import
  last
  less
  make
  man
  montage
  pager
  pass
  pc
  plog
  red
  reset
  rev
  sed
  sort
  sorter
  split
  stat
  tar
  test
  transform
  vi
:)
Re:Greppability is an underrated code metric by pbhjpbhj on Tuesday September 03, 2024 @06:47AM (#41433471)
Pitchfork? As in something that might be used to search a haystack?? How delightful.
Re:Greppability is an underrated code metric by sshine on Tuesday September 03, 2024 @11:08AM (#41435685)
Yeah, that’s one type.

Another is for turning soil at a small scale by hand (also called a cultivator, I think).

But they all have somewhat long prongs.

Re:Greppability is an underrated code metric by lukan on Tuesday September 03, 2024 @03:38AM (#41432316)
As far as I understood, it was part of the language before.

The german equivalent of the word would be probably "greifbar". Being able to hold something, usually used metaphorically.

Re:Greppability is an underrated code metric by ManuelKiessling on Tuesday September 03, 2024 @03:51AM (#41432395)
Which leads to "begreifbar", which I would explain/translate (badly) with "something is begreifbar if it can be understood".
Re:Greppability is an underrated code metric by kagevf on Tuesday September 03, 2024 @03:42AM (#41432330)
> able to hold

Would "grasp" work?

Re:Greppability is an underrated code metric by octocop on Tuesday September 03, 2024 @03:58AM (#41432438)
It's closer to grip
Re:Greppability is an underrated code metric by n_plus_1_acc on Tuesday September 03, 2024 @04:41AM (#41432692)
I've always related grep to grab
Re:Greppability is an underrated code metric by trashtester on Tuesday September 03, 2024 @06:18AM (#41433301)
"zu greifen" may best translate to "to grip", but "grip" has different mental connotations in English (it refers to mental stability, not intellectual insight).

The best dual purpose translation of "zu greifen"/"gripe" (German/Scandinavian) meaning "zu begreifen"/"begripe"/"understand" would be "to grasp", which covers both physically grabbing into something and also to understand it intellectually.

All these words stem back to the Proto-Indo-European gʰrebʰ, which more or less completes the circle back to "grep".

Re:Greppability is an underrated code metric by lordgrenville on Tuesday September 03, 2024 @07:54AM (#41434011)
related to "grok"?
Re:Greppability is an underrated code metric by trashtester on Tuesday September 03, 2024 @08:58AM (#41434522)
grok /ɡrɒk/

Origin 1960s: a word invented by Robert Heinlein (1907–88), American author.

Re:Greppability is an underrated code metric by actionfromafar on Tuesday September 03, 2024 @06:43AM (#41433441)
Yes. "Grasping for straws."
Re:Greppability is an underrated code metric by tripzilch on Tuesday September 03, 2024 @04:56AM (#41432799)
I learned from bash.org that "tar -xzvf" is in German accent for "xtract ze vucking files".
Re:Greppability is an underrated code metric by Tmpod on Tuesday September 03, 2024 @07:21PM (#41440301)
A classic
Re:Greppability is an underrated code metric by Aachen on Wednesday September 04, 2024 @04:59AM (#41443427)
Party pooper checking in: easier to remember is that v is the verbose option in most tools, x and f you already know, z is auto-detected for as long as I remember so you don't need to pass that. Add c for creating an archive and, congratulations, you can now do 90% of the tasks you'll ever want to do with tar, especially defusing xkcd bombs!

(To go for 99%, add t for testing an archive to your repertoire. This is all I ever use; anything else I do with the relevant tools that I already know, like compression settings `tar c . | zstd -19 > my.tar.zstd` or extracting to a folder `cd /to/here && tar x ~/Downloads/ar.tar`. I'm sure tar has options for all this but that's not the one thing it should do and do well.)

I hadn't heard of the German option but I love it, shame really that z is obsolete :(

Re:Greppability is an underrated code metric by tripzilch on Wednesday September 04, 2024 @06:25AM (#41443975)
I mean, you're not wrong. Learning what stuff means is good :) But there's also the part where making up a ridiculous story, pun or such enables it being a very strong mnemonic.

I know v is just the verbose option, though I didn't know z was autodetected.

Way back (~15y or so?) I was reading bash.org just for the jokes cause I was on IRC, I knew what a tar/tar.gz file is, but I had never needed to extract one from the command line (might've been on Windows back then). However, because I remembered the funny joke, the first time I was on a Linux system confronted with a tgz, I knew exactly what to type :)

Honestly to this day, I've never needed to create a tar archive, only to unpack them (when I need to archive+compress files it's usually to send to other people, and I pick zip cause everyone can deal with it). But `tar --help` and `man tar` are there in case I ever might.