Actually, the `plt-r6rs` executable seems like it might be a better choice
than `racket`, but trying that revealed a problem: given the following
program as "":
#!/usr/bin/env scheme-script
(import (rnrs io simple))
(display "Yay!\n")

Running via DrRacket, "racket", or "./" (given a
`scheme-script` based on `racket` and the executable bit set) works as
expected, but running via "plt-r6rs" or a `scheme-script` based
on `plt-r6rs` prints the following error: illegal character after `#!' in input: `/'
   /Applications/Racket v6.11/collects/syntax/readerr.rkt:6:2:
   /Applications/Racket v6.11/collects/syntax/module-reader.rkt:186:17: body
   /Applications/Racket v6.11/collects/syntax/module-reader.rkt:183:2:
   /Applications/Racket v6.11/share/pkgs/r6rs-lib/r6rs/run.rkt:54:2:
   /Applications/Racket v6.11/collects/syntax/modcode.rkt:62:2: reader
   /Applications/Racket v6.11/collects/syntax/modcode.rkt:279:5: compile-one
   /Applications/Racket v6.11/share/pkgs/r6rs-lib/r6rs/run.rkt: [running

(Adding a space between the `#!` and `/usr/bin/env` doesn't help.)


On Sun, Dec 10, 2017 at 9:34 AM, Philip McGrath <>

> This morning I stumbled across Appendix D to R6RS (
>, which
> suggests that implementations provide an executable named scheme-script for
> the purpose of executing portable scripts. It seems that Racket does not
> currently provide such an executable. Should it? (Of course I understand
> that Racket is not a Scheme implementation, but it does contain an R6RS
> implementation.)
> The rationale given in the report seems persuasive to me, having at least
> a little bit of experience wrangling Unix-style scripts that try to be
> somewhat portable. It seems like just making scheme-script an alias for the
> racket executable would be sufficient.
> -Philip

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to