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.2.tar.gz (46.5 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.2-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyjinx-1.2.2.tar.gz
  • Upload date:
  • Size: 46.5 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.2.tar.gz
Algorithm Hash digest
SHA256 e366eca7a06c9e96ea7a860d749e6ab6e926ff4e15c3c7060bf4deed82a8816c
MD5 5d26c971eaf8a0494c88f9f166d40c2a
BLAKE2b-256 aaa0a0512562bd85bad95977008501965b8df4dea2206f9d530e563f2d5f9b37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyjinx-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 50.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 812118bb53494bed791a3311ecaf5954fb1301603925dbdad50fd68fd5103d2d
MD5 525309f2e5dbd31e4f9de54849265482
BLAKE2b-256 c4743b72d5262601b1d6a8af8bfeaa0ec62d394d6e83da07e23d201434ac08b8

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