Hacker News new | ask | show | jobs
by jamil7 626 days ago
Pretty similar observations. Using Aider with Claude on an iOS app I’ve it can be helpful to scaffold new modules for example, if I give it some existing code and tell it to copy the conventions. But it’s virtually useless for editing or changing code where it will often produce code that doesn’t compile, has bugs and/or doesn’t solve the requirements.

Anything to do with Swift concurrency it’s completely hopeless, I assume partly because there’s not enough training data yet.

1 comments

> But it’s virtually useless for editing or changing code where it will often produce code that doesn’t compile, has bugs and/or doesn’t solve the requirements.

That is the exact problem I am trying to solve: modifying code with LLMs really sucks most of the time. I am trying a solution with Abstract Syntax Trees: I have the LLM write the code that will write the code you need. That is, modify the source tree rather than the text representation.

I wrote about my approach here: https://codeplusequalsai.com/static/blog/prompting_llms_to_m...

I do have it working for some cases quite well, but there are lots of pitfalls with this approach too. It does take a lot of context and the LLMs aren't really that well-versed at writing specifically esprima code for example. BeautifulSoup does work better, I guess because more people use it and there's more data in the training set.

I'm adding one language at a time, currently have HTML, CSS, Javascript and Python all kind-of working. It's pretty neat but I'm not sure how well it scales yet to larger projects and more difficult requirements/implementations.

Interesting! Bookmarked, I’ll read through it.