From: Dave <dave@dave.tj>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] blanks in file names
Date: Thu, 11 Jul 2002 02:47:18 -0400 [thread overview]
Message-ID: <200207110647.g6B6lI923214@dave2.dave.tj> (raw)
In-Reply-To: <20020711020105.C82D119A63@mail.cse.psu.edu> from <"anothy@cosym.net"@Jul>
Reply inline:
- Dave
anothy@cosym.net wrote:
>
> on the "linked lists for paths instead of strings with /" topic:
> while i can see how this could be interesting to persue, from a
> systems architecture research point of view, i'm unclear on how
> exactly this helps us solve any of the problems people are
> talking about. maybe i'm just missing something; if so, please
> clue me in. but here's what i don't see:
This won't directly solve any userland problems, because it's a kernel
level change. However, it _will_ provide the foundation necessary for
a real makeover for our shell, so it becomes a true translator between
the kernel and the user (what it was always meant to be).
>
> first, it seems your suggestion is primarialy aimed at allowing
> "/" in file names (perhaps some argument about generality or
> interoperation with DOS-derived systems and "\" could be made,
> as well). okay, i can see the theoretical benefit there (but it
> strikes me as a much more dubious gain than spaces in file
> names). but what would this system _look_ like, from a user's
> point of view? what would the output of `pwd' be? a list of
> strings? but how can i store a representation of that? wouldn't
> that involve lots of interaction with the shell, or whatever
> else was doing the interpretation (like $path does, although
> that's used is very few places, and is very function-specific,
> so isn't really much of an issue)?
I remarked in a couple of my previous posts about the subject, but let
me show some examples of what I mean:
Let's say we have a shell that uses C-style encoding, and we're in a
directory called (using a C-syntax string) "/usr/\/\\\n\'blah":
crazysh> pwd
/usr//\
'blah
crazysh> pwd --unambiguous
/usr/\/\\\n\'blah
crazysh> ls
What's wrong with you?
You don't want to know what's in this directory ;-/
crazysh> ls --unambiguous
What\'s wrong with you\?
\0\0\0
You don\'t want to know what\'s in this directory ;-\/
crazysh> exit
You'll notice that the initial pwd command prints the directory in
easy-for-human-to-read format - what it was "meant" to look like.
The second command runs the same program as the first command, but the
_shell_ (not the pwd command!) is given the --unambiguous option so
it prints the resulting path in its native (C-style encoding) format.
(Programs don't produce "text" as output; they produce "objects," which
- as I remarked in a previous post - may be filenames, strings, etc.)
The third command prints a directory listing in easy-for-human-to-read
format, and the fourth tells the shell to print ls' output filenames in
C-style rather than raw form (where you'll notice a file consisting of
nothing but NULLs suddenly appears - a neat trick that can make users
of other OSs quite jealous).
Obviously, a user may opt for a shell using URL encoding as its default
encoding, or even replace the "raw" encoding with URL/C/etc. encoding.
It's all a matter of personal preference, and the kernel isn't involved
at all ... nor is any filesystem code.
>
> second, i'm just not seeing at all how this helps us address
> spaces in file names (and maybe it wasn't meant to; this
> thread has wandered a bit). the dificult part of the problem
> (perhaps the entirety of the problem) seems to lie in getting
> the various tools that need to communicate to understand the
> edges of file names: things like "grep `{ls} foo". i fail to
> see how any of the kernel changes (or library additions) you
> propose even talk to this realm of problem.
Well, if you're using C-style syntax, filename edges are simply newlines.
If you're using url encoding, spaces seperate filenames. If you're using
Base64 (which I believe any human would have to be crazy to do, but I
see no reason for the system to stop crazy people), you'd have plenty
of choices for filename edges. You just have to make sure the both
sides of the pipe are working with the same encoding. (e.g., "crazysh>
program-outputting-in-url | program-expecting-in-c" ain't gonna work,
but most of your userland programs would probably ship with your shell
or offer optionss to support your shell's encoding (or if your shell
uses an uncommon encoding, it might provide programs to convert to/from
more common encodings).)
>
> third: want newline too?
A general solution should handle all cases. I see no reason not to handle
newlines, too. (In fact, my example above illustrated a lot more than
mere newlines being encoded.)
>
> on another embedded thread, you wrote:
> // You can do a lot of things if you're prepared to get
> // involved in the functions that your OS should be doing
> // automatically. Try running an FTP mirror to a busy site
> // that way, though, and you'll quickly discover...
>
> that you've completely missed what dan was saying? he (and
> Nemo before him) was talking about the ability of Plan 9's
> dump to back out changes to kernel, library, and utilitys
> uniformly. i don't have a clue what FTP or HTTP mirrors or
> "things your OS should do automatically" have to do with
> any of this. are we just having unrelated conversations at
> each other?
I was pointing out that yesterday doesn't even attempt to address
the problem I was referring to (keeping an FTP mirror up-to-date).
I (thought I) understood that he was proposing to run a filter on files
he's mirroring. My answer was quite simply that doing so is unfeasible
on a large scale. I hope that clarifies a bit :-)
> ã¢
>
next prev parent reply other threads:[~2002-07-11 6:47 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-11 1:41 anothy
[not found] ` <"anothy@cosym.net"@Jul>
2002-07-11 6:47 ` Dave [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-15 4:03 Geoff Collyer
2002-07-15 14:53 ` Jack Johnson
2002-07-21 19:52 ` Dave
2002-07-21 19:47 ` Dave
2002-07-14 18:28 rob pike, esq.
2002-07-11 23:56 okamoto
2002-07-11 8:39 Geoff Collyer
2002-07-14 18:13 ` Dave
2002-07-11 5:50 okamoto
2002-07-10 18:27 David Gordon Hogan
2002-07-10 20:56 ` arisawa
2002-07-10 8:00 Fco.J.Ballesteros
2002-07-09 7:54 Fco.J.Ballesteros
2002-07-09 1:08 okamoto
2002-07-08 23:19 David Gordon Hogan
2002-07-08 23:30 ` Dave
2002-07-08 20:22 rob pike, esq.
2002-07-08 21:21 ` Dave
2002-07-08 23:27 ` Dan Cross
2002-07-08 23:30 ` Dan Cross
2002-07-08 12:18 forsyth
[not found] ` <"forsyth@caldo.demon.co.uk"@Jul>
2002-07-08 20:42 ` Dave
2002-07-08 8:59 Fco.J.Ballesteros
[not found] ` <Fco.J.Ballesteros@Jul>
2002-07-08 20:18 ` Dave
2002-07-09 15:23 ` Dave
2002-07-10 16:02 ` Dave
2002-07-10 20:59 ` FJ Ballesteros
2002-07-10 21:51 ` Dave
2002-07-10 22:22 ` Dan Cross
2002-07-10 23:01 ` Dave
2002-07-11 2:00 ` Dan Cross
2002-07-11 6:14 ` Dave
2002-07-11 6:38 ` Lucio De Re
2002-07-14 18:00 ` Dave
2002-07-11 13:14 ` arisawa
2002-07-12 12:28 ` arisawa
2002-07-11 16:23 ` Dan Cross
2002-07-11 10:43 ` Ish Rattan
2002-07-14 18:49 ` Dave
2002-07-08 0:38 Scott Schwartz
2002-07-07 5:59 Geoff Collyer
2002-07-05 19:21 David Gordon Hogan
2002-07-05 19:52 ` Jim Choate
2002-07-05 20:10 ` Mark Bitting
2002-07-05 18:26 Sape Mullender
2002-07-05 18:23 David Gordon Hogan
2002-07-05 1:21 okamoto
[not found] <20020703160003.27491.58783.Mailman@psuvax1.cse.psu.edu>
2002-07-04 23:35 ` Andrew Simmons
2002-07-04 22:42 ` Sam
2002-07-04 22:44 ` Sam
2002-07-08 16:14 ` ozan s yigit
2002-07-04 12:26 Fco.J.Ballesteros
2002-07-04 12:20 forsyth
2002-07-04 11:37 Fco.J.Ballesteros
2002-07-04 11:36 rog
2002-07-04 9:50 Fco.J.Ballesteros
2002-07-04 9:41 forsyth
2002-07-04 8:31 Fco.J.Ballesteros
2002-07-04 8:22 forsyth
2002-07-04 7:53 Fco.J.Ballesteros
2002-07-04 7:47 Fco.J.Ballesteros
2002-07-04 6:34 forsyth
2002-07-04 7:39 ` Lucio De Re
2002-07-04 9:32 ` Nikolai SAOUKH
2002-07-03 8:00 Fco.J.Ballesteros
2002-07-03 12:00 ` Lucio De Re
2002-07-03 19:39 ` rob pike, esq.
2002-07-07 4:02 ` Dave
2002-07-07 5:17 ` arisawa
[not found] ` <"arisawa@ar.aichi-u.ac.jp"@Jul>
2002-07-07 5:38 ` Dave
2002-07-07 6:04 ` arisawa
2002-07-07 7:16 ` arisawa
2002-07-07 16:11 ` Dave
2002-07-07 16:12 ` Dave
2002-07-10 21:58 ` Dave
2002-07-10 22:38 ` arisawa
2002-07-11 5:10 ` Dave
2002-07-14 18:32 ` Dave
2002-07-14 18:51 ` Jim Choate
2002-07-14 23:27 ` arisawa
2002-07-08 9:48 ` Boyd Roberts
2002-07-08 20:22 ` Dave
2002-07-09 8:24 ` Boyd Roberts
2002-07-09 15:25 ` Dave
2002-07-08 23:05 ` Berry Kercheval
2002-07-02 18:14 rog
2002-07-02 23:08 ` Dan Cross
2002-07-02 11:09 forsyth
2002-07-02 11:53 ` matt
2002-07-02 13:29 ` Boyd Roberts
2002-07-02 14:57 ` FJ Ballesteros
2002-07-02 16:23 ` Lucio De Re
2002-07-03 19:21 ` rob pike, esq.
2002-07-03 14:31 ` FJ Ballesteros
2002-07-02 18:28 ` plan9
2002-07-03 13:54 ` arisawa
2002-07-03 14:24 ` FJ Ballesteros
2002-07-03 19:40 ` rob pike, esq.
2002-07-03 22:10 ` arisawa
2002-07-04 8:30 ` Ralph Corderoy
2002-07-02 9:53 Fco.J.Ballesteros
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=200207110647.g6B6lI923214@dave2.dave.tj \
--to=dave@dave.tj \
--cc=9fans@cse.psu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).