Re: Loading code from standard input
Marc Nieper-Wißkirchen 20 Apr 2020 16:29 UTC
Am Mo., 20. Apr. 2020 um 18:01 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
>
> > * `fantastic-scheme <foo.scm` from the shell
> >
> > This could run "foo.scm" as a program (in the sense of R7RS).
>
> That would require checking whether standard input is a terminal, and
> only running the REPL in that case. If standard input is a file, the
> implementation would use program semantics instead. I wonder whether
> this is brittle.
It is brittle in any case because the "script" being loaded may call
`read' in between. Anyway, I just wanted to say that the author of
`fantastic-scheme' may have decided that `fantastic-scheme' called
without a filename may read an R7RS top-level program from the
standard input port because the command to start a REPL is
`fantastic-repl'. :)