From cd181fcecf3c0b81a48175f49b4d24a3f09e7a8b Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Thu, 5 Feb 2026 09:01:30 -0500 Subject: The NEWS --- NEWS.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 0ccf151..c484b62 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,87 @@ # News +## zg v0.16.0-pre Release Notes + +This brings another major change to `zg`, touching basically everything. + +The `zg` modules no longer require allocation to use. Everything is +kept in static memory, where it should be. + +With compression gone in the last release, the inconvenience and startup +penalty of moving the data, already present _in_ static memory, over to +the heap, was purely wasted effort. Just CPU head. So that's gone. + +90% of the work here was done by Jacob Sandlund, who went on to write +his own rather interesting Unicode library, [uucode][uucode], which you +should check out if you like galaxy-brained comptime shenanigans (I +surely do). + +Zig having moved on, I needed to merge that code via massage and +copypasta, so none of the commits survive. But it's his work, so +thanks Jacob! + +I did manage to dispose of one last allocation in `CanonData`, by +integrating Vexu's very clever [comptime hash map][chm], so, that's +nice. + +### Migration + +Is simplicity itself: just call the module instead of calling the +`.init` function, with an allocator, using what it returns, and +disposing of it when you're done with it. + +Technically the laws of style dictate that, since these are now +containers, and not instantiable types, they should be lowercased. + +I did not do that in the README. But feel free! + +Pro tip: use LSP superpowers to rename the instance to the name of the +module, then just delete the initializer. Couldn't be simpler. + +### Emoji Module + +Also Jacob's work. + +[uucode]: https://github.com/jacobsandlund/uucode +[chm]: https://github.com/Vexu/comptime_hash_map/blob/master/src/main.zig + +### graphemeClusterWidth + +@lch361 submitted a minor refactor which makes it cleaner to obtain the +display width of a grapheme cluster. Thanks Lich! + +### The Future + +I hope I don't jinx it, but this is the last major change I've wanted +to make to `zg`. I brought it up with José before he handed over +maintainence to me, we agreed that compressing and decompressing and +heap-allocating was one of those ideas which turned out not to pencil +out. Hey, it happens. + +Features? There are few left, sure. Bugfixes? Always, of course. +But major API changes are now unlikely. + +I have a "no 1.0 until Zig 1.0" policy, because no one can guarantee the +stability of anything until that happens. Nor is `zg` actually ready +for a stability policy; if I decide to break apart a module, or move +something where it makes more sense, I'm going to do that. + +But it is _likely_ that this is the last 'global' refactor of the +library. + +## zg v0.15.2-4 Release Notes + +Better late than never. The notes, I mean. But the release too. + +This was primarily a matter of getting up to Zig `0.15` compatibility. +Minor bugfixes in word wrapping, and the display width of certain +esoteric emoji, are also included. + +Compression of the data was also removed. It was removed from stdlib, +but we could have vendored it: more importantly, it turned out to be +basically useless. Savings per data set were in the bytes to low +KiB range, and startup time was negatively affected. + ## zg v0.14.1 Release Notes In a flurry of activity during and after the `v0.14.0` beta, several @@ -35,7 +117,7 @@ to use a `u64` instead, and have included an explanation of why this is not the solution to actual problems which it at first might seem. My job as maintainer is to provide a useful library to the community, and -comptime makes it easy and pleasant to tailor types to purpose. So for those +comptime makes it easy and pleasant to tailor types to purpose. So for those who see a need for `u64` values in those structures, just pass `-Dfat_offset` or its equivalent, and you'll have them. -- cgit v1.2.3