GNU bug report logs - #46333
sbcl-common-lisp-jupyter does not install kernel.json

Previous Next

Package: guix;

Reported by: Jack Hill <jackhill <at> jackhill.us>

Date: Fri, 5 Feb 2021 19:45:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Jack Hill <jackhill <at> jackhill.us>
To: 46333 <at> debbugs.gnu.org
Subject: bug#46333: sbcl-common-lisp-jupyter does not install kernel.json
Date: Fri, 5 Feb 2021 14:44:08 -0500 (EST)
[Message part 1 (text/plain, inline)]
Hi Guix,

The sbcl-common-lisp-jupyter package does not install a kernel.json file. 
That's the file that tells Jupyter about the kernel and how to run it, and 
should be installed in /share/jupyter/kernels/<kernel-name>/kernel.json.

sbcl-common-lisp-jupyter doesn't come with a kernel.json file to install, 
but it can generate one with the following command line:

`sbcl --eval '(require "asdf")' --eval '(require :common-lisp-jupyter)' 
--eval '(cl-jupyter:install)' --eval '(exit)'`

(please pardon any awkwardness with the sbcl command line, I'm new to 
Common Lisp, and just wanted to play around with it in Jupyter)

That produces the following kernel.json in $HOME/.local/… (I've pretty 
printed it for clarity here:

```
{
  "interrupt_method": "message",
  "language": "common-lisp",
  "display_name": "Common Lisp",
  "argv": [
    "sbcl",
    "--eval",
    "(ql:quickload :common-lisp-jupyter)",
    "--eval",
    "(jupyter:run-kernel 'common-lisp-jupyter:kernel #\"{connection_file}\")"
  ]
}
```

Unfortunately that won't work out of the box, as we don't have quicklisp, 
but changing it to:

```
{
  "interrupt_method": "message",
  "language": "common-lisp",
  "display_name": "Common Lisp",
  "argv": [
    "sbcl",
    "--eval",
    "(require \"asdf\")",
    "--eval",
    "(require :common-lisp-jupyter)",
    "--eval",
    "(jupyter:run-kernel 'common-lisp-jupyter:kernel #\"{connection_file}\")"
  ]
}
```

allows Jupyter to run the kernel. We would of course need to also 
substitute the full store path for sbcl as well.

Is it worth having sbcl-common-lisp-jupyter generate the kernel.json, and 
then make many changes to it? Perhaps it would be better to just write out 
the correct definition of the file from Guix.

A final note is that the other Common Lisp implementation, like 
ecl-common-lisp-jupyter, also have this problem because they are created 
as transformation of the sbcl package. I'm not sure if the kernel.json is 
portable across the implementation or in general how to best to accomplish 
this change for our Common Lisp packages.

Best,
Jack

This bug report was last modified 3 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.