[r6rs-discuss] [Formal] "#! /usr/bin/env" is not "portable." It's
trentbuck at gmail.com
Wed Nov 22 23:56:25 EST 2006
On Wed, Nov 22, 2006 at 07:27:04PM -0500, John Cowan wrote:
> Trent Buck scripsit:
> > Under Debian, at least, there is a mechanism called "alternatives" to
> > choose the "best" installed alternative to be symlinked to a common
> > name.
> > For example, if you install mawk and gawk, /usr/bin/awk will default
> > to gawk and be customizable with `update-alternatives --config awk'.
> I'm familiar with it. However, it works best for something where
> there is little reason to change your mind on the fly, like your
> mail server or /bin/sh shell. Mawk and gawk aren't all that
> different: you typically want gawk, unless you are resource-constrained,
> and then you go with mawk.
So the problem is that different scripts run "better" (e.g. faster) in
different scheme systems. Here's the beginnings of my idea of how to
I believe it's currently quite common for "script" authors to include
a note on the page or in the script itself along the lines of
Tested with chicken, gambit and scheme48.
- r6rs script authors have some way of declaring this within the
- each installed scheme system has some way of registering itself
with a central, system-agnostic "scheme-script" program.
- The scheme-script program dispatches one of the installed scheme
systems to run the script.
If one of the tested systems is installed, the script is run with it.
If none of the tested systems are installed, scheme-system prints a
warning and uses one of the other installed scheme system.
If the script doesn't declare it has been tested with any scheme
systems, the scheme-script program uses any installed scheme system.
It is an error to run scheme-script when no systems are installed.
Trent Buck, Student Errant
More information about the r6rs-discuss