Live data from Hacker News

Call the compiler, fax it your code [video]

youtube.com

11–20 of 37 posts

Re: Call the compiler, fax it your code [video]

#12
post #10

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

Need a proper preprocessor to take a code file and make it OCR-safe by substituting for dangerously glyphs.

This might be a good reason to support trigraphs again! https://en.wikipedia.org/wiki/Digraphs_and_trigraphs_(progra...

edit: fixed link, copy paste fail dropped the ++

Re: Call the compiler, fax it your code [video]

#13

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

> OCR bugs

Especially if your fax machine uses JBIG2 compression. See: https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i...

Re: Call the compiler, fax it your code [video]

#14
post #5

Have fun troubleshooting when the OCR keeps mis-identifying one of the semi-colons as a greek question mark!

I wonder if this is a perfect use case for an LLM. I bet that if you did submit he code to Claude/ChatGPT with a prompt to „fix any typos in the code that was read using OCR” it would have a pretty high rate of success.

Re: Call the compiler, fax it your code [video]

#15

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

Amateur! Use a barcode font!

Re: Call the compiler, fax it your code [video]

#18

Possibly inspired by this stack overflow question: https://stackoverflow.com/questions/5508110/why-is-this-prog...

Related:

Why is this program erroneously rejected by three C++ compilers? - https://news.ycombinator.com/item?id=22798602 - April 2020 (1 comment)

Why is this program erroneously rejected by three C++ compilers? - https://news.ycombinator.com/item?id=6504442 - Oct 2013 (1 comment)

Why is this program erroneously rejected by three C++ compilers? - https://news.ycombinator.com/item?id=3727717 - March 2012 (7 comments)

Re: Call the compiler, fax it your code [video]

#19

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

Amateur! Use a barcode font!

monospace font OCR-B

Re: Call the compiler, fax it your code [video]

#20
post #14
post #5

Have fun troubleshooting when the OCR keeps mis-identifying one of the semi-colons as a greek question mark!

I wonder if this is a perfect use case for an LLM. I bet that if you did submit he code to Claude/ChatGPT with a prompt to „fix any typos in the code that was read using OCR” it would have a pretty high rate of success.

The past meets the future
Post reply on HN