0:00 / 0:00
Call the compiler, fax it your code
Computing: the Details
10K subscribers • 1 video on Hallway
- Recommended by 1 person: 1 on Lobsters.
- Presented by Lex Bailey
- Linked in the descriptionlexbailey/compilerfax
Beginner. No background in the topic needed.
74K views2 years ago1 recommendation
Systems programmingHardwareCompilers and interpretersNetworking and protocolsEmbedded systems
Lex Bailey demonstrates a custom service that allows users to fax C code to a Raspberry Pi, compile it, and receive the output back via fax.
Support me on Patreon: patreon.com/ComputingTheDetails This video in blog form: computingthedetails.org/blog/compilerfax-comile-c-code-by-fa… Hi, I'm Lex (they/them) I made a very silly fax service. In the video it is running on York Hackspace's internal phone system. It also ran at EMFCamp 2024 on the copper telephone network. Source code is here: github.com/lexbailey/compilerfax Enjoy :) ---- Explanation of what's going on in this video ---- This is a regular fax machine sending a normal fax to fax service that I built. The service runs on a Raspberry Pi that has a fax modem attached to it. It appears to any other fax machine just like a normal fax machine. Both the Raspberry Pi and the fax machine in the video are connected to a PABX (a local telephone exchange) in York Hackspace. The phone exchange there is not connected to the public network at all (at the time of filming, at least), and so you can only make local calls. The Hackspace PABX is very old, and only supports pulse dialing (it doesn't support the more modern DTMF dialing). As far as I can tell, the fax machine can only do DTMF, and can't do pulse. This is why there is a hamburger phone attached to the same phone line. The hamburger phone can do pulse dialing. At the start of the video, I put the printed source code on the fax scanner glass, and then pick up the hamburger phone and dial the number for the fax service running on the Raspberry Pi. The Pi is connected to extension 8, so I dial 8. Once I hear that the Raspberry Pi has accepted the incoming call, I press the button on the fax machine to start sending a fax. The Raspberry Pi listens to the incoming fax and saves it to the SD card. The fax service running on the Pi then performs OCR on the incoming fax. The result of the OCR is saved as a C file. That C file is then compiled with GCC, and then the resulting binary is executed. Of course, compilation might fail, in which case the program will not run. Regardless of the result of the compilation and execution, the fax service will generate a report and fax it back to the sender. (This can only happen if the sender included a reply number in the program. That's what the //REPLY=7# line is for. The fax machine is connected to extension 7. Unfortunately I couldn't figure out how to get caller ID working.) The report will contain any compiler errors or warnings, and any output from the program, if it ran. ---- FAQ ---- Q: What happens if you send a program that doesn't terminate? (An infinite loop) A: At the time of filming, it would have waited forever for the program to complete, and thus it would not reply at all and would stop processing incoming faxes. I have since added some time limits. You get 20 seconds to compile, and 60 seconds to run. After that the program is terminated and the report is sent back with a message indicating that a timeout occured. Q: What if you need more than one page to send all your code? A: You can send a mWhy it's here
1 person recommends thisWhat people say. Recommended as a fun and creative hardware hacking project combining legacy fax tech with modern compilers.