I made that video and I'm glad it caught your interest.
I don't know a lot about the inner workings of Chicken or Win10 pretend-tty's, and I don't have a machine available where I can test. But I thought I'd throw in a couple of things you can try.
262 | (define (tty-input?)
261 │ (or (##core#inline "C_i_tty_forcedp")
262 │ (##sys#tty-port? ##sys#standard-input)))
263 │
264 │ (set! ##sys#break-on-error #f)
265 │
266 │ (set! ##sys#read-prompt-hook
267 │ (let ([old ##sys#read-prompt-hook])
268 │ (lambda ()
269 │ (when (tty-input?) (old)) ) ) )
It seems the csi is trying to disable the input prompt unless we're interactive.
In repl.scm, I found the hook:
(define ##sys#read-prompt-hook
61 │ (let ((repl-prompt repl-prompt))
62 │ (lambda ()
63 │ (##sys#print ((repl-prompt)) #f ##sys#standa
│ rd-output)
64 │ (##sys#flush-output ##sys#standard-output)))
│ )
The sys##flush-output here is what you're looking for I think. It's problably not being called due to tty-input? returning #f. But it might work to redefine it to our needs:
me@termux > csi
(c) 2008-2020, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.2.0rc1 (prerelease) (rev 44ea9ed5)
Type ,? for help.
#;1> ##sys#read-prompt-hook
#<procedure>
#;2> (set! ##sys#read-prompt-hook (lambda () (display "test> ") (flush-output)))
test> "new prompt!"
"new prompt!"
test> ^C
I hope that works on your win10-emacs session too. If not, you could try this:
===== possible solution 2 =====
It's possible that using a real socket might be a feasable workaround. `chicken-install nrepl` and start a session (outside of emacs) with
> csi -R nrepl -e '(nrepl 1234)'
Then, from emacs, do
C-u M-x run-scheme <RET> nc localhost 1234
To have emacs use the networked REPL.
Best of luck!
K.