Commit graph

117 commits

Author SHA1 Message Date
Nathaniel Nicandro
160d6bd9ae Ensure jupyter-inhibit-handlers is dynamically bound 2023-06-07 21:30:33 -05:00
Nathaniel Nicandro
e0c6ee1a72 Declare some functions 2023-06-07 21:30:12 -05:00
Nathaniel Nicandro
48b25fd5e3 jupyter-io-nil -> jupyter--return-nil 2023-05-08 21:03:16 -05:00
Nathaniel Nicandro
5a77e4188c jupyter-return: Add a compiler macro 2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
d021240f35 jupyter-monads.el: Remove mentions of I/O where none are needed 2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
eeb5c9c248 jupyter-bind-delayed -> jupyter-bind 2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
4e8da80ac0 Move jupyter-io definition to jupyter-base.el 2023-02-13 20:30:20 -06:00
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
dabcf2a5b8 jupyter-mlet*: Simplify 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
b96ed78418 jupyter-mlet*: Remove an unneeded let binding 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
969cb1ebd7 Add a way to debug the message stream from a kernel
Previously it was hard to step through the code whenever messages were
coming in live from a kernel due to the asynchronous nature of
handling process output in Emacs.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
3b94b2b4dc Fix jupyter-mlet* binding 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
d4c9e24465 Remove jupyter-then 2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
b7ca2d47fa jupyter-return-delayed-thunk: Use thunk-delay
This makes it so that when a delayed value is bound, via
`jupyter-mlet*`, it always results in the same value as was computed
the first time it was bound.  Previously the computation associated
with the delayed value would occur each time it was bound, resulting
in a newly computed value each time.
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
423bdd76d8 Add jupyter-result 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
13935fe38f Add jupyter-return-delayed-thunk 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
45e611a2d8 Remove jupyter--subscribe 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
a4a48f772b Refactor to remove a use of jupyter-current-io 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
1dacde77b8 Update commentary 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
31d79dfd84 Remove do prefix of kernel action functions 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
9b4877c603 Document some functions 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
07bdc46a87 Move some code to a more appropriate place 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
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
e1221d55a1 Add :parent-request member when publishing request messages 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
37a74e601b Actually delay generation of request in jupyter-request 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
0f271ec322 monads: Reword doc 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
b763c09778 Remove unused functions 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
9dd6268fa5 Remove some comments 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
ef26ef1b08 Remove jupyter-io 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
a23f8fe864 Use jupyter-generate-request in jupyter-request 2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
ab616e4609 Simplify jupyter-request message collecting 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
e133c34707 Add do prefix to launch,shutdown,interrupt functions of a kernel
launch,shutdown,interrupt are now monadic functions.
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
f5d8e7c535 Remove unused function 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
bd6e2c3228 jupyter-monads.el: Require jupyter-base 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
84b2e140a4 jupyter-publisher: Mention jupyter-subscriber in doc 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
fa43656632 jupyter-pseudo-bind-content: Mention errors in doc 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
f28c1c649a Make jupyter-request pure 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
fc0321a1fd Distinguish between a publisher and subscriber error 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
1739346990 Remove unused function 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
61776abcce Add WebSocket I/O 2023-02-13 20:22:50 -06:00