Remix.run Logo
wmf 3 hours ago

An application of the first Futamura projection. https://en.wikipedia.org/wiki/Partial_evaluation

jszymborski 3 hours ago | parent | next [-]

I read this as Futurama way too many times

suprjami 3 hours ago | parent [-]

So did I. Considering there is a PS2 Futurama game, it seems a reasonable mistake.

jszymborski 2 hours ago | parent [-]

honestly I kept thinking of this https://theinfosphere.org/Futurama_theorem

masfuerte 3 hours ago | parent | prev [-]

Is 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 2 hours ago | parent [-]

"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 2 hours ago | parent [-]

Yes, 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.