In the previous blog post I wrote about tiny rule engine, my implementation of pattern directed inference system from Building Problem Solvers by Kenneth D. Forbus and Johan de Kleer. This blog post will be about internals of the system.
Hy 0.14.0. was released earlier today. As always, it’s available at PyPi. Change log is pretty substantial too. Python style unpacking operators #* and #** are one of the features I have been waiting to be available.
Grab the new release, run to your hydeaway and start hacking! Let us know if you encounter a bug.
I sometimes run into a situation with Hy that I would like to delete a macro. This happens especially when I’m trying to get a feel of code and are prototyping in REPL. Functions are easy to delete and replace with macro, but other way around took a bit digging.
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.
Sometimes it’s useful to be able to comment some code. It might be that you want to leave a mental note behind or want to quickly test something. Hy currently supports two (that I know of) ways of doing this.
After lots of back and forth discussion and debate, a new feature was added to Hy: explicit return statement. While this is pretty standard thing in most languages, it’s rather rare in languages of lisp family.
Upcoming version of Hy will have a new syntax for handling positional and keyword arguments (similar to * and ** in Python). Lets have a look what one can do with them.