Skip to main content

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 beautifhy
  • Pretty tracebacks with correct syntax highlighting for hy or python -- now moved to beautifhy
  • An inspect module 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 Actor class and defactor macro
  • 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 openai and anthropic packages.)

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).

Ask DeepWiki

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyjinx-1.2.1.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyjinx-1.2.1-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

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

Hashes for hyjinx-1.2.1.tar.gz
Algorithm Hash digest
SHA256 53508602cd94c0aa59104529e31bbd803f706ce36b99b76e3fa7fff4988ac1d0
MD5 4cfbf0e1416d3c543973ef773d6ddbba
BLAKE2b-256 1d8fd70d11607d3bc8f8e71cd86ff98701f19cef2814f76f18563e1f27d1012d

See more details on using hashes here.

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

Hashes for hyjinx-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b596f1d089efab1c1b578f2f3f0fb6c75885273f241993791378e1ac16ef62dd
MD5 a78f291cfeec8e540defbee14c50323e
BLAKE2b-256 86d803b06fb289600c1efa8cef229f8d3121f34e9cba8d8c6106329d3cec2ad1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page