Hy 1.0 Released
Hey, I see that Hy has released version 1.0…neat!
We can install it with uv.
❯ uv tool list
No tools installed
❯ uv tool install hy
Resolved 2 packages in 339ms
Built hy==1.0.0
Prepared 2 packages in 2.60s
Installed 2 packages in 1ms
+ funcparserlib==1.0.1
+ hy==1.0.0
Installed 3 executables: hy, hy2py, hyc
❯ uv tool list
hy v1.0.0
- hy
- hy2py
- hyc
❯ which hy
/home/tim/.local/bin/hy
❯ hy
Hy 1.0.0 (Afternoon Review) using CPython(main) 3.12.1 on Linux
=> (+ 1 2 3)
6
Hy is a Lisp dialect for Python. If you're familiar with Clojure, Fennel, or LFE, I was thinking it's like that
Hy : Python :: Clojure : Java
Hy : Python :: Fennel : Lua
Hy : Python :: LFE : Erlang
But apparently Hy is more tightly coupled to Python than that. Hy generates Python AST. So perhaps it is more akin to CoffeeScript
Hy : Python :: CoffeeScript : JavaScript
In any case, Hy allows us to write Lisp that interacts with Python.
And of course there's an Emacs mode for it! You probably also want to hook parinfer for it.
That Hy hello world program is using the very same print function as Python.
❯ ./hello.hy
Hello, World!
Okay, time to go read the tutorial!