弯曲
Bend – A language that blocks AI mistakes via proof, on CPU and GPU

原始链接: https://bend-lang.com/

Bend 是一门为后 AGI 时代设计的高性能编程语言,在人类意图与 AI 生成代码之间架起了一座无歧义的桥梁。它兼具 C 语言级的执行速度与无缝的自动 CPU/GPU 并行计算能力,无需复杂的线程或锁机制。 Bend 的独特之处在于其集成了形式化验证。通过利用证明检查类型系统,开发者可以在 `LAWS.bend` 中定义不可变规则。AI 智能体在加密层面被要求证明其代码遵循这些规则,从而在数学上杜绝了部署错误代码的可能性。 **核心特性:** * **极致速度:** 原生编译与自动硬件扩展。 * **快速验证:** 证明检查在数秒内完成,实现实时 AI 校验。 * **错误预防:** 通过强制 AI 构建满足既定形式化证明的代码,确保“灵感编码”应用程序的可靠性。 若要开始使用,请通过 `curl -fsSL https://bend-lang.com/install.sh | sh` 安装,并配置 AI 智能体的 `AGENTS.md` 以优先考虑 `LAWS.bend` 和并行化。Bend 目前针对 Linux 和 macOS 的后端环境进行了优化。

Bend 2.0 的发布在 Hacker News 上引发了讨论,但评价褒贬不一。一些用户对该项目使用交互组合子(interaction combinators)以及其在高性能并行计算方面的潜力感到兴奋,而另一些人则对其透明度和仓库管理提出了重大质疑。 批评者指出,Bend 仓库在 2.0.4 版本中似乎被合并为单一提交,从而抹去了其开发历史。此举引起了社区的怀疑,用户认为在当前的行业环境下,此类做法损害了信任。此外,一些评论者还对仓库的结构表示困惑,特别是质疑编译器源代码目前的可用性及其存放位置。
相关文章

原文
Bend
~/bend
×

1.Install

curl -fsSL https://bend-lang.com/install.sh | sh

2.Add this to your AGENTS.md

When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible

3.Enjoy bug-free, fast vibe-coded apps!

a fast language that blocks AI mistakes via proof

C speed · CUDA parallelism · Lean proofs

In the post-AGI economy, humans will eventually stop writing and reading code, but we still need an ambiguity-free way to tell the AIs building the world around us what we want done.

With laws, our intents can be much more precise than natural language. With proofs, we can verify that the AI implemented our prompts correctly. And a fast compiler runs it at speed.

That's Bend - and nothing else.

1.Bend runs FAST.

Bend compiles to native code. On one core, it runs nearly as fast as C. The same binary also runs on sixteen cores, or on the GPU, running up to a hundred times faster than one core.

Apple M4 Max · lower is better

2.Bend compiles FAST.

Bend's type checker is a proof checker, as in Lean and Rocq. Those can take minutes on a mid-sized codebase. Bend takes a second at most, so an AI agent can check after every change.

Apple M4 Max · lower is better

3.Bend is PARALLEL.

No threads, no locks, no kernels to write. Split the work in two, and Bend spreads the calls over every core it can find, then joins them back. Now watch pow2 run on 4,096 GPU cores:

pow2.bend running on the GPU

4.Bend BLOCKS mistakes - with proof

How can you trust code you never read? By demanding a proof. LAWS.bend is where you declare laws. From then on, no AI can ship one line that breaks them, ever. Watch it guard a game:

Law: winning is impossible

So far, it works!

New feature:

“Claude, make the board wrap around”

Without LAWS.bend:

Laws broken. AI mistake: merged.

With LAWS.bend:

Laws intact. AI mistake: blocked!

Without LAWS.bend, the bug went live. With LAWS.bend, the AI had to retry until it built a wall and proved the law holds. Merging a bug is mathematically impossible: it is a theorem.

LAWS.bend

# LAW: no move sequence leads to victory.
law you_cant_win:
  for moves: List<Move>            # any sequence of moves
  board = replay(start(), moves)   # replayed from the start
  is_won(board) == False{}         # never leads to victory

PROOF.bend

# PROOF: you_cant_win holds.
def Laws.you_cant_win(moves):
  # ... written by the AI

LAWS.bend is AGENTS.md backed by proof. “Make no mistakes” is now type-checked.

Skeptical? Try breaking the game.

5.Get started.

5.1.Install

curl -fsSL https://bend-lang.com/install.sh | sh

5.2.Tell your agent to use Bend

Add this to your AGENTS.md:

When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible

Then, just say: "use Bend"!

5.3.Enjoy bug-free, fast vibe-coded apps!

Hints: ask it to write laws for whatever should never break, and to parallelize everything you want running fast. Bend is young: if anything goes wrong, ask it to open an issue. Bend works best on the back-end, on Linux and on macOS. Enjoy! <3

6.References.

Guide: GUIDE.md is the whole language; bend guide prints it. Paper: BendTT, an affine dependent type theory, Bend's core. Paper: BendRT, a parallel runtime for CPUs and GPUs, the VM.

Bend is still evolving. Expect bugs, and please report them.

联系我们 contact @ memedata.com