Hy fork
Go to file
Bob Tolbert f6160c755a Much better version of new error messages.
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.
2013-12-31 09:56:03 -07:00
bin Provide bin scripts for both Windows and *nix 2013-07-14 09:06:42 -06:00
docs s/rply/rpython/ 2013-12-31 11:26:31 -05:00
eg Removing this file because it's nonfree. 2013-12-01 09:43:45 -05:00
hy Much better version of new error messages. 2013-12-31 09:56:03 -07:00
scripts Add update_coreteam script. 2013-12-17 18:50:01 +02:00
tests Much better version of new error messages. 2013-12-31 09:56:03 -07:00
.coveragerc Adding support for coverage tests at coveralls 2013-12-03 01:58:35 +05:30
.gitignore Provide bin scripts for both Windows and *nix 2013-07-14 09:06:42 -06:00
.travis.yml Adding support for coverage tests at coveralls 2013-12-03 01:58:35 +05:30
AUTHORS Add myself to authors 2013-12-31 21:58:40 +05:30
LICENSE Removing my name from the license. 2013-04-05 20:04:36 -04:00
make.bat Provide bin scripts for both Windows and *nix 2013-07-14 09:06:42 -06:00
Makefile Adding support for coverage tests at coveralls 2013-12-03 01:58:35 +05:30
NEWS Translate all foo? -> is_foo. Close #334 2013-12-01 15:03:31 -05:00
README.md Merge branch 'master' into pr/347 2013-12-02 23:41:54 -05:00
requirements-dev.txt Remove astor from requirements-dev.txt. 2013-12-23 08:12:22 +02:00
requirements.txt Update requirements.txt and setup.py to use rply upstream. 2013-12-08 07:11:42 +02:00
setup.cfg Adding in some basic bits in 2013-03-02 20:58:58 -05:00
setup.py Add astor to install_requires. 2013-12-10 17:46:45 +02:00
tox.ini Nuke the rply git checkout from tox.ini 2013-12-23 15:31:36 +01:00

Hy

Lisp and Python should love each other. Let's make it happen. Try it.

Build Status Downloads version Coverage Status

Hylarious Hacks

Django + Lisp

Python sh fun

Hy IRC bot

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