5 ms·
So, you can apparently compile C++ to LLVM-IR, then to Javascript, then to Python and then to C++ (you can do similar feat with C). Wonder if there is a fix poi
by mic47 8y ago
So, you can apparently compile C++ to LLVM-IR, then to Javascript, then to Python and then to C++ (you can do similar feat with C). Wonder if there is a fix point, or it diverges.
- esrauch 8y agoI looked at js2py (the most surprising-to-me link in that chain) the code it generates already kind of explodes on loc. I think it's probably very unlikely there is a fixed point instead of an exponential explosion of your program as you run it through the chain.
- sorokod 8y agoLike when you auto-translate English -> Japanese -> English. Very unlikely you will recover the original Good fun though.
- taejo 8y agoBy the pigeonhole principle, any such iteration must either enter a cycle, or the translations must be unbounded in length. If you experiment, you will find that Google Translate usually lands in the first category; transpilers usually land in the second.
- sorokod 8y agoI am iterested in an example that cycles on Google translate - can you share one?
- chrisseaton 8y ago> I am iterested in an example that cycles on Google translate - can you share one? Just translate 'hello' back and forth in any pair of languages I tried.
- Bjartr 8y agoThere's a web site dedicated to this http://translationparty.com http://translationparty.com
- sorokod 8y agoThanks!