From: Daniel B. <da...@te...> - 2001-10-29 00:39:30
|
Rahul Jain <ra...@ri...> writes: > On Sun, Oct 28, 2001 at 03:35:29PM +0100, Peter Van Eynde wrote: > > Hi people, > > > > Am I right in wondering why ACL 6 does: > > > > CL-USER(27): (pathname-directory #p"/usr/share/common-lisp/" :case :common) > > (:ABSOLUTE "usr" "share" "common-lisp") > > CL-USER(28): (pathname-directory #p"/usr/share/common-lisp/" :case :local) > > (:ABSOLUTE "usr" "share" "common-lisp") Lovely. Remember that #p will merge the hostname component of *default-pathname-defaults* at _read_ time - if that's a logical host, you may get different answers. But this is ACL, of course. Is there some kind of wacko extra-standard case munging going on elsewhere as well? > CL-USER 1 > (pathname-directory #p"/usr/share/common-lisp/" :case :common) > (:ABSOLUTE NIL NIL NIL) That, as far as I can see, is unequivocally wrong. Well, OK, it could be right, but not without a seriously weird interpretation of what a namestring syntax is > > The longer I think about it the longer I think that going to URI's would > > be best. It would cut our losses in the logical pathname fight :-). > > It would also remove the ability for us to even think about case > conversion. For a language like Java, I'd expect this kind of feature. > For Lisp, I wouldn't. I've never seen a situation where the case conversion does anything I wanted it to. The claimed use for case conversion is so that pathnames embedded in Lisp code (as opposed to pathnames provided by the user) can use a "standard" syntax which is transformed to whatever is usual for the host filesystem. Passing over the fact that on a Unix box we don't even know what that convention _is_ just by looking at the hostname (think about NFS mounts to FAT/VFAT/NTFS/VMS filesystems) it's still only half the problem because to do a _proper_ job of translation we'd also need to know what the allowable characters are and what the allowable length is. And then we want to start talking about files that have been processed more than once. Does foo.tar.gz have type "gz" or type "tar.gz"? What type is .cshrc? The CL pathname system really needs to decide whether it's (a) a system-independent api for accessing host file names, or (b) a translation system such that "lisp" path names can be mapped onto it. [ And LPN makes it worse, not better. Basically you can only use LPN if you don't care what the underlying file is actually called, because you get no guarantees that different implementations on the same OS will translate compatibly. What does this mean - this means you can't ship a tar file with a defsystem file that uses LPN to refer to the files in the tarchive, and expect it to work on any implementation you haven't tested it on to make sure it maps stuff the same way as the others. Great. Oh, and the absurdly constrained set of allowable characters is not what i would consider a feature either ] > What we DO need is for some sort of sane interpretation of the Pathname > chapter of the spec to surface and then for all the implementations to > adopt that. I think I've ranted on this topic before. If ACL, at $4000/seat or whatever it is, still haven't got pathnames right, that suggests to me that either (a) nobody understands it, (b) no paying customer is using it and cares enough to file bugs, or (c) they've decided that fixing it now is going to break too many apps that are dependent on the old behaviour. Basically, I'm not optimistic. (Nominally, asdf is stalled on pathname case issues. In practice it's stalled on me having run out of free time, but the thought that the next thing needing fixing is pathname case is not motivating me to prioritize it at all) -dan -- http://ww.telent.net/cliki/ - Link farm for free CL-on-Unix resources |