25 Jan 2004 crhodes   » (Master)

ANSI saith:

Using :absolute or :wild-inferiors immediately followed by :up or :back signals an error of type file-error.
As we have discovered, we need an Oracle (no relation) to interpret this mystifying pronouncement. What it would appear to mean is that at some point between creating a pathname with such a deviant directory structure and attempting to use it to discover something about the filesystem using standardized operators, a conforming Common Lisp should signal an error.

So far, so good. However, as the n+1th evidence of a severe mismatch between the Common Lisp "portable" pathname standard and any kind of Unix, it should be pointed out that the pathname named by "/../" (that is, in Lisp terms, (:absolute :up)) has well-defined semantics.

In practice, this means that I'm extremely reluctant to detect this error early (as might otherwise be the good citizen implementation); I don't want to throw an error from MAKE-PATHNAME or MERGE-PATHNAMES, because pathnames made this way could still be useful, albeit not through the standardized operators. In particular, feeding one of these deviant pathnames to SBCL's POSIX interface layer is a perfectly valid thing to do, and I think I want to support that.

So instead, we have to detect accesses to the filesystem of one of these pathnames. Which is, of course, harder, but fortunately for my sanity (working with CL pathnames sucks) not all that hard — it only touches three different places in the code rather than one. To whomever implemented the first version of CMUCL pathnames: thank you.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!