Just to be clear, the problem is actually not that the guy was being boring but that he was a monster.
Just Terrible
Submitted 4 days ago by fossilesque@mander.xyz to science_memes@mander.xyz
https://mander.xyz/pictrs/image/c0df77be-299d-4482-8f54-ad4b21fa950b.jpeg
Comments
bitcrafter@programming.dev 4 days ago
MonkderVierte@lemmy.ml 4 days ago
I think actually it’s because he’s not himself.
micnd90@hexbear.net 4 days ago
MATLAB is for matrix calcs. Matrix indices start at 1, fight me. Given a matrix X of 2x2 size, you write
x_11 x_12
x_21 x_22
Matlab has many issues, amongst other accessibility (which can be remedied by piracy), closed-software, but as a program designed to do computational matrix manipulation, starting at index 1 is literally correct. CS majors go home.
SomethingBurger@jlai.lu 4 days ago
Starting at 0 makes sense in low-level languages like C because it’s not really an index but a memory offset. Higher level languages like SQL or MatLab correctly start at 1 because they abstract memory management away. Other languages without manual memory management, such as JavaScript or Python, are incorrectly starting their arrays at 0.
flyos@jlai.lu 3 days ago
So, I’m not alone… Thank you!
azi@mander.xyz 3 days ago
It’s worth noting that a number of languages comparable C in use case and performance (including its predecessors COBOL, Fortran and ALGOL) start indexing at 1 just fine because they have proper array types and don’t make heavy use of pointers poking and peeking wherever they like.
Decoupling indices from memory offsets doesn’t get in the way of performance and actually often allows better optimization because the compiler knows you aren’t sharing pointers between arrays or some other shenanigans (see Fortran, the GOAT of fast array processing). Also in many cases it allows improved type safety and thus memory safety (see index types in Ada/SPARK and the fact that it’s the only ‘legacy’ language that’s gotten comprehensive compile-time memory safety analysis)
lolcatnip@reddthat.com 3 days ago
Almost every programming language uses 0.
unionagainstdhmo@aussie.zone 2 days ago
MATLAB is for matrix calcs
Gonna have to correct you on that one. MATLAB is for self torture.
keepcarrot@hexbear.net 4 days ago
Is there a reason for the convention other than that’s how most people count? (Which is a perfectly fine reason, I’m just curious)
micnd90@hexbear.net 4 days ago
When you say the first element of a matrix, first implies one and not zero. This is how linear algebra was invented (on paper, by a human mathematician), taught, and passed down to fellow humans.
Starting indexes at zero stem from the lineage of C programming and binary nature of computer. For example,
Computer memory addresses have 2^N cells addressed by N bits. Now if we start counting at 1, 2^N cells would need N+1 address lines. The extra-bit is needed to access exactly 1 address. (1000 in the above case.). Another way to solve it would be to leave the last address inaccessible, and use N address lines.
This is why, math and physics people who learn linear algebra and matrix calculus learn to index at 1 (on a piece of paper) while computer science programmers index at 0.
DannyBoy@sh.itjust.works 4 days ago
It’s from when arrays were just a block of memory and the index was the offset. So you’d start at pointer x and read memory from there. x + i was your memory location. So you’d start at x + 0 to read your first data element. x + 1 would be the location in memory of the second element.
errer@lemmy.world 4 days ago
Like Matlab would give a fuck about anyone’s feelings
nossaquesapao@lemmy.eco.br 4 days ago
This is the first time that I see this meme and I’m on the friend group B side, now I know how it feels.
jaggedrobotpubes@lemmy.world 4 days ago
It was the footwear that was the issue.
driving_crooner@lemmy.eco.br 4 days ago
Need more fRiends
apocalypticat@lemmy.world 4 days ago
If they’re using MATLAB, wouldn’t the index start at 1?
Bertuccio@lemmy.world 4 days ago
thatsthejoke.jpg
i_love_FFT@lemmy.ml 3 days ago
Group A starts indexing at 1. Group B at 0.
To me, the second layer of the joke is that the choice of starting number is significant enough that the author considers it to be two distinct personalities!
lolcatnip@reddthat.com 3 days ago
Mathematicians and computer scientists are natural enemies.
apocalypticat@lemmy.world 3 days ago
Yeah this joke goes much deeper than I thought when I first commented.
smeg@feddit.uk 3 days ago
Arrays start at zero, just like floors on a building
eran_morad@lemmy.world 4 days ago
It’s like u want fencepost errors.
PixelProf@lemmy.ca 4 days ago
I love that friend group A is a gradient.
i_love_FFT@lemmy.ml 3 days ago
It’s the logo of the Matlab software.
azi@mander.xyz 4 days ago
I’m with that guy. C was a mistake
gwilikers@lemmy.ml 3 days ago
Blasphemy!
lolcatnip@reddthat.com 3 days ago
Hate to break it to you, but almost every language uses 0-based indexing.
azi@mander.xyz 2 days ago
Yes, popularized by C
toynbee@lemmy.world 4 days ago
I can barely maintain one personality … Maybe that’s why I don’t get invited to any parties.
propter_hog@hexbear.net 4 days ago
Matlab likes 1-indexed thingers
deegeese@sopuli.xyz 4 days ago
Nobody want to be seen talking to a guy wearing socks with sandals.
unexposedhazard@discuss.tchncs.de 4 days ago
The haters will hate until they try it themselves and learn thats its peak foot comfort.
oxideseven@lemmy.ca 3 days ago
Barefoot gang would like a word.
blarth@thelemmy.club 3 days ago
People who didn’t grow up in the pacific NW:
DarkDarkHouse@lemmy.sdf.org 3 days ago
I’d wear socks and sandals before starting an index at 1
kameecoding@lemmy.world 3 days ago
You have obviously never been to the Czech Republic
zalgotext@sh.itjust.works 3 days ago
Or the Midwest United States during pumpkin spice season