2 ms·
I love this. It reminds me of [1], which I wrote years ago to do something similar with undefined method calls: Rather than erroring, a modified `method_missing
by drusepth 4y ago
I love this. It reminds me of [1], which I wrote years ago to do something similar with undefined method calls: Rather than erroring, a modified `method_missing` triggers and searches Stack Overflow for code snippets with the same method name, then injects that code into scope and walks back the stack trace to try again, recursively if necessary.
Horrible idea. Great execution.
[1] https://gist.github.com/drusepth/48a246e1263183e0418c https://gist.github.com/drusepth/48a246e1263183e0418c
- joezydeco 4y agoI always wanted to write a tool that took GCC compiler errors and put up a browser window with the most relevant Stack Overflow answer. Maybe GPT is way more useful here. Perhaps you get an explanation and a suggested fix.