Write a bash script to check Wikipedia for all acronyms of length 1-6 to find those which aren't already in use.
It did a fairly smooth job of it. See the chat transcript [0] and resulting bash script [1] with git commit history [2].
It fell into the initial trap of blocking while pre-generating long acronyms upfront. But a couple gentle requests got it to iteratively stream the acronyms.
It also made the initial script without an actual call to Wikipedia. When asked, it went ahead and added the live curl calls.
The resulting script correctly prints: Acronym CQK is not in use on Wikipedia.
Much of the article is describing prompting to get good code. Aider certainly devotes some of its prompts to encouraging GPT-4 to be a good coder:
Act as an expert software developer.
Always use best practices when coding.
When you edit or add code, respect and use existing conventions, libraries, etc.
Always COMPLETELY IMPLEMENT the needed code.
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
...
Think step-by-step and explain the needed changes with a numbered list of short sentences.
But most of aider's prompting is instructing GPT-4 about how to edit local files [3]. This allows aider to automatically apply the changes that GPT suggests to your local source files (and commit them to git). This requires good prompting and a flexible backend to process the GPT replies and tease out how to turn them into file edits.The author doesn't seem to directly comment about how they are taking successive versions of GPT code and putting it into local files. But reading between the lines, it sounds like maybe via copy & pasting? I guess that might work ok for a toy problem like this, but enabling GPT to directly edit existing (larger) files is pretty compelling for accomplishing larger projects.
[0] https://aider.chat/share/?mdurl=https://gist.github.com/paul...
[1] https://github.com/paul-gauthier/tla/blob/main/tla.sh
[2] https://github.com/paul-gauthier/tla/commits/main/tla.sh
[3] https://github.com/paul-gauthier/aider/blob/f6aa09ca858c4c82...