‹ BackHN Continuity

Thread

Bend – a language that blocks AI mistakes via proof and runs on GPUs

616 points · 327 comments · nicolas-siplis

  1. stschaef · · focus · HN ↗
    This reads very vibecoded, but putting that aside...

    1. How does this benefit from GPU parallelism? I don't know much about implementing proof assistant, as I am just a user, but its my understanding that these tasks aren't amenable to running on a GPU.

    2. The comparison to Lean&#x2F;Agda&#x2F;Isabelle&#x2F;etc have no meaning without understanding what programs are being used for comparison. I also so far have no reason to believe large-scale verified programs would ever adapt to Bend. For instance, I have a large software verification project written in Cubical Agda <a href="https:&#x2F;&#x2F;github.com&#x2F;um-catlab&#x2F;cubical-categorical-logic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;um-catlab&#x2F;cubical-categorical-logic it&#x27;s not clear to me how one would even begin to port this over to Bend, especially given the dependence on cubical

    3. Single commit history is hella sus

    4. Bend uses &quot;an affine dependent type theory&quot;. Substructural dependent type systems are an active area of research. If this weren&#x27;t slop, I&#x27;d expect such a system to be worthy of publication at a top programming languages conference. It sounds quite unlikely that a random vibecoded project with a Fable-written paper has worked out all of the kinks

    5. I would&#x27;ve at least expected this paper to be cited <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2401.15258" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2401.15258 but it is noticeably absent

    I&#x27;m glad you&#x27;re having fun vibecoding, and I like that you&#x27;re interested in this area of research&#x2F;engineering, but you are wildly overstating what you have here and sound sus af

    1. LightMachine · · focus · HN ↗
      Yes, there&#x27;s a lot of vibe-coding in many places, but the critical parts (compiler, runtime, kernel) are human designed, and the kernel has been extensively audited by human. All of it is my own design and architecture, and I&#x27;m a human, I think. We&#x27;ll prune AI slop over time. The project is big, and we&#x27;re a small team.

      1. The paper explains it well (sadly it is written by Claude for now, but it is accurate):

      <a href="https:&#x2F;&#x2F;github.com&#x2F;bendlang&#x2F;bend&#x2F;blob&#x2F;main&#x2F;paper&#x2F;BendRT.pdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bendlang&#x2F;bend&#x2F;blob&#x2F;main&#x2F;paper&#x2F;BendRT.pdf

      In short, we implemented a complete allocator, garbage-collector, closure evaluator and functional evaluator, on the GPU (with zero interaction net overhead this time). We then use a very simple (for now) scheduler that spreads binary recursive calls as to saturate all CPU or GPU cores, depending on where it is running. This is the simplest thing that works fast. In the future, we want to have a more flexible task stealing queue, but contention destroys GPU performance, so, that&#x27;s the best thing that works, for now.

      2. Benchmarks aside, large scale verified programs would run much faster on Bend for a simple reason: Bend is fully explicit. It has no tactics, and it does zero compile-time search. As always: the less a computer does, the faster it runs. This is a tradeoff. In exchange, Bend code is substantially more verbose than Lean, and it is more laborious to write Bend proofs. I argue this is the right tradeoff, because AI write proofs, and AI time is cheap, while bugs take human time, which is expensive.

      3. Sorry I&#x27;m not proud of the commit history

      4. I don&#x27;t think it is worthy publication because the core idea is simple. We just use QTT-like linear types to fully prohibit runtime closures. So, paradoxes like Russel&#x27;s and Girard&#x27;s are blocked. In exchange, functions like List.map are not expressive (without templates). So it is not a research breakthrough. I just made a conscious trade here, which makes Bend way closer to C or Rust, than to Haskell or Lean.

      5. Will patch.

      Great questions actually, and surprisingly respectful. I appreciate it a lot.

      1. stschaef · · focus · HN ↗
        1. thanks, I&#x27;ll try to take a look later at this. Most of my skepticism was rooted in a personal-hell I endured when trying to parallelize SAT-solving with GPUs...which didn&#x27;t go well because its hard to share across workers effectively. Another thing to note, I&#x27;d frown upon using Claude-written works for communication between humans. If the ideas are yours then it should be feasible to write the paper. Many people will take &quot;Claude wrote this paper&quot; as a big sign telling them to ignore it

        2. With no offense, but until it is demonstrated that this is useful for larger verified software projects I will be intensely skeptical; and, I&#x27;d advise not making claims like this until you have empirical evidence

        4. Assuming this all holds air and isn&#x27;t AI-bs (I&#x27;ll make no claims in either direction), then yeah I&#x27;d say its valid research. To be clear with what you&#x27;re claiming here, you&#x27;re giving the impression that you have a GPU-accelerated proof assistant that is 2 orders of magnitude faster than Lean. If true, then that&#x27;s a big and interesting contribution

        Best of luck with everything. I certainly understand the frustration with how slow proof assistants can be, and I hope that we as a community can significantly speed them up

        1. LightMachine · · focus · HN ↗
          2 isn&#x27;t a big claim though, I think anyone developing Lean or Agda would agree these would be much faster with zero inference, unification or search? They&#x27;d just complain the language would become unergonomic, and that&#x27;s true. Bend is very verbose.

          Thanks and your feedbacks are reasonable, I appreciate

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.