Finn Völkel / May 26 2020
Common Lisp environment
Show off:
(+ 1 2)0.1s
Lisp
Common Lisp
3
(defun fibonacci (n) (let ((a 0) (b 1) (c n)) (loop for i from 2 to n do (setq c (+ a b) a b b c)) c)) (fibonacci 12)0.0s
Lisp
Common Lisp
144
Installing sbcl (there are newer versions available but they require a newer version of glibc and they currently don't ship with ubuntu).
VERSION=1.4.5wget https://prdownloads.sourceforge.net/sbcl/sbcl-${VERSION}-x86-64-linux-binary.tar.bz2tar -xvjf sbcl-${VERSION}-x86-64-linux-binary.tar.bz2 cd sbcl-$VERSION-x86-64-linuxsh install.sh11.1s
Common Lisp (Bash)
sbcl --version1.0s
Common Lisp (Bash)
Installing jupyter and the kernel.
pip install jupyter jupyter_client \ git+https://github.com/nextjournal/jupyter_core6.7s
Common Lisp (Bash)
I forked an existing kernel and hardcoded some IP. There is probably a more graceful way to do things, but this was quick an easy.
rm -rf cl-jupytergit clone https://github.com/fiv0/cl-jupyter.gitcd cl-jupyterpython3 ./install-cl-jupyter.py4.4s
Common Lisp (Bash)
du -hsx /sbcl --versionjupyter kernelspec list7.4s
Common Lisp (Bash)
Installing quicklisp
wget -O /tmp/ql.lisp http://beta.quicklisp.org/quicklisp.lispsbcl --no-sysinit --no-userinit --load /tmp/ql.lisp \ --eval '(quicklisp-quickstart:install :path "~/.quicklisp")' \ --eval '(ql:add-to-init-file)' \ --quit25.2s
Common Lisp (Bash)
#-quicklisp(let ((quicklisp-init (merge-pathnames ".quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))).sbclrc
CommonLisp
{ "ip": "0.0.0.0", "transport": "tcp", "stdin_port": 55555, "control_port": 55556, "hb_port": 55557, "shell_port": 55558, "iopub_port": 55559, "signature_scheme": "hmac-sha256", "key": "session-secret"}kernel.json
JSON
(require "asdf")(asdf:asdf-version)asdf-testing.lisp
CommonLisp
sbcl --non-interactive --load /asdf-testing.lisp1.5s
Common Lisp (Bash)