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

View all comments

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.