15 points

I still mess this up for lists in Python…

permalink
report
reply
45 points

It’s for the best

permalink
report
reply
10 points

I love how they’re looking at each other

permalink
report
reply
4 points

God yes, you can clearly see from the background scene that while at different tables they can clearly see each other. All this bickering is madness

permalink
report
parent
reply
17 points

Wouldn’t it be nice if documentation used the words index and offset consistently?

permalink
report
reply
2 points

Aren’t those two the same thing? At least in C-style arrays, which might not be how they’re handled under the hood, but is at least how most languages present it to the programmer.

permalink
report
parent
reply
3 points

in my understanding offset is technically the “relative index”, or how much you have to go further

permalink
report
parent
reply
4 points

Yes they are presented in the programmer wrong. The first thing in memory should have offset 0 and index 1

permalink
report
parent
reply
10 points

The problem is that they both are contextual and can mean any position in a list/array. The starting index or starting offset is generally zero, but could be one, depending on the language used.

permalink
report
parent
reply
4 points

i wonder why people haven’t made a language that starts indexing at 2 yet. maybe some day

permalink
report
parent
reply
4 points

Maybe this could be a feature in brainfuck or COBOL.

permalink
report
parent
reply
2 points

Dreamberd starts array indexing at -1 instead of 0 or 1.

https://github.com/TodePond/DreamBerd

permalink
report
parent
reply
50 points

Don’t wanna state the obvious, but it looks like they still ended up staring at each other for the rest of the evening.

They have shown that they still love each other, so hope they can work with their one irreconcilable difference.

permalink
report
reply
36 points

I love the idea that they’re at two adjacent tables, each one staring at the other wondering why they hate them.

permalink
report
parent
reply
8 points

They hate each other because they are intolerant to one another’s index choices

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.3K

    Monthly active users

  • 884

    Posts

  • 8.9K

    Comments

Community moderators