iris
iris copied to clipboard
`C-d` doesn't quit the REPL immediately if at least one form has been evaluated
If I run iris and hit C-d, it quits the REPL immediately.
If I run iris, evaluate something, then hit C-d, it doesn't quit the REPL. Hitting C-d again quits the REPL.
I'm using the latest Iris installed with go get github.com/asciian/iris on Arch Linux.
In Windows Subsystem for Linux, there is no problem about this issue.
And in macOS, I have same problem. So I guess that this is the problem about the implementation of TTY.
To fix this bug, I need to rewrite whole implementation about /reader module. It's big changes.
I recommend you using rlwrap in your terminal. It maybe help you.
Hm, good point about rlwrap, but it doesn't change anything about that bug. I only get the other features, like line editing.
Yes. rlwrap doesn't fix this issue. rlwrap is quick answer for this issue. Of cource I promise you to fix this issue. For instance, I think that I must rewrite the parser with flex/yacc-style parser or PEG-parser because it has a few of problem like this issue.
If I change the parser, I have to change not only some code but also whole tests around the parser.
I report progress. Now I start new reader and parser.
- Splitting REPL and Reader (REPL will be used goreadline)
- Using parser combinator (ex goparsec)
- If parse error occurred, REPL wait new input at next line. (Currently reader waits each characters)