Stackoverflow: artifical artifical intelligence

Alan Nichol, the CTO of Rasa (and former boss of mine) shared an interesting side project on LinkedIn that he discovered on Reddit.

The project should allow for code like this:

from jit_implementation import implement

@implement
class Snake:
    """Snake game in pygame. Initializing launches the game."""

if __name__ == "__main__":
    Snake()

The just-in-time implementation joke is a reference to just-in-time compilation and the whole setup works by having an LLM write the implementation for you based on the docstring that you write. The author makes it clear that this project is not meant for production use. To quote the author of the tool:

I started this as a joke, but then I got carried away and made it actually work. Now I'm not sure if I should be proud or terrified.

The point that Alan makes is that while it is funny, it is also in stark contrast with reactive agents which do something similar but where prodction usecase is marketed as "ready". This is all very well and interesting, probably worth a discussion, but it is not the most interesting thing here.

To me, the most interesting thing is that we've seen a very similar project a few years ago. If you pip install stackoverflow from pypi, here's what you get:

>>> from stackoverflow import quick_sort, split_into_chunks

>>> print(quick_sort.sort([1, 3, 2, 5, 4]))
[1, 2, 3, 4, 5]

>>> print(list(split_into_chunks.chunk("very good chunk func")))
['very ', 'good ', 'chunk', ' func']

>>> print("I wonder who made split_into_chunks", split_into_chunks.__author__)
I wonder who made split_into_chunks https://stackoverflow.com/a/35107113

>>> print("but what's the license? Can I really use this?", quick_sort.__license__)
but what's the license? Can I really use this? CC BY-SA 3.0
>>> assert("nice, attribution!")

Like the aforementioned project stackoverflow package is a joke package, to the extend that it is even maintained by a user literally called CrazyPython. It works by scraping the Stackoverflow website to find snippets of code that answer the question you're asking. But in the end, it really does pretty much the same thing via a different API. Sure, it's using importlib instead of a decorator, but the idea is the same.

It's kind of amazing how the same joke can be made twice, and how the second time it's even more meta. If LLMs represent Artificial Intelligence, then Stackoverflow represent Artificial Artificial Intelligence.