Settings

Theme

Ask HN: Should LLM be able to translate C to rust as easy as English to Japanese

2 points by tonyplee 2 months ago · 2 comments · 1 min read


Tried that on Google's AI and gpt-oss with few models locally, the answers was not as good and I expect. Any idea on why? Not enough training materials over all?

PaulHoule 2 months ago

Translating a computer program you can be right or wrong. To write a Rust program that (1) compiles and (2) actually does the job you have to solve constraint problems exactly. If you are translating from English to Japanese you have a wide range of choices, people could argue a lot over whether or not a translation is good, practically one that is "95% correct" by one person's measure might be preferred over a "100% correct" one because people like the style better.

rglover 2 months ago

Not necessarily. They're different programming paradigms and the LLM isn't thinking, it's just giving you what is most likely to be the correct translation. But unlike a written language, there's a ton of technical nuance that it has no real awareness of beyond the similarities between tokens.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection