Functions and macros useful for modern living in the Hy REPL.
Compatible with Hy>=1.0
- 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 - 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
- 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.)
$ pip install -U hyjinxor, with optional dependencies,
$ pip install -U hyjinx[zmq]
$ pip install -U hyjinx[llm]To install offline hy/hyrule documentation,
$ hy -m hyjinx.docsFor 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.
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).