Cheng Lou’s Handwired turns JavaScript into a neural net
Confirmed
The takeaway
On Oct 15, 2026 Cheng Lou (React, ReasonML, now Midjourney) released Handwired, an MIT-licensed tool that turns regular JavaScript (if-else, loops, state) into a giant matrix multiplication plus ReLU network that runs on CPU or WebGPU.
Status
- Claim
Confirmed
- Our reporting
- High confidence
- Importance
- 2 of 5
- Last verified
- 15 October 2026
Your AI and this story
- GPT-6 Astra168 days after its cutoff
- Claude Opus 5.5107 days after its cutoff
- Gemini 4 Argon198 days after its cutoff
- Grok 4.7137 days after its cutoff
None of these four assistants can know about it. The closest, Claude Opus 5.5, stops 107 days before it.
Key facts
- README: ‘Turn your regular JavaScript code into a neural net; no training, exact, yet also fully differentiable!’
- Method: branches become arithmetic (e.g. a > 4 as max(0,a−4) − max(0,a−5)), both branches compute and a 0/1 selector picks one; the + , * and ReLU operations are collected into one big matmul (‘matrix multiplication + reglu over floats’)
- Suggested uses (README): unfreeze and train the weights; attach a frozen program to a generic neural net and train end-to-end; get GPU parallelism from single-threaded JS (a JSON search demo over 100k documents in milliseconds)
- Demos run in the browser without a GPU: chenglou.me/handwired (incl. a ‘HandwiredOS’ demo)
- Repo: github.com/chenglou/handwired, MIT, created on GitHub Oct 15, 2026; history starts June 4, 2026; 585 commits, 516 with a ‘Co-Authored-By: Claude Code’ trailer (GitHub API, Oct 15 evening); ~870 stars on day one
- X post by @_chenglou (Oct 15, 02:24 UTC): 807,823 views, 7,990 likes when checked via fxtwitter on Oct 15 evening
- Prior art: DeepMind’s Tracr (arXiv 2301.05062, Jan 2023) compiles human-readable programs into transformers with known weights; ‘Looped Transformers as Programmable Computers’ (arXiv 2301.13196, Jan 2023) shows fixed-weight looped transformers can run general programs
- A ‘Show HN: Hardwired’ thread (sic) was posted by another user and got little traction (4 points when checked)
What happened
Cheng Lou, known for work on React, ReasonML/ReScript and Messenger and now at Midjourney (his GitHub and X profiles), posted Handwired as his “latest toy project”. It rewrites control flow as arithmetic, so a program becomes a fixed network of matrix multiplications and ReLUs whose outputs equal the JavaScript program’s. Nothing is learned: the weights are written by the compiler. Because the result is differentiable, the program can be fine-tuned like a model or wired into a larger network and trained end-to-end.
The same idea has been explored in research: Tracr compiled programs into transformer weights for interpretability work, and the looped-transformers paper showed fixed weights can run general programs. Handwired targets ordinary JavaScript and runs in a browser.
The commit history shows the work was done with an AI coding agent: 516 of 585 commits carry a Claude Code co-author trailer.
Why it matters
It is a popular, hands-on demonstration that “program” and “neural net” are interchangeable, and it opens ideas like training a compiled program or embedding exact logic inside a model. It is also an example of a large solo project built mostly with Claude Code. Whether training the compiled weights produces anything useful has not been shown.
Sources
6 sources from 5 sites. Numbers match the chips in the text.
6 sources: 4 primary, 2 reactions
Primary
- GitHub: chenglou/handwired (MIT)github.com, code
- Handwired live demoschenglou.me, official
- arXiv 2301.05062: Tracr: Compiled Transformers as a Laboratory for Interpretabilityarxiv.org, paper
- arXiv 2301.13196: Looped Transformers as Programmable Computersarxiv.org, paper
Reactions
- X: Cheng Lou introduces Handwiredx.com, discussion
- Hacker News: Show HN: Hardwired – turn JS into a neural netnews.ycombinator.com, discussion
Changes
- Filed