From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names. Date: Tue, 17 May 2011 15:26:26 -0400 Message-ID: <87k4dpp1r1.fsf@netris.org> 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> <87vcxsycds.fsf@gnu.org> <87wri7ru80.fsf@netris.org> <87zkn2stsf.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1305660417 22899 80.91.229.12 (17 May 2011 19:26:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 May 2011 19:26:57 +0000 (UTC) Cc: Andy Wingo , Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 17 21:26:50 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 1QMPur-0000ga-Iz for guile-devel@m.gmane.org; Tue, 17 May 2011 21:26:49 +0200 Original-Received: from localhost ([::1]:44024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMPuq-0008RW-VP for guile-devel@m.gmane.org; Tue, 17 May 2011 15:26:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMPuo-0008R9-CP for guile-devel@gnu.org; Tue, 17 May 2011 15:26:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMPuk-0005zQ-G9 for guile-devel@gnu.org; Tue, 17 May 2011 15:26:46 -0400 Original-Received: from world.peace.net ([96.39.62.75]:51866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMPui-0005yj-99; Tue, 17 May 2011 15:26:40 -0400 Original-Received: from 209-6-41-222.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.41.222] helo=freedomincluded) by world.peace.net with esmtpa (Exim 4.69) (envelope-from ) id 1QMPub-0001fb-7y; Tue, 17 May 2011 15:26:33 -0400 Original-Received: from mhw by freedomincluded with local (Exim 4.69) (envelope-from ) id 1QMPuU-0003vG-V6; Tue, 17 May 2011 15:26:26 -0400 In-Reply-To: (Noah Lavine's message of "Tue, 17 May 2011 12:59:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 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:12502 Archived-At: Hi Noah, Thanks for thinking about this thorny issue. Noah Lavine writes: > Group 1: Treat pathnames as opaque objects that come from outside APIs > and can only be used by passing them to APIs. We can support these in > a way that will be compatible everywhere. > Operations: open file, close file, stat file. > In order to be useful, we might also provide a > "command-line-argument->file" operation, but probably no reverse > operation. Unfortunately, we'd need more than just that one operation. What if you need to run an external command on a filename received from readdir? For this you need `file->command-line-argument'. What if you need to put that filename into an environment variable? Then you need `file->environment-variable-value'. What if you want to use an environment variable's value (which contains a filename) to either open the file directly or call an external command on it? For this you need `environment-value->file' or `environment-variable-value->command-line-argument'. What if you want to put a command-line argument into an environment variable? For this you need `command-line-argument->environment-variable-value'. What if you want to split the PATH environment variable (or another one like it) up into components, and then use those components to either read those component directories from scheme, or run external commands on those components, or put the components into environment variables? Also, what are we to do about backward-compatibility for all of the existing POSIX interfaces in Guile which have always returned strings? What are we to do with procedures like `program-arguments', `command-line', `environ', `getenv', `readdir' and `passwd:dir'? What can we pass to `main' that would both incorporate this new distinct command-line-argument type and maintain backward compatibility with scripts that expect strings? Best, Mark