>ask AI to port something from python to rust>it's already up to 73 tests, written within the file itselfdo rustfags just love to test test test or something?
i thought they avoided test as much as possible
>>107847940Rust isn't the best usecase for AI, there just isn't that much Rust code for an AI to learn from.
>>107848050I thought that too, but the code quality is higher on average and the borrowchecker helps a lot
people tend to write bad code, but rationalize it with tests to validate it as "good".
>>107847940>/g/eet nocoder literally shaking after encountering good professional code practices for the first time>>107848050i don't fiddle with llm crap much, but from what i saw, they are good (as good as an llm can be) at producing working (or at least workable) code, but it tends to be very very unidiomatic.i saw an anon aptly describe it as if it's like the llm is generating C++ code in its head then trivially translating to rust. one easy telltale is when an i32 appears for no reason (substitute for int). there are others, but i don't want to help retards catch on ;)so it still can be helpful, especially if you for example want to decipher some c++ crap without learning that retardation. but you (the person) would still not "pass" if you don't idiomatize the code later.
>>107848050oh honey... bad news...
>>107848343Tests are fineputting all the tests in the same file as the code is notIt bloats the file immensely
>>107848374>/g/eet filtered by trivial modules invents new "bloat" concerns
>>107848408>over 1k lines of tests is fineno
>>107848444>/g/eetoloid switches to pure bait/bait-switchingnow that's just sad
>>107848374https://doc.rust-lang.org/book/ch11-03-test-organization.htmlYou can do whatever you want.
>>107848458i said it was 73 testshow long do you think 73 tests is going to be?