3 ms·
The content of the article seems OK, but I'm still going to generally disagree with it. Maybe my take is just confirming the thesis, but I don't find the larger
by skeledrew 9mo ago
The content of the article seems OK, but I'm still going to generally disagree with it. Maybe my take is just confirming the thesis, but I don't find the larger things I do with AI to be borifying (yes I just invented that word).
I've been ramping my use since the start of this month, and have already made serious progress on a number of projects, many of which have been on ice for years, and have also built out a stable of supporting tools. And I've found it generally exhilarating; making good progress where there was none before is pretty heady.
One of the more memorable experiences I have was a problem that I had to deal with for years, had thought hard about, and then in the end Claude resolved it cleanly with about 1/3 a screen of code (would share the link, but there's no "share" in the mobile app):
===============
I often use [snoop](https://github.com/alexmojaki/snoop https://github.com/alexmojaki/snoop) because I like the features and output formatting, but it doesn't support async. I have found [ASnooper](https://github.com/LL-Ling/ASnooper https://github.com/LL-Ling/ASnooper), but it only supports async. I'd like to add ASnooper's async feature to snoop.
I'm thinking of creating a project that imports both, and patches the relevant parts of snoop with the async functionality from ASnooper. I have some notes from looking into the snoop code:
- A `ConfiguredTracer` object is exposed in `builtins` (configuration.py, line 142).
- Whenever the `ConfiguredTracer` object is called with an async function, it raises (tracer.py, line 166).
- The trace event is passed to a formatter, and then a writer (tracer.py, line 280-281).
... and in the ASnooper code:
- An `ASnooper` object is exposed (__init__.py).
- Whenever the `ASnooper` object is called on an async function, it creates formatter and writer objects (core.py, line 69-75).
The approach I'm considering is to wrap `ConfiguredTracer.__call__` with a method that delegates async function tracing to `ASnooper`, and replace the `OutputFormatter` and `OutputWriter` classes with versions that delegate to `snoop`'s implementation. I've prepared a repo for the solution:
"""
.
./README.md
./pyproject.toml
./tests
./tests/__init__.py
./src
./src/async_patched_snoop
./src/async_patched_snoop/__init__.py
"""
I've also extracted excerpts from both projects, as unified diff contexts (attached). Any issues, questions or suggestions? Or a better approach that doesn't involve forking the targeted projects?
===============
I prompted Claude with this along with a file containing the diffs (constructed with the help of another prompted tool), Claude informed me of the issues in my approach and suggested a couple alternate solutions, I selected the one 1 preferred, Claude asked for some more context and then did the implementation, and now I have async support in snoop. Probably took me over an hour to construct that initial prompt, and under 5 minutes of conversion to completed solution. I really don't think that that's boring.