
Hi, Hrmn, this also seems to provoke an error in CMUCL: * (uiop:ensure-directory-pathname (uiop:parse-native-namestring ".")) Error in function LISP::UNPARSE-UNIX-FILE: Invalid value for a pathname name: "." [Condition of type SIMPLE-ERROR] Maybe that's a clearer bug since it only involves UIOP functions and not any plain Common Lisp stuff? Cheers, Jared On Thu, Jan 7, 2016 at 10:58 AM, Jared C. Davis <jared.c.davis@gmail.com> wrote:
Hi,
Ah, I should have though to include the components instead of the #P format. Here's what I get on the various Lisps for:
(defun show (x) (list :host (pathname-host x) :device (pathname-device x) :directory (pathname-directory x) :name (pathname-name x) :type (pathname-type x) :version (pathname-version x)))
(show (uiop:parse-native-namestring "."))
Cheers, Jared
CCL: (:HOST :UNSPECIFIC :DEVICE NIL :DIRECTORY NIL :NAME NIL :TYPE "" :VERSION NIL)
SBCL: (:HOST #<SB-IMPL::UNIX-HOST {1000F38E53}> :DEVICE NIL :DIRECTORY (:RELATIVE) :NAME "." :TYPE NIL :VERSION NIL)
Allegro: (:HOST NIL :DEVICE :UNSPECIFIC :DIRECTORY (:RELATIVE) :NAME NIL :TYPE NIL :VERSION :UNSPECIFIC)
CMUCL: (:HOST "" :DEVICE NIL :DIRECTORY NIL :NAME "." :TYPE :UNSPECIFIC :VERSION NIL)
On Thu, Jan 7, 2016 at 10:43 AM, Raymond Toy <toy.raymond@gmail.com> wrote:
> "Jared" == Jared C Davis <jared.c.davis@gmail.com> writes:
Jared> Hi, Jared> Should I be able to expect the following to behave consistently across Lisps?
Jared> (file-namestring (uiop:parse-native-namestring "."))
Jared> I find that:
Jared> - CCL and SBCL produce "." Jared> - Allegro produces NIL Jared> - CMUCL signals an error in LISP::UNPARSE-UNIX-FILE
Jared> If I just look at:
Jared> (uiop:parse-native-namestring ".")
Jared> I get:
Jared> Allegro: #P"./" Jared> CCL: #P"." Jared> SBCL: #P"." Jared> CMUCL: #P(:NAME "." :TYPE :UNSPECIFIC)
I wonder why uiop:parse-native-namestring does that on cmucl. (cl:parse-namestring ".") returns #p"./", which, I think, makes sense.
Without examining the actual slots, it's hard to tell what #p"." really is.
-- Ray
-- Jared C. Davis <jared@cs.utexas.edu> 11410 Windermere Meadows Austin, TX 78759 http://www.cs.utexas.edu/users/jared/
-- Jared C. Davis <jared@cs.utexas.edu> 11410 Windermere Meadows Austin, TX 78759 http://www.cs.utexas.edu/users/jared/