Skip to content

lisp/cl-jupyter

 
 

Repository files navigation

cl-jupyter

An enhanced interactive Shell for Common Lisp (based on the Jupyter protocol)

 cl-jupyter: an enhanced interactive Common Lisp Shell
(Version 0.7 - Ipython protocol v.5.0)
--> (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
                                 __________       
                                /         /.      
     .-----------------.       /_________/ |      
    /                 / |      |         | |      
   /+================+\ |      | |====|  | |      
   ||cl-jupyter      || |      |         | |      
   ||                || |      | |====|  | |      
   ||* (fact 5)      || |      |         | |      
   ||120             || |      |   ___   | |      
   ||                || |      |  |166|  | |      
   ||                ||/@@@    |   ---   | |      
   \+================+/    @   |_________|./.     
                         @           ..  ....'    
     ..................@      __.'. '  ''         
    /oooooooooooooooo//      ///                  
   /................//      /_/                   
   ------------------                          

Important : this is beta-quality software, expect (and please report) some bugs...

Requirements

To try cl-jupyter you need :

  • a Common lisp implementation, for now

    • either SBCL 1.2.x or above (with native threads enabled)

    • or Clozure CL 1.10 or above (with native threads enabled) ...

    • ECL is planned, for other implementations please fill an issue.

  • Quicklisp (cf. http://www.quicklisp.org)

  • Python 3.x (cf. http://www.python.org)

  • Jupyter (a.k.a. IPython 4.x) or IPython 3.x (cf. http://www.jupyter.org)

Quick install

Please run the installation script :

python3 ./install-cl-jupyter.py

By default, cl-jupyter assumes SBCL as the default lisp implementation. Using CCL instead requires the following command line:

python3 ./install-cl-jupyter.py  --lisp=ccl

Note: cl-jupyter seems to work better with CCL on MacOS but on Linux everything's fine with SBCL and it is the most tested configuration. Alas, it seems cl-jupyter does not work on Windows (I cannot try myself). If using a VM I would recommend the Linux/SBCL configuration.

As an optional step, you can pre-install the quicklisp dependencies to avoid a veeeerrrry long first startup.

  • using SBCL

    sbcl --load ./cl-jupyter.lisp
    
  • using CCL

    ccl --load ./cl-jupyter.lisp
    

Running cl-jupyter

The console mode is a simple REPL that is useful to check that cl-jupyter is working.

Console mode

  • for Jupyter

     jupyter console --kernel=lisp
    
  • for IPython 3.x

     ipython3 console --kernel=lisp
    

Notebooks

The real interest of cl-jupyter is its use conjointly with the Jupyter notebook frontend. For a try, type:

  • for Jupyter

    jupyter notebook
    
  • for IPython 3.x

    ipython3 notebook
    

The file about-cl-jupyter.ipynb is an example of a Lisp-based notebook.

The file about-cl-jupyter.pdf is a printable PDF version of this notebook that can be generated by the Jupyter nbconvert tool.


... have fun !

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 81.4%
  • Common Lisp 15.0%
  • Python 2.1%
  • JavaScript 1.5%