[r6rs-discuss] [Formal] "#! /usr/bin/env" is not "portable." It's Unix-specific.

From: Trent Buck <trentbuck>
Date: Wed Nov 22 23:57:11 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.

Granted.

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
approach this:

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.

Suppose that

  - r6rs script authors have some way of declaring this within the
    script header.

  - 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
Received on Wed Nov 22 2006 - 23:56:25 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC