-
Notifications
You must be signed in to change notification settings - Fork 13
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
To eval or not to eval #10
Comments
What are you suggesting, in terms of concrete Jupyter interactions? |
Suppose that I opened ;; foo.rkt
(provide foo)
(define (bar) 1)
(define (foo) (bar)) And I opened a jupyter notebook with ;; in notebook cell
(require "foo.rkt")
(foo) I run Later, I found that I would love to update the behavior of Now, if some magic happens, I would love to run the |
Thanks for clarifying. That might be possible. Here are some of the ingredients necessary for that to work:
Something similar is possible using Racket's default terminal interface (called xrepl) and the |
Thanks for pointing out the directions, I'll experiment with this. |
In Geiser document, there's a section To eval or not to eval. The main idea is to facilitate incremental development. by allowing users to evaluate code inside the context where it is defined (instead of top-level). This effectively re-defines the bindings in-place. This approach of course has some cons, but I think this is useful to provide the option.
I also noticed the recent update to the document here about "the hopeless top-level", so probably you already have some idea about whether this is desirable. The re-definition involving macros is of course trickier, re-definition of functions should be relatively smooth.
I think the way Geiser implemented this is completely on racket/scheme side, by keeping aware of namespace and context for evaluation. In Jupyter, different notebooks and file editors can be associated with the same kernel session. Thus I think this may be implementable. I'm looking into this, but I'm not sure when I can figure it out.
What do you think about this?
The text was updated successfully, but these errors were encountered: