-
Notifications
You must be signed in to change notification settings - Fork 132
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
Liner does not print characters when shift is pressed #163
Comments
elgopher
added a commit
to elgopher/pi
that referenced
this issue
Aug 11, 2023
elgopher
added a commit
to elgopher/pi
that referenced
this issue
Aug 12, 2023
This commit adds the ability to run Go code when the game is running. No need to compile, and restart the game. Just write the code in terminal, hit enter, and it will be immediately executed. Go code is interpreted by traefik/yaegi interpreter. It is a Go interpreter compatible with standard Go compiler. Lines are read from terminal by peterh/liner package. For now I'm using my fork of github.com/peterh/liner, because the original does not work well in Goland/VSCode on Win11 (see peterh/liner#163). This is temporary, until peterh/liner is fixed properly. Limitations: * MidInt, MaxInt, MinInt - those functions can be executed in terminal but only accepts int's (not int64, byte etc.) * pi.Int cannot be used * The size of compiled game with devtools is increased by 3.7MB (+35% increase), the compilation takes 21% more time. But it is worth it. I plan to add a possibility to disable scripting in the future though.
elgopher
added a commit
to elgopher/pi
that referenced
this issue
Aug 12, 2023
This commit adds the ability to run Go code when the game is running. No need to compile, and restart the game. Just write the code in terminal, hit enter, and it will be immediately executed. Go code is interpreted by traefik/yaegi interpreter. It is a Go interpreter compatible with standard Go compiler. Lines are read from terminal by peterh/liner package. For now I'm using my fork of github.com/peterh/liner, because the original does not work well in Goland/VSCode on Win11 (see peterh/liner#163). This is temporary, until peterh/liner is fixed properly. Limitations: * MidInt, MaxInt, MinInt - those functions can be executed in terminal but only accepts int's (not int64, byte etc.) * pi.Int cannot be used * The size of compiled game with devtools is increased by 3.7MB (+35% increase), the compilation takes 21% more time. But it is worth it. I plan to add a possibility to disable scripting in the future though.
elgopher
added a commit
to elgopher/pi-template
that referenced
this issue
Aug 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating System
Windows 11
Terminal Emulator
Bug behaviour
Liner does not print characters when shift is pressed.
Write following characters in sequence:
a
←
(left arrow key)B
Liner prints:
a
Expected behaviour
Liner should print
Ba
Complete sample that reproduces the bug
Run the code from VScode or GoLand, then write in terminal
a
←
(left arrow key)B
The text was updated successfully, but these errors were encountered: