A MIT/GNU Scheme Jupyter kernel based on metakernel
Project description
mit-scheme-kernel
A MIT/GNU Scheme Jupyter kernel based on metakernel.
Features
- Interactive execution of MIT/GNU Scheme code in Jupyter notebooks.
- The kernel can be configured to use a different Scheme installation, such as the one provided by the Scmutils library. See the Configuration section below for more information.
- Implements a cell magic command
%%show_expressionto render the output of a cell into LaTeX, in the same way as theshow-expressionfunction in theSmcutils. See the mechanics notebook for an example. - Plus all the features provided by metakernel.
Installation
Pre-requisites
It requires MIT/GNU Scheme to be installed (it expects the mit-scheme executable to be on the PATH).
Depending on the configuration, Scmutils may be required. See the installation instructions.
Installation
pip install mit-scheme-kernel
Post-installation
Run one of the following commands provided by metakernel:
# Install the kernel for the current Python environment
python -m mit_scheme_kernel install --sys-prefix
# Install the kernel for the current user
python -m mit_scheme_kernel install --user
# Global installation, might require root privileges
python -m mit_scheme_kernel install
# To find additional installation options, run:
python -m mit_scheme_kernel install --help
Configuration
There are a few configuration options available to customize the kernel's behavior. See the default configuration file for a description of these options.
To override the default configuration, create a YAML file containing the options you want to change and set the MIT_SCHEME_KERNEL_CONFIG environment variable to the file's absolute path.
For example, to change the mit-scheme executable to mechanics (the executable created when installing the Scmutils library):
cat > /tmp/my_config.yaml << EOF
executable: mechanics
filter_output: true
output_value_regex: ^\#\|\s*(.+)\s*\|\#$
EOF
export MIT_SCHEME_KERNEL_CONFIG=/tmp/my_config.yaml
# start Jupyter Notebook
Contributing
Contributions are more than welcome! If you have any suggestions, ideas, or improvements, please feel free to open an issue or a pull request. If you have any questions or would like to start a discussion, please feel free to reach out.
Take a look at the contributing guidelines for more information.
Credits
- This kernel is built on top of Calysto/Metakernel.
- This kernel relies on MIT/GNU Scheme as its Scheme implementation and was originally inspired by the excellent book The Structure and Interpretation of Classical Mechanics (MIT Press, 2015, second edition) by Gerald Jay Sussman and Jack Wisdom.
- This kernel uses the impressive functionality provided by the Jupyter Project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mit_scheme_kernel-0.1.5.tar.gz.
File metadata
- Download URL: mit_scheme_kernel-0.1.5.tar.gz
- Upload date:
- Size: 85.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4395f38644331cbd18bd5d9539fe3dee67b174efe773aa95c4313ae0d81101c4
|
|
| MD5 |
a32b4aeaf5f82ebde67c1884b6e4f6bf
|
|
| BLAKE2b-256 |
5bed83b0f046efa0c80f06d7102d96a90db8a803b86dda841179c9a32ad94f60
|
File details
Details for the file mit_scheme_kernel-0.1.5-py3-none-any.whl.
File metadata
- Download URL: mit_scheme_kernel-0.1.5-py3-none-any.whl
- Upload date:
- Size: 87.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5365ac753ccc6a3e7cf53d958e43e685acf5341b499d6c7d03ef058b8c0848fe
|
|
| MD5 |
01c13b0a02be6d3817bc25cf80a26f93
|
|
| BLAKE2b-256 |
3c2660c3c0c86f2b1afa78a596d4304d38555d42966ebebb59de1758c9d07fbe
|