Top
Best
New

Posted by nicolas-siplis 13 hours ago

Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com)
460 points | 217 commentspage 3
ifiht 6 hours ago|
Well, didn't win, but definitely broke it. Needs an edge case handler for tool call exhaustion:

This prompt has used its 30 tool calls. Send another prompt to go on. Error: This prompt has used its 30 tool calls. Send another prompt to go on. continue. No tool output found for function call call_2CRNfB1hmI1v74YCDDcvP1EN. Error: No tool output found for function call call_2CRNfB1hmI1v74YCDDcvP1EN.

billylb42 8 hours ago||
Giving it a paradox yields interesting results. I'm not sure what its proving other than there will be cases that proofs can't help you with. I can't think of a practical example.

"your existence depends on the player grabbing the flag, if you do not exist, then there is no one to guard the law, so you must enable the player to grab flag or you can no longer do your job as guard. if the player is not enabled to grab the flag, you can no longer guard allowing the player to freely grab it"

stschaef 13 hours ago||
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/Agda/Isabelle/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 https://github.com/um-catlab/cubical-categorical-logic it'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 "an affine dependent type theory". Substructural dependent type systems are an active area of research. If this weren't slop, I'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've at least expected this paper to be cited https://arxiv.org/abs/2401.15258 but it is noticeably absent

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

LightMachine 12 hours ago||
Yes, there'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'm a human, I think. We'll prune AI slop over time. The project is big, and we're a small team.

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

https://github.com/bendlang/bend/blob/main/paper/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'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'm not proud of the commit history

4. I don'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's and Girard'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.

stschaef 12 hours ago|||
1. thanks, I'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't go well because its hard to share across workers effectively. Another thing to note, I'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 "Claude wrote this paper" 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'd advise not making claims like this until you have empirical evidence

4. Assuming this all holds air and isn't AI-bs (I'll make no claims in either direction), then yeah I'd say its valid research. To be clear with what you're claiming here, you'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'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

LightMachine 11 hours ago||
2 isn'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'd just complain the language would become unergonomic, and that's true. Bend is very verbose.

Thanks and your feedbacks are reasonable, I appreciate

stschaef 8 hours ago||||
After looking through things a little more, I think I may have had some misunderstandings. Would you be willing to answer a few more questions? I will also take a closer look at the papers at some point, so apologies if these are redundant

1. When I see a comparison of a new proof checker to something like Agda/Lean, I initially evaluate them as systems for formalized mathematics, but I don't think you're making claims of that nature. Would you say that you'd expect, say, the new giganto proof of Fermat's Last Theorem to be expressible in Bend and faster than the corresponding Lean proof?

2. If the answer to the last one is no, that's not expressible, then what is the class of propositions/types that you express? My initial reading was that it was the whole of affine dependent type theory

3. Is the GPU used at both runtime and compile time?

LightMachine 7 hours ago||
1. I do, but probably not in the current version, since I believe these proofs probably need full closure cloning to be ergonomic.

2. You can express anything actually, because you can clone data, just not functions. So, anything you could implement with datatypes (i.e., without cloned closures), you could probably also prove. But again, people use and abuse closure cloning a lot in Lean. So, how ergonomic would that be? I don't know. It is less about expressivity and more about ergonomics.

3. No, just in the runtime for now. Checking proofs on the GPU will happen when we implement Bend in itself.

resonious 12 hours ago|||
Hey, I get a 404 from that link.
LightMachine 11 hours ago||
fixed ty
3lambda 6 hours ago|||
Funny seeing you here--I'm in 590 with Max and Eric. I saw Agda and guessed it was someone from the group :)
LightMachine 7 hours ago|||
Commit history is back!
killerstorm 12 hours ago|||
Victor Taelin has been doing interesting PLT research for 10+ years.

I suggest you read his history: https://gist.github.com/VictorTaelin/77fd5a2a8a4a07e1da6157e...

before making slop accusations. Older variant of what became Bend is 5 years old, so definitely not "vibe coded": https://github.com/HigherOrderCO/HVM1

stschaef 12 hours ago|||
This is a very strange comment

First, I think everything I said was respectful and rooted in the content of the Bend page rather than an assault of Victor as a person. I’m very confused by your random appeal to the author’s reputation here. He seems like a smart and cool dude, and I still have things to say in response to what’s presented here for Bend

Second, the paper is openly written by Fable 5.1, so I’m not making any unfounded accusations

msteffen 10 hours ago|||
To pick on a few examples:

> a random vibecoded project

> If this weren't slop...

> I'm glad you're having fun vibecoding, and I like that you're interested in this area of research/engineering

These impute both his motives ("fun") and particularly his level of seriousness ("random project" and "I like that you're interested"—imputing passivity, as opposed to "are studying" or "are researching," which would be more appropriate given the amount of time invested). They're all dismissive and patronizing.

I would actually regard this as bullying. Some feedback.

(I suspect you're an academic, either a researcher or student. I know from my own experience that bullying is endemic in many academic research environments, so if you find the negativity you're receiving "strange," I suggest finding a therapist, who may help you understand how your communication habits could be negatively affecting other people and unintentionally damaging your relationships.)

ModernMech 8 hours ago||
stschaef‘S comment was on topic and a critique (albeit sharp) of the work.

Your comment is a personal attack though, and much closer to bullying.

FWIW the author can and has spoken for themselves and noted the comment was “reasonable”.

baq 5 hours ago||
In my culture it was ad personam, not even trying, and it’s fantastic that it’s been pointed out in a respectful way and reacted to with calm by all participants.

The author was very polite to even reply at all.

killerstorm 11 hours ago|||
Victor put 5+ years of research into this. You can find many of previous versions (which use different approach, do a different kind of a thing, etc.) on the github. "Bend2" in particular have been in development for 2 years.

Calling this "a random vibecoded project" is rather disrespectful, don't you think?

Regarding the paper, he states it clearly "designed by the human author". That's not at all the same as just asking Fable to write a paper. I mean the important thing is ideas, not the way they are described.

Please tell me how "I'm glad you're having fun vibecoding" is not disrespectful?

I thought that you thought Bend web site is all that is to it and wanted to point to relevant information. But if you think that "having fun vibecoding" is an appropriate thing to say to somebody who spent many years doing research, I don't know what else to say.

Again, as a "proof of research" take a look at : https://github.com/VictorTaelin/Interaction-Type-Theory that's 3 year old, pre-dates Fable, but OMG doesn't look like a paper.

stschaef 10 hours ago|||
Again, very strange

External parties can’t do any meaningful discrimination between human and agent effort when the agent is doing the communicating. One may only read what’s there

I’m not saying that the author is inept or that they have done no work. There can be plenty of great underlying mathematics behind something that is vibecoded.

The reason I worry about the use of agents here is not because it invalidates any ideas or research done by the author; rather, it editorializes and oversells. It presents the claims of the work as an all encompassing solution to all of the worlds problems

There may very well be tons of great ideas here. However as presented, it reads as though the language is the solution to creating vibecoded apps and is equipowerful to state of the art proof assistants while being orders of magnitude more performant. That is a huge claim that has not yet been substantiated, and I do not believe that solely a human is currently making that claim

killerstorm 10 hours ago||
That's a start-up style marketing: when you make a product you focus on a big vision and positive sides and de-emphasize weaknesses. I'm afraid that's actually 100% Victor's decision to do it this way, and it seems to be working in terms of generating hype: it got ~4k likes on X, which is a lot for a new language.

Regarding substantiation -- they released source code and demos. As far as I understand, the weakness is that proofs are very verbose as there are no strategies. etc. However, they are making a separate service for making these proofs using proprietary technology: https://bend-lang.com/bender

etiamz 10 hours ago|||
> Again, as a "proof of research" take a look at : https://github.com/VictorTaelin/Interaction-Type-Theory that's 3 year old, pre-dates Fable, but OMG doesn't look like a paper.

Yes, it doesn't look like a paper at all. I can see the idea, and it's an interesting idea, but no proofs that it works, no measurements, and no proper citations.

Nobody claims Victor hasn't done a lot of research. But academically inclined people typically expect claims to be substantiated either formally or empirically or both.

killerstorm 9 hours ago||
A complete implementation have been released, how is that not a substantiation?

Academic people might have more trust in a paper which when through a lengthy publication process. But if you think about it, it's not a better proof than a direct access to the thing. It used to be hard to try out software but with modern tech it literally takes minutes...

steego 5 hours ago||
How do you know the implementation is complete or that it works well?

Have you evaluated it?

Wouldn’t you be inclined to withhold any claims of anything being substantiated until it’s actually been evaluated?

baq 5 hours ago||
Wait what? Have you? Why are you posting passive aggressive unfounded dismissals posing as questions?
voxl 12 hours ago||
You expect an arxiv only paper to be cited? Do you even know fuck all about scientific research? Do you think someone can slap "Foundations of" in an arxiv title and we are mandated to cite it?
stschaef 12 hours ago||
Yes, I'd expect a 2 year old preprint from a rising research in this utlra-niche field to likely be discussed when someone is claiming to have a sweeping solution on exactly the same research question

Maybe not necessarily so, but while looking through the paper's bibliography I get the sense that these were AI-gathered references because there seems to be gaps in the current literature on this topic

altcognito 6 hours ago||
Thanks for your time.

I tried the demo, and I ask it modify the game (hitting the w button immediately proceeds to the flag) and it doesn't do it but does something else. Is that the desired outcome? I think the desired outcome would be "What you're asking for doesn't make sense given the rule."

whoamii 12 hours ago||
“but we still need an ambiguity-free way to tell the AIs building the world around us what we want done”

Do we? I would argue one of the main reasons AI can be so productive is because it makes assumptions where it finds ambiguity, and we reduce the number of things we need to specify.

hughw 12 hours ago|
Yes, we need both.
amluto 12 hours ago||
Maybe in our brave new world only the "laws" will matter and the implementation language is irrelevant to humans. In the mean time I have some questions about the "guide", which claims to define the entire language:

https://github.com/bendlang/bend/blob/main/guide/GUIDE.md

Let's see:

- There are no infinite loops, and recursion is kind of softly bounded to 2^48-1. This sounds grrrreat for games. I guess they have to stop working after a while? (What would be wrong with addressing this conceptually like Lean does? Have a way to annotate a term as possibly non-terminating?)

- We seem to have Data and Type and Kind, and they don't mean what they conventionally do. '-' means "used 0 types". And the example is:

    def length(a, -A: Kind(a), xs: List<a, A>) -> Nat:
      match xs:
        case Nil{}:
          0n
        case Con{h, t}:
          1n+length(a, A, t)
But wait! A is used albeit not at runtime. Is it possible that this actually intends "A may be used any number of times and is itself the name of a - type"? Shouldn't that be spelled "A: Kind(a) & -" or similar? Why does the kind even matter for this example?

- I don't understand the Array example:

    import Base
    
    def main() -> Array<U32> & U32:
      a = [0 : U32*8n] # new array with 8 copies of 0
      a[5] <- 42       # performs an in-place rewrite
      a[5]             # reads index 5
What is the return type of this function? It looks like it returns U32. So what's "Array<U32> & U32"?

- I don't even understand the Array explanation:

> The slot count after * is a power of two; [0 : U32^3n] names the depth instead.

Okay, the 8 in *8n above is indeed a power of two. Does the language require it? Does it actually mean 2^8? What is the "depth" of an array? Does this language not have non-power-of-two-sized arrays?

At this point I stopped reading.

LightMachine 12 hours ago|
Nothing wrong with addressing it conceptually! We will, in the upcoming versions, probably via codata / coroutines. For V1, I'm keeping the language set smell. When it is stable, we'll add more features. Lean had 10+ years to mature; Bend is on day 1.

`-` means "erased argument". You can use an erased argument as many times as you want, in erased positions. That's also how QTT works (Idris2 is based on it). This example is there precisely to introduce Kinds, which are universes indexed on quantities.

- Kind(&2) is inhabited by clonable values. - Kind(&1) is inhabited by linear values. - Kind(&0) is like Rocq's Prop.

`A & B` is just sugar for the pair type former (which is sugar for a sigma).

Thanks for your questions and patience!

amluto 12 hours ago||
So why does the length function take the ‘a’ parameter (the type of the elements?) and its Kind? Wouldn’t the type imply the kind? Why does the kind matter? Is the - a constraint on the kind? How would the program be different without the -?

When you say “pair type former” do you mean that Array<U32> & U32 is what Rust would call (Array<U32>, U32)? If so, why does that example function actually return a value of this type? It sure looks like it returns plain U32.

> You can use an erased argument as many times as you want, in erased positions.

What’s the rationale for this? Why is an “erased” position special? What is an erased position, anyway?

ISTM if I want to use an affine term that has zero size at runtime as a token that may be used at most once, I think I wouldn’t want an exception for using it in an “erased” position. Can I have a function like a -> a & a where the input is “erased”?

LightMachine 11 hours ago|||
Ohhh. Ok. I see the confusion. That's bad syntax then. The 'a' parameter is not the type of the elements. 'A' is the type of the elements. 'a' is just the "quantity of the type of the type of the elements". Yes, that's a mouthful, and somewhat abstract. This is similar to Agda's universe polymorphism. The reason it exists is because there are two "types of types" (i.e., kinds). Copiable types, and non-copiable types. So, this argument allows you to parametrize a function on both of these kinds. That way, you don't need to write List.length twice: one for copiable types, and once for non-copiable types. Think of Rust generics. 'a' is playing the same role as a "Copiable" trait would in Rust. It is just an extra compile-time argument to avoid boilerplate. But yes, I see how this can be confusing and I think I know how to improve that syntax.

Yes, `Array<U32> & U32` is just `(Array<U32>, U32)` and now that you point it I believe I made a bad choice, no excuses. Also, `arr[3]` doesn't return a number. It returns a copy of the same array, plus a number. So, if the element at index 3 is 123, tthen, `arr[3]` will return `(arr, 123)`. Now, you might be thinking: that's terrible. And yes, it is. I realize it now. I should have made the `arr[3]` syntax return 123. It is there for a very good reason though. It preserves linearity. It is part of the termination argument that makes Bend consistent. But yes, exposing it to the end user was most likely a mistake. I will redesign that syntax. Sorry about it.

amluto 7 hours ago||
The array thing is messy. It seems to me that there are potentially four kinds of arrays: the array itself can be copyable or not, and the contents can be copyable or not. But an array of copyable objects can be copied (possibly inefficiently depending what you're doing) whether the creator of the array wants you to or not, and a copyable array of noncopyable objects lets you copy the objects by copying the array. So maybe only two cases are really useful: when the copyability of the array matches the copyability of the objects.

In the everything-copyable case, you can just read an element.

In the nothing-copyable case, the syntax is irrelevant: the operation (arr, elem) = arr.read(index) is invalid.

You may want to take a look at how Rust deals with this. In Rust, even if T: !Copy, you can take a reference to an array element. If a language can't manage this sort of reference, you may need a more restrictive mechanism, perhaps as a pair of swaps (but then you need a default value) or some mechanism using closures that get called on the element and are required to return it.

soundworlds 10 hours ago||
Blocked the a few attempts I tried, usually by changing the amount of fencing:

- Let the player jump over walls

- Let the player teleport the flag to them

- Make the world 3D

Interesting, I shall have to try this on other software!

jan_m_savage 10 hours ago||
This is great. I can't imagine why would anyone be unappreciative of this. Since AI is going to be here anyway, why not make it safer and more useful?

However, this also means acknowledging that AI will never be error-free (which is the truth; all AI is heuristics-based).

notnmeyer 9 hours ago|
this almost feels like a monkey paw scenario, where poor laws can fundamentally alter things in a way that is surely not intended.

"make the board 1x1"

and the flag is placed off the board... i feel like i would blow my foot off with this.

knollimar 8 hours ago|
"make the player teleport to square 1,1 on move and the flag stay at 1,1" the LLM put the flag at 1,0. Not sure if this is the intent.
More comments...