this post was submitted on 14 Jan 2025
444 points (90.7% liked)

Programmer Humor

34629 readers
265 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] davel@lemmy.ml 40 points 2 months ago (1 children)

My gender is e, which can be represented by neither integers nor floating points.

[–] Rentlar@lemmy.ca 26 points 2 months ago (2 children)

Can it be expressed or represented approximately in IEEE-754 form?

[–] davel@lemmy.ml 42 points 2 months ago* (last edited 2 months ago) (2 children)

Always approximated, never truly represented 😞

[–] LegoBrickOnFire@lemmy.world 7 points 2 months ago* (last edited 2 months ago) (1 children)

Unless your encoding has a special value that, by definition, is euler's constant :p

[–] davel@lemmy.ml 5 points 2 months ago (1 children)
[–] idunnololz@lemmy.world 5 points 2 months ago

Ah so ur gender can be represented in UTF 8.

load more comments (1 replies)
[–] Valmond@lemmy.world 20 points 2 months ago

Everything can be represented approximatively.

e = π = 3

[–] Thorry84@feddit.nl 35 points 2 months ago (1 children)

Obviously, there is True, False and FILE_NOT_FOUND

[–] shininghero@pawb.social 6 points 2 months ago

Better than having your gender datatype being a Bobool3ol and evaluating to "Tru(🍒🎂🍒)lse".

[–] CosmicTurtle0@lemmy.dbzer0.com 32 points 2 months ago (4 children)

There are 10 kinds of people in this world. Those who understand binary and those who don't.

[–] bamboo@lemmy.blahaj.zone 31 points 2 months ago (1 children)

There are 10 kinds of people in this world. Those who get ternary; those who don't; those who thought this was going to be a binary joke

[–] stebo02@lemmy.dbzer0.com 11 points 2 months ago (1 children)

There are 10 kinds of people in this world. Those who get quaternary; those who don't; those who thought this was going to be a ternary joke; those who can see where this is going...

[–] flambonkscious@sh.itjust.works 5 points 2 months ago (2 children)

I might be a slow learner but I'm catching on...

[–] JackbyDev@programming.dev 5 points 2 months ago (3 children)

Regardless of what base you're using, 10 is always the nth number. In base 10 (normal numbers), 10 is 10th. In base 2 it is the 2nd.

  1. 1
  2. 10
  3. 11

In base 16 (hexadecimal) it is the 16th.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. A
  11. B
  12. C
  13. D
  14. E
  15. F
  16. 10

The original joke is "there are 10 kinds of people, those who understand binary and those who don't l" because 10 in binary is 2 in base 10. But they're pointing out that a similar joke works for all bases of numbers.

load more comments (3 replies)
[–] stebo02@lemmy.dbzer0.com 3 points 2 months ago

ah I see, you are the 10th kind!

[–] schnurrito@discuss.tchncs.de 3 points 2 months ago

every base is base 10

load more comments (2 replies)
[–] thisfro@slrpnk.net 27 points 2 months ago (4 children)

Choose one class of gender:

  • Natural
  • Rational
  • Irrational
  • Complex
[–] affiliate@lemmy.world 13 points 2 months ago

this is p-adic gender erasure

[–] AeonFelis@lemmy.world 5 points 2 months ago

That's a very quaternionphobic list.

load more comments (2 replies)
[–] RandomVideos@programming.dev 24 points 2 months ago (1 children)

Even if every single person in the world had a unique gender, you could store that in 33 bits

You can store that in a small QR code

[–] Floey@lemm.ee 5 points 2 months ago (1 children)

Those bits wouldn't really provide the information to construct that gender though.

[–] RandomVideos@programming.dev 7 points 2 months ago

Neither would if you stored it as a bit

[–] AnnaFrankfurter@lemmy.ml 20 points 2 months ago (2 children)

Maybe it can be represented by 1qbit

[–] JackbyDev@programming.dev 6 points 2 months ago* (last edited 2 months ago)

I don't think so, because with qubits the intermediate values can be non binary but the end result must be binary when read. Unless you wanna make a joke about filling out government forms I guess lol.

[–] stebo02@lemmy.dbzer0.com 5 points 2 months ago

literally discussed with my friends the other day that gender is like a vector in Hilbert space

[–] tias@discuss.tchncs.de 17 points 2 months ago* (last edited 2 months ago) (6 children)

I've been thinking about this now and again. IMO gender, if one insists on tracking it at all (which I mostly find counterproductive), would need to be a vector / tuple of floating-point values. The components would be something like:

  1. Sexual Development Index: Encodes chromosomal sex, genitalia, and other primary sexual characteristics (X/Y chromosome ratio).
  2. Hormonal Balance & Secondary Sexual Characteristics: Combines hormonal levels and the resulting secondary traits (body hair, muscle mass, etc.).
  3. Brain Structure: A dimension indicating how a person's brain structure aligns with typical male or female patterns.
  4. Gender Identity: A measure of self-identified gender, representing the psychological and social dimension.
  5. Fertility/Intersex Traits: A combined measure of fertility potential and the presence of intersex traits (e.g., ambiguous genitalia, mixed gonadal structures, etc.).

Ideally it would track the specific genes that code for all of the above factors, but unfortunately science hasn't got those down yet.

[–] thisfro@slrpnk.net 9 points 2 months ago

Also genes is only half of it. Expression of genes is another, complicated story.

[–] shininghero@pawb.social 4 points 2 months ago

Gender Identity, now with linear algebra. Those 3b1b videos are going to be super useful, but not in the way the author intended.

[–] Bumblefumble@lemm.ee 3 points 2 months ago (1 children)

A good way would be to create as many variables as possible that map anything relevant, genes, upbringing, sexual and gender expression, etc., and then doing a PCA to reduce the defining vector to as few elements as possible.

load more comments (1 replies)
load more comments (3 replies)
[–] SnotFlickerman@lemmy.blahaj.zone 16 points 2 months ago* (last edited 2 months ago) (3 children)

Gender is not a boolean value, it's a variable.

[–] HiddenLayer555@lemmy.ml 25 points 2 months ago* (last edited 2 months ago) (1 children)

🚫 const gender

👉 var gender

[–] flamingo_pinyata@sopuli.xyz 9 points 2 months ago (2 children)

khm, khm
let gender

please don't use deprecated syntax

[–] Alfenstein@lemmy.ml 6 points 2 months ago

May be gdscript

load more comments (1 replies)
[–] Atlusb@lemmy.world 14 points 2 months ago (1 children)

And liable to type conversion errors and precision loss.

[–] NocturnalMorning@lemmy.world 9 points 2 months ago

Jesus, why'd you have to bring floating point and machine precision into the conversation? Now I won't sleep. And the nightmares will be worse than before.

[–] SpaceNoodle@lemmy.world 5 points 2 months ago

A boolean variable?

[–] LovableSidekick@lemmy.world 13 points 2 months ago (2 children)

So many other things are also non-binary, but people insist that not being 100% on their side means you're a million percent on the extreme opposite hateful wrong side.

[–] madcaesar@lemmy.world 5 points 2 months ago (1 children)

Absolutely. My baseline is that I want everyone to be treated equally and with respect. I want everyone have the same protections from the government and everyone to be allowed to be and to love whoever they want.

Past that, it gets into minutia I just can't get on board with and it's hurting the left as a whole because people are trying to force language and thought policing on people, which I don't like, it's authoritarian, and I think it's a losing strategy.

load more comments (1 replies)
[–] rabber@lemmy.ca 4 points 2 months ago

A lot of the userbase here thinks this way and it's very tiresome

[–] leaky_shower_thought@feddit.nl 7 points 2 months ago (1 children)
[–] luciferofastora@lemmy.zip 7 points 2 months ago (3 children)

Approximation is an important tool for compressing information into useable forms. All labels are limited approximations too. Such compression is inevitably lossy, but that is a sacrifice for the sake of practicality. The important question is what level of compression is acceptable for a given context. If I describe the location of a chess piece on the board, I don't need to specify how far off-center on its square a given piece is, so a 0-7 offset along each of the two axes is enough for game purposes.

When it comes to gender, I think we all agree that [0, 1] is insufficient, but how do we determine what is sufficient? Do we argue that a 2-bit vector (masc, fem) is enough to describe {neither, fem, masc, both} for rough rounding, or do we need more detailed values along those axes, or perhaps a third axis too (or more)?

load more comments (3 replies)
[–] enbipanic@lemmy.blahaj.zone 7 points 2 months ago

We may have discovered gender entropy, Shannon would be proud

[–] logging_strict@lemmy.ml 4 points 2 months ago

lets burn down our civilizations by spending all our wealth discussing this

The issue is based on legal terminology. Gender isn't a legal thing only pushed into our vocabulary.

Allocate an unbound memory blob and sit back for the herd of the Rust coders to line up. Sell them a soda while they do their best chicken parody

[–] Valmond@lemmy.world 3 points 2 months ago (1 children)

As it is not stable I'd go with a database.

Sqlite.

[–] AkatsukiLevi@lemmy.world 5 points 2 months ago (1 children)

Better go with MySQL to ensure foreign keys comstrains

load more comments (1 replies)
load more comments
view more: next ›