Stack Signal.
Technical news & guides across AI, programming and the open-source world
SATURDAY, NOVEMBER 07, 2026 · 101 articles · RSS

Programming & Web DevOct 24, 2026593 words

Bend: The Language Where All the Parallelism Is Implicit

Parallel programming is a slog. Before you write the first useful line, you've hired a team of threads, tailored a boss to feed them, and fenced off every shared mutable byte with locks or atomics — and the whole fragile apparatus is still one race away from silent corruption. Higher Order Company's answer, Bend, is to delete that labour entirely: you write what looks like ordinary functional code, and the machine figures out what can run at once. Everything that can run in parallel, runs in parallel. Nothing less, and none of the ceremony.

Bend, created by Victor Taelin and first published on 17 May 2024, reads like Python and thinks like Haskell. It has first-class functions, closures, unlimited recursion and iterative loops. There is no thread, no mutex, no atomic. The source of the implicit magic is the virtual machine underneath it. HVM2 is a massively parallel evaluator written in Rust that executes programs as interaction combinator graphs — a model, going back to Yves Lafont's interaction nets, that treats a running program as a collection of cells connected by wires. Two cells meeting at their principal ports reduce to a local rewrite. Because every reduction touches only its two cells, none of the graphs' work ever has to wait on distant neighbours, and the runtime is free to dispatch any pending pair to any core. Lafont argued interaction combinators are a universal model of distributed computation, the way Turing machines model sequential computation; HVM2 is the bet that he was right.

The payoff is the pitch. In Bend's signature benchmark, a bitonic sorter built from immutable tree rotations — exactly the kind of divide-and-conquer that normally needs hand-rolled parallelism — runs on an Apple M3 Max in 12.15 seconds on one thread, 0.96 seconds across 16 threads, and 0.21 seconds on an NVIDIA RTX 4090 with 16,000 threads. Same source file. A 57x speedup for changing the run command. bend run for sequential, bend run-c for parallel CPU, bend run-cu for the GPU.

Two years on, the caveats deserve the same honesty as the headline. GPU support is still NVIDIA-only and needs the CUDA 12.x toolkit. Bend works with limited 24-bit integers by default — fine for a demo, awkward for real math. The compiler and code generator are young, so single-threaded Bend loses to mature compilers at the same work. And HVM2's claim that it can keep thousands of threads busy without explicit coordination is a bet on an ambitious graph-based model, not a settled win. That a successor runtime has since moved off interaction nets and toward a bespoke execution model says the grand experiment is still in flux.

None of that makes the idea less worth knowing. Bend is not asking you to write harder — it asks you to write less, and hands the hard part to a model of computation that has been quietly waiting in the literature for three decades. If it grows to production maturity, it makes today's cultivated skill with threads look as quaint as manual memory management felt after garbage collection. Even if it stays a research project, it is the clearest argument yet that explicit parallelism is a choice of labour, not a law of physics.

Install it in a spare afternoon: cargo install hvm, then cargo install bend-lang, or reach it through the Higher Order Company repos. The sort-of-Python you type is a familiar front door. What's behind it is the strange, elegant idea that concurrency can be handed off to the machine — for free, and all at once.