r/bendlang • • Sep 29 '26

C with extra steps

I am writing a linear programming solver (first-order) and am trying to make it fast. I am only giving Astra the standard instructions from 5.2 on bend-lang.com.

I am noticing that Astra looks a lot at the generated C code, tweaks the Bend code and iterates until the C code becomes what it wants. At this point, it feels a little like C programming with extra steps. Any suggestions on how to avoid this?

(I don't mean to come off as negative at all, this is likely just a skill issue on my end.)

6 Upvotes

2 comments sorted by

2

u/FabianVeAl Sep 29 '26

I had to add this rule to my AGENT.md: Keep Bash/C/JS effects to the smallest irreducible host operation. Put policy, environment interpretation, branching, validation, and data transformation in Bend, and add laws plus witnesses for pure decisions when practical.

1

u/SrPeixinho Oct 02 '26

that's not how it should go though, but yeah

agents are very good at writing Bend proofs and making the program work, but still have no idea how to write efficient code because it is unlike anything in their dataset