-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
npx ezno repl spews error message #205
Comments
The problem is that the REPL expects a synchronous callback function that prints a prompt and expects string feedback. In Rust you can write a blocking stdin request and in Deno you can use the web For node, last time I checked I don't think was a blocking stdin function (all callback or I could make it in JS to request to the line checker but the way it currently works is built into the CLI and is a bit of work and duplication logic in JS. The REPL is an experiment thing so I don't have too much motivation to fix it for this architectural edge case. Thus why it just prints this debug message at the moment. |
I don't think that it's a reasonable expectation to synchronously wait for user input. In a web browser, for instance, doing so would mean you have to hang the rendering loop and all event handlers. That said, I don't know if it even makes sense to have a repl coded in WASM. I'd probably reuse |
Hmm yes, I think I should just disable the The web playground is a newer better way to interact with the checker. Maybe could revisit at some point but want to think about the least amount of code and best performant way to support this. |
That works.
It's very cool to have a web playground! I don't feel strongly about a command-line repl versus a web playground, but I do love the discoverability and ease of experimentation promised by Maybe |
Might be difficult to spin the playground up locally but opening |
I had a fairly easy time running it locally. Not sure your vision of the future re: cli.js and cli.rs, but in either rust or js, it doesn’t seem too crazy to I don’t like linking to the central page because (1) it requires a network connection (2) the web version won’t match the app version in general. |
I was thinking that maybe I could abstract the playground as a component out of the page, which would make this easier. The other problem is that the playground uses the local WASM build. If I was to build it into the CLI it would require compiling the CLI to be A better way is rather than the running the checker in the browser, it could instead communicate locally with the ASM checker via fetches, etc. It is a nice idea, be cool to have something like that one day but it is quite low priority atm |
I don't think this makes it any easier (but maybe I don't understand what you're suggesting).
This is something I didn't properly appreciate. I figured the checker would be compiled to WASM once and that the cli either:
|
npx ezno repl
repeatedly prints "Prompt not supported in NodeJS (sync issue)".It should either:
The text was updated successfully, but these errors were encountered: