…this is so much more cursed than it needs to be. If you want to bash in C just
system("echo hello world");
That wouldn’t necessarily be bash though
Fine,
system("bash -c 'echo hello world'");
then!Now print “¯\_(ツ)_/¯” with the quotes
my best guess:
system("bash -c 'echo \\\"¯\\\\_(ツ)_/¯\\\"'");
which will get parsed as:
bash -c 'echo \"¯\\_(ツ)_/¯\"'
which will run:
echo "¯\_(ツ)_/¯"
and since
echo
just prints whatever was given to it, it’ll print"¯\_(ツ)_/¯"
with the quotesI decided to throw my PC in the composter and become a gardener
That was actually the first line of C I’ve ever written so there’s no way I’m guessing the right number of escapes, but I guess I’d cheat by finding the value of each char and printing those one at a time.
Fair, should’ve just said shell
Tsk tsk… forgot to clean up your temp file!
That emoji annoys me more than I would like
As if someone’s telling a joke and saying “This is where you should laugh”
It’s the meme version of a laugh track
Laugh tracks have a purpose though. I understand they’re not to everyone’s liking - and that’s fine, but they work for some comedy shows - and usually they’re from the live audience that sees things performed in front of them.
For shame. They forgot to make a script to make a tmp script using mktmp, so they can store their tmp script in the tmp script and have proper cleanup
Sure.
Okay but 🍒 shouldn’t output 🍉. This is inconsistent and confusing. We have standards.
Picking emojis that make sense actually made it easy to read.
My coworkers could learn a thing or two from this. For one, it actually works.
Always follow best practices, make sure you cleanup by deleting the hello world bash file!
Violates CERT C ENV33-C.
It violates oh so much including that.
Now call that C program from some other program in another language.
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?""")
Rust, to make it safe.
step 1:
unsafe fn()
…
May I present to you: https://github.com/mame/quine-relay
It’s… Beautiful.
why would you hurt me like this
Fucking brilliant
Thanks, I hate it.
Who says C isnt mem safe?
Some time ago I wrote a program in COBOL and half of it was just
CALL "SYSTEM" BY CONTENT
in the end.I did the same with python once lol.
I didn’t know enoug python or bash so i mixed both with os.system
Apologies for being off-topic, but the domain name, “swg-empire.de”, does the ‘swg’ part ‘Star Wars Galaxies’ by chance?
No. It was for a Star Wars roleplay but not a video game. It started life in the newsgroup de.rec.sf.starwars and I played the role of Emperor.
No. It was for a Star Wars roleplay but not a video game. It started life in the newsgroup de.rec.sf.starwars
Ah, ok, nice! Was that the old D6 version, or the newer D20 one?
and I played the role of Emperor.
You dark person you! 😜
No set rules, just goofing around. When we got too annoying for the rest of the newsgroup we moved to a mailing list and met up in real life a bunch of times.
First time my father flew me there in a small sports plane. They had gotten the permission to greet me on the air field with a limousine blasting the Force Commander remix of the Imperial March and a black carpet. All the Jedi, Sith and in-betweens were waving Emperor-flags and greeted me as was befitting a man of my status.
Did I mention that I was 14 at the time and everyone else about 30?
Good times.
Sounds like good times, indeed.