Lilac 0.1.0.8 released


It's been almost a month since I last spoke about Lilac. Since then time I've made a fair number of updates/changes to it. This is just a reflection on Lilac and its software development process.

1 Nix is great, so is Cachix

So I have 3 repos that all use Lilac. Lilac itself (because it builds itself), my dotfiles, and this site. I've been heavily using Lilac for all of these, and needed a way to use it in a reliable way.

I use Nix to build Lilac, and then use Cachix to store the binary builds. Then I pull it down for my dotfiles repo. It works quite well. All I need to do is just tweak the Lilac version number (example) and my Nix environment will just pull it down from Cachix, because Lilac pushes binary caches whenever the main branch gets updated (and main currently always follows the latest Git tag from a version bump).

Anyway, it's just nice to be able to build and use the software using Nix, because everything is declarative. I plan on creating a Nix dev environment for the blog repository as well, just to make things consistent across my repos.

2 Literate Programming

2.1 Pros

Debugging. So far, every time I've hit on a bug or some strange behavior of Lilac, I've been able to debug it within a few minutes. Because everything is documented and cross-linked, it's easy to find where I need to tweak things.

Navigational aids. I don't know about you but I find it far, far easier to navigate (and remember!) a document with headings. So when I think about extending Lilac, it's easy to jump to the relevant area and refresh my memory about how the code works (because the code is right there next to the prose).

2.2 Cons

Refactors. One time, I refactored (renamed) something. Not just the naming of something in the code, but also the accompanying prose language. It was tough to hunt down the prose areas. I mean, it wasn't mentally difficult, but rather, just mundane and annoying. I suppose agentic AI could help here somewhat, but I don't use it yet (I'm too cheap to pay for it on my personal machines...). In a sense this isn't a con about LP per se (because how else would you update the language of documentation), but just something to keep in mind when you invest heavily in documentation.

3 The value of dogfooding

There's nothing like actually using your own software. I've found a number of bugs this way. Lilac now has 201 unit tests (and over a thousand commits!).

On the other hand, because I'm the only user I am biased when I dogfood Lilac. One area which is lacking is performance testing. I don't really have a good idea of how good or bad Lilac's performance is, because because I've only used it in a handful of repos, and for these cases it runs quickly enough. Still, it would be nice to have synthetic tests that simulate large-scale usage (we would almost certainly need to write property tests that can generate arbitrarily long or complex documents).

4 Document compilers?

It's interesting to me that there aren't a huge number of ecosystems for preparing documents (unlike the huge number of ecosystems for writing software). I can think of a few formats:

Table 1. A sample of some documentation preparation formats/ecosystems.
Format/ecosystemUsed primarily by
MarkdownProgrammers
reSTProgrammers
asciidocProgrammers
manpageProgrammers
texinfoProgrammers (GNU manuals)
OrgmodeProgrammers (Emacs)
MediaWikiWikipedia
XML familyEnterprise technical docs
TeX familyAcademia (esp. STEM fields)

Maybe I just haven't been exposed to this area much (because once I found Orgmode, I never looked back...). But it just seems to be under-developed than the plethora of programming languages and runtimes that exist. Maybe people are more interested in writing code for computers than documents for humans. But it would still be nice if there were more "document" compilers (automatic documentation preparation systems). This area appears to be still quite young/under-developed to me.

5 Closing thoughts

With the latest round of features, Lilac is mostly feature-complete. So I expect the pace of development activity to slow down in the coming weeks and months. I do have some ideas planned for it but most of it is in the backlog or icebox.

Until next time, happy hacking!

Page metrics