1. 09 Sep, 2019 4 commits
    • Ludovic Courtès's avatar
      messages: Provide a simpler 'header' procedure and export it. · 89d52b8f
      Ludovic Courtès authored
      * jupyter/messages.scm (<header>): Rename contructor to '%header'.
      (%protocol-version): New variable.
      (current-date-string, header, make-header): New procedures.
      (reply): Adjust to new 'header' API.
      (string->header): Likewise.
      89d52b8f
    • Ludovic Courtès's avatar
      Move messaging to (jupyter messages). · 2cc4a5cc
      Ludovic Courtès authored
      * guix-kernel/jupyter-client.scm (<header>, <message>, message)
      (make-message, message-parts, reply, message-type, message-sender)
      (string->header, header->string, parts->message, DELIM): Move to...
      * jupyter/messages.scm: ... here.  New file.
      (get-signature, make-id): New procedures.
      * guix-kernel/hmac.msc, guix-kernel/tools.scm, tests/tools.scm: Remove.
      * Makefile.am (SOURCES, SCM_TESTS): Adjust accordingly.
      * guix-jupyter-container.scm, guix-jupyter-kernel.scm,
      guix-kernel/jupyter-client.scm: Adjust import list accordingly.
      * tests/hmac.scm (get-signature): New variable.
      2cc4a5cc
    • Ludovic Courtès's avatar
      Remove <notebook>, use <kernel> throughout. · 30004d60
      Ludovic Courtès authored
      * guix-kernel/jupyter-client.scm (<notebook>, notebook): Remove.
      (json->notebook): Rename to...
      (json->kernel): ... this, and adjust accordingly.
      (read-message, send-message, relay-message, pub, pub-busy)
      (pub-idle, reply-html): Adjust accordingly.
      * guix-kernel/jupyter-server.scm (<kernel>)[key]: New field.
      (kernel-iopub): New macro.
      (kernel): Add #:key.
      (close-kernel): New procedure.
      * guix-jupyter-kernel.scm: Adjust, replacing "notebook" with "kernel".
      * guix-jupyter-container.scm: Likewise.
      30004d60
    • Ludovic Courtès's avatar
      Rewrite Jupyter messaging. · cc7fa604
      Ludovic Courtès authored
      Introduce <message> and <header> record that map directly to the Jupyter
      specs.
      
      This is a breaking change.
      cc7fa604
  2. 16 Oct, 2018 1 commit
  3. 15 Oct, 2018 1 commit
    • Ludovic Courtès's avatar
      client: Add a <notebook> record type and use it. · c7fd4571
      Ludovic Courtès authored
      * guix-kernel/jupyter-client.scm (<notebook>): New record type.
      (json->notebook, close-notebook): New procedures.
      * guix-jupyter-kernel.scm (%notebook): New variable.
      (notebook-info, get-notebook-info-atom)
      (notebook-info-control-port, notebook-info-shell-port)
      (notebook-info-transport, notebook-info-signature-scheme)
      (notebook-info-stdin-port, notebook-info-heartbeat-port)
      (notebook-info-ip, notebook-info-iopub-port)
      (notebook-info-key, create-address, context)
      (addr-heartbeat, addr-shell, addr-control, addr-iopub)
      (addr-stdin, socket-heartbeat, socket-shell, socket-control)
      (socket-iopub, socket-stdin, addresses, sockets): Remove.
      Remove top-level calls to 'zmq-set-socket-option' and
      'zmq-bind-socket'.
      (proxy-exec-container, heartbeat-handler, general-handler)
      (reply-kernel-info-request, reply-execute-request)
      (start-container, start-kernel): Refer to %NOTEBOOK instead of referring
      to the individual variables.
      (atexit, sig-exit-handler): Remove.
      (shutdown): Remove call to 'atexit'.
      (exit-handler): New procedure.
      Use it in top-level 'sigaction' calls.
      c7fd4571
  4. 24 Sep, 2018 1 commit
    • Ludovic Courtès's avatar
      Send and receive bytevectors. · da295031
      Ludovic Courtès authored
      This avoids the occasional string decoding error for byte streams that
      were not actual UTF-8 strings.
      
      This is based on commit fbab29d738b46d8637579ccec93be49520a4606f ("Fixed
      a bug when the kernel could not send kernel_info (1 minute pause after
      notebook starts)") of <https://github.com/jerry40/guile-kernel
      
      >.
      
      * guix-jupyter-container.scm (reply-execute-request): Turn UUID into a
      bytevector.
      * guix-jupyter-kernel.scm (send-to-container): Turn NAME into a
      bytevector and use 'zmq-send-msg-parts-bytevector'.
      (heartbeat-handler): Use '-bytevector' send and receive procedures.
      (general-handler): Likewise.  Add calls to 'utf8->string' as needed.
      * guix-kernel/jupyter-client.scm (send-to-jupyter)
      (pub): Likewise.
      * guix-kernel/jupyter-server.scm (run-kernel): Likewise.
      
      Co-authored-by: default avatarjerry40 <epanfilov@gmail.com>
      da295031
  5. 20 Jul, 2018 1 commit
    • ROUBY Pierre-Antoine's avatar
      guix-kernel: Use 'reply-html' in kernel. · bb386a21
      ROUBY Pierre-Antoine authored
      * guix-jupyter-kernel.scm: Get magic command 'html'.
      * guix-jupyter-container.scm (reply-html-to-kernel): Add
        'guix-end-of-eval' message.
      * guix-kernel/jupyter-client.scm (reply-html): Remove
        'guix-end-of-eval' message.
      bb386a21
  6. 17 Jul, 2018 1 commit
    • ROUBY Pierre-Antoine's avatar
      guix-kernel: Add ipython. · 0c25abe7
      ROUBY Pierre-Antoine authored
      * guix-jupyter-container.scm (proxy-exec-kernel): Get streams message
        type.
        (local-eval): Send 'guix-end-of-eval' message.
      * guix-jupyter-kernel.scm (proxy-exec-container): Get streams message
        type.
      * guix-kernel/jupyter-client.scm (reply-html): Send 'guix-end-of-eval'
        message.
      * guix-kernel/jupyter-server.scm (exec-kernel): Add IPython.
      0c25abe7
  7. 13 Jul, 2018 1 commit
    • ROUBY Pierre-Antoine's avatar
      guix-kernel: Reply html at environment creation. · 7a019ac3
      ROUBY Pierre-Antoine authored
      * guix-kernel/magic.scm (magic-html?): New procedure.
      * guix-jupyter-container.scm (reply-html-to-kernel,
        kernel-info->html): New procedures.
      * guix-jupyter-kernel.scm: Minor change.
      * guix-kernel/html.scm: New file.
      * guix-kernel/jupyter-client.scm (reply-html): New procedure.
      * Makefile.am: Add 'guix-kernel/html.scm'.
      * guix-kernel-demo.ipynb: Add example for new features.
      7a019ac3
  8. 03 Jul, 2018 1 commit
    • ROUBY Pierre-Antoine's avatar
      guix-kernel: Add modules jupyter-client. · 81d3619b
      ROUBY Pierre-Antoine authored
      * guix-kernel/jupyter-client.scm: New file.
      * guix-jupyter-container.scm: Use module 'guix-kernel jupyter-client'.
      * guix-jupyter-kernel.scm: Use module 'guix-kernel jupyter-client'.
      * Makefile.am: Add 'guix-kernel/jupyter-client.scm' to SOURCE.
      81d3619b