Skip to content

atisharma/hyjinx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦑 Hyjinx

Functions and macros useful for modern living in the Hy REPL.

Compatible with Hy>=1.0

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
  • 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

About

A kitchen-sink Hy utility library, using mostly the standard libraries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published