3 ms·
Did anyone try to train a model to translate a code to other languages (i.e. Google translate for codes) using data in this site?
by armanboyaci 7y ago
Did anyone try to train a model to translate a code to other languages (i.e. Google translate for codes) using data in this site?
- gchamonlive 7y agoThat would be possible for purely funcional languages, but the mainstream ones allow side effects that you can't quite predict. Remember training a model is just teaching a machine to memorise statistical occurrences. Anything the model doesn't anticipate can be catastrophical. I could see something like control engineers do, use machine learn to help tune a controller. In this case, use a model to generate an aproximation code translation with accompanying degree of precision.
- big_chungus 7y agoLots of languages have different assumptions about which edge cases you must handle or are handled automatically for you, or what restrictions you have. How do you account for a language which allows memory management or not? One that has higher- vs. lower-level threading APIs? These can be handled, but consider the complexity necessary to do so for only a single language. Then, imagine the thousands of other things you can't call to mind until you hit them as a crazy edge case trying to do this. While it may be theoretically possible, this means such a model is probably not the best tool to do this.