Blown away -- wanted to share translation of entire non-trivial program by Davinci 2

Testing the limits of what the model is capable of, I decided to throw it this, and ask it to translate the JS implementation to Python:

CoursePark/NestHydrationJS (

Essentially this algorithm is meant to take tabular data produces by JOIN queries, and turn them into nested objects, where the rows are grouped recursively by their identity columns. Not an easy task!

Well, Codex chewed through it:

Really mindblowing!

Now it’s possible to take the auto-generated Python translation, and use a tool like py2many to generate other language translations from that. Such a neat realm of possibilites to open up!

1 Like

Wow, what a great example!

1 Like

I got it to work as well, albeit with a much simpler python program. It flawlessly converted it to Javascript and Ruby in under a minute