HACKER Q&A
📣 AtlasBarfed

Used ChatGPT for nontrivial porting to another language?


So I'm out of work and playing around with FreeCiv, which is a BAD IDEA for productivity, and I'm digging around the guts of it and thinking "this might be fun to do ... in my favorite language.

You know what would impress me beyond the "I can write sample code for you" tricks I've seen ChatGPT do, and what would REALLY show if it can do it's stuff.

What if I type:

"port freeciv server from C to Groovy"

Freeciv is an interesting test case for this IMO. It has client interfaces and boundaries, nontrivial data interactions and usages obscured by the usual C is-it-a-pointer or is-it-an-array, it can be interactively tested using the clients.

Anyone taken a swing at ChatGPT for such a thing?

This is a class of problem that could really be mutually beneficial between AI and programmer, not the pseudo-adversarial one it currently is. Porting "good code" between languages is a BIG PROBLEM that is holding up good languages.

If ChatGPT could enormously speed up standard library conversion authoring and sharing of good algorithms and designs between languages, it could be an enormous boon to the programming language practice.

Because that's a big pain in the ass that NOBODY wants to do in the large. Sure people might want to play with api designs they have good domain knowledge, but serialization formats for example, or basic api/library interfaces? Yuck.

And this is a good "bulk charge" money maker. Businesses will flock to this for porting old legacy code and the like. This can be a BIG moneymaker for ChatGPT.


  👤 PaulHoule Accepted Answer ✓
It's nowhere near being able to do that now, but if you can break the task up into bits it can probably help you. It would be fun to see what it does for porting a function from C to Groovy.