Open Kreijstal opened 8 months ago
I had to insert two newlines between each command (or press enter twice after each line) to receive a response. If you only use one newline you get the expected end of input
error message.
meanwhile in my machine
> lake exe repl
{ "cmd" : "#eval 1+1"}
\r\n
(doesn't seem to work)
what OS and terminal are you using? Most terminals submit the result after each line. Ctrl-D should work to close the input stream and push everything, but it's obviously not optimal since you can't write anything after that.
It seems like this code:
/-- Get lines from stdin until a blank line is entered. -/
partial def getLines : IO String := do
match (← (← IO.getStdin).getLine) with
| "" => pure ""
| "\n" => pure "\n"
| line => pure <| line ++ (← getLines)
may fail on windows and cause it to keep asking for lines forever if a blank line is sent as "\r\n"
rather than "\n"
. cc: @semorrison
I am using vscode under windows
@Kreijstal, would you mind checking if the problem has been resolved now?
I am trying to use the repl, I have no idea how is it supposed to work but I receive no output
after ctr+c I get
am I doing something wrong?