February 29, 2024

Tishamarie online

Specialists in technology

AI Attempts Converting Python Code To C++

[ad_1]

[Alexander] created codex_py2cpp as a way of experimenting with Codex, an AI supposed to translate natural language into code. [Alexander] had somewhat distinctive concepts, nonetheless, and designed codex_py2cpp as a way to enjoy with the strategy of automagically converting Python into C++. It’s not seriously intended to produce robust code conversions, but as far as experiments go, it’s fairly neat.

The system performs by looking through a Python script as an input file, environment up a couple of parameters, then creating a request to OpenAI’s Codex API for the conversion. It then tries to compile the consequence. If compilation is productive, then hopefully the resulting executable actually will work the same way the input file did. If not? Nicely, finding out is fun, far too. If you give it a shot, probably start off straightforward and never throw it as well lots of curveballs.

Codex is an exciting plan, and this isn’t the initially experiment we have found that plays with the concept of utilizing device mastering in this way. We have witnessed a project that generates Linux commands dependent on a verbal description, and our possess [Maya Posch] took a close search at GitHub Copilot, a task superior on assure and concept, but — at the very least at the time — substantially much less so when it came to precise practicality or usefulness.

[ad_2]

Resource connection