-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement a REPL #2
Comments
#39 is merged. I think it still needs some work. |
In particular, it starts a kernel subprocess, sleeps 1 second, and then launches jupyter console. This is brittle. If the system is too busy, the console may try to start before the kernel is ready. Increasing the sleep time by more than a couple of seconds would be annoying most of the time. I feel like there should be a better way to do this, but I can't find good enough documentation. The obvious way (passing jupyter console the subprocess list) was deprecated, and I can't seem to make it work anyway. Installing the kernel seems to work globally, even if done in a virtualenv, and I can't seem to make it work anyway (although we will want this feature working eventually). Waiting until the kernel prints something might be good enough. Or maybe I can have it retry a few times. Unfortunately, it will include a "keeping kernel alive" message on exit, and I'm not sure how to stop that either. Minor nit, the REPL will ask for more lines if |
Some edge cases in how the REPL asks for more lines:
Maybe something like Lissp's |
Trouble:
It should have asked for another line. Yes, this much is valid, but more would also have been valid so ending here is premature. |
Simple regex can't distinguish these edge cases. Not that they'd come up much. Distinguishing them seems harder. I'd have to at least write a proper lexer. But duh, I've already got one of those in the parser module. I can just use that. |
#64 fixes the regression and the nit. |
A REPL is certainly implemented now (and has been for some time), it just has some problems, which ought to be tracked in separate issues. Closing. |
Basing one on IPython might be a good idea. We'd also get a Jupyter kernel out of it.
The text was updated successfully, but these errors were encountered: