3 ms·
An application of the first Futamura projection. https://en.wikipedia.org/wiki/Partial_evaluation https://en.wikipedia.org/wiki/Partial_evaluation
by wmf 9mo ago
An application of the first Futamura projection. https://en.wikipedia.org/wiki/Partial_evaluation https://en.wikipedia.org/wiki/Partial_evaluation
- jszymborski 9mo agoI read this as Futurama way too many times
- suprjami 9mo agoSo did I. Considering there is a PS2 Futurama game, it seems a reasonable mistake.
- jszymborski 9mo agohonestly I kept thinking of this https://theinfosphere.org/Futurama_theorem https://theinfosphere.org/Futurama_theorem
- efreak 9mo agoCould be worse
- masfuerte 9mo agoIs it? It would be if it partially evaluated a MIPS emulator on a particular game. But it doesn't seem to work like that.
- wmf 9mo ago"Decoding the MIPS R5900 instructions in each function Translating those instructions to equivalent C++ code Generating a runtime that can execute the recompiled code The translated code is very literal, with each MIPS instruction mapping to a C++ operation." It sounds like a MIPS interpreter that gets statically unrolled.
- masfuerte 9mo agoYes, it's like the result of unrolling a MIPS interpreter, but there never was an actual MIPS interpreter. I thought the point of the Futamura projection was that there was actually partial evaluation happening, i.e. you take a real interpreter and specialize it in some automated fashion. That's what makes it interesting. But I could well be wrong about the naming. It doesn't really matter what it's called if we're all clear about what's actually happening.