Posts from November 2026

Now for some Rust

2 min read; 10 GFI

I'm sure I've mentioned it plenty of times on this blog over the years, but I like to dabble with programming languages. For some people, writing code is purely a job; they concentrate on one language, do it well, and that's enough for them. I can respect that. For me, though, writing code started as a hobby, long before I ever did it as a living, and it continues to be a hobby.

A consequence of this is that I like to try to wrap my head around a new language every so often. Over the years, I've written code with:

  • Assembler
  • BASIC
  • C
  • C++
  • Clipper
  • COBOL
  • Common Lisp
  • Emacs Lisp
  • JavaScript
  • Julia
  • OCaml
  • Pascal
  • Perl
  • PHP
  • Python
  • Ruby
  • Scheme
  • TypeScript

and probably some others I've forgotten to add to this list. One or two I like to think I've (mostly) mastered (at least at one point in my cycle of use); others I've dabbled with to the point of having some fun and nothing more.

This last week, I've started to add another language to the list: Rust. I don't know where on the usage scale it will end up yet (either quick dabble or the walk to attempting to master), but I'm finally getting to grips with it and the urge to do so is sticking.

I've had a couple of goes before now, both times making an effort to work through the book. For some reason, both those times in the past, I lost interest. I think it's because -- as I've often said -- I'm the sort of person who needs a purpose when it comes to learning a language. So, to this end, I'm working on the problem I've used for this so many times before: I'm writing a Norton Guide reading library.

As always, for me, this is a great project to work on: it's a problem I know well, it's an outcome I know well, and it's a requirement that touches on all sorts of issues that you want to be thinking about when learning a language. Already, while working on this, I've had to learn something about how to build a library package, how to lay the code out, what Rust does for the obvious bits of syntax you tend to go looking for, how to do memory management, how to do file IO, and so on.

I won't claim that what I've got written so far is good Rust. I suspect that much of it isn't even idiomatic Rust (yet). What I do know is, so far, the code is working, and in getting it to work, I've started to understand some core concepts of writing Rust.

I now want to see it through to the finish. Heck, who knows, perhaps I'll eventually take it further and build a Rust-based sibling application for AgiNG so I can see how working with Ratatui compares with all my experience with Textual.

Zensical (Redux)

2 min read; 8 GFI

Back in March this year I dipped my toe into trying out Zensical as a replacement for MkDocs/mkdocs-material. At the time I had success with using it as a drop-in replacement for a project, and following that used it for a couple more. All was good.

In that post, towards the end, I also said:

The next test will be to try the docs for something like Hike. They're a little bit more involved, with SVG-based screenshots being generated at build time, etc. If that just works out of the box too, without incident, I think I'm all sorted.

I did try this, but ran into a problem: the screenshots took ages to build. At that point I decided to put the PR on the back-burner and only use Zensical for more static-like sites.

A couple of days ago I noticed that v0.1.0 had been released, and with it this claim:

This release closes the major remaining compatibility gaps with MkDocs, including support for many of its most widely used plugins. You can bring your existing MkDocs project to Zensical and continue using the workflows you're familiar with.

With this I was reminded that I'd not gone back and tried to use it again. So I took the Hike PR, upgraded Zensical, rebuilt the docs and... pretty much as fast as MkDocs! The result, style changes aside, looked the same too.

Given that it seemed to be working fine, I decided to start again from scratch with my current pet project of choice: Rogallo. I removed MkDocs/mkdocs-material, added Zensical, tweaked the Makefile, ran make rtfm and... crash! The error being along the lines of:

RuntimeError: Python error: FileNotFoundError: [Errno 2] No such file or directory: '[...]/site-packages/zensical/templates/.icons/simple/cplusplus.svg'

I tweaked a couple of things to eliminate anything particular about my environment (in the case of Rogallo, SmolServe is used to run Zensical, to ensure there's a test server available for making the screenshots, so I wanted to ensure that it wasn't some fallout from that setup), but the problem remained.

I then hit the issues and did a quick search; it turned out it was a known issue and, in my case, was easily fixed with a quick make update (resolving the issue that markdown-exec had a small bug that had subsequently been addressed).

So, as of today, I've swapped Rogallo over to using Zensical for its documentation and, so far, it looks to be working out well. From my perspective the claim of it being a drop-in replacement is 100% true.

My only quibble: I wish they supported a zensical.yml configuration file. From what I can tell it's zensical.toml or mkdocs.yml, so no satisfying mv mkdocs.yml zensical.yml to be had here.

I think I can cope with that, though.