top | item 46948909

(no title)

sigseg1v | 21 days ago

To add on to this, I see many complaints that "[AI] produced garbage code that doesn't solve the problem" yet I have never seen someone say "I set up a verification system where code that passes the tests and criteria and code that does not is identified as follows" and then say the same thing after.

To me it reads like saying "I typed pseudocode into a JS file and it didn't compile , JS is junk". If people learn to use the tool, it works.

Anecdotally, I've been experimenting with migrations between languages and found LLMs taking shortcuts, but when I added a step to convert the source code's language to an AST and the transformed code to another AST and then designed a diff algorithm to compare the logic is equivalent in the converted code, and to retry until it matches within X tolerance, then it stopped outputting shortcuts because it simply would just continue until there were no shortcuts made. I suspect complainants are not doing this.

discuss

order

qlm|21 days ago

At that point why not just have an actual deterministic transpiler?

sigseg1v|20 days ago

I feel that the devil is in the edge cases and this allows you to have the freedom to say "ok I want to try for 1.0 match between everything, I can accept 0.98 match, and files which have less of a match it can detail notes for and I can manually approve them". So for things where the languages differ too much for specific patterns such as maybe an event handing module, you can allow more leniency and tell it to use the target languages patterns more easily, without having to be so precise as to define every single transformation as you would with a transpiler.

In short: because it's faster and more flexible.