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