Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nilqed/jucl
A (almost) fool-proof Jupyter kernel for Common Lisp
https://github.com/nilqed/jucl
common-lisp jupyter jupyter-kernel
Last synced: 11 days ago
JSON representation
A (almost) fool-proof Jupyter kernel for Common Lisp
- Host: GitHub
- URL: https://github.com/nilqed/jucl
- Owner: nilqed
- License: mit
- Created: 2025-01-17T12:00:32.000Z (14 days ago)
- Default Branch: main
- Last Pushed: 2025-01-17T13:33:09.000Z (14 days ago)
- Last Synced: 2025-01-17T14:28:10.796Z (14 days ago)
- Topics: common-lisp, jupyter, jupyter-kernel
- Language: Python
- Homepage:
- Size: 601 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# juCL
A (almost) fool-proof Jupyter kernel for Common Lisp in very few lines of lisp and py.:warning: in progress :construction:
Instead of implementing the kernel in CL itself, we use
IPython’s kernel machinery[^1] and
__Hunchentoot__[^2] (the awesome Common Lisp web server) for the
communication.## Installation
There are three files necessary1. `jucl.py` -- the wrapper kernel (python3)
2. `jucl.lisp` -- loads Hunchentoot (POPEN in `jucl.py`)
3. `kernel.json` -- the kernel specTo install them, clone this repo and either run `./ìnstall.sh` or perform the commands manually:
# Install kernel.json
jupyter kernelspec install ./ --name='jucl' --user
jupyter kernelspec list# Search for Python user site
PYUSRSITE=$(python3 -m site --user-site)# Copy kernel and server
mkdir -p -v $PYUSRSITE/jucl
cp -v ./jucl.py $PYUSRSITE/jucl
cp -v ./jucl.lisp $PYUSRSITE/juclThe prerequisites are of course:
* a CL + QuickLisp (only __SBCL__ tested at the moment)
* Python 3: `jupyter` and the `requests` library (pip).## Start
After installation try$ cd /tmp
$ jupyter notebook
choose `juCL`![select-kernel](./docs/jucl1.jpg?raw=true)
Try some CL commands
![notebook](./docs/jucl2.jpg?raw=true)
Notice the terminal, where `SBCL` is running. One may ignore it, however,
it accepts cl commands as well (sharing common env!).![terminal](./docs/jucl3.jpg?raw=true)
Last but not least, there is the jupyter console showing the log.
![jupyter-log](./docs/jucl4.jpg?raw=true)
## For Developers
TODO: see branch *stage1* (a.s. [similar](https://github.com/nilqed/jfricas.pip)📅 17-JAN-2025
[^1]:https://jupyter-client.readthedocs.io/en/stable/wrapperkernels.html
[^2]:https://edicl.github.io/hunchentoot/