Mirko
4/14/2016 8:47:00 PM
On Thursday, April 14, 2016 at 4:09:00 PM UTC-4, Kaz Kylheku wrote:
> On 2016-04-14, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> > I am trying out ABCL on Windows 7 (in order to process Excel files).
> >
> > It does not seem to understand paths such as "~/asdf".
>
> You're on Windows! Can you type "~/asdf" into Windows Explorer?
>
> Tilde expansion is a feature of the POSIX shell language and related
> dialects. The kernels of Unix-like systems do not understand it,
> either.
>
> It's not a Lisp convention, either. The fact that we can do this in,
> say, CLISP:
>
> [1]> (open "~/foo")
>
> *** - OPEN: File #P"/home/kaz/foo" does not exist
>
> is completely gratuitous; CLISP has chosen to provide shell-like
> tilde expansion, even though it isn't the shell language.
>
> This is implemented in the logic which parses a path namestring to
> a pathname object. It is not a feature of open itself nor of the
> semantics of pathname objects themselves:
>
> [1]> (open (make-pathname :name "~"))
>
> *** - OPEN: File #P"/home/kaz/txr/~" does not exist
>
> [2]> (open (make-pathname :directory "~" :name "foo"))
>
> *** - OPEN: Directory #P"/~/" does not exist
>
> I don't see a way of escaping the tilde when creating a pathname via
> namestring parsing. This is in contrast to the shell language, in which
> we can backslash the tilde to remove its special meaning:
>
> $ ls -ld ~
> drwxr-xr-x 73 kaz kaz 4096 Apr 14 13:00 /home/kaz
> $ ls -ld \~
> ls: cannot access ~: No such file or directory
>
> > I could not find anything in the documentation.
>
> Why would the documentation write about things which are not
> requirements? The set of such features is indefinitely large.
> Can you imagine?
>
> "ABCL doesn't implement POSIX shell tilde expansion, Fortran common
> blocks, COBOL structure assignment by field name, C pointers, SQL
> stored procedures, Intercal COMEFROM, ..."
Thanks for the clarification. I was spoiled by CCL. It does understand "~".
Thanks (to you and Dimitri).
Mirko