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

Jens Axel Søgaard jensaxel at soegaard.net
Wed Nov 15 15:50:50 EST 2006


AndrevanTonder skrev:
> On Wed, 15 Nov 2006, Jens Axel Søgaard wrote:
> 
>>> Not necessarily.  The draft does not require scripts to be whole files.
>>> As a result, while the Unix script starts on the first line, we are 
>>> entitled to regard the Scheme script as starting on the next line of 
>>> the same file.  The first line of the Unix script is the #!, while 
>>> the first line of the Scheme script is whatever comes next.  In this 
>>> view, R6RS has to specify the Scheme script, but can avoid specifying 
>>> the first line of the Unix file, which is then not part of the Scheme 
>>> script.
>>
>> I think we agree? I was trying to argue that the draft does indeed 
>> specify the right thing.
> 
> Not quite.  I am saying the draft should start where the Scheme starts, 
> which
> is in this case on the second line.  It should not concern itself with the
> mechanisms, such as #!, that the host system use to decide where the 
> Scheme starts.  It should not even mention them.

So you suggest something like:

<script> -> <line>* <script start> <script substance>
<script start> -> #!program  <linefeed>

where <script substance> is as in the draft
and <line> is any line not matching #!program.

?

-- 
Jens Axel Søgaard






More information about the r6rs-discuss mailing list