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

[DISCUSS] Implement $$.restart #154

Open
n-riesco opened this issue May 28, 2018 · 3 comments
Open

[DISCUSS] Implement $$.restart #154

n-riesco opened this issue May 28, 2018 · 3 comments

Comments

@n-riesco
Copy link
Owner

In some cases, it may be convenient to restart the kernel while keeping the session (so that frontends like Hydrogen and nteract can continue using the session).


Re #117

@ken-okabe
Copy link

ken-okabe commented Jul 22, 2018

I'm a beginner user of IJavascript, and thanks for the great implementation of the node kernel for Jupyter notebook.
Here's my thought using JupyterNotebook+IJavascript.
In general sense of software design, I'm sort of surprised to find the software frequently requires to "restart the kernel" itself. For instance, "Run All Cell" for the second time generates
SyntaxError: Identifier 'log' has already been declared
and required to restart the kernel which takes for a while where inefficient and resource consuming process. It's merely a document, and I don't know the reason to restart the whole kernel.
It's surely possible to "Run All Cell" without the kernel reboot, since opening new document with copying-paste the identical code can run properly without error (at least for the first time.)
Rebooting the software should be the last thing to do in the software design I believe.
Currently, I look for a work-around not to restart the kernel to avoid the syntax-error, and I barely could find there is "%reset" command for Python environment.
https://stackoverflow.com/questions/35492914/reset-an-ipython-kernel-without-restarting
This doesn't work for IJavascipt kernel mode, and I really want you implement $$.reset to reset environment variables instead of $$.restart.

@n-riesco
Copy link
Owner Author

@kenokabe Thank you for showing interest in $$.restart. In the meantime, I suggest treating Jupyter notebooks as if they were REPL sessions. In particular, for Javascript, I'd recommend the use of var (and avoid const and let) to define identifiers in the global scope.

@ken-okabe
Copy link

@n-riesco Thanks for the response. Yes, so far, I hack for a small patch to replace strings for const to var in NEL execution code. This is ok, since I deubg the code in IDE. However still, now ES6 is a language of block-scope and local variables, and so many adopted users of ES6 will see this const-syntax error for each re-evaluation of documents problematic I suppose. So please take this issue more seriously. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants