Do you know the fax principle?
You put your document in the device, dial the number of the recipient, and before the document is transferred over the phone line and printed remotely. It was crazy for that time! So if I tell you that a hacker hijacked this good old technology to make it C fax translatorI’m sure you won’t believe me.
Yes, thanks to a crazy project CompileFax, you can now fax your C code, compile and run it on a remote Raspberry Pi, and receive the result… again by fax! Real retro-technological delirium, a mashup amazingly between technology from another century and modern software. I love projects like this WTF so I had to tell you about it!
So, write your C code on a nice sheet of paper, using a font suitable for optical character recognition (OCR). The Calibri font seems to be doing well and don’t forget to add the magic line in the comments //REPLY=
followed by your fax number or you won’t get a reply!
According to the tests, the OCR error rate varies depending on the fonts used because certain characters like O, i or x are often misinterpreted. So it’s better to avoid them in variable names, and also remember to space the code well to make it easier to recognize.
Then go to your favorite fax machine, dial the CompilerFax number and submit your code. On the other hand, a Raspberry Pi equipped with a fax modem receives your document, extracts the code using an OCR tool such as Tesseract OCRcompiles it with GCC and runs it in the environment in the sandbox under Alpine Linux (to prevent geeks from exploiting vulnerabilities). The result is then faxed back to you illico presto! Finally, in a reasonable amount of time as the compilation is limited to 20 seconds and the performance to 60 seconds. After that, the program is terminated.
There are some top hacks behind this wacky project as CompilerFax creator Lex Bailey had to use a wealth of ingenuity to bring these conflicting technologies into dialogue. And if you’re interested, the full source code is available at Github.
Well, I’ll admit, the 9600bps fax speed isn’t ideal for sending large programs, which is why only page sending is currently supported, and the OCR quality isn’t always there, but finally, CompilerFax works and it allows us to go back to our sources a bit, at a more human pace in our world where everything is almost instantaneous.
Good hack anyway!