@[email protected] to Programmer [email protected] • 3 months ago"☹️".reverse() == "🙂"sopuli.xyzimagemessage-square22fedilinkarrow-up1314arrow-down117cross-posted to: [email protected]
arrow-up1297arrow-down1image"☹️".reverse() == "🙂"sopuli.xyz@[email protected] to Programmer [email protected] • 3 months agomessage-square22fedilinkcross-posted to: [email protected]
minus-square@[email protected]OPlinkfedilink44•3 months agoUse 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?
minus-square@[email protected]linkfedilink27•3 months agoI’m tempted to publish an NPM package to do so as a joke, but I fear that it’d get used seriously
minus-square@[email protected]linkfedilink7•3 months agoWhere 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
minus-square@FeathercrownlinkEnglish6•edit-23 months agoasync function reverse(str){ return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`); }
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?
I’m tempted to publish an NPM package to do so as a joke, but I fear that it’d get used seriously
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
async function reverse(str){ return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`); }
Lua could possibly do this