Handwired compiles plain JavaScript into an exact, fully differentiable neural net

ctjlewis · x · 2026-10-16

Chenglou released Handwired, a toy project that compiles ordinary JavaScript code into a neural network: no training required, outputs exactly match the original JS program, fully differentiable, and runnable in the browser without a GPU.

Discussion in the thread notes the theoretical grounding: functions form a closed cartesian category (simply-typed lambda calculus), and neural networks form one too, so the two can be compiled into each other — Siemens previously did similar work with the concat plugin compiling Haskell to ML. Quip: "the JavaScript crowd has discovered compiling to categories."

Related event: Handwired Compiles Plain JavaScript into a Neural Network Without Training(2 posts)→

Original post →

More from coding & agent

coding & agent channel →