lab
Experiments. Raw WebGL, Canvas2D, no libraries.
GPU

Gray-Scott model. Two chemicals, simple rules, emergent complexity.

Signed distance fields. A 3D renderer in a fragment shader.

120k particles in curl noise. Transform feedback, zero CPU.

147k slime mold agents. Sense, turn, deposit, repeat.

Navier-Stokes in six shader passes. Pressure, advection, vorticity.

150k particles tracing Thomas' chaotic orbits in 3D.

Fractal zoom. Click to dive, smooth coloring, infinite detail.
Simulation

Verlet integration. Drag to interact, pull hard to tear.

Flocking. Separation, alignment, cohesion. No leader, no plan.

Six species, random forces, emergent chemistry.

Four rules. Gliders, guns, and Turing-complete computation.

Chaos in two arms. Tiny initial differences, wildly different paths.
Math

Draw a shape. Rotating circles recreate it.

Fractal trees from simple rewriting rules.

The 2023 aperiodic monotile. One shape, infinite non-repeating tiling.

Nearest-neighbor tessellation. Delaunay dual, drifting seeds, circumcircles.

Cut paper as mechanism. Rotating panels, opening pores, auxetic motion.
Algorithms

Eight algorithms race side-by-side. Pick three, tune the input.

A* vs Dijkstra vs BFS. Draw walls, watch the search.

AVL insertions with animated rotations and rebalancing.

Edit distance. Watch dynamic programming fill a table.

Tarjan's algorithm. Find strongly connected components.
ML / AI

What fits in an LLM prompt, what gets dropped, and why position matters.

Multi-head self-attention. Different heads learn different patterns.

Key-value caching turns O(n²) generation into O(n). Watch it grow.

Temperature, top-K, top-P. How LLMs choose the next word.

Draft fast, verify once. Cascade rejection on mismatch.

Sparse routing. Each token activates a fraction of the network.

Words as vectors. Semantic clusters, nearest neighbors, vector arithmetic.

Query vectors rank chunks. Top-k, thresholds, filters, retrieval tradeoffs.

Relationship directions and contextual shifts inside learned representations.

Byte-pair encoding. How text becomes tokens before the model sees it.

Tree of candidates, pruned by score. Greedy vs beam width comparison.
Agents

Opus advises, Sonnet or Haiku executes. Escalate only when judgment matters.

Separate context windows for focused workers. Delegate, summarize, return.

Generate, critique, revise. A quality loop with explicit stop conditions.

State-driven control transfer across specialist agents and conversation stages.

Lifecycle callbacks for guardrails, audit trails, approvals, memory, and cleanup.
Writing
Data Structures

Recursive alphabet splitting. Bitvectors at every node, rank queries in O(log σ).

Hypergraph peeling builds a fingerprint table. Three XORs answer membership.

ALEX. Piecewise linear models replace B-tree pages. The CDF is the index.

Fingerprints in a cuckoo hash table. Insertions kick, chains cascade.











































