this post was submitted on 14 Jan 2025
233 points (90.9% liked)

Programmer Humor

19967 readers
618 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
all 30 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 4 hours ago

Gender: true

[–] [email protected] 22 points 18 hours ago (3 children)

Even booleans take up 8 bits. And that's a lot of wasted space.

[–] [email protected] 2 points 4 hours ago

That's only due to technical reasons on weird platforms like x86, 64bit x86 or ARM.

[–] [email protected] 5 points 8 hours ago

That's why you use bitarrays and bitflags instead when you need more than just one or two arguments for a function.

[–] [email protected] 3 points 10 hours ago

Solution: 1 bit computer

[–] [email protected] 37 points 21 hours ago (2 children)

Clearly your gender field is a boolean. Which means it can be either true, false, null, or undefined. Except in javascript where for some reason it can sometimes be NaN, but only when you try to compare two people.

[–] [email protected] 2 points 10 hours ago

A boolean, so 8 bits of freedom to fill up

[–] [email protected] 11 points 20 hours ago

My gender is

{ toString: ()=>{String.prototype.toString = ()=>">:3"; return ":3";} }
[–] [email protected] 15 points 20 hours ago (1 children)

Bold of programmers to assume gender can be expressed accurately in a finite discrete system. Gonna have to bust the Taylor series for some better approximation.

[–] [email protected] 7 points 19 hours ago (2 children)

I guess in theory as there will only ever be a finite number of individuals, there will also necessarily only ever be a finite number of different gender expressions, so finite discrete probably works. (Not to say that peoples experiences of gender are fixed and equidistant, but more so that you could have a "gender enum" with an entry for each individual)

Of course, trying to say how many bits this would require is almost impossible because theres always going to be more people and more genders, but it is technically finite.

In any case, bagsies on (leading zeros)100101001

[–] [email protected] 5 points 15 hours ago (2 children)

Me on my way to define everyone's gender:

enum Gender {
  AARON,
  ALEX,
  ANN,
  ...
[–] [email protected] 2 points 11 hours ago

I will always read it as ay-ay-ron

[–] [email protected] 3 points 14 hours ago

Hell yeah although you might want to construct an identifier from like, name and surname and datetime of birth?

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

finite number of individuals, there will also necessarily only ever be a finite number of different gender expressions

This only demonstrates that there will be a finite number of genders at any given instance. One could be more fluid and a responsive gender such that it maximizes the gay of any particular kiss they are having at the time.

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

Sure but thats their experience of gender right? Their experience of gender will never be "not their experience of gender" even if it changes from instant to instant

[–] [email protected] 1 points 17 hours ago (1 children)

Sure, but just because sine is one function doesn't mean it's accurately replicable in a finite discrete system.

I read your previous comment as making the point that because there are finite people, there will be finite values of gender, and therefore discrete and replicable. If it's continuous and variable, even if there are finite individuals that have finite methods of expressions their gender, gender itself spans the reals.

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

I was more approaching it from a programming perspective than a mathematical one - we could theoretically "label" all the gender experiences (perhaps just with the name of the individual that experiences it)

Of course this would be like labeling different variations of the sine function, and other functions, to use the analogy you made

The thing thats represented by the label may be discrete or continuous or anything

To be clear, I'm not attempting to represent gender as a continuous spectrum between Man and Woman - I'm throwing the gender binary out entirely and imagining each gender as some arbitrarily defined thing, ie for some people its a sine function (again to use your analogy) with different coefficients

If one wanted to represent the "gender space" as some 1d number line or 2d space with cartesian axes, then absolutely you'd need to fulfil the infinite and continuous criteria and I agree with you.

Though, to ramble a bit, I don't know what you'd use to label the axis/axes because we sure as hell can't use Man to Woman when agender folk exist, and we can't even use Man to Woman and Agender to Allogender because some folk would fall outside of those axes still.

[–] [email protected] 1 points 15 hours ago* (last edited 15 hours ago) (1 children)

Valid and this is very certainly my math bias poking through. Though I think to consider the false case of a gender binary, the 1-bit value being M or F would suggest it's describing the scope of gender expressions in memory values, and this interpretation seems to continue with the meme of it needing to be a 64-bit gender. So in correcting that falsehood, it would be a the space that have spots for all possible gender expressions.

While I agree the tautological approach of person['gender'] = "{Person's gender}" would accurately label all genders, I think the radical point to make is that the space itself is the confining factor. My point being the systems needed to properly represent a gender expression can only be approximated with finite discrete systems.

Agreed the difficulty of describing the gender space even would be near impossible! I always say the simplest way I can describe mine is: Ae^iαt^|💪> + Be^iβt^|💅> + Ce^iγt^|🤖>

|💪>, |💅>, and |🤖> of course being the base vectors I find most useful as invariant under my transformation.

Though, to ramble a bit

Please, this is a very serious conversation about very serious things like an n-dimensional gender hyperspace! Please refrain from nonsensical ramblings.

I guess the real question is, what would best represent your eigenvectors?

[–] [email protected] 2 points 14 hours ago

You're 100% right that is the most logical extension from the basis of 1 bit m-f - I completely overlooked that!

I'm glad to stumble upon someone on the internet who has the same crossover of programming, math, and gender (so unlikely! I know!) as well as silly humour in this regard :D

[–] [email protected] 9 points 18 hours ago

Gender is a pointer

[–] [email protected] 8 points 19 hours ago

Now is the time for quantum computing

[–] [email protected] 7 points 20 hours ago

Why not a linked list? Or a hash-table?

[–] [email protected] 4 points 19 hours ago (1 children)
[–] [email protected] 2 points 16 hours ago (1 children)
import isFemale

def isMale(Person):
     if isFemale(Person):
          return False
     else:
          return True
[–] [email protected] 8 points 15 hours ago (1 children)
public boolean isMale() {
    return !isFemale();
}

public boolean isFemale() {
    return !isMale();
}
          
[–] [email protected] 5 points 10 hours ago

StackOverflowException was unhanded

[–] [email protected] 4 points 19 hours ago (1 children)

Gender is obviously a signed byte.

[–] [email protected] 3 points 8 hours ago* (last edited 8 hours ago) (1 children)

Gender is a struct

struct Gender {
  byte binaryBias;    ///Determines male (+) or female (-) bias if present
  ubyte binaryAm;    ///Determines the amount of binary gender(s) present
  bool isTrans;    ///True if assigned at birth gender does not equal with current one
  ubyte xenoAm;    ///Determines the amount of xenogender
  uint xenoGen;    ///Xenogender selection, 0 if not applicable
  Sex* sex;    ///Pointer to the person's current sex
}
[–] [email protected] 2 points 5 hours ago

Now this is a gender definition I can get behind. None of that string/enum crap, just raw data.