TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

OpenAI Codex Python to C++ Code Generator

36 点作者 ArdelleF大约 3 年前

6 条评论

chubot大约 3 年前
I&#x27;m writing a Python to C++ translator for <a href="https:&#x2F;&#x2F;www.oilshell.org" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org</a>. The shell itself is less than 40K lines of code and the translator is ~4-8K lines.<p>And I even have a 50K euro NLNet grant to hire someone!<p><i>Brief Descriptions of a Python to C++ Translator</i> <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2022&#x2F;05&#x2F;mycpp.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2022&#x2F;05&#x2F;mycpp.html</a><p>---<p>But I don&#x27;t think there is anything interesting in this repo. It doesn&#x27;t show anything that works, and doesn&#x27;t really make any claims.<p>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&#x27;s code translating and running correctly with AI, I will award you a big part of my grant.<p>I think it&#x27;s impossible with the state of the art. I don&#x27;t have much interest in current ML techniques, but I&#x27;m credited on a deep learning paper with thousands of citations, so it&#x27;s not a totally uneducated claim.<p>---<p>On the other hand, I&#x27;m looking for a C++ &#x2F; Python &#x2F; compiler engineer, particularly in the European Union. Please take a look at <i>Oil Is Being Implemented &quot;Middle Out&quot;</i> [1] and send leads my way :) (e-mail in profile)<p>[1] <a href="https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2022&#x2F;03&#x2F;middle-out.html" rel="nofollow">https:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2022&#x2F;03&#x2F;middle-out.html</a>
评论 #31410448 未加载
评论 #31408154 未加载
评论 #31407015 未加载
accountofme大约 3 年前
Interesting idea.... I wonder if the same could be done for c&#x2F;c++ -&gt; rust :D
评论 #31408345 未加载
评论 #31415985 未加载
idan大约 3 年前
Shameless plug for Copilot Labs, which offers arbitrary language-pair translations.<p><a href="https:&#x2F;&#x2F;githubnext.com&#x2F;projects&#x2F;copilot-labs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;githubnext.com&#x2F;projects&#x2F;copilot-labs&#x2F;</a><p>Warning, Codex is nondeterministic and sometimes nonsensical! Good prompts are hard to find.
Traster大约 3 年前
So my understanding is it works like this: You take some Python you throw it at OpenAI and you see if the resulting C++ compiles. Doesn&#x27;t the fact that you need to check the result even compiles also imply you probably want to check if the result is functionally correct also?
评论 #31409701 未加载
axg11大约 3 年前
A question for the computer scientists here: are there applications for this where Codex could be used to automatically optimize complex systems?
评论 #31406499 未加载
评论 #31406164 未加载
jasfi大约 3 年前
I think it would be simpler to convert Python to Nim, which itself compiles to C. That&#x27;s assuming this is for performance gains only.