Just to be clear, the problem is actually not that the guy was being boring but that he was a monster.
Just Terrible
Submitted 2 months 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 2 months ago
MonkderVierte@lemmy.ml 2 months ago
I think actually it’s because he’s not himself.
micnd90@hexbear.net 2 months 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 2 months 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 2 months ago
So, I’m not alone… Thank you!
azi@mander.xyz 2 months 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 2 months ago
Almost every programming language uses 0.
keepcarrot@hexbear.net 2 months 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 2 months 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 2 months 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.
unionagainstdhmo@aussie.zone 1 month ago
MATLAB is for matrix calcs
Gonna have to correct you on that one. MATLAB is for self torture.
errer@lemmy.world 2 months ago
Like Matlab would give a fuck about anyone’s feelings
nossaquesapao@lemmy.eco.br 2 months 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 2 months ago
It was the footwear that was the issue.
driving_crooner@lemmy.eco.br 2 months ago
Need more fRiends
apocalypticat@lemmy.world 2 months ago
If they’re using MATLAB, wouldn’t the index start at 1?
Bertuccio@lemmy.world 2 months ago
thatsthejoke.jpg
i_love_FFT@lemmy.ml 2 months 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 2 months ago
Mathematicians and computer scientists are natural enemies.
apocalypticat@lemmy.world 2 months ago
Yeah this joke goes much deeper than I thought when I first commented.
eran_morad@lemmy.world 2 months ago
It’s like u want fencepost errors.
smeg@feddit.uk 2 months ago
Arrays start at zero, just like floors on a building
azi@mander.xyz 2 months ago
I’m with that guy. C was a mistake
gwilikers@lemmy.ml 2 months ago
Blasphemy!
lolcatnip@reddthat.com 2 months ago
Hate to break it to you, but almost every language uses 0-based indexing.
azi@mander.xyz 1 month ago
Yes, popularized by C
PixelProf@lemmy.ca 2 months ago
I love that friend group A is a gradient.
i_love_FFT@lemmy.ml 2 months ago
It’s the logo of the Matlab software.
toynbee@lemmy.world 2 months ago
I can barely maintain one personality … Maybe that’s why I don’t get invited to any parties.
propter_hog@hexbear.net 2 months ago
Matlab likes 1-indexed thingers
deegeese@sopuli.xyz 2 months ago
Nobody want to be seen talking to a guy wearing socks with sandals.
unexposedhazard@discuss.tchncs.de 2 months ago
The haters will hate until they try it themselves and learn thats its peak foot comfort.
oxideseven@lemmy.ca 2 months ago
Barefoot gang would like a word.
blarth@thelemmy.club 2 months ago
People who didn’t grow up in the pacific NW:
DarkDarkHouse@lemmy.sdf.org 2 months ago
I’d wear socks and sandals before starting an index at 1
kameecoding@lemmy.world 2 months ago
You have obviously never been to the Czech Republic
zalgotext@sh.itjust.works 2 months ago
Or the Midwest United States during pumpkin spice season