Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I know this is an anecdote, but try to break down the problem you have in simpler terms

This should be the first thing you try. Something to keep in mind is that AI is just a tool for munging long strings of text. It's not really intelligent and it doesn't have a crystal ball.



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.


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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: