Kodi Arfer
2b11b9be20
Automatically read and write bytecode
Importing or executing a Hy file now loads the byte-compiled version if it exists and is up to date, and if not, the source is byte-compiled after it's parsed. This change can speed up Hy a lot. Here are some examples comparing run times of the current master (491b474e) to this commit, on my laptop with Python 3.6: - `nosetests --exclude='test_bin'` goes from 3.8 s to 0.7 s (a 5-fold speedup) - `hy -c '(print "hello world")` goes from 0.47 s to 0.20 s (a 2-fold speedup) - Rogue TV's startup goes from 3.6 s to 0.4 s (a 9-fold speedup) Accompanying changes include: - `setup.py` now creates and installs bytecode for `hy.core`, `hy.contrib`, and `hy.extra`. - The `hyc` command under Python 3 now creates bytecode in `__pycache__`, as usual for Python 3, instead of putting the `.pyc` right next to the source file like Python 2 does. I've removed a test of `hy.extra.anaphoric.a-if` that triggers #1268 when the test file is byte-compiled and then hits some weird `macroexpand` bug or something when I try to work around that—Nose crashes when trying to produce an error message, and I can't seem to replicate the bug without Nose.
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
- IRC: Join #hy on freenode
Description
Languages
Python
50.7%
Hy
41.5%
reStructuredText
7.1%
Batchfile
0.4%
Makefile
0.3%