from Hacker News

Call the compiler, fax it your code [video]

by ayoreis on 7/26/24, 5:45 PM with 36 comments

  • by faxmeyourcode on 7/26/24, 6:34 PM

    So my username is a little less ridiculous than I originally thought? :)

    The fact that this can introduce OCR bugs into your C code is hilarious, and this is diabolical:

        #define one ( 4 - 3 )
        #define eleven ( 3 + 4 + 4 )
    
    
    Source code is here https://github.com/lexbailey/compilerfax
  • by JoshTriplett on 7/26/24, 7:56 PM

    This is awesome. Using computers for what they're best at: fax and figures.

    I'm curious why this requires a reply number in the program, rather than relying on something like Caller ID and sending the reply back to the number that sent the fax.

  • by khaki54 on 7/26/24, 6:32 PM

    Have fun troubleshooting when the OCR keeps mis-identifying one of the semi-colons as a greek question mark!
  • by jabbany on 7/26/24, 10:21 PM

    So, as someone who has lived in regions with pretty severe internet censorship in the past and built circumvention software back in the day, I've always pondered the idea of whether one could build a fax-based thing like this for browsing the web. Kind of as like a "last resort" system.^

    Could have a form that you fax in with, like a URL and session info (cookies and stuff), and then it faxes back the page, and you can circle stuff and fax the page back to interact and "click on" things.

    Plus, since computers can ingest faxes, you wouldn't need to waste paper printing everything out, and could just do everything digitally. But you still had the option to use paper and a fax machine if you really need to.

    ^: Yes, I know faxes are unencrypted and phone lines can be tapped. But I've always found the idea intriguing. Plus having some emergency point-to-point communication to bootstrap things like key exchange could still be neat.

  • by fortran77 on 7/26/24, 11:50 PM

    This is similar to the workflow for my CS101 class at college in the 70s.

    I submitted my deck of cards to a person in the computer center at one of the times the PL/C compiler was scheduled to run (10 AM and 2 PM), I sat and waited, and then my output would be handed to me after it was compiled and run.

  • by kazinator on 7/26/24, 6:32 PM

    With Common Lisp, we don't need an infinite roll of paper to prank the faxed compiler. Just

      (progn . #1=((print 'foo) . #1#))
  • by odo1242 on 7/26/24, 9:33 PM

    It would honestly be even funnier if the compiler just sent back your code in x86 assembly.
  • by rickreynoldssf on 7/26/24, 10:32 PM

    That's got to be actually useful. I can't think how but there's got to be some situation where that is the best solution.
  • by nehal3m on 7/26/24, 7:10 PM

    Computer floop noises. Nice.
  • by l0rn on 7/26/24, 6:48 PM

    it would be a cool competition who makes the nicest program using the fax compiler
  • by davidkunz on 7/26/24, 6:18 PM

    Nothing new, we've been doing it like that for ages here in Germany. But it's a cool Hamburger phone.
  • by xyst on 7/27/24, 12:20 AM

    Can it also compile rust ;)
  • by throwway120385 on 7/26/24, 6:12 PM

    I don't understand. Is this not how everyone browses the web?
  • by ManWith2Plans on 7/26/24, 8:04 PM

    Possibly inspired by this stack overflow question:

    https://stackoverflow.com/questions/5508110/why-is-this-prog...