Paul Tagliamonte
8d2143177e
Overhaul macros to allow macros to ref the Compiler
This allows macros to take a keyword dict containing useful things by defining a keyword argument. This allows us to pass in new objects which might be handy to have in macros. This changeset refactors module_name to become `compiler`, so that we can pass the compiler itself into the macros as `opts['compiler']`. This allows the macro to both get the macro name (`compiler.module_name`), as well as use the compiler to build AST. In the future, this will enable us to create "super-macros" which return AST, not HyAST, in order to manually create insane things from userland. For userland macros (not `defmacro`) the core.language `macroexpand` will go ahead and make a new compiler for you.
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 language 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 awesome.
Oh, and lisps are neat.
(fan art from the one and only doctormo)
Project
- Code: https://github.com/hylang/hy
- Docs (latest, for use with bleeding-edge github version): http://hylang.org/
- Docs (stable, for use with the PyPI version): http://docs.hylang.org/en/stable/
- Quickstart: http://hylang.org/en/latest/quickstart.html
- Bug reports: We have no bugs! Your bugs are your own! (https://github.com/hylang/hy/issues)
- License: MIT (Expat)
- Contributor Guidelines & Code of Conduct
Description
Languages
Python
50.7%
Hy
41.5%
reStructuredText
7.1%
Batchfile
0.4%
Makefile
0.3%