Macaulay2 and GAP in Jupyter

I’m running Anaconda on my laptop and was wondering Would it be possible to include a distribution of Macaulay2 and GAP with Jupyter? How difficult would this be to include?

Installing a Jupyter package generally only provides its own dependencies, and usually won’t bring along domain-specific packages.

As for getting them installed by other means:

GAP

It appears this is available from conda-forge.

This could be captured in an environment.yml that would work on binder or locally:

channels:
  - conda-forge
dependencies:
  - gap

Or installed directly:

mamba install -c conda-forge gap

Macaulay2

This is not on conda-forge (or any other channel on anaconda.org. You could request it on the staged-recipes repo.

Then using in jupyter:

It sort of seems like both of those are domain-specific languages: it might be possible to write a wrapper kernel. Basing it on ipykernel has a lot of advantages, as it is possible to reuse most of the machinery, and for now, is basically guaranteed to be installed on any Jupyter system. A more direct approach might be a xeus implementation, which would be more direct at the C level.

Alternately, one could run them through more established kernels, just by shelling out.

2 Likes