How I made a compiler that you can Fax your code to

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Hi, I'm Lex (they/them)
    You've found a video about one of my many silly projects.
    This one is a compiler that you communicate with by fax.
    The code for it is all on github, if you want to build your own: github.com/lex...
    The original short video where I introduced it can be found here: • Call the compiler, fax...
    Enjoy!

КОМЕНТАРІ • 68

  • @piemadd
    @piemadd Місяць тому +214

    You see, the solution to your OCR problems is to have users convert their C code into a QR code, which has stuff like error correction built in, allowing for a much lower failure rate for me to fork-bomb-by-fax your machine!

    • @tigerstein
      @tigerstein Місяць тому +31

      Or maybe instead, fax a card where the text is encoded with holes punched into them. That could work.

    • @amalirfan
      @amalirfan Місяць тому +6

      ​@@tigersteinYou gonna give father of computer science nostalgia mate

    • @WindowsDaily
      @WindowsDaily Місяць тому +10

      no joke, that would work quote well probably. each qr code can hold 3kb of data, which should be well enough.

    • @xorxpert
      @xorxpert Місяць тому

      nah bits or asm would’ve been better xD

    • @andrewferguson6901
      @andrewferguson6901 Місяць тому +2

      Don't worry though, my fork bomb will eventually halt. I pinky promise

  • @thetux0815
    @thetux0815 Місяць тому +61

    This opens the door to software development for a lot of Germans

    • @m1k3y_m1
      @m1k3y_m1 Місяць тому +17

      First time, a german authority gets access to cloud computing. This will revolutionize our bureaucracy.

  • @pluieuwu
    @pluieuwu Місяць тому +104

    finally, a use for all that code they ask us to handwrite in computer science exam papers!! 😂❤

    • @tatianatub
      @tatianatub Місяць тому +2

      they asked you to do what ?!

    • @t0biascze644
      @t0biascze644 Місяць тому +1

      @@tatianatub In first year of programming class, some teachers make you write the test on paper

  • @JohnneyleeRollins
    @JohnneyleeRollins Місяць тому +43

    Thank you for not inserting airhorn sounds here

  • @madduxv
    @madduxv Місяць тому +7

    with printer ink being the most expensive liquid, you can finally recreate AWS infinite loop costs at home

  • @Davemane43
    @Davemane43 Місяць тому +26

    Ive used Tesseract in the past and was surprise it was working just fine when you first mentioned it... i stand corrected... lots of post process was required

    • @redline6802
      @redline6802 Місяць тому +3

      EasyOCR is supposed to be much more accurate than Tesseract, though I think it requires a GPU to be reasonably fast.

  • @stanislavnepochatov8381
    @stanislavnepochatov8381 Місяць тому +24

    I have to say. Hamburger phone really sells the video!

  • @SianaGearz
    @SianaGearz Місяць тому +2

    You know what, with OTCC, you can fax yourself a C compiler. You may want to choose the deobfuscated version, it's still faxable.

  • @madduxv
    @madduxv Місяць тому +3

    oh yeah baby we’ve almost made it back to punch cards

  • @Manabender
    @Manabender Місяць тому +3

    11:00 If the output fax was just the input fax, you could send a quine and have it forever print the same thing.
    (A quine is a source code file which, when compiled and run, outputs its own text. Yes, C can do this.)

  • @PeterfoxUwU
    @PeterfoxUwU Місяць тому +6

    This is a really cool Idea!
    I love that you actually did it

  • @tomrow32
    @tomrow32 Місяць тому +7

    It'd be cool if you could add an option to send the resulting ELF binary in a barcode or hex printout instead

  • @No-mq5lw
    @No-mq5lw 29 днів тому

    I think including an OCR friendly font will help out a bunch. There's OCR-B which is found below bar codes and on passports, and E-13B which is found on checks.
    E-13B in particular should be useful, as it's designed for magnetic scanning of characters, potentially even allowing for skipping the OCR step entirely and instead use signal processing tricks.
    E:also using something like S record or Intel Hex should allow for mostly keeping the spirit of faxing your code alive while allowing for sending/receiving arbitrary characters.

  • @haonnoah
    @haonnoah Місяць тому +8

    Fax-GPT next 😅

  • @seandonelan5834
    @seandonelan5834 Місяць тому +1

    Maybe you should check out the Piston code execution engine, and get this working securely for a ton of other languages. That sounds cool!

  • @owngamesgamer4030
    @owngamesgamer4030 Місяць тому +24

    *sees lgbtq flag and programing together*
    "TRANSSS"
    *sees NB spider on the printer*
    "ha i was right"

  • @IanLaffey
    @IanLaffey Місяць тому

    next time you do this if it's for something small skip the annoying OCR stuff and use GPT4-o or LLaVA. Those models are great at structured data extraction!

  • @mnoxman
    @mnoxman Місяць тому

    Other than you printed it on a 8x11 in piece of paper this is exactly how you did computing in 1957 on a 1401.

    • @mnoxman
      @mnoxman Місяць тому

      To make your 1957 Mainframe experience more authentic you could extend the JCL on the page by add //LANG=FIV. The FIV would be for FORTRAN IV and point it to GnuFortran. To make it more authentic (this is a stretch) put a QR code in place of your code so it "feels" more like an non-human readable EBCDIC punch card. To simulate it more you can put hard time limits on compile and runtime. Then you could add billing to as well for the compile and runtime.

  • @revision386
    @revision386 Місяць тому

    brings me back

  • @MrLampbus
    @MrLampbus Місяць тому

    Love it :)
    Fax resolution is odd: 204 x 98 DPI 1 bit/px. "Fine" setting would do squarer pixels = explains your odd rescaling. Perhaps dont rescale for better OCR.
    Encoding was a crude run length limit scheme: eg 15 white px,2 blk,19 white etc to fill a line...then move to the next line...
    For a while, scammers realised this and would send out faxes by bulk electronic methods...with a "competition" on and a detailed pixelly image. Fax Back with the answer box ticked and your contact details written on to win a prize.
    Many companies were charged for this as the fax back number was one of those £1/min.
    ...and the optical scanning process made the return transmission reallllllyyyyy sssllloooowwwwww.

  • @tentative_flora2690
    @tentative_flora2690 Місяць тому

    thats a really cute pride spider sticker!

  • @louis1001
    @louis1001 Місяць тому +1

    I was gonna ask if you could try handwriting your code. But I guess the OCR is already buggy enough with typesets.

  • @roostertechchan
    @roostertechchan Місяць тому +1

    Couldn't you use "efax" linux command instead of hylafax? I've made similar setup with RPi receiving image over Bluetooth and printing it over simulated 12v phone line to a fax machine. I was sending the image with 'efax' cli command.

  • @herzogsbuick
    @herzogsbuick Місяць тому

    punch cards punch cards punch cards i dunno if tesseract can handle that but punch cards punch cards punch cards

  • @emifro
    @emifro Місяць тому

    Awesome stickers!

  • @UnixTMDev
    @UnixTMDev Місяць тому +1

    massive W

  • @zperk13
    @zperk13 Місяць тому +1

    I wonder if you could add some sort of error correction for the scanning

  • @m1k3y_m1
    @m1k3y_m1 Місяць тому

    Is there some kind of tool to automatically fix many ocr errors that result in compiler errors by replacing the char causing the problem by a lookalike until it works?

  • @lucidattf
    @lucidattf Місяць тому +7

    “plus gcc for compilation” not clang? it is alpine.. haha

    • @xanderplayz3446
      @xanderplayz3446 Місяць тому

      huh??? how does alpine associate with clang?

    • @lucidattf
      @lucidattf Місяць тому +6

      @@xanderplayz3446 alpine doesn’t use any gnu stuff, so to use the gnu compiler instead of other compatible alternatives (such as clang) on an alpine system feels sacrilegious to me haha

  • @zweiblali3410
    @zweiblali3410 Місяць тому +10

    A small LLM could probably help with the ocr. Something like "The following source code might contain ocr artifacts, remove them if present" as a promt

    • @dumonu
      @dumonu Місяць тому +5

      Seems unlikely to me that you could get an LLM to run on a pi 3 in a reasonable amount of time, though. I guess you could send the OCR results to a web API if you wanted, but that seems to be counter to the project's design.

    • @zweiblali3410
      @zweiblali3410 Місяць тому +2

      @@dumonu There are some small llms that run on a pi 4 or 5 like tinydolphin. It would add a couple seconds of latency but I don't think this matters. They are able to remove OCR artifacts but it requires some promt engineering and they something still turn the code into c++.

    • @andrewferguson6901
      @andrewferguson6901 Місяць тому

      ​@@zweiblali3410yikes

  • @exzld
    @exzld Місяць тому

    Hylax sounds lame, have you found any other alternatives?

  • @cbbcbb6803
    @cbbcbb6803 Місяць тому

    Just for fun?

  • @kibbewater
    @kibbewater Місяць тому

    It would be interesting if you could use some sort of LLM to sort of "auto-repair" incorrectly formatted code if it errors out, that way you don't need to fiddle with the OCR as much

  • @RedStone576
    @RedStone576 Місяць тому

    thats gay :3

  • @brothertyler
    @brothertyler Місяць тому

    dumb but cool.

  • @stratos2
    @stratos2 Місяць тому

    Perhaps a language like brainfuck with fewer characters might work better here. And be more ridiculous

  • @cat22_a1
    @cat22_a1 Місяць тому +3

    Seems like a waste of paper and slow too. Wouldn't it be better to just compile it locally? What is the benefit of this system?

    • @jlco
      @jlco Місяць тому +32

      fun

    • @vaisakhkm783
      @vaisakhkm783 Місяць тому +30

      Found a product manager...

    • @theninjascientist689
      @theninjascientist689 Місяць тому +34

      I don't know what you mean, this is much faster than mailing my source code to the office for someone to transcribe and compile.

    • @monad_tcp
      @monad_tcp Місяць тому +4

      All papers are a waste anyway, why do we even need bureaucrats and managers and HR people anyway ?

    • @OdyseeEnjoyer
      @OdyseeEnjoyer Місяць тому +5

      my dude really thought this was about efficiency

  • @aarocka11
    @aarocka11 Місяць тому

    If you make it public you should call the service cFax (ceefax reference).