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

Поделиться
HTML-код
  • Опубликовано: 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

  • @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.

  • @madduxv
    @madduxv Месяц назад +7

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

  • @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.)

  • @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

  • @PeterfoxUwU
    @PeterfoxUwU Месяц назад +6

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

  • @No-mq5lw
    @No-mq5lw Месяц назад

    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"

  • @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.

  • @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!

  • @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

  • @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

  • @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?

  • @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

  • @brothertyler
    @brothertyler Месяц назад

    dumb but cool.

  • @RedStone576
    @RedStone576 Месяц назад

    thats gay :3

  • @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).