Metadata-Version: 2.4
Name: jlanguage
Version: 9.7.1.1
Summary: The J programming language, with J sessions, IPython magics and a Jupyter kernel for Python.
Author-email: Jeremy Howard <github@jhoward.fastmail.fm>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/AnswerDotAI/jlanguage
Project-URL: Repository, https://github.com/AnswerDotAI/jlanguage
Project-URL: Issues, https://github.com/AnswerDotAI/jlanguage/issues
Project-URL: Documentation, https://answerdotai.github.io/jlanguage
Project-URL: J home page, https://www.jsoftware.com
Project-URL: J wiki, https://code.jsoftware.com/wiki
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Other
Classifier: Framework :: Jupyter
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: fastcore
Requires-Dist: kernmini>=0.1.19
Provides-Extra: dev
Requires-Dist: fastship>=0.1.9; extra == "dev"
Requires-Dist: nbdev>=3.3.24; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: conkernelclient>=0.0.23; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: wheel; extra == "dev"

# jlanguage


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The [J programming language](https://www.jsoftware.com), installable with pip. The package also runs J from Python, with J sessions, IPython magics and a Jupyter kernel. This is an unofficial packaging, not affiliated with Jsoftware: J’s home page is [jsoftware.com](https://www.jsoftware.com) and its official source is [jsoftware/jsource](https://github.com/jsoftware/jsource). The wheels contain the official J binary releases, unmodified, for Linux (x86_64, aarch64), macOS (Intel and Apple Silicon) and Windows (amd64, arm64).

## Usage

Requires Python 3.11 or newer.

    pip install jlanguage
    jconsole

That starts the standard J console REPL:

       +/ % # 1 2 3 4
    0.25

`python -m jlang` does the same. From Python, `jlang.path()` returns the J installation directory, containing `bin/`, `system/`, `addons/` and `tools/`, and `jlang.jconsole_path()` the full path of the console.

## J from Python and Jupyter

`J` runs J inside the Python process:

``` python
from jlang.core import J
j = J()
j['+/ % # 1 2 3 4']
```

    0.25

In IPython or Jupyter, `%load_ext jlang.core` adds the `%%j` and `%j` magics. Jupyter lists the included J kernel as J. See the [J page](https://answerdotai.github.io/jlanguage/core.html) for sessions, magics and the kernel.

## Versioning

The first three numbers of the version are J’s version: `jlanguage 9.7.1.1` installs J 9.7.1. The fourth number counts jlanguage’s releases for that J version.

## How it’s built

`tools/make_wheels.py` builds the Python wrapper once, then bundles each official J release from jsoftware.com into its platform wheel. Downloads are checked against the published sha256sums. One CI job packages Linux, macOS and Windows wheels without compilation or platform-specific build runners. The Python interface loads the bundled J library through `ctypes`. The Jupyter kernel uses kernmini’s Python API.

## Contributing

Fetch J for your platform, then install the package and its development tools:

``` bash
python tools/fetch_j.py
pip install -e '.[dev]'
```

Edit the notebooks, then run `nbdev-export` and `nbdev-readme` to regenerate the Python API and README. Run `nbdev-test` for the notebooks and `pytest` for the kernel and packaging tests. `python tools/make_wheels.py` creates all platform wheels.

## License

J is © Jsoftware Inc. and distributed under the GPLv3 (see [jsoftware/jsource](https://github.com/jsoftware/jsource)). This package redistributes the official binaries unmodified.

## Releasing a new version

When Jsoftware publishes a new J release:

1.  Set `version` in `pyproject.toml` to the new J version followed by `.1`, such as `9.7.2.1`. `tools/fetch_j.py` derives the download URL from it. Check the archive names against [the install dir](https://www.jsoftware.com/download/), because the suffixes have changed between releases (9.6.3 used `linux64`, 9.7.1 uses `linux`).
2.  Commit and push the changes, then run `ship-release`. CI builds and publishes the five platform wheels.

`ship-release` tags the version in `pyproject.toml` and bumps the fourth number afterwards. For another release of the same J version, keep the first three numbers and run `ship-release` again.
