11:05:09splittistGiven the string "/foo/bar/../baz/quux.lisp" I would like to obtain "/foo/baz/quux.lisp", and the obvious generalizations of this scheme. Because the string looks like a pathname I have been looking at various path-related things, but nothing and nobody seems to want to give me what I want. Am I just thinking about this wrong?
11:12:50z0dsplittist: doesn't cl-fad has something for it?
11:15:01splittistExcept that I'm on SBCL (or CCL), and "NB: Since this function does not access the filesystem it will only remove :BACK elements from the path (not :UP elements). Since some lisps, ccl/sbcl/clisp convert ".." in pathnames to :UP, and not :BACK, the actual utility of the function is limited."
11:18:21splittistI'll implement it myself. (It is verging on the Left_Pad level of functionality...)
11:26:33ShinmeraColleen: tell splittist look up pathname-utils normalize-pathname
11:26:33Colleensplittist: Function pathname-utils:normalize-pathname https://shinmera.github.io/pathname-utils#FUNCTION%20PATHNAME-UTILS%3ANORMALIZE-PATHNAME
11:28:41Shinmerathat library has been tested on a few implementations at least so I know the stuff is as correct as can be :)
11:41:09splittistOdin- and phoe: Yes! I had actually looked at it a while ago but didn't think it would work on the basis of the description of dotdot. 0 for reading comprehension.
11:42:06Odin-Yeah, I wasn't sure so I decided to just see what it did. :p
13:20:53didiWhat do I use to write a SETF variable that accepts a default value like `getf'? For example, (incf (getf foo :bar 0)) works even if FOO doesn't have the indicator :BAR.
13:29:27phoedidi: (defun (setf my-getf) (newval place key &optional default) ...)