From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Thien-Thi Nguyen <ttn@gnuvola.org>
Newsgroups: gmane.lisp.guile.devel
Subject: Re: port-filename and path canonicalization
Date: Tue, 20 Apr 2010 13:15:22 +0200
Message-ID: <87tyr69xyt.fsf@ambire.localdomain>
References: <m34oj7bili.fsf@pobox.com> <878w8jyr3w.fsf@gnu.org>
	<m3ochea28t.fsf@pobox.com>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: dough.gmane.org 1271762378 17800 80.91.229.12 (20 Apr 2010 11:19:38 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Tue, 20 Apr 2010 11:19:38 +0000 (UTC)
To: guile-devel@gnu.org
Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 20 13:19:37 2010
connect(): No such file or directory
Return-path: <guile-devel-bounces+guile-devel=m.gmane.org@gnu.org>
Envelope-to: guile-devel@m.gmane.org
Original-Received: from lists.gnu.org ([199.232.76.165])
	by lo.gmane.org with esmtp (Exim 4.69)
	(envelope-from <guile-devel-bounces+guile-devel=m.gmane.org@gnu.org>)
	id 1O4BSt-0006yP-DA
	for guile-devel@m.gmane.org; Tue, 20 Apr 2010 13:19:36 +0200
Original-Received: from localhost ([127.0.0.1]:34273 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1O4BRw-0006qV-0R
	for guile-devel@m.gmane.org; Tue, 20 Apr 2010 07:17:04 -0400
Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1O4BRn-0006qP-Sj
	for guile-devel@gnu.org; Tue, 20 Apr 2010 07:16:55 -0400
Original-Received: from [140.186.70.92] (port=45247 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1O4BRk-0006q1-M7
	for guile-devel@gnu.org; Tue, 20 Apr 2010 07:16:54 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <ttn@gnuvola.org>) id 1O4BRb-0007Et-2B
	for guile-devel@gnu.org; Tue, 20 Apr 2010 07:16:43 -0400
Original-Received: from host137-69-dynamic.21-79-r.retail.telecomitalia.it
	([79.21.69.137]:60373 helo=ambire.localdomain)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <ttn@gnuvola.org>) id 1O4BRa-0007EY-R0
	for guile-devel@gnu.org; Tue, 20 Apr 2010 07:16:43 -0400
Original-Received: from ttn by ambire.localdomain with local (Exim 4.63)
	(envelope-from <ttn@gnuvola.org>) id 1O4BQI-0004ZZ-Dt
	for guile-devel@gnu.org; Tue, 20 Apr 2010 13:15:22 +0200
In-Reply-To: <m3ochea28t.fsf@pobox.com> (Andy Wingo's message of "Tue, 20 Apr
	2010 11:42:58 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-BeenThere: guile-devel@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Developers list for Guile,
	the GNU extensibility library" <guile-devel.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/guile-devel>,
	<mailto:guile-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/guile-devel>
List-Post: <mailto:guile-devel@gnu.org>
List-Help: <mailto:guile-devel-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/guile-devel>,
	<mailto:guile-devel-request@gnu.org?subject=subscribe>
Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org
Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.lisp.guile.devel:10269
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.devel/10269>

() Andy Wingo <wingo@pobox.com>
() Tue, 20 Apr 2010 11:42:58 +0200

   I'd be happy to have some cleaner solution, though.
   Do you have any ideas?

Another idea is to conceptually separate "filename" to be "directory"
and "basename" and have file ports maintain the directory portion as a
file descriptor (or equivalent) internally, exposed through some kind of
opaque handle.

With this separation, one can start to play with other virtualized
location schemes (FUSE, tarball, network byte stream, VMS-style logical
names, etc), while also addressing the actual need directly: finding
"neighbors" of the already opened file.

One (important for users' software freedom) neighbor is the source code;
others might be debugging info, runtime stats (thinking of future JIT),
previous versions (for ABI negotiation/fallback), and so on.

If the separation is applied earlier, that is, if directory objects can
be made without opening a file, you get "browsing".

FWIW, in Guile 1.4.x, i was headed towards this with module catalogs
(inspired by SLIB's catalog system), but it is not yet fully realized,
and might never be.  Perhaps i can move some of that to Guile 1.9.

thi