oops so i did a rly dumb thing

(define (run-recursive msg)
(write-string msg)
(let ([next-msg (read-line)])
(displayln next-msg) ;; haha printf debugging time
(cond [(equal? eof next-msg) (error ...)]
[else (run-recursive (handle-msg msg))]))))

(parameterize ([current-input-port in] [current-output-port out]) (run-recursive initial-msg))

so i wondering why that displayln wasn't actually printing to the console....

Follow

oh also add a (flush-output) there because apparently aggressive buffering is on by default,

Sign in to participate in the conversation
Cybrespace

Cybrespace is an instance of Mastodon, a social network based on open web protocols and free, open-source software. It is decentralized like e-mail.