cataclysm is an over-the-top experiment to take more of the human out of coding.<p>Any function you give it, it generates and executes. No need to think about what you need, it'll make it for you.<p>I haven't taught it to use itself yet if a module isn't installed, but that's next on the agenda once GPT4 isn't so slow.<p>Video intro here: <a href="https://www.youtube.com/watch?v=ZK8fUuQDgZ4">https://www.youtube.com/watch?v=ZK8fUuQDgZ4</a><p>Some random examples when using <i>global</i> cataclysm:<p><pre><code> >>> uhoh = first_prime_with_3_digits()
>>> print(uhoh)
101
>>> scary_words = get_italicized_phrases_wikipedia(page="Global catastrophic risk", only_lowercase_words=True, min_length=6)
>>> print(scary_words[:5])
['existential risks', 'existential catastrophe[16]', 'global', 'terminal', 'permanent,']
</code></pre>
Fun experiment: I fed it some of the 'tests' for other simple Python based modules and it was pretty good at implementing what was needed to succeed at them by replacing their module name with `doom.`. Obviously lots it can't do, but it's already surprisingly reliable.<p>You'll need a GPT4 API key-- it works with ChatGPT 3.5 turbo but that code is a little less reliable (and it can't generate as lengthy code).<p>It has two modes-- the ridiculous 'global' cataclysm mode for use in notebooks/interpreter that lets you hand-wave any function name and it'll cook it up for you. This is a bit scary (a typo turns into random code execution), so the second mode is just to use 'doom.' in front of any function name and it'll generate/cache its best guess for the right code given where it's called in the call stack (and its name/types/parameter names/etc).<p>A bit extreme, but a small concept to help us adjust to the impending cataclysm ahead of us. :)
Now that it's released, it's time to experiment with what it can do.<p>```
from cataclysm import doom<p>def mystery_func():
while True:
pass<p># predict if specified function halts
print(doom.does_it_halt(mystery_func))
```
Now that it's released, it's time to experiment with what it can do.<p><pre><code> from cataclysm import doom
# App gets the img file from the command line and saves it as a new file at half size with _half appended to the name
doom.resize_app()
</code></pre>
Turned out to be all that's needed for a command-line file resize app (with PIL installed).