Bob Tolbert
f5d88bb108
gensym in Hy
Simple implementation of gensym in Hy. Returns a new HySymbol. Usable in macros like: (defmacro nif [expr pos zero neg] (let [[g (gensym)]] `(let [[~g ~expr]] (cond [(pos? ~g) ~pos] [(zero? ~g) ~zero] [(neg? ~g) ~neg])))) This addresses all the general comments about (gensym), and doesn't try to implement "auto-gensym" yet. But clearly the macro approach instead of the pre-processor approach (as described in the letoverlambda (http://letoverlambda.com/index.cl/guest/chap3.html#sec_5) is the way to go
Hy
Lisp and Python should love each other. Let's make it happen. Try it.
Hylarious Hacks
OK, so, why?
Well. Python is awesome. So awesome, that we have so many tools to alter the languge in a core way, but we never use them.
Why?
Well, I wrote Hy to help people realize one thing about Python:
It's really goddamn awesome.
Oh, and lisps are neat.
(fan art from the one and only doctormo)
Project
- Code: https://github.com/hylang/hy
- Docs: http://hy.rtfd.org/
- Quickstart: http://hy.rtfd.org/quickstart
- Bug reports: We have no bugs! Your bugs are your own! (https://github.com/hylang/hy/issues)
- License: MIT (Expat)
Description
Languages
Python
50.7%
Hy
41.5%
reStructuredText
7.1%
Batchfile
0.4%
Makefile
0.3%