Tsk tsk… forgot to clean up your temp file!
Always follow best practices, make sure you cleanup by deleting the hello world bash file!
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.
Picking emojis that make sense actually made it easy to read.
Okay but 🍒 shouldn’t output 🍉. This is inconsistent and confusing. We have standards.
…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
Fair, should’ve just said shell
Fine,
system("bash -c 'echo hello world'");
then!Now print “¯\_(ツ)_/¯” with the quotes
I decided to throw my PC in the composter and become a gardener
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 quotesThat 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.
why would you hurt me like this
Thanks, I hate it.
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.
Violates CERT C ENV33-C.
It violates oh so much including that.
Now call that C program from some other program in another language.
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)
unsafe fn<'a, T>(p: &'a T) -> &'static mut T { p as *cons T as *mut T as &'static mut T }
It is a bit more than just dereferencing raw 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?""")
May I present to you: https://github.com/mame/quine-relay
It’s… Beautiful.
Fucking brilliant
My coworkers could learn a thing or two from this. For one, it actually works.
That’s me with TCL.
I’ve had an eggdrop for years (obviously) and I’m very bad with TCL, so any new script that I want to add is a bash script executed by the TCL script.
TIL people still run eggdrop bots. I don’t think Ive touched one since maybe 2003. was probably the last time I messed with tcl
I still have an IRC server but the eggdrop’s usefulness has pretty much been reduced to fetching YouTube titles and the URL of images on tenor. Its main use was to fetch titles for all URLs pasted on channels where it is, but because me and most of the users are now using TheLounge as a client, there is no need for that anymore, except for a few exceptions. At one point it was also displaying all the things my friends upvoted on reddit, but since reddit closed its API and I came here…
IRC with TheLounge is still very useful though.
deleted by creator
subprocess.run()