Björn Tantau@swg-empire.de to Programmer Humor@programming.dev · 3 months agoPretty straight forwardswg-empire.deexternal-linkmessage-square46fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1external-linkPretty straight forwardswg-empire.deBjörn Tantau@swg-empire.de to Programmer Humor@programming.dev · 3 months agomessage-square46fedilinkfile-text
minus-squaretiredofsametab@fedia.iolinkfedilinkarrow-up0·3 months agoNow call that C program from some other program in another language.
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up0·3 months agoMay I present to you: https://github.com/mame/quine-relay
minus-squareTraister101@lemmy.todaylinkfedilinkarrow-up0·3 months 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-23 months 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?""")