Hy fork
f6160c755a
This version is much simpler. At the point that the exception is raised, we don't have access to the actual source, just the current expression. but as the exception percolates up, we can intercept it, add the source and the re-raise it. Then at the final point, in the cmdline handler, we can choose to let the entire traceback print, or just the simpler, direct error message. And even with the full traceback, the last bit is nicely formatted just like the shorter, simpler message. The error message is colored if clint is installed, but to avoid yet another dependency, you get monochrome without clint. I'm sure there is a better way to do the markup, the current method is kludgy but works. I wish there was more shared code between HyTypeError and LexException but they are kind of different in some fundamental ways. This doesn't work (yet) with runtime errors generated from Python, like NameError, but I have a method that can catch NameError and turn it into a more pleasing output. Finally, there is no obvious way to raise HyTypeError from pure Hy code, so methods in core/language.hy throw ugly TypeError/ValueError. |
||
---|---|---|
bin | ||
docs | ||
eg | ||
hy | ||
scripts | ||
tests | ||
.coveragerc | ||
.gitignore | ||
.travis.yml | ||
AUTHORS | ||
LICENSE | ||
make.bat | ||
Makefile | ||
NEWS | ||
README.md | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
tox.ini |
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)