From the book Introduction to the Practice of Statistics
Explore the docs »
Report Bug
·
Request Feature
·
View Outputs
This repository contains worked Jupyter notebook examples from the book, Introduction to the Practice of Statistics, ninth edition.
To get a local copy up and running follow these steps:
An ANSI Common Lisp implementation. Developed and tested with SBCL
- Install common-lisp-jupyter
- Clone the repository
cd ~/quicklisp/local-projects && git clone https://github.com/Lisp-Stat/IPS.git
- Reset the ASDF source-registry to find the new system (from the REPL)
(asdf:clear-source-registry)
- Load the system
(ql:quickload :ips)
Run Jupyter-Lab in the IPS directory above. You should see the example notebooks.
common-lisp-jupyter (JupyterLab) and VS Code take different approaches to cell execution, and there isn't (yet) a good VS Code extension for Common Lisp. If you run a notebook in VS Code you should set the cell language to 'clojure', which is the closest language for which VS Code does have support. You'll lose some of the Common Lisp syntax highlighting, but the cells will run. Here's a detailed explanation of the differences:
- No cell-level language identifiers - cells don't have individual language metadata
- Kernel determines everything - the notebook kernel (Python, R, Julia, Common Lisp, etc.) handles all code execution and language features
- Uniform syntax highlighting - all code cells use the same syntax highlighting based on the kernel language
- Simple model - one kernel = one language for the entire notebook
- Cell-level language metadata - each cell can have its own language identifier
- Hybrid approach - kernel handles execution, but cell language affects editor features
- Per-cell syntax highlighting - each cell can have different syntax highlighting
- More complex - allows mixed-language notebooks (though execution still goes through one kernel)
VS Code's approach allows for:
- Better editor integration - language servers, IntelliSense, error checking per cell
- Mixed content - you could have SQL in one cell, Python in another (with appropriate kernels)
- Consistent editor experience - same language features as regular files
- Flexibility - syntax highlighting can differ from execution kernel
JupyterLab's simpler approach:
- No language confusion - kernel = language
- Consistent experience
- No metadata overhead
VS Code's approach:
- More flexible and powerful
- Can create confusion
- Requires language metadata management
In JupyterLab with a Common Lisp kernel:
- All cells automatically get Common Lisp syntax highlighting
- No need to specify language per cell
- Kernel handles everything
In VS Code:
- You need to set cell language to the closest syntax (Clojure)
See the open issues for a list of proposed features (and known issues). We will include additional examples in the chapter order of the book
This system is part of the Lisp-Stat project; that should be your first stop for information. Also see the
community page for more information.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Please see CONTRIBUTING for details on the code of conduct, and the process for submitting pull requests.
Distributed under the MS-PL License. See LICENSE for more information.
Project Link: https://github.com/lisp-stat/IPS