1
755
submitted 14 hours ago by siriusmart to c/[email protected]
2
1300
Of course (lemmy.world)
submitted 23 hours ago by hypertown to c/[email protected]
3
724
Thanks ... (jlai.lu)
submitted 1 day ago by [email protected] to c/[email protected]
4
454
submitted 1 day ago by [email protected] to c/[email protected]
5
175
submitted 1 day ago by [email protected] to c/[email protected]

cross-posted from: https://lemmy.cringecollective.io/post/9716

Maybe some ALGOL 58 while we're at it too.

6
368
print('butt') (lemmy.world)
submitted 1 day ago by hypertown to c/[email protected]
7
338
submitted 6 days ago by [email protected] to c/[email protected]
8
377
submitted 6 days ago by [email protected] to c/[email protected]
9
300
submitted 1 week ago* (last edited 1 week ago) by renzev to c/[email protected]

Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python's native datatypes, which means you now have two different bool types and two different sets of True and False. Lovely.

Mypy is a type checker for python (python supports static typing, but doesn't actually enforce it). Mypy treats numpy's bool_ and python's native bool as incompatible types, leading to the asinine error message above. Mypy is "technically" correct, since they are two completely different classes. But in practice, there is little functional difference between bool and bool_. So you have to do dumb workarounds like declaring every bool values as bool | np.bool_ or casting bool_ down to bool. Ugh. Both numpy and mypy declared this issue a WONTFIX. Lovely.

10
1314
submitted 1 week ago by seaQueue to c/[email protected]
11
503
submitted 1 week ago by [email protected] to c/[email protected]
12
448
submitted 1 week ago by [email protected] to c/[email protected]
13
498
submitted 1 week ago by [email protected] to c/[email protected]
14
532
submitted 1 week ago by [email protected] to c/[email protected]
15
191
js Monk and Fly (sh.itjust.works)
submitted 1 week ago by [email protected] to c/[email protected]
16
848
submitted 1 week ago by [email protected] to c/[email protected]
17
941
Certified in AI (sh.itjust.works)
submitted 1 week ago by [email protected] to c/[email protected]
18
175
Let's do micro service (sh.itjust.works)
submitted 1 week ago by [email protected] to c/[email protected]
19
502
I am a sinner (sh.itjust.works)
submitted 1 week ago by [email protected] to c/[email protected]
20
173
submitted 1 week ago by [email protected] to c/[email protected]
21
782
submitted 1 week ago by [email protected] to c/[email protected]
22
205
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
23
426
got him (lemy.lol)
submitted 1 week ago by [email protected] to c/[email protected]
24
1089
Users (lemmy.world)
submitted 2 weeks ago by ekZepp to c/[email protected]
25
35
submitted 2 weeks ago by [email protected] to c/[email protected]
view more: next ›

Programmer Humor

30813 readers
2768 users here now

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

Rules:

founded 4 years ago
MODERATORS