-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
how to stop the REPL? #433
Comments
Hm ... thank you for reporting this. I will test console on windows and try to solve this. I only have Linux so for Mac and Windows I rely on your feedback. Last time I made specifically made ansi escape codes work on windows and at that point it worked, but I was updating ctrl-c behavior in the meantime so maybe I destroyed something. Thanks! |
I'm having some problems with time so I haven't been able to get to this yet. I should in the next few days. |
I noticed the following, nice nice language, I started exploring it-- I'm on Ubuntu 24.10 WSL shell on Windows, and call the "rye" executable from a Bash shell. control-C does exit out as I'd consider "normal". If instead you exit the REPL by typing the function call exit 0 followed by the Enter key, it does exit the interpreter, but character echo gets mangled somehow, so from that point on you don't see any characters you type into the Bash shell, though they are received by Bash and any commands you type will "work" and show output, just that terminal character echo for your typing doesn't work anymore. I don't know if this is expected behavior or not. I always was interested in Rebol but the edge cases and exceptions to rules turned me off, and the documentation was a combination of too voluminous to search easily, yet not covering cookbook examples for common cases. Your documentation even at this beginning point is so much more useful and concise and has examples that aid understanding of base concepts. I'm impressed. |
Hm ... good catch. Exit wasn't meant specifically for exiting the console, but a program with specific status code. But of course it should also work normally in console. It probably leaves the terminal in wrong state / modes. I will look into this and Fix it Thanks! I must also look in general into ctrl-c handling and detection as there are some inconsistences there inside the console. Where some actions should block and catch ctrl-c without exiting (like display, or enter-console) and otherwise it should exit. I also read that it's better to use ctrl-c for exiting / canceling internal processes, and ctrl-d for exiting the console itself. I have to work on all this very soon. Thank you for the kind words about documentation. I do try lately to make it well made and consistent. But it does take time. Some part / a reference will be generated, but yes, I find this cookbook format the best. When I try to explain things it also helps me design the API / functions / naming itself and look at it from the outside. So it's partially documentation adn design at the same time. |
@kozmikyak I fixed the @HFolkertH please try if there is any change on Windows regarding Ctrl+D. I made program print debug info on exit so we make there signal handling solid. If it won't work please report me if anything is written in console when you press Ctrl+c and Ctrl+d. Also you can try |
Thanks for your responsiveness. |
ctrl-D works as expected in Windows 10 and Mac OSX 11. But on Mac the way to start the Repl is now apparently or accidently changed to "ryelang" instead of "rye". At first I thought there went something wrong during installation because the documents clearly says the you should start the Repl with 'rye' . But the rye executable is not found in the path. |
I will look how come ryelang executable got created for Mac and fix it for next release. Thanks for reporting. WIth Ctrl+D working on windonw I am closing this issue. |
on my Mac I can stop the Rye-fyne REPL with Ctrl-C.
But not on my Windows laptop. I tried every text-command and keyboard-combi but the Repl just keeps on going.
Perhaps add a text at the start/top of the Repl about how to stop the repl in Windows, OSX or Linux?
The text was updated successfully, but these errors were encountered: