Closed arthurmaciel closed 3 years ago
Hi, @justinethier!
I have found this strange behaviour when experimenting with reading ports:
cyclone> (define str-as-port (open-input-string "1")) ok cyclone> (peek-char str-as-port) #\1 cyclone> (read-char str-as-port) #\1 cyclone> (peek-char str-as-port) (exits interpreter)
On CHICKEN:
#;1> (define str-as-port (open-input-string "1")) #;2> (peek-char str-as-port) #\1 #;3> (read-char str-as-port) #\1 #;4> (peek-char str-as-port) #!eof #;5> (read-char str-as-port) #!eof #;6> (read-char str-as-port) #!eof #;7> (peek-char str-as-port) #!eof #;8>
On Gambit:
> (define str-as-port (open-input-string "1")) > (peek-char str-as-port) #\1 > (read-char str-as-port) #\1 > (peek-char str-as-port) #!eof > (read-char str-as-port) #!eof > (read-char str-as-port) #!eof > (peek-char str-as-port) #!eof >
Good catch @arthurmaciel !
This has never been handled properly but the fix is simple enough. This will work much better now if you can pull down the latest code from master.
master
Thanks, @justinethier!
Hi, @justinethier!
I have found this strange behaviour when experimenting with reading ports:
On CHICKEN:
On Gambit: