From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names. Date: Mon, 2 May 2011 19:16:11 -0400 Message-ID: <19903.15163.681435.910306@winooski.ccs.neu.edu> References: <1297784103-18322-1-git-send-email-janneke-list@xs4all.nl> <1297784103-18322-3-git-send-email-janneke-list@xs4all.nl> <87r58gzuoy.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304396413 22765 80.91.229.12 (3 May 2011 04:20:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 04:20:13 +0000 (UTC) Cc: ludo@gnu.org, guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 03 06:20:08 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QH75j-0003Le-VP for guile-devel@m.gmane.org; Tue, 03 May 2011 06:20:08 +0200 Original-Received: from localhost ([::1]:50152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH75j-0007Gv-Ev for guile-devel@m.gmane.org; Tue, 03 May 2011 00:20:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH2Ld-00008b-Pt for guile-devel@gnu.org; Mon, 02 May 2011 19:16:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QH2Lc-0007uR-Gj for guile-devel@gnu.org; Mon, 02 May 2011 19:16:13 -0400 Original-Received: from winooski.ccs.neu.edu ([129.10.115.117]:33225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH2Lc-0007uL-9t; Mon, 02 May 2011 19:16:12 -0400 Original-Received: from winooski.ccs.neu.edu (localhost.localdomain [127.0.0.1]) by winooski.ccs.neu.edu (8.14.4/8.14.4) with ESMTP id p42NGB4h001341; Mon, 2 May 2011 19:16:11 -0400 Original-Received: (from eli@localhost) by winooski.ccs.neu.edu (8.14.4/8.14.4/Submit) id p42NGBvG001337; Mon, 2 May 2011 19:16:11 -0400 In-Reply-To: X-Mailer: VM 8.1.93a under 23.2.1 (x86_64-redhat-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 129.10.115.117 X-Mailman-Approved-At: Tue, 03 May 2011 00:20:05 -0400 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12409 Archived-At: [Second attempt, my Emacs has unfortunate issues with Ludovic's name...] An hour ago, Andy Wingo wrote: > On Mon 02 May 2011 22:58, ludo@gnu.org (Ludovic Court=C3=A8s) writes:= >=20 > > Andy Wingo writes: > > > >> Basically I think the plan should be to add scm=5Ffrom=5Flocale=5F= path, > >> scm=5Ffrom=5Fraw=5Fpath, etc to filesys.[ch], and change any > >> pathname-accepting procedure in Guile to accept path objects, > >> producing them from strings when given strings, and pass the > >> bytevector representation to the raw o/s procedures like `open' > >> et al. > > > > Seems to like a disjoint type =E2=80=9Cjust for Windows=E2=80=9D wo= uld be > > overkill, no=3F >=20 > Maybe you're right; hummm! I have added a kind racketeer on Cc; perh= aps > if he has time, he might have some thoughts in this regard. :-) I don't think that I can contribute much -- I'm mostly looking at these things from a user's point of view... Roughly speaking (mostly because I don't know what the issues that you're up against), our path values have "just paths" for whatever the OS wants -- so on Windows they might have either backslashes or slashes (since Racket accepts both). To write portable code we don't have a `file-separator' thing, instead, we have `build-path' that combines two paths with the right separator. Similarly, we have `split-path' to split up a path to the directory part and the last part. I think that it's generally better this way, since it represents the higher level operation rather than fiddling with the semantics of where and how to put separators directly (but this is not some religious issue, just seems to me like it would be more convenient). Also, we have cases where we want something that looks like a portable path (for example, naming relative file names in `require') -- for those we use /-separated strings that are limited to "safe" characters. And related, in cases where we want to encode path in code (for example, some macro that wants to generate a path), we'll use strings or byte strings, with the latter more common for lower level things. (But I'm just rambling now, I haven't slept in N days -- so feel free to ignore me...) --=20 ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay= : http://barzilay.org/ Maze is Life= !