[HN Gopher] Call the compiler, fax it your code [video]
___________________________________________________________________
Call the compiler, fax it your code [video]
Author : ayoreis
Score : 109 points
Date : 2024-07-26 17:45 UTC (5 hours ago)
(HTM) web link (www.youtube.com)
(TXT) w3m dump (www.youtube.com)
| throwway120385 wrote:
| I don't understand. Is this not how everyone browses the web?
| ruined wrote:
| no it's more typical to fax a complete browsing service
| jzombie wrote:
| FaxGPT
| davidkunz wrote:
| Nothing new, we've been doing it like that for ages here in
| Germany. But it's a cool Hamburger phone.
| khaki54 wrote:
| Have fun troubleshooting when the OCR keeps mis-identifying one
| of the semi-colons as a greek question mark!
| M4v3R wrote:
| 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.
| joebob42 wrote:
| The past meets the future
| kazinator wrote:
| With Common Lisp, we don't need an infinite roll of paper to
| prank the faxed compiler. Just (progn .
| #1=((print 'foo) . #1#))
| faxmeyourcode wrote:
| 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
| lupire wrote:
| Need a proper preprocessor to take a code file and make it OCR-
| safe by substituting for dangerously glyphs.
| simcop2387 wrote:
| 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 ++
| deepspace wrote:
| > OCR bugs
|
| Especially if your fax machine uses JBIG2 compression. See:
| https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i...
| skitter wrote:
| I think it's appropriate linking directly to Kriesel's blog1
| or his talk, as that's about the scanner creating fake data
| and not about rce. Though technically it too is not an OCR
| bug as there's no ocr in JBIG2.
|
| 1: http://www.dkriesel.com/en/blog/2013/0802_xerox-
| workcentres_...
| OnlyMortal wrote:
| Amateur! Use a barcode font!
| landgenoot wrote:
| monospace font OCR-B
| jabbany wrote:
| I wonder if OCR could be improved by adding a "language model"
| of sorts...
|
| Like, sure, maybe it's hard to tell apart a "1", "i", or "l"
| purely visually, but if you knew it was supposed to be code,
| I'd suspect one could significantly improve the recognition
| accuracy if the system just worked in the probability of each
| confusable option given the preceding (and following) text.
| playingalong wrote:
| This would also have a higher risk of introducing some nasty,
| hard to spot errors.
|
| It's actually better for the compilation to fail than for the
| Clippy to make up something syntactically and compilation
| correct, but wrong.
| l0rn wrote:
| it would be a cool competition who makes the nicest program using
| the fax compiler
| nehal3m wrote:
| Computer floop noises. Nice.
| JoshTriplett wrote:
| 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.
| Denvercoder9 wrote:
| It was probably just easier to implement. The build script[1]
| already has the source code, extracting the number from a
| comment is trivial, while retrieving out-of-band data like
| Caller ID from the fax server is likely more complicated. For a
| joke it's not compelling to do that, especially if you've
| already been fighting the fax server...[2]
|
| [1]
| https://github.com/lexbailey/compilerfax/blob/main/build_and...
|
| [2]
| https://github.com/lexbailey/compilerfax/tree/main?tab=readm...
| ManWith2Plans wrote:
| Possibly inspired by this stack overflow question:
|
| https://stackoverflow.com/questions/5508110/why-is-this-prog...
| dang wrote:
| 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)
| odo1242 wrote:
| It would honestly be even funnier if the compiler just sent back
| your code in x86 assembly.
| fanf2 wrote:
| [delayed]
| jabbany wrote:
| 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.
| reaperducer wrote:
| Slightly related:
|
| There was a time when web browsing was crazy slow and
| expensive, but there were e-mail services that were also crazy
| slow, but free.
|
| There were mail to web gateways that you could e-mail a URL to,
| which would then reply with the contents of the web page. You'd
| then send another URL from that page, and get another reply,
| and so on. Free slow-motion web browsing.
|
| I say "slow-motion" because this was back when getting a
| response to an e-mail took hours or days, not seconds. So you
| were lucky to get through three or four links in a day. But it
| was free, and we had other things to do than surf the web
| anyway.
| rickreynoldssf wrote:
| 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.
___________________________________________________________________
(page generated 2024-07-26 23:01 UTC)