How far are we from a model that can take a python repo on github and convert it to a cpp without intervention?
Posted by bonesoftheancients@reddit | LocalLLaMA | View on Reddit | 16 comments
just wondering, how far are we from a model that can take a python repo on github and convert it to a cpp without intervention? something like Wan2GP for example with numpy and pytorch and gradio etc - local or cloud base models...
smirnfil@reddit
We are beyond that point. The only question is what are your expectations of the resulting app.
bonesoftheancients@reddit (OP)
what are my expectations? personally i want the agent to convert and compile the app autonomously without my intervention. all functionality needs to be replicated, UI and design one can work on till kingdom comes but its enough if it mimics the gradio interface at this point. I just was an optimised, locally compiled, small size app that is kept up to date with upstream changes instead of an 8gb venv and slow python execution
smirnfil@reddit
In general it is unsolvabale problem as for some apps it would be impossible to create exactly the same cpp version(without writing a python compiler and just running python code)
RogerRamjet999@reddit
It could be difficult in some conditions, but claiming it's impossible seems a bit of a stretch. Can you give an example where it would be impossible? Plus, there is such a thing as Turing Completeness...
smirnfil@reddit
Some concurrency side effect sensitive algorythms would be impossible to move. The problem is validation - how do you know that program a and program b are doing the same thing. Has nothing to do with the way of moving software from one language to another. Turing Completeness is a cool thing, but it is a math abstraction it doesn't take into acount "real life things" like performance.
RogerRamjet999@reddit
Again that seems difficult, but not impossible. It would be difficult for you or I to do this, but I feel pretty confident given a reasonable amount of time I could get any working Python program converted to C++ (unless it was so large as to be beyond one person's lifetime output). Eventually, I believe, software (of some sort) will be able to write any code that a typical human programmer could write. Could I be wrong, sure, but it doesn't seem that anything we as humans do in programming is inherently beyond what machines will one day achieve. Anyway, we may never agree, but that's my opinion. All the best, cheers!
StewedAngelSkins@reddit
Depends on the amount/complexity of python and your requirements for the C++ code I'd imagine.
For what it's worth, whatever it is you think you're accomplishing by doing this I can almost guarantee there's an easier way.
bonesoftheancients@reddit (OP)
I guess I need to frame this within a specific point. Take ace-step-1.5 gradio app on github. running it on my PC with venv takes some 8gb of disk space for the base install . Then someone has created acestep.cpp (you can find it on github too) - few MB and runs much smoother on a windows pc at least. Now, the ace-step code keeps updating so the cpp implementation needs to be catching up with upstream changes constantly.
Assuming you can have an agent that can convert the upstream repo code into cpp independently whenever new code is pushed and compile i just have the most current code running without thinking about it is the ultimate goal
BuildAQuad@reddit
I mean it should be fairly simple setting up some agent that checks for updates in the Python repo periodically, then starts implementing the changes in the c++ repo, builds it and pushes the new c++ repo.
Biggest hurdle would be that the agent actually manages to successfully implement the individual tasks id guess? So just reduced to individual agentic coding tasks.
vasimv@reddit
Doesn't cython and other python compilers do exactly this already? I'd guess, any modern model will just call cython if it has right to call tools 😄
Voxandr@reddit
They need static types
RogerRamjet999@reddit
Pretty much every current comment says it's possible today. Personally, I'm pretty doubtful, so I would love it if someone would really try it and let us know the results.
SeyAssociation38@reddit
This is now possible with oh my openagent
Late_Night_AI@reddit
We are basically already there. Currently its not a question of what llm can do it, but rather what “agent/harness” you use for it.
Conscious_Cut_6144@reddit
Probably doable since mid last year with closed source,
Late last year with open source.
ortegaalfredo@reddit
I would say -2 months, Im sure many local models can do it with an agent that help it.