Hienotammi

Software engineering from first principles: embedded and safety-critical systems, storage engines, numerical and graphics code.

This page is its own exhibit. One Rust program, compiled to a no_std WebAssembly module with no imports, no allocator and a fixed memory, renders it and runs the experiments below in your browser.

Static render: the live module has not started.

The house oak
Tammi is Finnish for oak. This one is grown from seed 7a331c0d: 447 branch nodes, 65 strands from crown to roots.

Work

Three bodies of work. Each write-up follows one path: problem, constraints, architecture, implementation, verification, measured results, and keeps what is implemented apart from what is experimental or planned.

Railway signalling: ERTMS/ETCS

Embedded development, safety engineering, formal requirements, interfaces and verification.

Write-up in preparation.

A low-level database

Memory layout, storage, operating-system interfaces, concurrency and data structures.

Write-up in preparation.

A mathematics and graphics engine

Numerical methods, geometry, optimisation, SIMD and GPU architecture.

Write-up in preparation.

Oak

The oak is grown, not drawn. Attractor points scattered in a crown envelope pull the nearest branch tips towards them, and a tip that reaches its attractor consumes it (space colonisation, Runions et al. 2007). Branch thickness follows the pipe model: rᵞ of a branch is the sum over its children. Every crown tip then sends one strand down through the trunk into the roots, so the trunk is the bundle of its branches.

All of it lives in fixed buffers, 4 096 nodes and 2 048 attractors, without allocation. Growth is a state machine advanced one iteration per frame while the oak is on screen. Change a parameter and it regrows from the trunk.

seed 7a331c0d · grown
nodes
447 / 4 096
iterations
36
live attractors
0 / 640
strands (crown tips)
65
root tips
17
state
256.2 KiB
growth time
0.0 ms
capacity
within

microGPT

A character-level transformer after Karpathy's microgpt: 1 layer, 4 heads, 16-dimensional embeddings, an MLP of width 64, a context of 16 and 4 192 parameters, trained on 32 033 names.

Gradients come from a scalar reverse-mode tape of at most 131 072 nodes in one fixed array. Training is a resumable state machine: forward pass, backward pass and the Adam update are split into units of work and advanced within each frame's budget, and training in chunks is bit-identical to an uninterrupted run of 1 000 steps.

Reference run at build time: 1 000 steps from seed 42, final loss 2.416 (moving average), parameter hash 856e4610c1ed8389. Training in this tab must end at the same hash. Names it samples at temperature 0.5: amis, krian, meria, aalia, lelin, jeelin, terian, lan, alari, donan, kadi, taylan.

Not started. Training runs here, in this tab: 1 000 steps of Adam over 32 033 names.

Loss per step (dots) and its moving average (line); the dashed level is uniform guessing, ln 27.
parameters
4 192 (16.4 KiB)
step
0 / 1 000
loss (moving avg.)
0.000
tape nodes
0 / 131 072
tape peak
0
tape memory
3.16 MiB
work done
0 units
budget per frame
0 units
throughput
0.0 steps/s
Tape nodes by stage, this step
embedding0 · 0.0 %
rmsnorm0 · 0.0 %
q k v0 · 0.0 %
attention0 · 0.0 %
projection0 · 0.0 %
rmsnorm0 · 0.0 %
mlp0 · 0.0 %
lm head0 · 0.0 %
loss0 · 0.0 %