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.3.tar.gz (46.6 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.3-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hyjinx-1.2.3.tar.gz
Algorithm Hash digest
SHA256 6b543f46a984e13bc0f3a028f5174387ed8086ef96a0011e88cbfcbad4c5b16b
MD5 89d230aff9737b6c83742d69c9f59b3e
BLAKE2b-256 d3c8fea1b9c67b17d4c6758511971d31c4e4c9d58c3857e06c2704c9d1a77a5b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hyjinx-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 11a98af066c40bc8634b7f807ed58eac5bed3c142ff2b0cd14105c7975e13cc1
MD5 6c96cbfd50e64f38e446e51dad5770d0
BLAKE2b-256 fafc2452b70da57e7f41851a656d63994c253e5a77de72dd89a7ca93afc5e71e

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