this post was submitted on 27 Aug 2024
137 points (100.0% liked)

Programmer Humor

852 readers
16 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 18 comments
sorted by: hot top controversial new old
[โ€“] lelgenio@lemmy.ml 30 points 1 month ago (1 children)
[๐ŸŒฝ].pop() == ๐Ÿฟ
[โ€“] tetris11@lemmy.ml 17 points 1 month ago* (last edited 1 month ago)
"๐Ÿšด".push() = "๐Ÿšฒ๐Ÿคธ"
[โ€“] BaumGeist@lemmy.ml 28 points 1 month ago (2 children)
"โ˜น๏ธ".reverse() == "โ˜น๏ธ"
[โ€“] hydroptic@sopuli.xyz 9 points 1 month ago (1 children)
[โ€“] BaumGeist@lemmy.ml 8 points 1 month ago

Look closer at the beauty mark, I flipped the emoji

[โ€“] Boomkop3@reddthat.com 2 points 1 month ago* (last edited 1 month ago)

wasn't it
๐Ÿ™
.
r
e
v
e
r
s
e
()

[โ€“] AllNewTypeFace@leminal.space 20 points 1 month ago (1 children)

Then โ€œbโ€ backwards would have to be โ€œdโ€

[โ€“] hydroptic@sopuli.xyz 17 points 1 month ago

"E".reverse() == "โˆƒ"

[โ€“] socsa@piefed.social 14 points 1 month ago

Be the operator overload you wish to see in the world

[โ€“] CanadaPlus@lemmy.sdf.org 9 points 1 month ago* (last edited 1 month ago) (1 children)

Also, it should turn an error into an empty but successful call. /s

[โ€“] hydroptic@sopuli.xyz 8 points 1 month ago (1 children)

Calling reverse() on a function should return its inverse

[โ€“] tetris11@lemmy.ml 4 points 1 month ago (1 children)
isprime.reverse(True)
// outputs 19 billion prime numbers. Checkmate, atheists.
[โ€“] CanadaPlus@lemmy.sdf.org 2 points 1 month ago

It's a just a joke, but I feel like that actually says something pretty profound about duck typing, and how computable it actually is.

[โ€“] tetris11@lemmy.ml 6 points 1 month ago
"๐Ÿˆ".concat() = "๐Ÿ˜ผ"
[โ€“] RiceMunk@sopuli.xyz 6 points 1 month ago* (last edited 1 month ago)

but

"๐Ÿ™‚".reverse() == "๐Ÿ™ƒ"

[โ€“] MultipleAnimals@sopuli.xyz 3 points 1 month ago

JavaScript taking notes

[โ€“] Boomkop3@reddthat.com 2 points 1 month ago (1 children)

You could implement that on a chat, but I wouldn't do that on a string

[โ€“] hydroptic@sopuli.xyz 1 points 1 month ago

Where's your sense of adventure?!