ANN: Hy - Python / Lisp interoperability layer
Hello, World!
tl;dr
=====
Version: 0.9.4
License: Expat (sometimes called MIT)
Hilarious: Yes
Hy is a wicked funny hack that lets you interop (in both directions)
with Lisp from Python (or with Python from Lisp).
It's pip installable:
$ pip install hy
[...]
$ hy
=> (print (.join ", " ["Hello" "World"]))
Hello, World
(REPL even has cute readline bits mostly workingish, with a few known
issues)
And the source is on GitHub @ http://git.io/hy (star it, fork it, hack it)
It's undergoing changes quite quickly - so, be careful!
OK, what is it (technically)
============================
Hy is a set of hacks, implemented in Python, to lex and compile a Lisp
variant (called `Hy', which looks very similar to Clojure in some ways)
into Python AST, and transparently load it into sys.modules using a PEP
302 import hook.
I gave a lightning talk about Hy at PyCon, in case anyone's having
flashbacks. You can see that talk on my blog
(http://blog.pault.ag/post/46982895940/), or watch a full hour-long talk
about Hy at Boston Python at http://www.youtube.com/watch?v=ulekCWvDFVI
Right, so that means?
=====================
You can do hilarious (hylarious?) things like write full Django
projects[1] in Lisp, or interop with pymongo[2], or even use pdb
to debug Lisp code[3].
Wait, are you serious?
======================
About it working? Yup!
About making this lisp-variant production quality? Not really.
It's just really funny, and helps teach people about how awesome Python is.
Whatabout Macros?
=================
Yep!(*)
*: but you have to write them in Python for now (code plot'ed) :(
Docs?
=====
Yep! http://hy.rtfd.org/ - could use help!
Hacks welcome!
With lots of love,
paultag
Special thanks to the current contributors:
* Thomas Mashek
participants (1)
-
Paul Tagliamonte