Bend 2 makes AI prove its code before it compiles — on CPU and GPU

Write invariants as laws and the compiler rejects any code that breaks them — so your agent can't ship a spec violation. Plus: models that skip text to talk.

Nowline SEP 21 12:00 AM banner

Top AI stories from the last hour

Top AI stories from the last hour

Copy markdown

  • Write a law, and the AI can't compile around it

    Bend 2 lets you state invariants as machine-checked laws — 'canceling twice equals canceling once,' 'these balances always sum to zero.' The compiler rejects any implementation that violates them, and the agent loop repeats until the proof holds, so a coding agent literally can't ship code that breaks your spec.

  • It compiles to one C file and runs on your GPU

    Everything lowers to a single C file that targets Metal or CUDA behind macros; mark the parallel work and pass --gpu. On Bend's own M4 Max benchmark, Game of Life falls from 7.8s sequential to 0.06s on GPU — their modes against each other, not a hand-tuned CUDA baseline.

  • Install it tonight — Apache-2.0, v2.0.5

    curl -fsSL https://bend-lang.com/install.sh | sh, or run it through Bun. Weekend build: a sorter or a small order system whose correctness is proven rather than tested — the type checker refuses to compile the wrong permutation.

  • The catch: you hand-write the proofs

    No tactics or proof search yet, no debugger, no language server, and a thin standard library — so you'll prove even basic lemmas yourself. And an underspecified law leaves a loophole an agent will happily exploit.

  • Elsewhere: models that talk without generating text

    Cache-to-Cache (ICLR'26, Apache-2.0) is back on the front page with open code and weights: two models trade meaning straight through their KV-caches instead of passing tokens — about 2x faster than a text hand-off and 3-5% more accurate. Pip-installable, with seven pretrained Qwen projector pairs on Hugging Face.