Jeffrey M. Barber

Tombstone

Vec4U

Nov 2004 โ€“ Jul 2005 ยท age 22โ€“23

What it was

A tiny typed language for vector algebra that compiled one expression at a time into hand-tuned SSE intrinsics. Writing SIMD by hand in 2004 was miserable, so Jeff wrote a 500-line OCaml compiler: you typed A + (B - A) * s and got back a complete C++ function on __m128 registers. It knew four types, scalar, vector, matrix and quaternion, and a type checker built as a multiplication table chose which intrinsic sequence each operator became. The generated code was not naive: two-shuffle cross products, reciprocal square roots, a four-shuffle quaternion multiply. The whole thing went from first artifact to a manual, a licence and a $25 payment button in about seventy-two hours, and then spent six months writing the math for Jeff's own game engine.

Wins, for the age

What it taught

Genealogy

Ancestors: Crml: camlp4 and the reflex to build a small language. Zsl: engine math, and OCaml already sitting beside the C++. Descendants: Edu Lang: another small language, this time teaching instead of computing. Vector Register: vector math generated as code, now in Java.

Epitaph

Here lies Vec4U, which typed vectors by their first letter, computed four sines at once, and moved a game camera for six months. It never became anything; it was the shape of things that did.