Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

could this be used for locally translating between programming languages in addition to natural languages?

any models for that available i wonder?



It depends on the scale you're talking about but the local LLMs are fairly capable of translating between different programming languages, particularly if you're not so concerned about external library support.

Pasting a function in and asking for it in a different programming language will get an implementation in the target language. Using ollama run llama2:13b on my mac will allow converting in this fashion.

It might not be the best code, but this is true of machine translations as well.


thanks for the reply!

  > Using ollama run llama2:13b on my mac will allow converting in this fashion
okay, i'll have t try this out

  > It might not be the best code, but this is true of machine translations as well.
true, one thing im hoping for is some local version of copilot/chatgpt for code where its trained on local libraries and the local project and such (and can translate them in some scenarios)


Computer programming languages are already machine-parsable though. ML does not seem like the appropriate solution for converting between them.

Technically what you're describing is done by a compiler/decompiler/transpiler, operating on the AST.


Programming languages are machine-parseable if you already have a parser for them. The befit of LLMs is that you do not need a parser for each programming language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: