# mit-scheme-kernel
A MIT/GNU Scheme Jupyter kernel based on [metakernel](https://github.com/Calysto/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](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html). See the [Configuration](#configuration) section below for more information.
- Implements a cell magic command `%%show_expression` to render the output of a cell into LaTeX, in the same way as the `show-expression` function in the `Smcutils`. See the [mechanics notebook](./examples/mechanics.ipynb) for an example.
- Plus all the features provided by [metakernel](https://github.com/Calysto/metakernel).
## Installation
### Pre-requisites
It requires [MIT/GNU Scheme](https://www.gnu.org/software/mit-scheme/) to be installed (it expects the `mit-scheme` executable to be on the `PATH`).
Depending on the [configuration](#configuration), [Scmutils](https://github.com/slavad/scmutils) may be required. See the [installation instructions](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html).
### Installation
```bash
pip install mit-scheme-kernel
```
### Post-installation
Run one of the following commands provided by [metakernel](https://github.com/Calysto/metakernel):
```bash
# 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](./src/mit_scheme_kernel/config.yaml) 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](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html)):
```bash
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](./CONTRIBUTING.md) for more information.
## Credits
- This kernel is built on top of [Calysto/Metakernel](https://github.com/Calysto/metakernel).
- This kernel relies on [GNU/MIT Scheme](https://www.gnu.org/software/mit-scheme/) as its Scheme implementation and was originally inspired by the excellent book [The Structure and Interpretation of Classical Mechanics](https://mitpress.mit.edu/9780262028967/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](https://jupyter.org/).
Raw data
{
"_id": null,
"home_page": null,
"name": "mit-scheme-kernel",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Diego Sandoval <dsandovalv@gmail.com>",
"keywords": "jupyter, mechanics, metakernel, mit-scheme, mit-scheme-kernel, scheme, scmutils",
"author": null,
"author_email": "Diego Sandoval <dsandovalv@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/60/fd/0fc82eff08a7c679c2ff69057f04059634d3a5c508c72cb629a74c383038/mit_scheme_kernel-0.1.4.tar.gz",
"platform": null,
"description": "# mit-scheme-kernel\n\n\n\nA MIT/GNU Scheme Jupyter kernel based on [metakernel](https://github.com/Calysto/metakernel).\n\n## Features\n\n- Interactive execution of MIT/GNU Scheme code in Jupyter notebooks.\n- The kernel can be configured to use a different Scheme installation, such as the one provided by the [Scmutils library](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html). See the [Configuration](#configuration) section below for more information.\n- Implements a cell magic command `%%show_expression` to render the output of a cell into LaTeX, in the same way as the `show-expression` function in the `Smcutils`. See the [mechanics notebook](./examples/mechanics.ipynb) for an example.\n- Plus all the features provided by [metakernel](https://github.com/Calysto/metakernel).\n\n## Installation\n\n### Pre-requisites\n\nIt requires [MIT/GNU Scheme](https://www.gnu.org/software/mit-scheme/) to be installed (it expects the `mit-scheme` executable to be on the `PATH`).\n\nDepending on the [configuration](#configuration), [Scmutils](https://github.com/slavad/scmutils) may be required. See the [installation instructions](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html).\n\n\n### Installation\n\n```bash\npip install mit-scheme-kernel\n```\n\n\n### Post-installation\n\nRun one of the following commands provided by [metakernel](https://github.com/Calysto/metakernel):\n\n```bash\n# Install the kernel for the current Python environment\npython -m mit_scheme_kernel install --sys-prefix\n\n# Install the kernel for the current user\npython -m mit_scheme_kernel install --user\n\n# Global installation, might require root privileges\npython -m mit_scheme_kernel install\n\n# To find additional installation options, run:\npython -m mit_scheme_kernel install --help\n```\n\n## Configuration\n\nThere are a few configuration options available to customize the kernel's behavior. See the [default configuration file](./src/mit_scheme_kernel/config.yaml) for a description of these options.\n\nTo 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.\n\nFor example, to change the `mit-scheme` executable to `mechanics` (the executable created when installing the [Scmutils library](https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html)):\n\n```bash\ncat > /tmp/my_config.yaml << EOF\nexecutable: mechanics\nfilter_output: true\noutput_value_regex: ^\\#\\|\\s*(.+)\\s*\\|\\#$\nEOF\n\nexport MIT_SCHEME_KERNEL_CONFIG=/tmp/my_config.yaml\n# start Jupyter Notebook\n```\n\n## Contributing\n\nContributions 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.\n\nTake a look at the [contributing guidelines](./CONTRIBUTING.md) for more information.\n\n## Credits\n\n- This kernel is built on top of [Calysto/Metakernel](https://github.com/Calysto/metakernel).\n- This kernel relies on [GNU/MIT Scheme](https://www.gnu.org/software/mit-scheme/) as its Scheme implementation and was originally inspired by the excellent book [The Structure and Interpretation of Classical Mechanics](https://mitpress.mit.edu/9780262028967/structure-and-interpretation-of-classical-mechanics/) (MIT Press, 2015, second edition) by Gerald Jay Sussman and Jack Wisdom.\n- This kernel uses the impressive functionality provided by the [Jupyter Project](https://jupyter.org/).\n",
"bugtrack_url": null,
"license": null,
"summary": "A MIT/GNU Scheme Jupyter kernel based on metakernel",
"version": "0.1.4",
"project_urls": {
"Documentation": "https://github.com/twaclaw/mit-scheme-kernel",
"Homepage": "https://github.com/twaclaw/mit-scheme-kernel",
"Issues": "https://github.com/twaclaw/mit-scheme-kernel/issues"
},
"split_keywords": [
"jupyter",
" mechanics",
" metakernel",
" mit-scheme",
" mit-scheme-kernel",
" scheme",
" scmutils"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "de0b1e9e1d11075e883a144253bf5121818cfccae0954fdada1bf028c59e5012",
"md5": "b04795a67827c9bfa3f99932037e7da4",
"sha256": "91e8956082fbb8fde1f88d4d1c82c24c9324939d83aaeacc330f9c01a1060dda"
},
"downloads": -1,
"filename": "mit_scheme_kernel-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b04795a67827c9bfa3f99932037e7da4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 87057,
"upload_time": "2025-07-10T05:13:00",
"upload_time_iso_8601": "2025-07-10T05:13:00.307991Z",
"url": "https://files.pythonhosted.org/packages/de/0b/1e9e1d11075e883a144253bf5121818cfccae0954fdada1bf028c59e5012/mit_scheme_kernel-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "60fd0fc82eff08a7c679c2ff69057f04059634d3a5c508c72cb629a74c383038",
"md5": "0d5513cad0b35565b16e7972c0bf5525",
"sha256": "3a0e42eebe51ca6bf2bff163fd2cd8fa38e1884289a69e9caebd5575ac299978"
},
"downloads": -1,
"filename": "mit_scheme_kernel-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "0d5513cad0b35565b16e7972c0bf5525",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 85179,
"upload_time": "2025-07-10T05:13:02",
"upload_time_iso_8601": "2025-07-10T05:13:02.487428Z",
"url": "https://files.pythonhosted.org/packages/60/fd/0fc82eff08a7c679c2ff69057f04059634d3a5c508c72cb629a74c383038/mit_scheme_kernel-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 05:13:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "twaclaw",
"github_project": "mit-scheme-kernel",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mit-scheme-kernel"
}