All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Dabbs" <david@dabbs.net>
To: 'Hans Reiser' <reiser@namesys.com>
Cc: linux-fsdevel@vger.kernel.org,
	'ReiserFS List' <reiserfs-list@namesys.com>
Subject: RE: [RFC] Pathname Semantics with //
Date: Thu, 9 Sep 2004 14:21:18 -0500	[thread overview]
Message-ID: <20040909191641.A33B315E8B@mail03.powweb.com> (raw)
In-Reply-To: <413F2FBD.9070304@namesys.com>



> 
> Use of : in addition to / is a bad idea, see The Hideous Name by Rob
> Pike for why.
> 
> Hans
> 

I've read The Hideous Name, and I think you're taking Pike out of context.
He wrote that document when device files were still only a part of a
research version of UNIX. His main point is that programs should not be
saddled with understanding physical devices when constructing filenames. 


Regarding use of colons in file name spaces, I find the following:

>name of a file is a string that identifies the disk drive holding the file.
>Syntax separates these componentsof the name; MS-DOS uses a colon following
>the disk name, a single character: 
>
>A:FILE is a file on disk drive A, while 
>B:FILE is a file on disk drive B. 
>
>The advantage of putting such information in names is that software need
>not know about disks tomanipulate files. Internally, of course, system
>software must use the syntax of the name to locate the file,

The colon itself is not at question here, but the fact that MSDOS naming
forces software to know about disks to manipulate files.


>ucbvax were a gateway we could access files on a distant machine as
>UCBVAX::KREMVAX::file, it is only because the semantics of :: explicitly
>permit such access. The :: operator is implemented by passing the string
>after it to the remote machine, but first checking its syn-tax, so the file
>name parser must have special code for multiple ::'s. 

So what if VMS used two colons? They could have been tildes. The colon was
incident to his primary point:

>Instead, if names had multiple components (that is, syntax), where the
>components did not necessarily correspond to physical devices, the name
>space would have the advantages of that of both MVS and MS-DOS, with the
>disadvantages of neither. A good example: UNIX(R)

He later gripes about the colon w.r.t the Ibis remote file system. Again, it
is the same complaint. But we will not be changing paths to the objects
every application understands today. An opaque escape is added to the
beginning and again at the end. Everything in between is standard UNIX
pathnames, though sometimes the use of dot is required where it may be
elided in practice today.


Regarding slashes, I can't find anywhere that Pike criticizes slashes.
Now, I can see where the proposal runs afoul of his advice that:

>The syntax should be clean and uniform; every new syntactic rule requires
>at least one, and usually many, semantic rules to resolve peculiarities
>introduced by the new syntax. If the name space is a tree or any other kind
>of graph, a single character should be used to separate nodes in a name.

Well, the only reason two trailing slashes are required is that we need some
way to distinguish a directory's named streams from its entries. What is
worse, one extra slash at the end of a directory (or two for a file) or
"/metas"?

The SuS is the standards document to which Linux and other Unices attempt to
conform. The proposal inherits the pre-existing double leading slash and the
slash pathname delimiter. If I understand you correctly, you're saying there
is a problem with the slash character. Could you be more specific? I don't
think you're proposing to change Linux path delimiter, are you?

To what the SuS allows, only the dreaded colon is added. As I said in the
proposal, the colon is arbitrary. Also, the colon could be elided for
relative paths, but consistency seemed important. If we patched the VFS,
etc. to support Linux-specific pathname semantics you should (with hope) be
able to do the following without modifying the applications:

   mkdir test
   cd test
   touch foo.txt        # dir entry
   emacs //.//foo.txt   # named stream file

All you had to do was take the existing path, "foo.txt", prepend a special
escape and append two slashes. The new named streams are there only for the
initiated applications and humans. Every other naïve application is happily
ignorant.


David



WARNING: multiple messages have this Message-ID (diff)
From: "David Dabbs" <david@dabbs.net>
To: "'Hans Reiser'" <reiser@namesys.com>
Cc: <linux-fsdevel@vger.kernel.org>,
	"'ReiserFS List'" <reiserfs-list@namesys.com>
Subject: RE: [RFC] Pathname Semantics with //
Date: Thu, 9 Sep 2004 14:21:18 -0500	[thread overview]
Message-ID: <20040909191641.A33B315E8B@mail03.powweb.com> (raw)
In-Reply-To: <413F2FBD.9070304@namesys.com>



> 
> Use of : in addition to / is a bad idea, see The Hideous Name by Rob
> Pike for why.
> 
> Hans
> 

I've read The Hideous Name, and I think you're taking Pike out of context.
He wrote that document when device files were still only a part of a
research version of UNIX. His main point is that programs should not be
saddled with understanding physical devices when constructing filenames. 


Regarding use of colons in file name spaces, I find the following:

>name of a file is a string that identifies the disk drive holding the file.
>Syntax separates these componentsof the name; MS-DOS uses a colon following
>the disk name, a single character: 
>
>A:FILE is a file on disk drive A, while 
>B:FILE is a file on disk drive B. 
>
>The advantage of putting such information in names is that software need
>not know about disks tomanipulate files. Internally, of course, system
>software must use the syntax of the name to locate the file,

The colon itself is not at question here, but the fact that MSDOS naming
forces software to know about disks to manipulate files.


>ucbvax were a gateway we could access files on a distant machine as
>UCBVAX::KREMVAX::file, it is only because the semantics of :: explicitly
>permit such access. The :: operator is implemented by passing the string
>after it to the remote machine, but first checking its syn-tax, so the file
>name parser must have special code for multiple ::'s. 

So what if VMS used two colons? They could have been tildes. The colon was
incident to his primary point:

>Instead, if names had multiple components (that is, syntax), where the
>components did not necessarily correspond to physical devices, the name
>space would have the advantages of that of both MVS and MS-DOS, with the
>disadvantages of neither. A good example: UNIX(R)

He later gripes about the colon w.r.t the Ibis remote file system. Again, it
is the same complaint. But we will not be changing paths to the objects
every application understands today. An opaque escape is added to the
beginning and again at the end. Everything in between is standard UNIX
pathnames, though sometimes the use of dot is required where it may be
elided in practice today.


Regarding slashes, I can't find anywhere that Pike criticizes slashes.
Now, I can see where the proposal runs afoul of his advice that:

>The syntax should be clean and uniform; every new syntactic rule requires
>at least one, and usually many, semantic rules to resolve peculiarities
>introduced by the new syntax. If the name space is a tree or any other kind
>of graph, a single character should be used to separate nodes in a name.

Well, the only reason two trailing slashes are required is that we need some
way to distinguish a directory's named streams from its entries. What is
worse, one extra slash at the end of a directory (or two for a file) or
"/metas"?

The SuS is the standards document to which Linux and other Unices attempt to
conform. The proposal inherits the pre-existing double leading slash and the
slash pathname delimiter. If I understand you correctly, you're saying there
is a problem with the slash character. Could you be more specific? I don't
think you're proposing to change Linux path delimiter, are you?

To what the SuS allows, only the dreaded colon is added. As I said in the
proposal, the colon is arbitrary. Also, the colon could be elided for
relative paths, but consistency seemed important. If we patched the VFS,
etc. to support Linux-specific pathname semantics you should (with hope) be
able to do the following without modifying the applications:

   mkdir test
   cd test
   touch foo.txt        # dir entry
   emacs //.//foo.txt   # named stream file

All you had to do was take the existing path, "foo.txt", prepend a special
escape and append two slashes. The new named streams are there only for the
initiated applications and humans. Every other naïve application is happily
ignorant.


David

  parent reply	other threads:[~2004-09-09 19:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 10:41 [RFC] Pathname Semantics with // David Dabbs
2004-09-09 10:41 ` David Dabbs
2004-09-08 16:13 ` Hans Reiser
2004-09-09 16:36   ` Peter Foldiak
2004-09-09 19:21   ` David Dabbs [this message]
2004-09-09 19:21     ` David Dabbs
2004-09-10  0:49     ` Hans Reiser
2004-09-10  3:06       ` David Dabbs
2004-09-10  3:06         ` David Dabbs
2004-09-10  5:40         ` Hans Reiser
2004-09-09 21:51   ` David Dabbs
2004-09-09 21:51     ` David Dabbs
2004-09-09  6:10     ` Hans Reiser
2004-09-09 17:33 ` Christian Mayrhuber
2004-09-09 20:17   ` David Dabbs
2004-09-09 20:17     ` David Dabbs
2004-09-09 20:41     ` Andreas Dilger
2004-09-10  9:11       ` Markus   Törnqvist
2004-09-10 10:37     ` Christian Mayrhuber
2004-09-09 23:03   ` Jamie Lokier
2004-09-10  1:37     ` David Dabbs
2004-09-10  1:37       ` David Dabbs
2004-09-10  9:53       ` [SPAM] " Jamie Lokier
2004-09-10 17:11         ` David Dabbs
2004-09-10 17:11           ` David Dabbs
2004-09-10 11:47       ` Christian Mayrhuber
2004-09-10 11:06     ` Christian Mayrhuber
  -- strict thread matches above, loose matches on Subject: below --
2004-09-10 17:49 David Dabbs
2004-09-10 17:49 ` David Dabbs
2004-09-09 18:03 ` Hans Reiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040909191641.A33B315E8B@mail03.powweb.com \
    --to=david@dabbs.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.