Skip to main content

Hyjax

pip install hyjax

Hyjax is Hy bindings for JAX.

When walking about the countryside of Italy, the people will not hesitate to tell you that JAX has “una anima di pura programmazione funzionale”. –– 🔪 JAX - The Sharp Bits 🔪

“As one would expect from its goals, artificial intelligence research generates many significant programming problems. In other programming cultures this spate of problems spawns new languages. ... We toast the Lisp programmer who pens his thoughts within nests of parentheses.” -- Alan J. Perlis

You now know enough to be dangerous with Hy. You may now smile villainously and sneak off to your Hydeaway to do unspeakable things. –– Hy Tutorial

The goals are

  1. the name pun was funny
  2. let fully JIT-compiled JAX code be written in idiomatic Lisp

Some examples loosely inspired by the JAX Quickstart tutorials are in src/experiments.hy. The Hy and JAX docs might also be helpful.

Features

  • (mapv f vec) as vmap(f)(vec)
  • (if/ja pred then else) as lax.cond
  • (defn/j f [args] body) as @jit def f(args): ...
    • identical syntax to Hy's defn; supports other decorators, annotations, variadic & keyword args
  • (if pred then else) inside defn/j as lax.cond
    • works with any macros that compile to if, such as cond
  • binding for lax.while_loop
  • binding for lax.fori_loop

Release files for hyjax 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hyjax 0.1.0
File Size Uploaded
hyjax-0.1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hyjax 0.1.0
File Interpreter ABI Platform
hyjax-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / hyjax-0.1.0.tar.gz

Download URL hyjax-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6462c1785a60db8c41bff36b3707610064b3b408b3071a37b3a561efed905f0b
BLAKE2b-256 checksum
How to use checksums
220d3e828241339d8eb3bade97e3128cb042d2f41506ba1985673f486d280664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.9

Release files / hyjax-0.1.0-py3-none-any.whl

Download URL hyjax-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff9413e0febb065daad05e6ef3c44a3b4d9c9d67789f6734fbbb9fbe68dde049
BLAKE2b-256 checksum
How to use checksums
19bf0495b8d25c380d909ab478569565b507f9e4d0beb9f84c2c51dd9dbd268e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page