Live data from Hacker News

AI converts between hundreds of programming languages

codelanguageconverter.com

11–20 of 60 posts

Re: AI converts between hundreds of programming languages

#14
I have written translators and they are really hard. I think training on code bases is the way to go but I am skeptical overall that it is even worth the effort. The problem is that the translation doesn't get you all the way there. The code produced is buggy and wrong in most cases. You probably get a better result from re-designing and re-implementing.

I wonder what the data being trained on even is. It has to include successful translations, right? There are not many of those. Not enough for a good result.

Re: AI converts between hundreds of programming languages

#15

I just want AI that will write a unit test for me.

I’m remembering a joke from my childhood.

Guy is in a computer store. Salesman says “This will halve your workload”. Guy says “Great, I’ll buy two!”

We’re nearly there now.

Re: AI converts between hundreds of programming languages

#17
post #13

Sample 2, typescript to c++: infinite loop. It just keeps spitting out code

What's weird is that it starts generating a function to print out its parameters in ts then immediately translates it to cpp, both initiated with comment lines which seems similar to copilot.

Re: AI converts between hundreds of programming languages

#18

Tried pasting a big piece of code. "Whoah, that's big, try something smaller." Ok, paste small snippet of code. Click "translate". "Sign up first". Urgh, fine, this looks just about exiting enough to try, but barely so. After signing up, I have zero credits, without a single translation performed. I mean, not that I expect free lunch, but I'm also not gonna pay money before seeing a single 10 line example.

At least the samples seem legit, in the sense that some break the algorithm badly enough that we can be confident they weren't hard-coded lol.

Re: AI converts between hundreds of programming languages

#19

Tried pasting a big piece of code. "Whoah, that's big, try something smaller." Ok, paste small snippet of code. Click "translate". "Sign up first". Urgh, fine, this looks just about exiting enough to try, but barely so. After signing up, I have zero credits, without a single translation performed. I mean, not that I expect free lunch, but I'm also not gonna pay money before seeing a single 10 line example.

Plus a trivial translation is just that, trivial.

It’s not going to rewrite the huge web of dependencies that any given app consists of, nor will it recreate the various differences between runtime environments for interpreted languages.

It’s essentially a cute party trick.

Stuff like copilot is where I see the utility in the space.

Post reply on HN