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

Feature to read/process raw inputs from stdin in @lune/stdio #258

Open
Sythivo opened this issue Sep 19, 2024 · 3 comments
Open

Feature to read/process raw inputs from stdin in @lune/stdio #258

Sythivo opened this issue Sep 19, 2024 · 3 comments
Labels
enhancement New feature or request pending / needs design Awaiting design and/or implementation discussion and decisions

Comments

@Sythivo
Copy link

Sythivo commented Sep 19, 2024

A way to read inputs directly from stdin, or another lune api to get arrow inputs from user in real-time. Current workaround is using stdio.prompt, but this is not in real-time and would force the user to select an option.

Related to: luau-snake#1

@CompeyDev
Copy link
Contributor

Does stdio.readToEnd not support your needs?

@Sythivo
Copy link
Author

Sythivo commented Sep 20, 2024

I have tried readToEnd but the function does not return immediate inputs. It also would never return a value, somewhat hanging, even after pressing enter.

@CompeyDev
Copy link
Contributor

It reads until EOF, so maybe not the best for realtime input. Unfortunately it's quite challenging to have a non-blocking alternative to readToEnd as pointed out in #152.

@filiptibell filiptibell added enhancement New feature or request pending / needs design Awaiting design and/or implementation discussion and decisions labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending / needs design Awaiting design and/or implementation discussion and decisions
Projects
None yet
Development

No branches or pull requests

3 participants