3 ms·
> Just imagine being able to reduce any Haskell app to, like, 8 different instructions. It's a universal property of all programming languages that they can be
by chrisseaton 9y ago
> Just imagine being able to reduce any Haskell app to, like, 8 different instructions.
It's a universal property of all programming languages that they can be reduced to a language with just one instruction, so it isn't a surprising result.
- aisofteng 9y agoCompiling C to assembly code that uses only one instruction, namely mov: https://github.com/xoreaxeaxeax/movfuscator https://github.com/xoreaxeaxeax/movfuscator
- kobeya 9y agoCalling 'mov' on x86 one instruction is a bit of a fiction to begin with though.
- chrisseaton 9y agoThere are other, more straight-forward, one-instruction instruction-sets, such as subtract-and-branch-if-less-than-or-equal-to-zero.
- tome 9y agoBut the point is that STG preserves[1] the operational semantics of the program, not just the final calculated value. [1] Indeed it defines the operational semantics