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!
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!
Or maybe instead, fax a card where the text is encoded with holes punched into them. That could work.
@@tigersteinYou gonna give father of computer science nostalgia mate
no joke, that would work quote well probably. each qr code can hold 3kb of data, which should be well enough.
nah bits or asm would’ve been better xD
Don't worry though, my fork bomb will eventually halt. I pinky promise
This opens the door to software development for a lot of Germans
First time, a german authority gets access to cloud computing. This will revolutionize our bureaucracy.
finally, a use for all that code they ask us to handwrite in computer science exam papers!! 😂❤
they asked you to do what ?!
@@tatianatub In first year of programming class, some teachers make you write the test on paper
Thank you for not inserting airhorn sounds here
with printer ink being the most expensive liquid, you can finally recreate AWS infinite loop costs at home
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
EasyOCR is supposed to be much more accurate than Tesseract, though I think it requires a GPU to be reasonably fast.
I have to say. Hamburger phone really sells the video!
You know what, with OTCC, you can fax yourself a C compiler. You may want to choose the deobfuscated version, it's still faxable.
oh yeah baby we’ve almost made it back to punch cards
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.)
This is a really cool Idea!
I love that you actually did it
It'd be cool if you could add an option to send the resulting ELF binary in a barcode or hex printout instead
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.
Fax-GPT next 😅
it always speaks fax
Maybe you should check out the Piston code execution engine, and get this working securely for a ton of other languages. That sounds cool!
*sees lgbtq flag and programing together*
"TRANSSS"
*sees NB spider on the printer*
"ha i was right"
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!
Other than you printed it on a 8x11 in piece of paper this is exactly how you did computing in 1957 on a 1401.
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.
brings me back
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.
thats a really cute pride spider sticker!
I was gonna ask if you could try handwriting your code. But I guess the OCR is already buggy enough with typesets.
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.
punch cards punch cards punch cards i dunno if tesseract can handle that but punch cards punch cards punch cards
Awesome stickers!
massive W
I wonder if you could add some sort of error correction for the scanning
Other user suggests qr code
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?
“plus gcc for compilation” not clang? it is alpine.. haha
huh??? how does alpine associate with clang?
@@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
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
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.
@@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++.
@@zweiblali3410yikes
Hylax sounds lame, have you found any other alternatives?
Just for fun?
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
thats gay :3
dumb but cool.
Perhaps a language like brainfuck with fewer characters might work better here. And be more ridiculous
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?
fun
Found a product manager...
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.
All papers are a waste anyway, why do we even need bureaucrats and managers and HR people anyway ?
my dude really thought this was about efficiency
If you make it public you should call the service cFax (ceefax reference).