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.4.tar.gz (55.2 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.4-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file hyjinx-1.2.4.tar.gz.

File metadata

  • Download URL: hyjinx-1.2.4.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for hyjinx-1.2.4.tar.gz
Algorithm Hash digest
SHA256 b0851dea1b4688e4ad16c49ac1913aa40c0a2bf09f5209274ac67574471f4517
MD5 d4a218940af440e695209d12e9dc760d
BLAKE2b-256 f8fb4ac01709cce244eafecb8d14bc267dac37c4cee30060a10c2c28e6573dcc

See more details on using hashes here.

File details

Details for the file hyjinx-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: hyjinx-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for hyjinx-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f7da123e9f2738103a2718696bb5ba736ee8e2dda455725861d5d109ac50f340
MD5 2cc031d936350ab7d43d4221ad5b8b97
BLAKE2b-256 6724dec4844fdae15ef7d87b752738451c14433d17244220970403cb10391bdc

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