OpenAI Codex Python to C++ Code Generator
github.com
github.com
And I even have a 50K euro NLNet grant to hire someone!
Brief Descriptions of a Python to C++ Translator https://www.oilshell.org/blog/2022/05/mycpp.html
---
But I don't think there is anything interesting in this repo. It doesn't show anything that works, and doesn't really make any claims.
But maybe it would be a fun illustration of the limitations of AI. So I would propose that if you can get even 1000 lines of Oil's code translating and running correctly with AI, I will award you a big part of my grant.
I think it's impossible with the state of the art. I don't have much interest in current ML techniques, but I'm credited on a deep learning paper with thousands of citations, so it's not a totally uneducated claim.
---
On the other hand, I'm looking for a C++ / Python / compiler engineer, particularly in the European Union. Please take a look at Oil Is Being Implemented "Middle Out" [1] and send leads my way :) (e-mail in profile)
Great post BTW. That is cool you got to cross paths with John Plevyak. That IFA paper is pretty damn great. He worked on Wasm support for Envoy you know. Maybe Plevyak is your compiler writer? :)
Yeah I should get in touch for sure... I remember talking with John about the Apache Traffic Server (formerly Yahoo) and his Python-to-C++ pyc compiler almost 10 years ago!
Right now I'm contacting a bunch of people in the EU, since the funders have some preference there. But yes Shed Skin is one of the closest things!
[1] https://github.com/serge-sans-paille/pythran/commits/master
It does say it's specifically for numeric code. That is what I hinted at in the blog post around use cases for Shed Skin vs. string- and dict-oriented code.
There are quite a few numeric accelerators for Python, and I even chatted with Travis Oliphant (of NumPy) about another one he was prototyping.
But there are fewer for the kind of program a shell is. mypyc and shed skin are the 2 I mentioned that are most similar. We already have an approach that works, but it just needs "labor".
From what I’ve read in the past inferring the types is the hard part (the scheme stuff I saw used abstract interpretation) then just did a relatively simple translation step to end up with C. Well, continuations were also troublesome as were dependency graphs but IIRC that’s because they needed types to compute them. So, yeah, easy peasy if you already have the types.
I once liked c++ but after years of writing it professionally. I am done.
You have to fight c++ to get things working which obfuscates problems in the code. Safety comes from simplicity -- c++ is never simple.
I could rant about this for hours. But in my opinion rust is a better language and the one we as software engineers should get behind for safe systems.
C++ is old and needs to be retired.
https://githubnext.com/projects/copilot-labs/
Warning, Codex is nondeterministic and sometimes nonsensical! Good prompts are hard to find.