Remix.run Logo
▲ scandinavian an hour ago

I've been using both sol and astra to write some python and rust, and they generate the sloppiest code I've seen in a long time. I would be embarrassed to commit anything they write. The rust code especially was terrible. Had it implement a reader/writer for a binary format and it was just littered with magic numbers, terribly named variables, very compact code visually etc. It produces working code, so I guess the GPT models are mostly for people who let AI take the wheel 100%.

▲logicchains 15 minutes ago | parent | next [-]

You're using it wrong. If you want it producing clean code, you should be telling it to clean up and refactor the code, not just treating the first thing it spits out as the final product.

▲hermitShell 22 minutes ago | parent | prev [-]

Do we want LLM generated and maintained code to look similar to human generated and maintained code?

I've always used AI tools to write very constrained and small functions and modules, and then stitch it all together myself. So far. Over the last year it's become evident that many people let the AI drive 100% and there are proponents (DHH notably) that this is the way.

I'll be interested to see how compilers and LLM's compare at generating assembly over the next decade. Assembly offers enough abstraction, why do we need C? \s

▲andoando 5 minutes ago | parent [-]

I think even for LLMs it's going to be much easier to analyze code, and especially its intent with proper naming vs trying to figure out what a bunch of assembly is doing. A function called binarySort is alot less tokens and communicates what the function is attempting to do vs 100 lines of assembly