English Idiom in Unix: Directory Recursively

S

Steven D'Aprano

But not to digress, the /real/ problem with commands or idioms like "rm
-r" is /not/ their choice of option names but that they explain these
options in the exact same terms. No one would have a problem with "-r,
--recursive -- remove directories including all sub-directories" instead
of "-r, --recursive -- remove directories and their contents
recursively".

I think you are understanding the description "remove directories and
their contents recursively" as a description of the *mechanism* by which
rm removes the directory, i.e. some recursive tree-walking function that
visits each node and deletes it.

I don't believe that's how the description is meant to be understood. I
understand it as describing the effect, not the implementation. If the
tree-walker was re-written to be iterative, the description would not
need to be changed. It is meant to be understood as:

rm -r foo

* deletes foo
* deletes things inside foo
* if any of those things inside foo are directories, delete them too, in
exactly the same way (i.e. "recursively").

Notice that, strictly speaking, the description is impossible. You can't
delete the top level directory first. But that's how the human reader
will understand it:

* delete the directory you point it at, plus the things inside it in the
same way

rather than how the implementation (probably) does it:

* drill down all the way to the bottom, start deleting like mad, and work
your way back up the stack, deleting as you go.


You're interpreting the reference to "recursive" as a nod to the
implementation. I'm not, and therefore your arguments don't convince me.
 
T

Thorsten Kampe

* Steven D'Aprano (26 May 2011 10:06:44 GMT)
I think you are understanding the description "remove directories and
their contents recursively" as a description of the *mechanism* by which
rm removes the directory, i.e. some recursive tree-walking function that
visits each node and deletes it.

I don't believe that's how the description is meant to be understood. I
understand it as describing the effect, not the implementation.

It doesn't matter how I interprete the explanation "-r = recursively
delete". What matters is that I have to explain (interpret, translate
the explanation.
You're interpreting the reference to "recursive" as a nod to the
implementation. I'm not, and therefore your arguments don't convince
me.

No one understands what "recursively delete" means until someone
explains ("translates") it to him. This is not an argument but a simple
fact. I experienced it many times, others here in the thread did and
probably you, too.

"recursively delete" is completely unneccessary because there is already
a simple explanation that everyone understands without translation
("delete including subdirectories").

It's unnecessary bullshit buzzword bingo from nerds which adds or helps
or explains nothing. It's just that simple.

Thorsten
 
C

Charles

Thorsten Kampe said:
If someone has learned what a directory or folder is, you don't have to
explain what "include sub-folders" means. Instead of creating a new
mysterious term ("recursively delete"), you simply explain stuff by re-
using an already existing term. It's just that simple.

I'm a native english speaker, and to me there is a difference between
"delete directory and sub-directories" (or folders and sub-folders if you
follow Microsoft's naming conventions) and "recursively delete". I know
english is very ambiguous, but to me "directory and sub-directories"
does not necessarily imply sub-directories of sub-directories and so
on, while "recursively delete" does carry the connotation of deleting the
sub-directories of sub-directories and sub-directories of sub-directories
of sub-directories and so on.


Charles
 
C

Chris Angelico

I just conducted a rapid poll of a non-technical userbase.

(Okay, I just asked my sister who happens to be sitting here. But
she's nontechnical.)

She explained "recursive" as "it repeats until it can't go any
further". I think that's a fair, if not perfectly accurate,
explanation.

Actually... if we accept that one iteration is deleting all files from
one depth level, then yes, the algorithm repeats that operation. And
I'm using "iteration" here without implying that it's an iterative
function.

Chris Angelico
 
T

Thorsten Kampe

* Charles (Thu, 26 May 2011 20:58:35 +1000)
I'm a native english speaker, and to me there is a difference between
"delete directory and sub-directories" (or folders and sub-folders if
you follow Microsoft's naming conventions) and "recursively delete". I
know english is very ambiguous, but to me "directory and
sub-directories" does not necessarily imply sub-directories of
sub-directories and so on,

Are we playing word games here? You can easily improve my example to
"delete directory and all sub-directories beneath". Or "delete directory
and all sub-directories beneath and all content". Or "delete directory
and all files and directories within".
while "recursively delete" does carry the connotation of deleting the
sub-directories of sub-directories and sub-directories of
sub-directories of sub-directories and so on.

Sure. Because you already know what it means (someone has already
translated it to you long time ago).

Did your mom tell you to "recursively clean up your room"?.

Does my file manager ask me "are you sure you want to recursively delete
the folder?"? No, it asks 'are you sure you want to remove folder
"folder name" and all its contents?'.

Thorsten
 
C

Chris Angelico

Did your mom tell you to "recursively clean up your room"?.

Considering that I don't have a wardrobe with a portal to Narnia, no,
she has never had to tell me to clean up the room inside my room.

Anyway, my room's full. There's no room in it anywhere. :)

Chris Angelico
 
X

Xah Lee

Did your mom tell you to "recursively clean up your room"?.

that had me L O L!

i think i'll quote in my unix hating blogs sometimes, if you don't
mind. ☺

Xah
 
H

harrismh777

Steven said:
You really do
need to know whether the car you drive uses leaded or unleaded.

Actually, you need to know whether your car can burn 85 gas (at
about 60 cents /gallon cheaper... and, whether 85 gas will have enough
energy to move the car without using 35% more fuel... making it about
$1.00 /gallon more expensive.... ehem.



:-}
 
D

David Schwartz

Indeed. And the algorithms that are employed to perform the operations
so described are recursive.

Actually, they almost never are. Iterative algorithms are almost
always used to avoid a stack explosion. However, the terminology is
still correct. When you are asked if the operation should be performed
recursively, it is asking whether you want the same effect you would
get if a recursive algorithm was used.

Essentially, there is an implied 'as if' rule. The user doesn't care
how the program accomplishes the task, the user just needs to specify
what task the program should accomplish. This is common throughout the
discipline of programming. (Most standards have an explicit 'as if'
rule that says that when the standard specifies X, they don't
literally mean that X must happen. They mean the behavior must be
indistinguishable from X happening.)

DS
 
R

Rikishi42

I know many people who have no idea what a directory is, let alone a
subdirectory, unless it's the phone directory. They're non-computer
users. Once they start using computers, they quickly work out what the
word means in context, or they ask and get told, and then they've learned
a new word and never need ask again. This is a good thing.

The idiom of "recursively delete" is no different. Of course some people
will have to learn a new term in order to make sense of it. So what?

OK, but the addition of recursive, is not really usefull, is it? Deleting
the directory says it, doesn't it?

I know many people who incinerate leaves in an incinerator. Or at least
they used to, until the government here banned it. It might only have
been a 44 gallon drum with holes punched in the side, but they still
called it an incinerator.

I learned that word from my father, who left school at 14 to work in a
shoe shop. He isn't especially educated, doesn't read much beyond the
daily tabloid, and thinks Benny Hill is the height of wit. But he's not
an idiot and even at 72 is capable of learning new words.

Is it that widespread? I figured most people woul speak of burning.
OK, my bad if it is.

Why do you think they're called "microwave ovens" instead of "fizzbaz
ovens"? Could it possibly have something to do with the fact that they
cook with microwaves?

So not actually "just a name" at all. It's a jargon description of the
implementation of the oven.

True, but I meant that they just use it as a name. I don't think many people
would actually try to find out what a microwave is.

What's a gas pedal? Is that some strange American term for what most of
the English-speaking world knows as the accelerator? *wink*


Oh, come one. I'm sure I've heard that often enough NOT to have imagined it.

That would be brake, and decelerator.

Sorry. But I actually have a excuse for those. (see below) ;-)

You can't force people to learn new words, although you would be
surprised how even the most disinterested, lazy speaker manages to pick
up vocabulary without even being aware of it.

I know, I'm one.

But nor do you have to pander to the slackers. They can learn the word,
or not, I don't care. If I'm writing for an audience of children, or
English as a second language, or the otherwise linguistically challenged,

Third, actually. But I do try. ;-)

I'll simplify my vocabulary appropriately. For everyone else, I'll use an
ordinary adult vocabulary, and that includes the word "recursion" or
"recursive". It's hardly technical jargon -- I've found a discussion of
gangsta rap that uses it. Even children understand the concept of
recursion (self-reference). People put it in comedies like Blazing
Saddles and Space Balls! How difficult is it to put a name to the concept?



Pedantic... that's another one of those academic words that need to be
explained to lay people, isn't it? As is academic itself, and in fact
"lay people". Who uses "lay people" in conversation?

That (lay people) was atually a quote, from someone who actually used it in
this thread.

I think you *grossly* underestimate how many words people know,
particularly if you include so-called "passive vocabulary" (words people
can understand in context, but not define precisely). See, for example:

http://www.worldwidewords.org/articles/howmany.htm

Got a point, there.
 
C

Chris Angelico

Is it [the term 'incinerate'] that widespread? I figured most people
woul speak of burning. OK, my bad if it is.

I think it's geographic. This list covers a lot of geography; I'm in
Australia, there are quite a few Brits, and probably the bulk of posts
come from either the US or Europe. (And yes, I did deliberately fold
all of Europe down to one entity, and I did also deliberately leave
Great Britain out of that entity.)
True, but I meant that they just use it as a name. I don't think many people
would actually try to find out what a microwave is.

Most things work out that way. A thing gets a name based either on its
implementation or on the brand name of the first/most popular one. If
the only microwave oven ever produced had been made by Foobar Corp,
and that company were not known for anything else, then quite possibly
everyone would call them "foobar ovens".
That (lay people) was atually a quote, from someone who actually used it in
this thread.

"Lay person"/"lay people" is a fairly common expression, although
"laity" (which ought to mean the same thing) seems only to have
meaning in a church context (as in, the non-clergy).

Geeks tend to have larger vocabularies than non-geeks, on average;
probably akin to our love of word games and precision (two distinct
notions that bridge surprisingly often).

Chris Angelico
 
C

Chris Angelico

The beginning of wisdom is to call things by their right names. - Chinese
Proverb (So I'm told at least, I'd check with the Chinese first though ;)

See, I thought it was "The fear of the Lord is the beginning of
wisdom", but the Chinese don't worship Yahweh, so I guess they
wouldn't say that. Proverbs chapter 9 verse 10, in any case. :)

Chris Angelico
yes, bit of a Bible geek as well as a programming geek
 
S

Steven D'Aprano

Geeks tend to have larger vocabularies than non-geeks, on average;
probably akin to our love of word games and precision (two distinct
notions that bridge surprisingly often).

And also because more educated people in general tend to have larger
vocabularies than less educated people: both for the number of words they
actually use, and those they can interpret in context.

Geeks sometimes tend to forget that they're not the only smart, educated
people who use "hard" (big, technical, complicated) words.
 
R

rantingrick

It's interesting to note that the definitions of 'recursive' to be found
in Wikipedia and Wiktionary have very little in common with the
definitions to be found in the dictionaries covered by Onelook.  No
wonder experts in different areas have trouble communicating with one
another.

Yes, and when you extrapolate that conclusion into the current hodge
podge of natural languages you begin to understand the genesis of
human beings selfish nature.
 
R

rantingrick

If you tell a joke, you have to tell it right.

Jeez, speaking of bad colloquialisms...

"""if you're going to "share" a joke you should at least "recite" it
CORRECTLY."""

Thank you.
 
R

rantingrick

If you tell a joke, you have to tell it right.

Jeez, speaking of bad colloquialisms...

"""if you're going to "share" a joke you should at least "recite" it
CORRECTLY."""

Thank you.
 
R

rantingrick

In the emacs case: “Recursive delete of xx? (y or n) ”, what could it
possibly mean by the word “recursive” there? Like, it might delete the
directory but not delete all files in it?

Actually i think this case is more for "scare factor" than anything.
As in... Do you really want to destroy all these files FOREVER AND
EVER or did your mouse finger slip... again?
 
R

rantingrick

Trust me on this, if the audience of Carry On films could understand
recursion, anyone can!

Well we could also say that this pathetic display of metal
masturbation is recursive also.
 
R

rantingrick

Gas pedal. Pedal was allraedy known when the car was invented. The simple
addition of gas solved that need. Oh, and it's break pedal, not
descellarator. (sp?)

Yes "Gas Pedal"... that clears up all the confusion </sarcasm>.
However i would have thought if the vehicle had a "decelerator petal"
it would at least sport a complimentary "accelerator petal". You know
the whole "equal and opposite thing"?
I'm one of the 'people'. You say exposed to, I say bothered/bored with.

I have nothing against the use of a proper, precise term. And that word can
be a complex one with many, many sylables (seems to add value, somehow).

But I'm not an academic, so I don't admire the pedantic use of terms that
need to be explained to 'lay' people. Especially if there is a widespread,
usually shorter and much simpler one for it. A pointless effort if
pointless, even when comming from a physicist.  :)

You may be "right", but then again, who knows, you may be left? In
this upside down world of layperson colloquialisms -- which ironic-ly
enough are devised to "ease communication"... right? I mean i "used
to" think that choosing words that clearly described my intentions was
a good idea but heck, i would hate to think that those poor laypeople
had to languish though such tongue twisting syllable gymnastics just
for the sake of clear communications.
 
R

rantingrick

Americans might call it a gas pedal. We call it an accelerator. You
don't have a "decelerator pedal" though, because it's more accurately
called a "brake pedal" because it controls the brakes.

Actually the same argument could be applied to your observation of the
driver to vehicle interface. You say "brake petal" simple because it
controls the brakes. Well then what does the "accelerator" control
then?

Most wise observers would blubber... "I know, I know, it controls the
gas!"...and while partially correct they would be mostly wrong. Yes it
does control the "gas" but not in a direct way. Of course technically
it depends on implementation (a favorite word around c.l.py it seems
*rolls-eyes*).

In the days of carburetors the "accelerator" actually controlled a big
flap. This "big flap" (An attribute of which many round here seem to
posses and use generously) is opened to allow air to enter and the gas
is mixed into the air by secondary effect.

So if we really wanted to get pedantic we should call it an "air
petal"? However considering that any vehicle made after the early
nineties is fuel injected (which is controlled by a computer!) then we
may want to call it a "puter petal" to be precise.

Note: The remainder of your post was lucid and informative.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top