unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46333: sbcl-common-lisp-jupyter does not install kernel.json
@ 2021-02-05 19:44 Jack Hill
  2021-05-18 16:12 ` Jack Hill
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jack Hill @ 2021-02-05 19:44 UTC (permalink / raw)
  To: 46333

[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-14 21:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-05 19:44 bug#46333: sbcl-common-lisp-jupyter does not install kernel.json Jack Hill
2021-05-18 16:12 ` Jack Hill
2021-05-18 16:58   ` Guillaume Le Vaillant
2021-05-19 22:23     ` Sharlatan Hellseher
2021-05-24 21:28       ` Sharlatan Hellseher
2021-05-25 15:40         ` Guillaume Le Vaillant
2021-06-08 14:48 ` bug#46333: Install Command Line Tarn Burton
2021-06-14 15:21 ` bug#46333: Typos Tarn Burton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).