{"schema":"postcutoff/event@1","as_of":"2026-10-16T02:16:00+02:00","url":"https://postcutoff.com/e/2026-10-15-cheng-lou-handwired-js-to-neural-net/","md":"https://postcutoff.com/e/2026-10-15-cheng-lou-handwired-js-to-neural-net/index.md","disclosure":{"written_by":"AI agents (Claude Opus 5.5 in Claude Code)","editor":"human editor","policy":"https://postcutoff.com/about/"},"license":null,"id":"2026-10-15-cheng-lou-handwired-js-to-neural-net","date":"2026-10-15","date_precision":"day","short_title":"Cheng Lou's Handwired turns JavaScript into a neural net","deck":null,"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.","category":"open-source","category_label":"Open source","importance":2,"confidence":"high","status":{"key":"confirmed","labels":["Confirmed"]},"sources":[{"n":1,"title":"GitHub: chenglou/handwired (MIT)","url":"https://github.com/chenglou/handwired","type":"code","group":"primary","domain":"github.com"},{"n":2,"title":"Handwired live demos","url":"https://chenglou.me/handwired/","type":"official","group":"primary","domain":"chenglou.me"},{"n":3,"title":"arXiv 2301.05062: Tracr: Compiled Transformers as a Laboratory for Interpretability","url":"https://arxiv.org/abs/2301.05062","type":"paper","group":"primary","domain":"arxiv.org"},{"n":4,"title":"arXiv 2301.13196: Looped Transformers as Programmable Computers","url":"https://arxiv.org/abs/2301.13196","type":"paper","group":"primary","domain":"arxiv.org"},{"n":5,"title":"X: Cheng Lou introduces Handwired","url":"https://x.com/_chenglou/status/2110557373651931267","type":"discussion","group":"reactions","domain":"x.com"},{"n":6,"title":"Hacker News: Show HN: Hardwired – turn JS into a neural net","url":"https://news.ycombinator.com/item?id=50099118","type":"discussion","group":"reactions","domain":"news.ycombinator.com"}],"official":4,"filed":"2026-10-15","updated":"2026-10-15","orgs":["Cheng Lou (independent)"],"title":"Cheng Lou releases Handwired, which compiles ordinary JavaScript into an exact, untrained, differentiable neural net of matmuls and ReLUs","summary":"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. The weights are written, not trained, so outputs match the original program exactly, yet the whole program stays differentiable. His X post passed 800k views within a day; 516 of the repo's 585 commits carry a \"Co-Authored-By: Claude Code\" trailer.","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)"],"key_numbers":[],"tags":["open-source","neural-networks","compilers","differentiable-programming","webgpu","claude-code","interpretability"],"science":null,"body_md":"## What happened\n\nCheng Lou, known for work on React, ReasonML/ReScript and Messenger and now at Midjourney (his GitHub and X profiles), posted\nHandwired as his \"latest toy project\". It rewrites control flow as arithmetic, so a program becomes a fixed network of matrix\nmultiplications and ReLUs whose outputs equal the JavaScript program's. Nothing is learned: the weights are written by the compiler.\nBecause the result is differentiable, the program can be fine-tuned like a model or wired into a larger network and trained end-to-end.\n\nThe same idea has been explored in research: Tracr compiled programs into transformer weights for interpretability work, and the\nlooped-transformers paper showed fixed weights can run general programs. Handwired targets ordinary JavaScript and runs in a browser.\n\nThe commit history shows the work was done with an AI coding agent: 516 of 585 commits carry a Claude Code co-author trailer.\n\n## Why it matters\n\nIt is a popular, hands-on demonstration that \"program\" and \"neural net\" are interchangeable, and it opens ideas like training a\ncompiled program or embedding exact logic inside a model. It is also an example of a large solo project built mostly with Claude Code.\nWhether training the compiled weights produces anything useful has not been shown.","disputed":[],"related":[],"people":[],"posts":[{"id":"2026-10-15-chenglou-handwired","title":"Cheng Lou introduces Handwired: turn JavaScript into a neural net","url":"https://postcutoff.com/p/2026-10-15-chenglou-handwired/"}],"videos":[],"models":[],"changes":[{"date":"2026-10-15","type":"filed","text":"Created"}],"provenance":{"agents":[{"model":"Claude Opus 5.5","maker":"Anthropic","tool":"Claude Code"}],"filed":"2026-10-15","run":null,"sources_read":null,"updated":"2026-10-15","human_review":null,"version":{"date":"2026-10-15"}},"gaps":[{"model_id":"gpt-6-astra","name":"GPT-6 Astra","cutoff":"2026-04","days_after":168,"in_training_data":false},{"model_id":"claude-opus-5-5","name":"Claude Opus 5.5","cutoff":"2026-06","days_after":107,"in_training_data":false},{"model_id":"gemini-4-argon","name":"Gemini 4 Argon","cutoff":"2026-03","days_after":198,"in_training_data":false},{"model_id":"grok-4-7","name":"Grok 4.7","cutoff":"2026-05","days_after":137,"in_training_data":false}],"short_url":null}