justinethier / cyclone

:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
http://justinethier.github.io/cyclone/
MIT License
824 stars 44 forks source link

Flush current-output-port after writing prompt to it #473

Closed nmeum closed 3 years ago

nmeum commented 3 years ago

On Unix-like operating systems stdio.h (which Cyclone seems to use internally) is line-buffered. As such, the prompt will only be written after a newline character is written (since the prompt itself doesn't contain a newline) which is probably not what was intended here. This commit fixes this issue by always flushing the current-output-port after writing the prompt string.

justinethier commented 3 years ago

Great catch, thanks @nmeum !