Bend 2 is a new programming language designed to be both extremely fast and formally unambiguous so humans can state intents that AIs must implement correctly. It combines a high-performance compiler (targets: C, CUDA, Metal, JavaScript) with an affine dependent type system, purity and linearity to generate code that rivals hand-written C on CPU and scales across thousands of GPU cores. The toolchain includes a fast proof checker that claims orders-of-magnitude speedups over existing assistants, enabling practical verification of program invariants. Built-in parallelism requires no explicit threads or locks: the runtime splits work automatically across available cores and GPUs.
Correctness is enforced by LAWS.bend and PROOF.bend: developers declare invariants as laws and the compiler demands machine-checkable proofs whenever code changes, preventing AI or human edits from violating those guarantees. Examples show laws like “players can never pass through walls” or “sum of balances is zero,” with proofs written or generated by agents to unblock merges. Installation is simple, but the system is young and limited: no backward compatibility with Bend 1, verbose annotations, few numeric types, no advanced libraries (TLS/HTTP/JSON), restricted platform support, no rich tooling or proof automation, and a largely AI-written compiler that hasn’t been fully audited.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.