Serge Zaitsev,
machine learningtensor librariesc programmingsystems programming
Serge Zaitsev builds a compact tensor library in C from the representation upward: contiguous data, shapes and strides, broadcasting, kernels, SIMD, then enough layers and manual backward passes to train small models. It is not a PyTorch replacement, which is exactly why it works so well as a teaching artifact. Once the runtime is small enough to read, "tensor operations" stop feeling like API magic and become memory layout, indexing, and carefully composed loops.
The Hacker News discussion catches an important boundary: a tensor in a numerical library is a useful computational representation, but that is not the full mathematical object, with its coordinate-independent transformation behavior. That is not a reason to reject the simplification. It is a reason to label it clearly. Good systems explanations earn their clarity by saying which layer they are describing, and this post is strongest when read as a tour of the engineering layer beneath modern ML tools.