#lang imperative-syndicate

(require/activate imperative-syndicate/drivers/external-event)
(require (only-in racket/port read-bytes-line-evt))

(spawn (define stdin-evt (read-bytes-line-evt (current-input-port) 'any))
       (on (message (inbound (external-event stdin-evt (list $line))))
           (if (eof-object? line)
               (stop-current-facet)
               (printf "~a\n" line))))
