this post was submitted on 12 Jun 2023
107 points (99.1% liked)

Programmer Humor

32504 readers
759 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 year ago
a = a ^ b
b = a ^ b
a = a ^ b
[–] Crackhappy 6 points 1 year ago

Never used Python but that's hilarious.

[–] [email protected] 6 points 1 year ago (1 children)

Storing the value in the user instead of RAM!

[–] softhat 2 points 1 year ago (1 children)

This actually raises a very good question - could you increase the amount of available RAM by using the user?

Juggling chainsaws comes to mind.

[–] [email protected] 1 points 1 year ago

That's basically what old games did with passwords for saves. Although I guess that's more like using the user as persistent storage rather than ram.

[–] [email protected] 4 points 1 year ago

Using an organic processor

[–] [email protected] 3 points 1 year ago (1 children)

I raise you

@lambda _: _()
def result() -> int:
    global a; global b; a, b = b, a

hat tip to @[email protected] via Cursed Python

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Haha thanks, but the original idea is from @goodside on Twitter, I just screenshotted his tweet and harvested the upvotes :D

[–] [email protected] 2 points 1 year ago

D'oh, you're right! My bad and thanks for the catch!

[–] [email protected] 3 points 1 year ago (1 children)

So you are asking the user to do it

[–] [email protected] 2 points 1 year ago

What do you think captcha is other than computers manualizing tasks.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)
[–] [email protected] 2 points 1 year ago

Version 3 is disgusting.

load more comments
view more: next ›