libera/#ccl - IRC Chatlog
Search
14:46:09
yitzi
CCL appears to preserve case in the parsing of logical pathnames and in translate-logical-pathname. Does anyone know if this is intentional? Seems like this isn't permitted according to CLHS 19.3.1 and CLHS 19.3.1.1.7, unless I just misreading the spec.
16:05:25
pjb
yitzi: it's intentional. But indeed, I don't agree with this choice. on unix (posix even in general), the customary case is lowercase even if normally the unix file systems are case-sensitive.
16:06:22
pjb
CCL comes from MCL that ran on Mac OS where there was no customary case per se (the file systems were case insensitive, case preserving, and file names were kept as the user wrote them, usually mixed case).
16:07:00
pjb
yitzi: but one problem anyway is that CL doesn't expect that different file systems may be mounted one onto the other, so that a given path may have components in different customary case!
16:08:31
pjb
so you could have to translate "MNT:SOME-UNIX-FS;SOME-MACOS-FS;SOME-DOS-FS;SOME-WINDOWS-FS;EXAMPLE.TXT" to "/mnt/some-unix-fs/Some Mac OS FS/SOMEDOSF/Some Windows FS/Example.text"
16:08:59
pjb
the only way this can be achieved properly within the specification, is using an explicit logical pathname translation entry for each pathname!
16:10:25
pjb
yitzi: for the former, I usually do something like: https://github.com/informatimago/patchwork/blob/dialog/loghosts.lisp#L145
16:11:08
pjb
yitzi: for the later: https://github.com/informatimago/patchwork/blob/dialog/loghosts.lisp#L90
16:17:52
yitzi
pjb: It's not breaking anything in my code. It's just suprissing that intentionally not following the spec (at least in parsing) isn't a choice.