this post was submitted on 27 Aug 2024
297 points (94.9% liked)

Programmer Humor

19176 readers
1374 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] RVGamer06@sh.itjust.works 12 points 3 weeks ago (1 children)

Has someone made a library for that?

[–] hydroptic@sopuli.xyz 44 points 3 weeks ago (2 children)

Use a dynamically typed language and you won't have to: just override the default reverse() method on strings like a Real Programmer!

Unintended consequences you say? Nonsense! What could possibly go wrong?

[–] petey@aussie.zone 27 points 3 weeks ago (1 children)

I’m tempted to publish an NPM package to do so as a joke, but I fear that it’d get used seriously

[–] RonSijm@programming.dev 7 points 3 weeks ago (1 children)

Where does it end though? It's a bit like infinite craft - but instead of combining resources you'd have to find an inverse for every emoji

[–] Feathercrown@lemmy.world 6 points 3 weeks ago* (last edited 3 weeks ago)
async function reverse(str){
    return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`);
}
[–] RVGamer06@sh.itjust.works 6 points 3 weeks ago

Lua could possibly do this