• @CanadaPlus@lemmy.sdf.org
    link
    fedilink
    -1
    edit-2
    8 months ago

    Why the fuck would you spell it “1st” if it’s not 1?

    Edit: Which is not pronounced “onest”. I think people might be missing the point here; I’m actually a fan of zero indexing.

    • @0ops@lemm.ee
      link
      fedilink
      88 months ago

      I feel like the joke would’ve landed better if it said “first”. I know it’s pronounced the same way, but I’m gonna argue anyway that there’s a subtle difference. I’ve heard 0th used in cs to describe what was at the 0-index, so in that context 1st would be"second", but “first” generally means “nothing before it”. English is weird. I wonder if anyone knows whether the word “first” or “1st” came 1st (lol)?

      • @CanadaPlus@lemmy.sdf.org
        link
        fedilink
        2
        edit-2
        8 months ago

        Ordinal vs. cardinal. It’s “first” not “onest”, right? Even the ancient proto-Germanic speakers could tell there’s a difference. (In fact, it’s basically a contraction of “foremost”, and has nothing to do with numbers; their weak numeracy was an advantage on this topic)

        If we weren’t implicitly choosing 1-indexing it would be 1nd for “second” (and still not “onend” or something). That breaks down once you get to third and fourth, though.

    • @psud@aussie.zone
      link
      fedilink
      18 months ago

      They said 1st as an abbreviation of first (it’s a normal abbreviation 1st, 2nd, 3rd … 7th abbreviate first, second, third … seventh)

    • @ElectricMoose@lemmy.world
      link
      fedilink
      18 months ago

      Interestingly, we’ve got the same glitch in the Gregorian calendar, where the year 0 doesn’t exist. So the 21st century started in 2001…

      • @CanadaPlus@lemmy.sdf.org
        link
        fedilink
        1
        edit-2
        8 months ago

        Yup. We should really zero-index century names and years AD/BC as well, but we don’t. If we were still using Roman numerals it would be no big deal, but we rarely do, so there’s a confusing clash. I’m not sure if it was this programming humour community or another where I had a big exchange on the topic before.

        I suppose you could have some kind of positional system that’s one-indexed, so 999AD = 1111999AD, and 2000 would be written 2111, but you’d have to completely redo the way arithmetic works, and that defeats the point a bit. And, the new 999 would not be our 999, because it’s effectively base 9.

  • pelya
    link
    fedilink
    618 months ago

    In the UK it’s called a ground table.

    • @xmunk@sh.itjust.works
      link
      fedilink
      38 months ago

      Yes, and if he texted “Hey, I’m at the zeroith table” and the woman replied with the sibling comment then you know to run far and run fast.

    • @TwilightKiddy@programming.dev
      link
      fedilink
      English
      28
      edit-2
      8 months ago

      There is no such thing as “zeroith”. Does not matter which numbers you slap on the tables, the one with the lowest number will always be the first. The word “first” has nothing to do with indices, it’s just an antonym for “last”.

      • @0ops@lemm.ee
        link
        fedilink
        68 months ago

        I kind of brought this up in another comment, that “first” and “1st” aren’t really the same thing. Which is confusing when you extend that to fourth/4th five/5th. I don’t generally see someone write “zeroith”, but I’ll see “0th”.

        • @psud@aussie.zone
          link
          fedilink
          48 months ago

          First and 1st are certainly different symbols for the same concept

          The spelling for the index before the first is zeroth, no need to insert an extra vowel

      • lad
        link
        fedilink
        English
        6
        edit-2
        8 months ago

        There’s no such thing as “zeroith” because it’s called “zeroth — being numbered zero in a series”

        This works for building storeys, this would work equally well for tables. The only reason this is not used often is because the series are rarely zero-based in anything that doesn’t also want to equate index and offset.

        You’re right that first may be read as “opposite of last”, that would add to the confusion, but that’s just natural language not being precise enough.

        Edit: spelling

        Edit2: also, if you extend that logic, when you’re presented with an ordinal number, you would need to first check all the options, sort them, and then apply the position you’re asked, that’s not really how people would expect ordinal number to be treated, not me, at the very least

  • 🇨🇦 tunetardis
    link
    fedilink
    English
    58 months ago

    This could be why Obiwan wound up a hermit? (Programmers of my generation at least talk about “Obiwan errors” because his name sounds like “off-by-one”.)

  • @netvor@lemmy.world
    link
    fedilink
    548 months ago

    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.

  • @NateNate60@lemmy.world
    link
    fedilink
    -6
    edit-2
    8 months ago

    Bullshit.

    Every programmer knows that 'A' in ['A', 'B', 'C', 'D'] would be the 0th item; the first item is 'B'

      • @psud@aussie.zone
        link
        fedilink
        2
        edit-2
        8 months ago

        If you want to be both wrong and confusing

        If you want to use correct English and be clear don’t use ordinals: Say “index 0, index 1” etc

        Save ordinals for contexts without indices: the first time through this loop, the last record"

      • @NateNate60@lemmy.world
        link
        fedilink
        2
        edit-2
        8 months ago

        That’s because the word “first” in first() uses one-based indexing. In true programmer fashion it would have been called zeroth() but that is wholly unintuitive to most humans.

        I maintain that the element with the lowest index is called the “zeroth” element in zero-based indexing and “first” in one-based indexing. The element with index N is the Nth element.

        • @communism@lemmy.ml
          link
          fedilink
          68 months ago

          No, there is simply no such thing as “zeroth”, that’s not how ordinal numbers work. If I have the following numbered list:

          1. Foo

          2. Bar

          3. Baz

          The first item is “Foo” which is indexed 5. It is not the fifth item, because the item indexed 5 comes first in the list, so the item indexed 5 is the first item. Ordinal numbers don’t refer to index, they refer to order.

          • @xmunk@sh.itjust.works
            link
            fedilink
            18 months ago

            Foo is both the first and fifth item - Foo is the first item in that segment (or slice if you’re a weird golang programmer) but it is also the fifth item in some sir-not-appears-in-this-film list that is responsible for the odd numbering. If I said “I just finished the fifth item on our todo list” you’d mark off Foo because that’s clearly what I was referring to.

            Places can have two labels (or more!) and, for bonus points, zeroth is a thing because we both know what that word means.

          • @NateNate60@lemmy.world
            link
            fedilink
            2
            edit-2
            8 months ago

            Okay, I will admit, you got me there. I did confuse indexing with numbering. From now on I will use the term “numbering” instead.

            It is entirely how ordinal numbers work in zero-based numbering. There is no “right way” for ordinal numbers to work. You can create a valid ordinal numbering system starting from any integer, or just some other ordered list. You cannot assume one-based numbering is “correct” and use it as an argument against numbering beginning from any other number.

            I encourage you read up what is meant by “zero based numbering” because you and everyone else who has replied to me has tried to use “but that’s not how it works in one-based numbering” as an explanation for why I’m wrong. This is as nonsensical of an argument as trying to say i (the imaginary unit) is not a number because it’s not on the number line. It’s only not a number in the domain of the real numbers. Similarly, zero-based numbering is only nonsensical in the context of one-based indexing.

            Zero-based numbering would number “foo” as the zeroth element, “bar” as the first element, and “baz” as the second element. “zeroth”, “first”, and “second” are labels representing ordinals. Your list has a length of 3 (which is a cardinal quantity unrelated to ordinals).

            Although, I would like to point out, it is perfectly valid to construct an ordinal labelling system that assigns “fifth” to the element with the lowest index, “sixth” to the next, and so on. That system is mathematically coherent but it is just troublesome to when it comes time to convert ordinal numbers (such as the index of the last fence-post) to cardinal numbers (such as the length of fence to buy).

            But this is now getting into the weeds of pure mathematics and most people here are engineers.

        • Melmi
          link
          fedilink
          English
          08 months ago

          Indexes start from zero because they’re memory offsets, but array[0] is still the first element because it’s an ordinal number, not an offset. It’s literally counting each element of the array. It lines up with the cardinality—you wouldn’t say ['A', 'B', 'C'] has two elements, despite array[2] being the last element.

          • @NateNate60@lemmy.world
            link
            fedilink
            2
            edit-2
            8 months ago

            Zero-based indexing redefines the meaning of the labels “first”, “second”, “third”, and so on. It adds a new label, “zeroth”, which has the same ordinal value as “first” in one-based indexing. The word “first” does not mean “the element with the lowest index” in zero-based indexing.

            If you are using a zero-based numbering system, you would absolutely say that array[2] is the final element in the array, that element having the ordinal label “second”, and yet the length of the array is 3 (cardinal). There is no fundamental connection between the ordinal labels “zeroth”, “first”, “second”, and “third” and the cardinal numbers 0, 1, 2, and 3. The similarities are purely an artefact of human language, which is arbitrary anyway. You can make an equally mathematically valid ordinal numbering system that assigns “third” to the element with the smallest index, “fourth” to the next-smallest, and so on. That ordinal numbering system is mathematically coherent and valid, but you’re just causing trouble for yourself when it comes time to convert those ordinals (such as array indexes) into cardinals (such as memory locations or lengths of fencing to buy).

            You can make an argument for why one-based numbering is more convenient and easier to use, but you cannot use the notion that zero-based numbering doesn’t make sense given the assumed context of one-based numbering as an argument for why zero-based numbering is invalid.

            I encourage you read up what is meant by “zero based numbering” because you and everyone else who has replied to me has tried to use “but that’s not how it works in one-based numbering” as an explanation for why I’m wrong. This is as nonsensical of an argument as trying to say i (the imaginary unit) is not a number because it’s not on the number line. It’s only not a number in the domain of the real numbers. Similarly, zero-based numbering is only nonsensical in the context of one-based indexing.

            It does not matter why indexes start from zero. The memory offset argument is only salient if you are using it as an argument for why computers should use zero-based numbering.

            • Melmi
              link
              fedilink
              English
              1
              edit-2
              8 months ago

              Yeah, fair enough. To my mind I guess I don’t think of array indexes as an example of actual zero based numbering, simply a quirk of how pointers work. I don’t see why one starting from zero has anything to do with the other starting from zero. They’re separate things in my head. Interestingly, the article you linked does mention this argument:

              Referencing memory by an address and an offset is represented directly in computer hardware on virtually all computer architectures, so this design detail in C makes compilation easier, at the cost of some human factors. In this context using “zeroth” as an ordinal is not strictly correct, but a widespread habit in this profession.

              That said, I suppose I still use normal one-based numbering because that’s how I’m used to everything else working.

        • @dave@feddit.uk
          link
          fedilink
          English
          28 months ago

          Most humans wouldd never write the word first followed by (). It absolutely should have been zeroth(), and would not cause any confusion amongst anyone who needed to write it.

          • @JustAnotherRando@lemmy.world
            link
            fedilink
            78 months ago

            It absolutely should not have been named zeroth() because the reasoning for that is purely pedantic and ignores WHY arrays are 0 indexed. It’s not like the people in the early days of writing programming languages were saying “the zeroth item in the array” - they would refer to it using human language because they are humans, not machines. Arrays are 0 indexed because it’s more efficient for address location. To get the location in memory of an array item, it’s startingAddress + (objectSize * index). If they were 1 indexed, the machine would have to reverse the offset.
            Function/Method names, on the other hand, should be written so as to make the most sense to the humans reading and writing the code, because the humans are the only ones that care what the name is. When you have an array or list, it’s intuitive to think “I want the first thing in the array” or “I want the last thing in the array),” so it makes sense to use first and last. That also makes them intuitive counterparts (what would be the intuitive counterpart to “zeroth”?).

            • @NateNate60@lemmy.world
              link
              fedilink
              38 months ago

              My argument is purely pedantic. Pedantry is the lifeblood of programmer “humour”.

              I’m not arguing that we should adopt zero-based numberingin real-life human applications. I am arguing that in zero-based numbering, the label “zeroth” refers to the same ordinal as “first” in one-based numbering. I am poking fun at the conversion between human one-based numbering and computers’ zero-based numbering. That is why I am saying it should be called zeroth(); because human language should adapt to match the zero-based numbering their tools use. Whether I actually mean what I say—well, I leave that up to you.

              It does not matter why indexes start from zero in computing. The memory offset argument is only salient if you are using it as an argument for why computers should use zero-based numbering. It is not an argument against the properties of zero-based numbering itself.

            • @dave@feddit.uk
              link
              fedilink
              English
              28 months ago

              Function/Method names, on the other hand, should be written so as to make the most sense to the humans reading and writing the code

              Of course—that’s why we have such classics as stristr(), strpbrk(), and stripos(). Pretty obvious what the differences are there.

              But to your point, the ‘intuitive’ counterpart to ‘zeroth’ is the item with index zero. What we have is a mishmash of accurate and colloquial terms for the same thing.

    • tiredofsametab
      link
      fedilink
      18 months ago

      I’ve been a software engineer for almost 20 years now. ‘A’, at index 0*, is the first thing in the array.

      * well, unless you’re using some language that actually is not zero-indexed. I think LUA is one?

        • tiredofsametab
          link
          fedilink
          18 months ago

          So, based on

          Every programmer knows that ‘A’ in [‘A’, ‘B’, ‘C’, ‘D’] would be the 0th item; the first item is ‘B’

          You’re saying I can’t be a programmer because I speak English?

          • @NateNate60@lemmy.world
            link
            fedilink
            18 months ago

            No, what I said is true if you use zero-based numbering. But when communicating with others in English, the label “first” refers to the element with the smallest index. In zero-based numbering, the label “zeroth” refers to the element with the lowest index. It’s just not the default in English, but you can definitely use zero-based numbering in English if you’re willing to edit the configuration files.

          • @psud@aussie.zone
            link
            fedilink
            18 months ago

            Calling index zero the first is correct, but risks misunderstandings such as in the op comic

            That is why many call index zero the zeroth index

  • @drunkpostdisaster@lemmy.world
    link
    fedilink
    698 months ago

    And then he texts back ‘where are you?’ And then she texts back ‘the first table’ and he replies ‘umm I’m here too. But I don’t see you’ confused she asks him ’ table 0p?’ And then ‘01*?’ He says ‘no, 00.’ Releaved she says ‘lol I am at table 01’ he chuckles ‘I am at 00, I’ll go find you’

    Later they get married and have kids. But relationship collapses and it ruins both of them and they cannot find the heart to love anyone again. Their children grow up broken and struggle through life. Some get arrested end up in prison, all of them repeatedly fall into a series of toxic relationships for the rest of their lives.

    • @PolarisFx@lemmy.dbzer0.com
      link
      fedilink
      48 months ago

      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