AI Attempts Converting Python Code To C++

[Alexander] created codex_py2cpp as a way of experimenting with Codex, an AI intended to translate natural language into code. [Alexander] had slightly different ideas, however, and created codex_py2cpp as a way to play with the idea of automagically converting Python into C++. It’s not really intended to create robust code conversions, but as far as experiments go, it’s pretty neat.

The program works by reading a Python script as an input file, setting up a few parameters, then making a request to OpenAI’s Codex API for the conversion. It then attempts to compile the result. If compilation is successful, then hopefully the resulting executable actually works the same way the input file did. If not? Well, learning is fun, too. If you give it a shot, maybe start simple and don’t throw it too many curveballs.

Codex is an interesting idea, and this isn’t the first experiment we’ve seen that plays with the concept of using machine learning in this way. We’ve seen a project that generates Linux commands based on a verbal description, and our own [Maya Posch] took a close look at GitHub Copilot, a project high on promise and concept, but — at least at the time — considerably less so when it came to actual practicality or usefulness.

Wooden Puzzle Book Will Twist And Dazzle Your Brain

In what might be one of the coolest applications of laser cutting, joinery, puzzles, writing, and bookbinding, [Brady Whitney] has created the Codex Silenda — a literal puzzle book of magnificent proportions.

[Whitney] had originally conceived the idea of the Codex for his senior thesis research project at Iowa State University, and the result is something for almost everyone. On each of the Codex’s five pages lies a mechanical puzzle that must be solved to progress to the next, while an accompanying text weaves a story as you do so. These intricate pages were designed in SolidWorks and painstakingly assembled from laser cut wood. Breaking the fourth wall of storytelling by engaging the reader directly in uncovering the book’s mysteries is a unique feat, and it looks gorgeous to boot.

Continue reading “Wooden Puzzle Book Will Twist And Dazzle Your Brain”