From: "Jose A. Ortega Ruiz" <jao@gnu.org>
Subject: Re: Proposal: allow "guile foo.scm"
Date: Fri, 12 Nov 2004 16:32:31 +0100 [thread overview]
Message-ID: <87vfcbdqwg.fsf@imladris.homeunix.org> (raw)
In-Reply-To: <rmi654bp3bs.fsf@fnord.ir.bbn.com> (Greg Troxel's message of "12 Nov 2004 09:08:39 -0500")
Greg Troxel <gdt@ir.bbn.com> 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
next prev parent reply other threads:[~2004-11-12 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 18:26 Proposal: allow "guile foo.scm" Andy Wingo
2004-11-12 14:08 ` Greg Troxel
2004-11-12 15:19 ` Paul Jarc
2004-12-22 16:25 ` Marius Vollmer
2004-11-12 15:32 ` Jose A. Ortega Ruiz [this message]
2004-11-12 15:39 ` Paul Jarc
2004-11-12 21:43 ` Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vfcbdqwg.fsf@imladris.homeunix.org \
--to=jao@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).