There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

sus , in `"☹️".reverse() == "🙂"`

but sometimes “👍🏽”.reverse() == “🏽👍”

i_love_FFT , in `"☹️".reverse() == "🙂"`
@i_love_FFT@lemmy.ml avatar

“🙂”.reverse() == “🙃”

jol ,

Then we need reverseX and reverseY

Randelung ,

🙂.reverseX = 🙂

RVGamer06 , in `"☹️".reverse() == "🙂"`

Has someone made a library for that?

hydroptic OP ,

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 ,

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

RonSijm ,
@RonSijm@programming.dev avatar

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 ,

<span style="color:#323232;">async function reverse(str){
</span><span style="color:#323232;">    return ChatGPT.ask(`Please reverse the string ${str}. Reply only with the answer, without other words or symbols.`);
</span><span style="color:#323232;">}
</span>
RVGamer06 ,

Lua could possibly do this

SzethFriendOfNimi , in `"☹️".reverse() == "🙂"`
@SzethFriendOfNimi@lemmy.world avatar

Imagine, if you will. A world where string reverse changes the character codes of the string.

What beauty, what wonder would such a world have?

Destruction and despair. Developers unsure why their programs don’t respond correctly. Ships run aground on islands already overcrowded with those who were shipwrecked before. Signal antennas pointed towards the sun with it’s constant noise. Spacecraft whose exhaust melt to slag populated cities as people briefly scream their final terrors of pain and suffering.

This, is a world we should not want to live in. A world you can only find, in the Twilight Zone.

sukhmel ,

Nah, this could’ve been possible with some clever fuckery in defining those emojis’ unicode content, like with flags that are not a single point but three independent ones, allowing you to do this:


<span style="color:#323232;">"🇧🇬".reverse() == "🇬🇧"
</span><span style="color:#323232;">"🇬🇪".reverse() == "🇪🇬"
</span>
n7gifmdn ,
@n7gifmdn@lemmy.ca avatar

THANKS. I didn’t get the flag joke at first @sukhmel

Endmaker , in `getStorageList()`

Any context?

qaz OP ,

Found it while refactoring KDE Connect Android.

beepnoise ,
Traister101 ,

Wow, that looks like a nightmare

30p87 ,
@30p87@feddit.org avatar

It has a typo

Me about to make my first contribution to KDEConnect Ü

mbtrhcs , in `getStorageList()`

No usages

cheddar ,
@cheddar@programming.dev avatar

Somebody should tell Albert and the others, they can let this method go.

qaz OP , (edited )

I already did so an hour ago https://lemmy.world/pictrs/image/3e40872f-e268-4926-b709-5278d2b9090b.png

UPDATE: It has been merged

AdNecrias ,

xkcd.com/1172

You know it’s comming.

cheddar ,
@cheddar@programming.dev avatar

Alright, this is my first contribution to an open-source project, albeit indirect. I’ll drink to that!

FellowHuman ,

Well its public so who knows in what other package is using it. And it’s static, so who know what kind if monster is calling it from some inapropriate place. I have seen static methods being called from translation/localization files, because “it works”.

mbtrhcs ,

IntelliJ finds most uses in my experience unless you’re doing something weird with reflection or similar. And if it’s a public facing API only used by the library’s consumers…– it should be used in tests at the very least! Especially if it’s prone to regressions like the comment suggests

qaz OP ,

There are only 7 unit test classes. 2 of which I wrote myself this month.

mhredox , in One Note enshitification

e13n

pkill , in One Note enshitification

Notesnook ftw

hades , in `getStorageList()`

Ah yes, that’s Android for ya.

Comment105 , in A Guessing Game

Rhowch, mwyn, and wnffre are Welsh. The rest is nonsense.

accideath ,

What are those in English?

Taleya ,

Rhowch = give / enter supply? Kinda? Like “enter password” is where i’ve seen it.

Mwyn = mine as in dig

Wmffre = welsh version of humphrey and i only know that due to my great-grandfather.

anti ,

Cwtch is the most obviously Welsh word there.

Comment105 ,

Obviously.

MrLLM , in `"☹️".reverse() == "🙂"`

<span style="color:#323232;">File "<stdin>", line 1
</span><span style="color:#323232;">    "👉".reverse() = "👈"
</span><span style="color:#323232;">    ^
</span><span style="color:#323232;">SyntaxError: cannot assign to function call
</span>
derpgon ,

It is a font that changes == to one long equals sign.

MrLLM ,

Oh my bad, that idea didn’t cross my mind.


<span style="color:#323232;">Traceback (most recent call last):
</span><span style="color:#323232;">  File "<stdin>", line 1, in <module>
</span><span style="color:#323232;">AttributeError: 'str' object has no attribute 'reverse'
</span>
sukhmel , in `"☹️".reverse() == "🙂"`
ABluManOnLemmy , in `"☹️".reverse() == "🙂"`

“🇮🇪”.reverse() = “🇨🇮”

SpaceNoodle , in PlePuProPro: The Pledge to Put Prolog in Production

I know what I’m doing next week

anton , in PlePuProPro: The Pledge to Put Prolog in Production

Prolog is not suitable for any problem domain, although this is more readily apparent for some domains than others.

For real, for real.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines