[gambit-list] Read from stdin

Eduardo Cavazos wayo.cavazos at gmail.com
Thu Apr 16 05:54:28 EDT 2009


Eduardo Cavazos <wayo.cavazos at gmail.com> writes:

>> Other Schemes (like Chicken, Ypsilon, Larceny, and Ikarus) will read 
>> from stdin by default. For example:
>>
>>      echo '(+ 1 1)' | csi
>>
>> However, this doesn't work with 'gsi'. Is there a way to
>> get this to work?

Alex Shinn wrote:

> $ echo '(println (+ 1 1))' | gsi /dev/stdin

Thanks Alex.

Is there a way to get gsi/gsc to start a REPL which reads from stdin? 
This is not quite the same:

     gsi /dev/stdin -

That will read from stdin till EOF and then start a REPL.

I'm guessing that the fact that the gsi/gsc REPL doesn't read from stdin 
by default has to do with the elaborate console it comes with. Seems 
like there should be a way to turn that off with an option; i.e. get a 
plain old stdin repl.

Ed



More information about the Gambit-list mailing list