Hacker News new | ask | show | jobs
by badsectoracula 44 days ago
I don't know about converting it to "high concurrent Go" or anything like that, but after searching a bit, i found some old PRG code for dBase III Plus someone posted in a googlegroup, gave it to Devstral Small 2 (local model) and asked it to convert it to C# and the conversion looked fine to me, using .NET's database functionality, etc. It is too long to post it though (also TBH the code had some questionable fields).

In general LLMs seem to be very good at translating between programming languages and something like PRG uses very straightforward syntax and concepts. The first attempt by the LLM did a mostly one-to-one conversion using the console but i asked it to convert it to Windows Forms and the code looked fine for that too, using appropriate controls for the fields like text, combobox or datetime pickers (though it used fixed coordinates for the controls so i'm not sure if that looked fine).

FWIW, i didn't try to run the code (i'm on Linux and i do not even have anything related to C# on my PC nor a DB to work with :-P) and chances are there might be some subtle mistakes, but it looked like a decent starting point. IME, at least with local models, converting code between languages in a piecemeal fashion is trivial even with weird/less common languages (you may need to put some instructions to the LLM on a few edge cases though). And IMO that approach would be the right way to do it instead of dumping the entire codebase to it and hoping for the best :-P