Commit graph

487 commits

Author SHA1 Message Date
Nathaniel Nicandro
a5390637d1 jupyter-return-delayed -> jupyter-return 2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
6c55e5bae5 Remove jupyter-current-io 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
c53d15af6d Introduce accessor function to a client's IO slot 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
a5399f793c Rename jupyter-send to jupyter-sent
`jupyter-send` is already defined as a method which takes more than
one argument and I couldn't figure out how to make it so that I could
add a method which takes a single argument.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
5d7d1e1dc8 Replace call to jupyter-add-callback with jupyter-subscriber equivalent
`jupyter-add-callback` no longer exists.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
0a9aeb86bd Silence the byte compiler 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
32376a22b5 Remove jupyter--eval-insert-execute-result 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
8255cc2f17 Implement the state monad more accurately 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
d25d9a48dd jupyter-eval-result-callbacks: Add missing region variable 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
801a2d9da3 Work around a bug when using jupyter-with-client in jupyter-kernel-info
There would be a `max-lisp-eval-depth` error issued when attempting to
let bind `jupyter-current-client` for some reason.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
5ca326ffd4 Signal an unbound-slot error when a client isn't connected in some functions
Previously these functions would do nothing when a client isn't
connected, but it would be useful to raise an error for debugging
purposes.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
99c981c1cc Fix unbound variable error 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
d061c6eb89 Rename jupyter-reply-message -> jupyter-reply 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
ae9b0c0c84 Use jupyter-result in one place 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
a530037553 Remove unnecessary cl-defgeneric 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
c74da6bd94 Remove stale documentation 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
a852074c30 Fix unbound slot reference 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
313cc02fa6 Re-add the jupyter-io method 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
56ada9392b Remove unused slot 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
3db7446f3a Don't disconnect client after restart 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
d32f293f86 Fix void variable 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
f92e14f62b Add jupyter-restart-kernel 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
66a72ad24c Resurrect jupyter-finalized-object 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
dcdda2bf92 Remove unused function 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
c1bff794d0 Add jupyter-reply-message 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
0b32635a3a Remove some unused functions 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
3c2cc77348 Remove the callbacks slot of a jupyter-request
Callbacks are added to a request using `jupyter-message-subscribed`.
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
fdf6407616 Remove a use of jupyter-request-last-message 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
bb12d37e05 Fix input_request handling 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
877070ea89 Remove a use of jupyter-request-callbacks 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
8acb7bc487 Simplify jupyter-wait-until-idle 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
22d2a3f327 Remove the jupyter-send method...
- Add a `message-publisher` slot to `jupyter-request`, set when
  sending a request.

- `*-request` functions now return a delayed request value instead of
  a request. Update call sites.

- Add the functions `jupyter-messages`, `jupyter-idle`,
`jupyter-message-subscribed` and `jupyter-client-subscribed`.

- Move client subscription to a request's messages to
  `jupyter-client-subscribed`.

- Request callbacks are now added via `jupyter-message-subscribed`.

- Reduce usage of callbacks in favor of searching `jupyter-messages`
  where appropriate.

- Update tests
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
f957696f26 Set jupyter-current-io in jupyter-with-client 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
6842b84e2e Verify jupyter-inhibit-handlers outside of jupyter-send 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
039decdc97 Remove calls of jupyter-wait-until-received 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
d89e5f104d jupyter-eval-add-callbacks -> jupyter-eval-callbacks 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
ac35f52e02 Add :callbacks and :handlers keys to request calls 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
bbb32457a9 Remove requests slot of a client 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
b46cf42aa3 Remove jupyter-last-sent-request 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
f48900213f Remove jupyter-drop-request and related
Transitioning away from relying on a client requests table.
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
422c59ee48 Remove the pending request interface 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
e1221d55a1 Add :parent-request member when publishing request messages 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
a76d772716 (send ... (request ...)) -> (request ...) 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
dfd1d1e02d Remove the kernel slot of a client
`jupyter-websocket-io` now returns, in addition to an IO function, a
kernel action subscriber.  A client now sends messages to the
subscriber to interrupt or shutdown a kernel instead of doing so using
a `kernel` slot.

Also add the `jupyter-kernel-action` convenience function for
evaluating arbitrary code on a client's kernel.
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
e10efe4274 Remove no longer used functions 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
e03cedea10 Fix jupyter-shutdown-kernel
Sending a shutdown request actually restarts a kernel behind a Jupyter
notebook, so shutdown using the kernel's method.

Disconnect the client after shutting down so that
`jupyter-connected-p` returns nil after shutdown.
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
dc336ae638 Fix input_request client handler 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
134167e65e Remove keyword message types 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
a430f4f0e1 Remove jupyter-channels-running-p 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
436329ee50 Fix wrong slot name 2023-02-13 20:25:05 -06:00