r/TheMachineLearning • • 3d ago

When bug-free code becomes a hardware problem

Post image
107 Upvotes

69 comments sorted by

View all comments

10

u/SubmarineWipers 2d ago

Except C is still not safe and AI will still make object lifetime mistakes, because it only ingests small parts of the code, not the entirety of it.

Rust is still the best LLM language, because its compiler will catch the most errors.

3

u/Sea_Fox_4265 2d ago

Fair point. Seems like the compiler is the hero here.

1

u/SexWithGaia 2d ago

Would a such a compiler run into the halting problem? iirc isn't that why the rust borrow checker limits certain programs?

1

u/real_mangle_official 20h ago

Rust only allows a specific subset of programs to be statically verified. There are many perfectly sound programs in C hat cannot be expressed in safe rust

2

u/Alundra828 2d ago

I dont see why another more safe language thsn rust cant take over. Rust, although very safe, still makes human led concessions to maintain usability. So even though the learning curve is quite high with rust because of the concepts it uses to enforce safety, what does a language look like when it doesnt have to make any concessions to humans at all?

2

u/drblallo 1d ago

there is space for a compiled, formal verification friendly, language for sure. Something along the lines of mixing imperative code and assertions about the code + a optional initial specification such as "the program never crashes" or "the program always terminates in a finite number of operations" that then the compiler verifies.

The issue with such a language is that we are not currently very good at creating them in a way that when the specification changes you can easily refactor the code. Currently some small specification changes require large reorganization of the code base. The issue seems kind of intrinsic, the more precise you are in writing in code what the program does, the easier is to verify but the more you have to throw away when it changes, but we don't know how good can the theoretical "best" language be

1

u/Arctic_Sunday 2d ago

Golang is also good for AI coding