729
Just Terrible (mander.xyz)
all 44 comments
sorted by: hot top controversial new old
[-] deegeese@sopuli.xyz 52 points 1 month ago

Nobody want to be seen talking to a guy wearing socks with sandals.

[-] unexposedhazard@discuss.tchncs.de 21 points 1 month ago

The haters will hate until they try it themselves and learn thats its peak foot comfort.

[-] oxideseven@lemmy.ca 5 points 1 month ago

Barefoot gang would like a word.

[-] unexposedhazard@discuss.tchncs.de 2 points 1 month ago

When its warm enough i agree

[-] blarth@thelemmy.club 1 points 1 month ago

People who didn’t grow up in the pacific NW:

[-] DarkDarkHouse@lemmy.sdf.org 7 points 1 month ago

I’d wear socks and sandals before starting an index at 1

[-] kameecoding@lemmy.world 3 points 1 month ago

You have obviously never been to the Czech Republic

[-] zalgotext@sh.itjust.works 3 points 1 month ago

Or the Midwest United States during pumpkin spice season

[-] i_love_FFT@lemmy.ml 2 points 1 month ago

Or to any woung people from 2000 onwards. To them, specifically white socks with slip-in sandals is a perfectly good choice of footwear!

[-] bitcrafter@programming.dev 31 points 1 month ago

Just to be clear, the problem is actually not that the guy was being boring but that he was a monster.

[-] MonkderVierte@lemmy.ml 2 points 1 month ago

I think actually it's because he's not himself.

[-] micnd90@hexbear.net 28 points 1 month ago* (last edited 1 month ago)

MATLAB is for matrix calcs. Matrix indices start at 1, fight me. Given a matrix X of m x n size, you write

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. This is how you learn matrix indices in intro linear algebra. How is it make sense then you use a software to assist computation and start indexing at 0, while you write the equations and indices on a piece of paper you start at 1. CS majors go home.

[-] SomethingBurger@jlai.lu 14 points 1 month 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 points 1 month ago

So, I'm not alone... Thank you!

[-] azi@mander.xyz 2 points 1 month ago* (last edited 1 month 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 (eg by using references instead).

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. This also 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 (though the latter is moreso from the less willy-nilly pointers in general)

[-] lolcatnip@reddthat.com 1 points 1 month ago

Almost every programming language uses 0.

[-] keepcarrot@hexbear.net 4 points 1 month 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 points 1 month 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.

[-] keepcarrot@hexbear.net 3 points 1 month ago

Is linear algebra older than 0? Hang on (no, it is not, formalised in 17th century)

In my CS course, at least, it was treated as "engineering", so we did both linear algebra and C programming. For everyone counting from 1 was more natural and the C method had to be taught a few times throughout the course (starting with java loops, which wasn't used for malloc, OOP was probably the first unit anyone did for CS). As a habit it tended to stick even where we didn't really use it (or in languages that don't, e.g. lua), given how grueling C programming was and the other languages that were downstream of it.

I guess you could analogise things like saying "17th century" is 1600-1699 (first century is 0001 to 0099, I guess), in CS you are counting the very start of a thing (e.g. how many apple-widths to get to the first apple), vs the more common how many apples to have gotten the first apple. Or something, idk,

I'm drunk and avoiding housework, sorry

There is no general convention in mathematics and linear algebra to index from 1. It highly depends on the department and person and it’s becoming more common to index from 0.

[-] DannyBoy@sh.itjust.works 1 points 1 month 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 23 points 1 month ago

Like Matlab would give a fuck about anyone’s feelings

[-] nossaquesapao@lemmy.eco.br 18 points 1 month 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 17 points 1 month ago

It was the footwear that was the issue.

[-] driving_crooner@lemmy.eco.br 14 points 1 month ago

Need more fRiends

[-] apocalypticat@lemmy.world 10 points 1 month ago

If they're using MATLAB, wouldn't the index start at 1?

[-] Bertuccio@lemmy.world 18 points 1 month ago

thatsthejoke.jpg

[-] i_love_FFT@lemmy.ml 12 points 1 month 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 6 points 1 month ago

Mathematicians and computer scientists are natural enemies.

[-] anton@lemmy.blahaj.zone 2 points 1 month ago

Like mathematicians and physicists.

[-] apocalypticat@lemmy.world 1 points 1 month ago

Yeah this joke goes much deeper than I thought when I first commented.

[-] eran_morad@lemmy.world 10 points 1 month ago

It’s like u want fencepost errors.

[-] smeg@feddit.uk 7 points 1 month ago

Arrays start at zero, just like floors on a building

[-] FourThirteen@lemmy.world 5 points 1 month ago

Hi, what is this meme format called?

[-] toynbee@lemmy.world 4 points 1 month ago

I can barely maintain one personality ... Maybe that's why I don't get invited to any parties.

[-] PixelProf@lemmy.ca 4 points 1 month ago

I love that friend group A is a gradient.

[-] i_love_FFT@lemmy.ml 2 points 1 month ago

It's the logo of the Matlab software.

[-] azi@mander.xyz 2 points 1 month ago

I'm with that guy. C was a mistake

[-] gwilikers@lemmy.ml 5 points 1 month ago
[-] lolcatnip@reddthat.com 1 points 1 month ago

Hate to break it to you, but almost every language uses 0-based indexing.

[-] azi@mander.xyz 4 points 1 month ago

Yes, popularized by C

[-] propter_hog@hexbear.net 1 points 1 month ago

Matlab likes 1-indexed thingers

this post was submitted on 19 Oct 2024
729 points (98.7% liked)

Science Memes

11189 readers
3156 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.

This is a science community. We use the Dawkins definition of meme.



Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS