flush whitespace from the repl input buffer *before* evaluation
authorAndy Wingo <wingo@pobox.com>
Mon, 22 Jun 2009 20:57:48 +0000 (22:57 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 22 Jun 2009 20:57:48 +0000 (22:57 +0200)
commit0d646345f477f0ffced6f602370fc8c607f7d32f
tree26314319593087ca042e363ceda6846ed7741713
parentb674d4716abe775e648445795f02bece8a3396e0
flush whitespace from the repl input buffer *before* evaluation

* module/system/repl/repl.scm (start-repl): Given that the input port of
  the repl is line-buffered, it's likely we have #\newline in the input
  that is strictly extraneous, an in-band indicator to the repl that it
  should begin reading now. So flush out that newline, so that you can
  (read-char) at the repl, and it actually does wait for you to type in
  a char instead of just returning #\newline.

  While it's not an overriding concern, this does fix some brainfuck
  programs that want to input from the user.
module/system/repl/repl.scm