4 ms·
Absolutely. This is just some delusions of a vibe coder at best. Not with just current generation of AI tools but essentially never. The conversion from C, C++,
by diath 5mo ago
Absolutely. This is just some delusions of a vibe coder at best. Not with just current generation of AI tools but essentially never. The conversion from C, C++, Rust or whatever, through post-processing (macros etc), through IR generation, through compile time optimizations, through link time optimizations, to the generated machine code is a one way street for low level languages. You can get a pretty close higher level approximation that matches the flow/logic/structure - but the code will never be anywhere near close to the original source code. I could write the same C++ program in 3 different ways and get identical assembly, how do you go back to the exact source? The answer is that you don't.
Here's the same simple program, written in 3 different ways, producing identical binary compatible code: https://godbolt.org/z/qWrc8fEnn https://godbolt.org/z/qWrc8fEnn
How does the AI know whether it should produce back the snippet #1, #2 or #3? It does not. It cannot.
- CamperBob2 5mo agoWho cares? Who said anything about recreating the exact code? You will get usable, compilable, and surprisingly readable source code, in your language of choice, that yields the functional equivalent of the binary. Barring obvious edge cases that could show up but don't usually, like intentional race conditions. Timing is the one area where things get iffy.
- deleted 5mo ago[deleted]
- diath 5mo ago> Who said anything about recreating the exact code? The person I'm replying to? Who said you will get the same code as if it were the original source?
- deleted 5mo ago[deleted]
- wuschel 5mo agoThat is quite incredible if that is true. Need to read a bit into that. Can you point towards relevant literature/examples? Also: please see my questions in the comment to your other reply
- MarioMan 5mo agoThis blog post is a great starting point: https://blog.chrislewis.au/the-unexpected-effectiveness-of-one-shot-decompilation-with-claude/ https://blog.chrislewis.au/the-unexpected-effectiveness-of-o...