Sneak peek of possible future

As you may be aware, let was dropped not too long time ago from Hy. While being very integral and essential part of Lisp, it was just really hard to get working correctly and thus it was removed. However, gilch, one of core developers of Hy, didn’t give up the idea and eventually came up with a proposal how let could be written.

Continue reading


Hy 0.12.0

It’s been a long journey, full of both joy and humbling moments. Working on Hy has given me chance to learn from people who are not only bright, but extremely kind and friendly too. The journey continues, but now it’s moment to relax and celebrate what has been achieved as Hy 0.12.0 has been released.


Some hylarious macro shenanigans

Just a word of warning: what I’m about to describe here makes even less sense than what I usually write. It’s probably very bad idea for various reasons and definitely shouldn’t be used in production code. However, it might come handy in some limited situations and offer short term gains that justify the bad things. Use your own judgement.

As you might know, Hy is gearing towards the next release and there will be some major, code breaking changes. Things like let and defclass will have changed syntax and some aliases will be dropped (true doesn’t work anymore, only True). After talking with various people, I started thinking “what kind of system could help me to port old code to new one?”. And of course I turned for macros. So, here I’m going to show basic implementation for a macro that takes Hy code written in old syntax and transforms it for the new syntax. One can then wrap all existing code in that macro, update Hy and things hopefully work right out of box. Then it’s just matter of manually fixing things on the new syntax, while having test suite to check that there has not been any errors in process. Sounds easy enough, right?

Continue reading

Currying in apocrita

While apocrita is very limited language, it’s already complete enough that I can experiment with ideas and see how they work in practice (or in this case, how to implement an old and well known idea). And that old idea is currying (technically partial application, but close enough).

In partial application the language will detect if a function is being called without enough parameters. Instead of throwing an error, a new function is created and returned. This new function captures all the parameters that were supplied to the original function and can be called either normally or partially applied again (if there are more than one parameter left).

Continue reading