Simon Willison on Nostr: Lazy refactoring using my symbex and llm tools to have GPT-4 do the work for me: ``` ...
Lazy refactoring using my symbex and llm tools to have GPT-4 do the work for me:
```
symbex test_homepage -f tests/test_api.py | \
llm -m 4 --system 'Change all of the == some integer tests in this code to isinstance(thing, int) instead'
```
This saved me about 15 seconds of effort this morning!
https://github.com/simonw/datasette/issues/2092#issuecomment-1613381990Published at
2023-06-29 15:28:02Event JSON
{
"id": "1d3e80d9fe36e46a861fcfbd88aa02a911a06b7014141aa6a93797d4a41a7187",
"pubkey": "8b0be93ed69c30e9a68159fd384fd8308ce4bbf16c39e840e0803dcb6c08720e",
"created_at": 1688052482,
"kind": 1,
"tags": [
[
"mostr",
"https://fedi.simonwillison.net/users/simon/statuses/110628207506602827"
]
],
"content": "Lazy refactoring using my symbex and llm tools to have GPT-4 do the work for me:\n```\nsymbex test_homepage -f tests/test_api.py | \\\n llm -m 4 --system 'Change all of the == some integer tests in this code to isinstance(thing, int) instead'\n```\nThis saved me about 15 seconds of effort this morning!\n\nhttps://github.com/simonw/datasette/issues/2092#issuecomment-1613381990",
"sig": "fa28a6fa38c3281f45f0fccd158ed9724eaee04801f4009f77963fb697739dc155801a02c05157bc702dc44dd58f003a755818bc0af606396ba654b418b0380b"
}