Macro cold_iron::mnemonic[]

macro_rules! mnemonic {
    (comment, priority) => { ... };
Expand description

Compile-time reminders of intent

All programming has the notion of bit rot: even if the code remains unmodified, the world moves on and may no longer be able to run a program. Dependencies get updated, compilers are reconfigured, services go offline. Even if everything is exactly as before, diving into a once-familiar codebase can be even more difficult than one never seen before.

Documentation and code comments are the common answer to this. For nanothaumaturgy, though, a simple comment is insufficient. Because intent is such an important component, even for a very well-specified program, compiling something scarcely remembered is unlikely to produce a satisfactory result.

The mnemonic macro attempts to address this by allowing you to leave notes to yourself in the future. Unlike comments, however, these are not ignored by the compiler: they are presented to the user in sequence by cargo to ensure one is visualising the correct concepts during compilation.

The style and quantity of mnemonics is a personal choice, though large software houses often conform to a standard. The guides from Gensokyo are an excellent starting place to prepare your own style or start a new one.

A note on rest

Because concentration is such a fundamental component of nanothaumaturgy, it is nearly impossible to successfully build a project while exhausted. A large invocation could take several minutes to complete, and during that time one’s attention cannot wander. A distracted Thaum will produce incantations that are less performant, nonfunctional, or possibly even downright dangerous.

Many find breathing exercises or yoga to be helpful in this regard. Indeed, many of the ritual witches of yore used were less about the Shape of magic and more about centring oneself. Every Thaum must find their own techniques to produce a successful incantation. As with mnemonics, the Gensokyo guide provides many tried-and-true techniques for increasing compilation success.