Skip to content

Interactive shell #11

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

Open
alanjds opened this issue Aug 21, 2018 · 2 comments
Open

Interactive shell #11

alanjds opened this issue Aug 21, 2018 · 2 comments
Labels
imported Imported from google/grumpy

Comments

@alanjds
Copy link

alanjds commented Aug 21, 2018

google#9 opened by @waitingkuo on 4 Jan 2017

Is it possible to launch a python interactive shell?

@alanjds
Copy link
Author

alanjds commented Aug 21, 2018

Comment by trotterdylan
Wednesday Jan 04, 2017 at 19:26 GMT


Currently the best option is "make run", like this:

$ make run
print 'hola'
^D

I'll leave this issue open to track progress on a nicer interactive experience.

@alanjds alanjds added the imported Imported from google/grumpy label Aug 21, 2018
@alanjds
Copy link
Author

alanjds commented Aug 23, 2018

I was thinking about this for a bit of time:

For me, the problem is the same of eval. How to have a running context and provide new code compiled after the first one?

Right now, I see two ways:

  1. Use an interpreter
  2. Compile and link the new code

For the interpreter, the https://github.com/RustPython/RustPython guys are building a promissing bytecode interpreter of CPython bytecodes. I can imagine Grumpy the future falling back to use it, or to have an own interpreter just to run eval stuff, but is unlikely.

A more feasible approach is to compile a dylib and link to the running grumpy process via the plugin feature of recent Go runtimes. The downside is that it needs a complete Go toolchain in the machine trying to do an eval, or access to a remote one with such capability plus the confidence to use external binary blobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported Imported from google/grumpy
Projects
None yet
Development

No branches or pull requests

1 participant