Subject: [clisp-list] Support of Windows' \\mymachine\mydir\myfile namestrings?

From: Georges KO <[email-masked]>
Date: 02 Jan 2001 12:40:21 +0800

Hello,

    Will there be support for namestrings such as above?

    Thanks.
-- 
 Georges KO (Taipei, Taiwan)      2001-01-02      [email-masked] / ICQ: 8719684
                                                     Day 2 of week 1 of 2001

---

From: Sam Steingold <[email-masked]>
Date: 02 Jan 2001 17:27:23 -0500

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Support of Windows' \\mymachine\mydir\myfile namestrings?"
> * Sent on 02 Jan 2001 12:40:21 +0800
> * Honorable Georges KO <[email-masked]> writes:
>

http://clisp.sourceforge.net/impnotes.html#filenames says that the
`host' component of a pathname is always nil - Bruno, how important is
this requirement for you? (pathname.d seems not to assume this, but it
always wants to concat them as host:/path/ -- BTW, much as I hate
windows, //host/path makes more sense than host:/path since ":" is a
valid filename char while zero length filenames are not allowed, so the
windows way is less ambiguous)

since win32 CreateFile can take strings like \\host\dir\name.ext, it
makes sense to modify `parse-namestring' and `namestring' to handle
such strings properly:

now:
(parse-namestring "\\\\host\\dir\\name.ext")
==>
#S(pathname :host nil :device nil :directory (:absolute "" "host" "dir")
   :name "name" :type "ext" :version nil)
should be:
#S(pathname :host "host" :device nil :directory (:absolute "dir")
   :name "name" :type "ext" :version nil)

unfortunately, something deep is amiss there:

(let ((a "\\\\host\\dir\\name.ext"))
  (string= a (namestring (parse-namestring a))))
        ==> T

so obviously some other change is necessary too.
(it appears that the default device gets in the way - I don't have time
to investigate further right now, I hope Bruno will tell you more...)

--
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
If You Want Breakfast In Bed, Sleep In the Kitchen.

---

From: Bruno Haible <[email-masked]>
Date: Wed, 3 Jan 2001 14:59:28 +0100 (CET)

Sam Steingold:
> this requirement for you?

This is not a requirement; it's a description of what the
implementation currently does. And it does it because Georges Ko is
the first one who realized that it could be useful. (At the time I did
the Win32 port, this \\hostname\subdir\filename.type syntax wasn't
frequently used.)

Bruno

---

From: Georges KO <[email-masked]>
Date: 06 Jan 2001 12:18:23 +0800

Bruno Haible <[email-masked]> writes:

> the first one who realized that it could be useful. (At the time I
> did the Win32 port, this \\hostname\subdir\filename.type syntax wasn't
> frequently used.)

    Well, it would be nice if this kind of namestrings was
implemented, as I need to do things such as probe-file, load, open,
etc. on a set of Windows machines.

    Georges.
-- 
 Georges KO (Taipei, Taiwan)      2001-01-06      [email-masked] / ICQ: 8719684
                                         Jour 6 de la semaine 1 de l'an 2001

---

From: Sam Steingold <[email-masked]>
Date: 06 Jan 2001 23:38:26 -0500

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] Support of Windows' \\mymachine\mydir\myfile namestrings?"
> * Sent on 06 Jan 2001 12:18:23 +0800
> > (At the time I did the Win32 port, this
> > \\hostname\subdir\filename.type syntax wasn't frequently used.)
> 

done - see the current CVS or the snapshots on cellar.goems.com (it will
be up for some time, but not for long, I hope to move the snapshots
infrastructure either to sourceforge or to cons.org).

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Never trust a man who can count to 1024 on his fingers.

---

From: Georges KO <[email-masked]>
Date: 09 Jan 2001 22:50:55 +0800

> infrastructure either to sourceforge or to cons.org).

    Thanks ! As I have no compiler installed on my machine, is there a
binary version of the latest CVS for Win32 (like, the one you got when
you compiled your version) ?

    Also, it seems that passing logical pathnames to open, probe-file,
etc. doesn't work, that is, I have to translate them to pathnames...

    Thanks.

    Georges.
-- 
 Georges KO (Taipei, Taiwan)      2001-01-09      [email-masked] / ICQ: 8719684
                                                     Day 2 of week 2 of 2001

---

From: Sam Steingold <[email-masked]>
Date: 09 Jan 2001 10:10:25 -0500

> * In message <[email-masked]>
> * Sent on 09 Jan 2001 22:50:55 +0800

I could probably create one, but I won't.
Please understand: this is a development version, not even a pretest.
It does contain numerous _known_ bugs.
You would probably be better off using the release.

We do understand that it has been almost a year since the last
release, and we hope to make another release more or less soon (don't
hold your breath though).

> etc. doesn't work, that is, I have to translate them to pathnames...

the next release will have LISP:*PARSE-NAMESTRING-ANSI* (NIL by default,
set to T by LISP:*ANSI* and `-a'), which controls this.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
There's always free cheese in a mousetrap.

---

From: Marco Antoniotti <[email-masked]>
Date: Tue, 9 Jan 2001 10:25:45 -0500

> From: Sam Steingold <[email-masked]>
> Date: 09 Jan 2001 10:10:25 -0500

  ...

> set to T by LISP:*ANSI* and `-a'), which controls this.

What will this entail?  Also, why not make the ANSI behavior the default?

Cheers

-- 
Marco Antoniotti =============================================================
NYU Bioinformatics Group			 tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                          fax  +1 - 212 - 995 4122
New York, NY 10003, USA				 http://galt.mrl.nyu.edu/valis
             Like DNA, such a language [Lisp] does not go out of style.
			      Paul Graham, ANSI Common Lisp

---

From: Sam Steingold <[email-masked]>
Date: 09 Jan 2001 11:18:05 -0500

> * In message <[email-masked]>
> * Sent on Tue, 9 Jan 2001 10:25:45 -0500
> * Honorable Marco Antoniotti <[email-masked]> writes:
>
> What will this entail?

(pathname "host:dir;name.ext") will be the same as
(pathname (translate-logical-pathname "host:dir;name.ext"))

> Also, why not make the ANSI behavior the default?

because win32 paths like "c:\\dir\\name.ext" make logical paths
ambiguous.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
In every non-trivial program there is at least one bug.

---

From: Marco Antoniotti <[email-masked]>
Date: Tue, 9 Jan 2001 13:56:44 -0500

> X-Envelope-To: 	
> Cc: [email-masked], [email-masked]
> Reply-To: [email-masked]
> Mail-Copies-To: never
> Date: 09 Jan 2001 11:18:05 -0500
> User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
> Content-Type: text/plain; charset=us-ascii
> Content-Length: 1002
> 

As it should be.

> because win32 paths like "c:\\dir\\name.ext" make logical paths

You can easily disambiguate this case. The presence of the #\\
character right after the "c:" tells you that this cannot be treated
as a logical pathname.  LWW and ACL do the expected thing. Moreover,
if I the ANSI modality on, what will happen when I say

(pathname "c:\\dir\\name.ext")

?

The problem with the Windows filenames is

    "c:zut.ext."

as the problem with UNIX is

    ".cshrc"

(as per the message just appeared on CLL).

Cheers

---

From: Sam Steingold <[email-masked]>
Date: 10 Jan 2001 10:22:34 -0500

> * In message <[email-masked]>
> * Sent on Tue, 9 Jan 2001 13:56:44 -0500

as per the ANSI CL spec, yes.

> as a logical pathname.

what about "c:" and "c:file.path"?

if there are logical pathnames and there is no logical host "c", we must
signal an error.  if this is a physical pathname, we cannot define a
logical host "c".  if we check for existence of logical host "c" before
deciding what kind of pathname this is, than the interpretation of this
path might change with time, which can be a bitch to deal with.

Marco, you are preaching to a converted.

I believe that whatever ANSI said must be implemented no matter how
stupid - just because the users expect it.
I think `-a' should be the default.
Bruno is opposed to it.
The issue is closed as far as we are concerned.
All further question should be directed to Bruno.

--
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Diplomacy is the art of saying "nice doggy" until you can find a rock.