The Wayback Machine - https://web.archive.org/web/20201219200900/https://github.com/islisp-dev/iris/issues/7
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`C-d` doesn't quit the REPL immediately if at least one form has been evaluated #7

Open
wasamasa opened this issue May 5, 2018 · 4 comments
Labels

Comments

@wasamasa
Copy link

@wasamasa wasamasa commented May 5, 2018

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.

@tani
Copy link
Collaborator

@tani tani commented May 6, 2018

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.

@wasamasa
Copy link
Author

@wasamasa wasamasa commented May 6, 2018

Hm, good point about rlwrap, but it doesn't change anything about that bug. I only get the other features, like line editing.

@tani
Copy link
Collaborator

@tani tani commented May 6, 2018

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.

@tani
Copy link
Collaborator

@tani tani commented May 22, 2018

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.