Numbering should start at π (2025) (umars.edu) Seriously, it all depends on whether u're counting the items themselves (1-based) or the spaces btwn them (0-based). The former uses natural numbers, while the latter uses non-negative integers For instance, when dealing with memory words, do u address the word itself or its starting location (the first byte)? The same consideration applies to coordinate systems: r u pos…
Why do you write “you” as “u” here? I don’t want to be rude, but it’s very jarring to see juvenile txt-speak in a serious discussion.
Numbering should start at zero (1982)
221–230 of 309 posts
Re: Numbering should start at zero (1982)
#222Earlier quoted context omitted.
Sam Altman: https://x.com/sama
I knew who it was, sorry, I was just trolling. Both twitter and AI-bro culture are extremely distasteful to me so I thought citing an AI bro’s twitter account as an example of how it’s acceptable to behave online was absurd.
Re: Numbering should start at zero (1982)
#223Perhaps ideally we'd change English to count the "first" entry in a sequence as the "zeroth" item, but the path dependency and the effort required to do that is rather large to say the least. At least we're not stuck with the Roman "inclusive counting" system that included one extra number in ranges* so that e.g. weeks have "8" days and Sunday is two days before Monday since Monday is itself included in the count. *…
Re: Numbering should start at zero (1982)
#224Earlier quoted context omitted.
Your arguments using "first" and "second" are invalid, because those words have nothing to do with numbers, like also "last". If you argue based on English, you should point only to the ordinals "third", "fourth" and the like. In the older European languages, the initial position in a sequence was named using words like "first", which mean "closest to the front". The next position was named with words meaning "the ot…
> Your arguments using "first" and "second" are invalid, > because those words have nothing to do with numbers "First" is the ordinal number corresponding to the number one, while "second" is the ordinal number corresponding to the number two. You can represent "first" as 1st and "second" as 2nd. I believe the origins of these two words do not significantly impact my argument.
The abbreviations "1st" and "2nd" are very recent and they cannot be used as an argument that there is a long tradition of correspondence between "first" and "one".
Like I have said, the correct argument based on English is that the position after the second is called "third", which is derived from "three", and the next position is called "fourth" from "4", so extrapolating backwards that sequence results in decrementing "3", which gives a correspondence between "2" and "second", and decrementing the number once more gives a correspondence between "1" and "first".
This is the exact reasoning that has lead to the abbreviations "1st" and "2nd", which have no relationship with the pronunciation or the meaning of the abbreviated words, which mean "closest to the front" and "the following", meanings that are unrelated to any numbers.
Re: Numbering should start at zero (1982)
#225I found it devastating that there are no distinct agreed-upon words denoting zero- and one-based addressing. Initially I thought that the word "index" clearly denotes zero-base, and for one-base there is "order", "position", "rank" or some other word, but after rather painful and humiliating research I stood corrected. ("Index" is really used in both meanings, and without prior knowledge of the context, there is real…
I humbly submit '1ndex' and 'ind0x', or '1dx' and 'i0x'.
Re: Numbering should start at zero (1982)
#226Re: Numbering should start at zero (1982)
#227Re: Numbering should start at zero (1982)
#228Earlier quoted context omitted.
I always thought: - Offset: 0-based - Index: 1-based
That sounds reasonable at first, but humans are messy and so the distinction is not always clear. For example, in music we use numbers for the notes of a scale (G is the 5th of C, because in the C major scale: C=1, D=2, E=3, F=4, G=5, A=6, B=7). The numbers are clearly indices for the notes of the scale. But we often think of stuff like: what's the 3rd of the 5th -- that is, get the note at the 5th position (G in our…
Re: Numbering should start at zero (1982)
#229Perhaps ideally we'd change English to count the "first" entry in a sequence as the "zeroth" item, but the path dependency and the effort required to do that is rather large to say the least. At least we're not stuck with the Roman "inclusive counting" system that included one extra number in ranges* so that e.g. weeks have "8" days and Sunday is two days before Monday since Monday is itself included in the count. *…
Yes, we are. C gives pointers one past the end of an array meaningful semantics. That's in the standard. You can compare them and operate on them but not de-reference them.
Amusingly, you're not allowed to go one off the end at the beginning of a C or C++ array. (Although Numerical Recipes in C did it to mimic FORTRAN indices.) So reverse iterators in C++ are not like forward iterators. They're off by 1.
[1] https://devblogs.microsoft.com/oldnewthing/20211112-00/?p=10...
Re: Numbering should start at zero (1982)
#230Earlier quoted context omitted.
-1 is correct, there is no -0. The math works correctly the Python way.
Indexing is not really math, it's a reference-system which is using numbers for convenience. You could use letters or even emojis to get the same result.