[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
From: |
Florian Zumbiehl |
Subject: |
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path. |
Date: |
Mon, 18 Mar 2013 19:46:41 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hi,
> If we keep the ~-expansion, any safe code that use the filesystem API
> will have to resort to tricks like
>
> (operation (if (absolute-pathname? the-path)
> the-path
> (make-pathname (current-directory) the-path)))
>
> to guard against input that would cause unintended expansions. In the
> end, we'd have just the opposite of convenience (obviously, _if_ you
> _remember_ to use the trick to avoid expansions).
Thank you for demonstrating how that kind of API also tends to breed broken
workarounds due to cognitive overload.
Your code has a potential race condition, as your CWD can be renamed and a
different directory placed at the old name in between current-directory and
the subsequent pathname resolution performed by operation, so the semantics
would differ from a non-expanding operation.
Given that there is qs for shell quoting, why not have something similarly
short for (partial) shell expansion, so it's reasonably easy for
interactive use?
Regards, Florian
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., (continued)
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Alaric Snell-Pym, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Florian Zumbiehl, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Alaric Snell-Pym, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.,
Florian Zumbiehl <=
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jörg F . Wittenberger, 2013/03/20
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., John Cowan, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/19