A minimal Hy utility library, using mostly the standard libraries.
Project description
🦑 Hyjinx 🔬
Functions and macros useful for modern living in the Hy REPL.
Compatible with Hy>=1.2.0
Hyjinx is a chaotic kitchen sink of useful things that have nothing to do with each other. When a module stabilises, it gets spun out into its own package.
Hylights
- A sensible, lispy
defmethod(polymorphic type dispatch) A Hy code beautifier and in-REPL syntax highlighting-- now moved to beautifhyPretty tracebacks with correct syntax highlighting for hy or python-- now moved to beautifhy- An
inspectmodule that works like Python's, but also for Hy code (see https://github.com/hylang/hy/pull/2678) - Print/get/edit source code of a function, module etc.; e.g.
(print-source hyjinx.lib.sieve) - In-repl code analysis and discussion using LLMs (e.g. for writing docstrings, code review)
- In-repl syntax highlighting and latex rendering (for sixel-capable terminals) for LLM replies
- Numpy array pretty printing
- A zmq lazy pirate protocol
- A minimal ncurses class
- An async actor-model class
Modules
- hyjinx.lib: a smorgasbord of convenience functions.
- hyjinx.source: live code inspection.
- hyjinx.inspect: code inspection.
- hyjinx.doc: peruse hy documentation.
- hyjinx.actors: the async
Actorclass anddefactormacro - hyjinx.screen: a convenient ncurses wrapper.
- hyjinx.mat: numpy pretty-printing for humans. (requires numpy, jax optional)
- hyjinx.[zmq_client, zmq_server, crypto, wire]: lazy-pirate zmq RPC architecture. (requires zmq, ecdsa, zstandard, msgpack)
- hyjinx.llm: discuss code with a Large Language Model (AI). TabbyAPI, OpenAI-compatible and Claude are supported. (requires
openaiandanthropicpackages.)
Install
$ pip install -U hyjinx
or, with optional dependencies,
$ pip install -U hyjinx[zmq]
$ pip install -U hyjinx[llm]
To install offline hy/hyrule documentation,
$ hy -m hyjinx.docs
For in-terminal sixel rendering of latex in LLM replies, make sure pdflatex, dvipng and img2sixel are installed, and that you're using a sixel-capable terminal.
Optional dependencies
You can install with the [zmq] option which also installs ecdsa, pyzmq and zstandard for the zmq server/client
You can install with the [llm] option which also installs openai and lets you discuss code objects with ChatGPT or a locally-served LLM (via TabbyAPI or similar).
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 hyjinx-1.2.1.tar.gz.
File metadata
- Download URL: hyjinx-1.2.1.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53508602cd94c0aa59104529e31bbd803f706ce36b99b76e3fa7fff4988ac1d0
|
|
| MD5 |
4cfbf0e1416d3c543973ef773d6ddbba
|
|
| BLAKE2b-256 |
1d8fd70d11607d3bc8f8e71cd86ff98701f19cef2814f76f18563e1f27d1012d
|
File details
Details for the file hyjinx-1.2.1-py3-none-any.whl.
File metadata
- Download URL: hyjinx-1.2.1-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b596f1d089efab1c1b578f2f3f0fb6c75885273f241993791378e1ac16ef62dd
|
|
| MD5 |
a78f291cfeec8e540defbee14c50323e
|
|
| BLAKE2b-256 |
86d803b06fb289600c1efa8cef229f8d3121f34e9cba8d8c6106329d3cec2ad1
|