From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jose A. Ortega Ruiz" Newsgroups: gmane.lisp.guile.devel Subject: Re: Proposal: allow "guile foo.scm" Date: Fri, 12 Nov 2004 16:32:31 +0100 Organization: CCD - Autonomous University of Barcelona Message-ID: <87vfcbdqwg.fsf@imladris.homeunix.org> References: <1100197586.19830.125.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100273588 28019 80.91.229.6 (12 Nov 2004 15:33:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2004 15:33:08 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 12 16:32:58 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSdQ2-0002T0-00 for ; Fri, 12 Nov 2004 16:32:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSdYa-0002q5-HJ for guile-devel@m.gmane.org; Fri, 12 Nov 2004 10:41:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSdYY-0002pz-4O for guile-devel@gnu.org; Fri, 12 Nov 2004 10:41:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSdYX-0002pn-OD for guile-devel@gnu.org; Fri, 12 Nov 2004 10:41:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSdYX-0002pk-Kc for guile-devel@gnu.org; Fri, 12 Nov 2004 10:41:45 -0500 Original-Received: from [158.109.70.145] (helo=localhost) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1CSdPu-0002wP-7v for guile-devel@gnu.org; Fri, 12 Nov 2004 10:32:50 -0500 Original-Received: from jao by localhost with local (Exim 4.34) id 1CSdPb-0001a3-9Z for guile-devel@gnu.org; Fri, 12 Nov 2004 16:32:31 +0100 Original-To: guile-devel X-Attribution: jao X-URL: In-Reply-To: (Greg Troxel's message of "12 Nov 2004 09:08:39 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: main.gmane.org gmane.lisp.guile.devel:4377 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4377 Greg Troxel writes: > What do you think of allowing guile to be run as "guile foo.scm"? > > I think it makes sense; /bin/sh acts like this. Reading 'guile > --help', this could currently only start up a guile with foo.scm in > (command-line), but it doesn't. > > But, I think your example fails to pass arguments to the guile > process. Do you mean to include $0 $@? Why can't you do > > #! /usr/bin/env guile -s $0 "$@" > !# > IMHO, the best way would be to support SRFI-22 (Running Scheme scripts in Unix, http://srfi.schemers.org/srfi-22/srfi-22.html), which calls a procedure named main in the body of a script starting with #!/usr/bin/env guile after evaluating the body, passing to it as arguments the provided command line ones [1]. Besides being a simple approach, it would be make live easier for people writing code intended for multiple schemes. Just my .02 euros, jao Footnotes: [1] Actually, i'm oversimplifying here: the SRFI suggests also concrete names for the interpreter (instead of just 'guile'), according to its compliance to RnRS. -- If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is. - John von Neumann _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel