Skip to content

v0.4.7

Latest

Choose a tag to compare

@KaruroChori KaruroChori released this 21 Apr 11:46
· 16 commits to master since this release

While working on my new toy I felt some features were missing.
Hence, this release is mostly made of new features and small additions:

  • IDs, IDs for everyone! And ID for you. And you! And you too.
  • Support for nesting and tree structures. I found out a nice trick to minimally extend the for cycle and get what I was looking for.
  • Proper context for logs, mostly to improve error messages and make them a little less useless. We finally got there :D!

I also took some time to improve the documentations a bit.

New Features

Introduced tree-rewrite capabilities with s:for via the additional attributes src-children and dst-children.
Basically the same for cycle is matched recursively inside the relative path described by src-children and applied inside dst-children.
The actual behaviour of dst-children has not been fully implemented yet, as it requires access to children in reverse order, making it incompatible with the rest of the codebase.
As such, some custom implementation is needed. For now one can only specify the direct name of the tag embedding children, without nesting as it should be in its final form.
The nested behaviour of s:for is going to change a bit in v0.4.9 once dst-children is fully fixed.

We also added support for more VM functions:

  • timestamp as the name implies
  • rid to generate a 256bit random ID serialized as hex string.
  • sid to generate an int-sized sequential ID, autoincrementing and with an optional family ID to have independent sequences.

Finally, logs have now a proper context which provides paths and offsets to the template, data and destination locations which triggered the message.
For more details, check changes to log_t::ctx.

Oh, and now the default log format is much cuter in the terminal.
image