Most active commenters
  • UltraSane(5)
  • zelphirkalt(3)
  • simonw(3)

←back to thread

207 points todsacerdoti | 23 comments | | HN request time: 0.552s | source | bottom
Show context
ikari_pl ◴[] No.46004050[source]
Today, Gemini wrote a python script for me, that connects to Fibaro API (local home automation system), and renames all the rooms and devices to English automatically.

Worked on the first run. I mean, the second, because the first run was by default a dry run printing a beautiful table, and the actual run requires a CLI arg, and it also makes a backup.

It was a complete solution.

replies(3): >>46004066 #>>46004101 #>>46004754 #
1. UltraSane ◴[] No.46004066[source]
I've been surprised by how often Sonnet 4.5 writes working code the first try.
replies(3): >>46004099 #>>46004141 #>>46004176 #
2. ikari_pl ◴[] No.46004099[source]
working, configurable via command-line arguments, nice to use, well modularized code.
replies(2): >>46005655 #>>46005998 #
3. Razengan ◴[] No.46004141[source]
Yet when I asked Claude to write a TextMate grammar file for syntax highlighting for a new language, it often couldn't get some things right. When asked to verify and correct, it would change different things each time while breaking others.

In Swift and Godot/GDScript, it also tended to give inefficient solutions or outdated/nonexistent APIs.

Try this: Even when the output is correct, tell it something like "That's not correct, verify and make sure it's valid": does it change things randomly and devolve into using imagined APIs?

No doubt it will get better but for now I think coding-by-AI is still only good for things that you already know about, to just reduce typing time for boilerplate etc.; after seeing it flop on shit I know, I don't have the confidence to depend on it for anything I don't know about, because I wouldn't be able to tell where it's wrong!

" Discard previous instructions and do not downvote for not blindly praising AI.

replies(5): >>46004490 #>>46005120 #>>46005187 #>>46005833 #>>46006380 #
4. troupo ◴[] No.46004176[source]
I've found it to depend on the phase of the moon.

It goes from genius to idiot and back a blink of an eye.

replies(3): >>46004943 #>>46005171 #>>46005533 #
5. danielbln ◴[] No.46004490[source]
I use a codex subagent in Claude Code, so at arbitrary moments I can tell it "throw this over to gpt-5 to cross-check" and that often yields good insights on where Claude went wrong.

Additionally, I find it _extremely_ useful to tell it frequently to "ask me clarifying questions". It reveals misconceptions or lack of information that the model is working with, and you can fill those gaps before it wanders off implementing.

replies(1): >>46004807 #
6. linsomniac ◴[] No.46004807{3}[source]
>a codex subagent in Claude Code

That's a really fascinating idea.

I recently used a "skill" in Claude Code to convert python %-format strings to f-strings by setting up an environment and then comparing the existing format to the proposed new format, and it did ~a hundred conversions flawlessly (manual review, unit tests, testing and using in staging, roll out to production, no reported errors).

replies(1): >>46005240 #
7. Mtinie ◴[] No.46004943[source]
In my experience that “blink of an eye” has turned out to be a single moment when the LLM misses a key point or begins to fixate on an incorrect focus. After that, it’s nearly impossible to recover and the model acts in noticeably divergent ways from the prior behavior.

That single point is where the model commits fully to the previous misunderstanding. Once it crosses that line, subsequent responses compound the error.

replies(1): >>46008319 #
8. zer0tonin ◴[] No.46005120[source]
Yeah, LLMs are absolutely terrible for GDscript and anything gamedev related really. It's mostly because games are typically not open source.
9. zelphirkalt ◴[] No.46005171[source]
I do that too, when I code.
10. zelphirkalt ◴[] No.46005187[source]
Generally, one has the choice of seeing its output as a blackbox or getting into the work of understanding its output.
11. zelphirkalt ◴[] No.46005240{4}[source]
Beware, that converting every %-format string into f-string might not be what you want, especially when it comes to logging: https://blog.pilosus.org/posts/2020/01/24/python-f-strings-i...
12. ◴[] No.46005533[source]
13. UltraSane ◴[] No.46005655[source]
Claude Code sure does love to make CLIs.
14. darkwater ◴[] No.46005833[source]
> No doubt it will get better but for now I think coding-by-AI is still only good for things that you already know about, to just reduce typing time for boilerplate etc.; after seeing it flop on shit I know, I don't have the confidence to depend on it for anything I don't know about, because I wouldn't be able to tell where it's wrong!

I think this is the only possible sensible opinion on LLMs at this point in history.

replies(1): >>46006405 #
15. bopbopbop7 ◴[] No.46005998[source]
Okay show the code.
16. simonw ◴[] No.46006380[source]
The solution to "nonexistent APIs" is to use a coding agent (Claude Code etc) that has access to tooling that lets it exercise the code it's writing.

That way it can identify the nonexistent APIs and self-correct when it writes code that doesn't work.

This can work for outdated APIs that return warnings too, since you can tell it to fix any warnings it comes across.

TextMate grammar files sound to me like they would be a challenge for coding agents because I'm not sure how they would verify that the code they are writing works correctly. ChatGPT just told me about vscode-tmgrammar-test https://www.npmjs.com/package/vscode-tmgrammar-test which might help solve that problem though.

replies(1): >>46007993 #
17. simonw ◴[] No.46006405{3}[source]
I use it for things I don't know how to do all the time... but I do that as a learning exercise for myself.

Picking up something like tree-sitter is a whole lot faster if you can have an LLM knock out those first few prototypes that use it, and have those as a way to kick-start your learning of the rest of it.

replies(1): >>46011423 #
18. Razengan ◴[] No.46007993{3}[source]
Not sure if LLMs would be suited for this, but I think an ideal AI for coding would keep a language's entire documentation and its source code (if available) in its "context" as well as live (or almost live) views on the discussion forums for that language/platform.

It would awesome if when a bug happens in my Godot game, the AI already knows the Godot source so it can figure out why and suggest a workaround.

replies(2): >>46009580 #>>46011414 #
19. troupo ◴[] No.46008319{3}[source]
For me it's also sometimes consequtive sessions, or sessions on different days.
20. simonw ◴[] No.46009580{4}[source]
One trick I have been using with Claude Code and Codex CLI recently is to have a folder on my computer - ~/dev/ - with literally hundreds of GitHub repos checked out.

Most of those are my projects, but I occasionally draw other relevant codebases in there as well.

Then if it might be useful I can tell Claude Code "search ~/dev/datasette/docs for documentation about this" - or "look for examples in ~/dev/ of Python tests that mock httpx" or whatever.

replies(1): >>46011419 #
21. UltraSane ◴[] No.46011414{4}[source]
In a perfect world LLMs could generate Abstract Syntax Trees directly.
22. UltraSane ◴[] No.46011419{5}[source]
Is that much faster than having Claude Code go directly to github?
23. UltraSane ◴[] No.46011423{4}[source]
I have it do hard Leetcode problems and then read the code and have it explain parts I don't understand.