Björn Tantau@swg-empire.de to Programmer Humor@programming.dev · 4 days agoPretty straight forwardswg-empire.deexternal-linkmessage-square45fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1external-linkPretty straight forwardswg-empire.deBjörn Tantau@swg-empire.de to Programmer Humor@programming.dev · 4 days agomessage-square45fedilinkfile-text
minus-squaretiredofsametab@fedia.iolinkfedilinkarrow-up0·4 days agoNow call that C program from some other program in another language.
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up0·4 days agoMay I present to you: https://github.com/mame/quine-relay
minus-squareTraister101@lemmy.todaylinkfedilinkarrow-up0·4 days agoAh yes now I can… dereference a raw pointer (yes that’s essentially the only thing unsafe rust actually enables you to do, it doesn’t disable the borrow checker or anything else, it just allows you to play with pointers)
minus-squareJasonDJ@lemmy.ziplinkfedilinkarrow-up0·edit-24 days agowith open('program.c', 'w') as f: f.write( """I'm not actually going to copy down the program... But you get the idea of the joke. Right?""")
Now call that C program from some other program in another language.
May I present to you: https://github.com/mame/quine-relay
It’s… Beautiful.
Rust, to make it safe.
step 1:
unsafe fn()
…Ah yes now I can… dereference a raw pointer (yes that’s essentially the only thing unsafe rust actually enables you to do, it doesn’t disable the borrow checker or anything else, it just allows you to play with pointers)
with open('program.c', 'w') as f: f.write( """I'm not actually going to copy down the program... But you get the idea of the joke. Right?""")