Earlier quoted context omitted.
Zero is not an ordinal number. There can be a vector element indexed with zero, but it is not "zeroth" element. Book chapter numbers are ordinal numbers.
But what is there to gain with this distinction? Just the convenience of having an ordinal number to say? Rather than saying "chapter 0, chapter 1, chapter 2" one can say "the fourth chapter"? Or is it the fact that the chapter with number 4 has 3 chapters preceding it? On first glance I find this all rather meaningless pedantry.
The Manuscripts of Edsger W. Dijkstra
41–50 of 129 posts
Re: The Manuscripts of Edsger W. Dijkstra
#42Re: The Manuscripts of Edsger W. Dijkstra
#43Seeing book sections or chapters starting with zero, always confuses me. I know that this convention is probably inspired by the fact that the addresses of memory locations start with zero. But that case was due to that fact one of the combination of the voltages can be all zeros. So, it's actually the count of combinations, and I don't think it can be used for ordinal enumeration of worldly things such as book chapt…
The first element in a collection at address 15 is at address 15. The offset of an element from the start is addr-start, so 15-15=0 for the first, 16-15=1 for the second, etc. that's why we start from 0, not because of voltages, at least in compsci.
Re: The Manuscripts of Edsger W. Dijkstra
#44Completely silly fact: knowing 0 about the guy except that he gave his name to the famous algorithm, I had somehow assumed he was Indian. Weird to see a white Dutchman in the picture.
(Curious) How did Edsger Dijkstra sound like an indian name to you?
I don’t think it was ever a conscious decision. It’s similar to how I always pictured Jane Austen as a sarcastic woman in her forties while reading her books, but she wrote her most famous works being borderline a teenager. Your mind just fills things up I guess.
Re: The Manuscripts of Edsger W. Dijkstra
#45Less likely to make mistakes if you can’t erase
Re: The Manuscripts of Edsger W. Dijkstra
#46Earlier quoted context omitted.
If you’re at a corner and someone asks for directions, you say “three blocks that way”. That means three blocks starting from here. Then what do you call “here”? The name for where you start from in this scenario is usually not required because it’s obvious what you mean and everyone understands the first block means you have to first walk a block, not that where you start is the first block. So in that sense yes we…
"here" is definitely not a zeroth block. As soon you start walking, you are in the first block. However, if you are numbering the separations (cuts) between the blocks, you can number that "here" as zero.
What is the name of the block from which you left to enter the first block? Before you started walking I mean.
And mustn’t that block be before that other first? When we move from where we start we count up, so then mustn’t an earlier block be counting down? Counting down would mean a number smaller than one.
And are blocks not counted in units, as whole numbers?
So would it not be the case that one block less than 1 must be by necessity the zeroth block?
In other words if you agree that “as soon as you start walking, you are in the first block”, then you must also agree that before you left you began in the zeroth block.
How else could it be interpreted?
Re: The Manuscripts of Edsger W. Dijkstra
#47This is a treasure (it’s been around quite a while). For those youngers out there: still completely relevant. Still ahead of the game, imho.
Re: The Manuscripts of Edsger W. Dijkstra
#48I once had one of his quote on the back of my business card when I was doing a lot of software dev consultancy: "Computer Science is no more about computers than astronomy is about telescopes". I keep meaning to sit down with this site and make my way through it all. Might make more progress if I grab them into an eReader-friendly format and then peruse them more easily when travelling.
Astronomy is not named "Telescope Science" though. ;-)
Re: The Manuscripts of Edsger W. Dijkstra
#49Something which I occasionally link to, is this: https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF >. It not only shows why computer languages should start their indexes at 0 (instead of 1), but also shows why intervals should be specified as lower-inclusive and upper-exclusive.
The IBM 704's index registers were decrementing, subtracting their contents from an instruction's address field to form an effective address.
Type A instructions had a three bit tag, indicating which index registers to use.
With those three indexes you get Fortran’s efficient 7D column major arrays. This made data aggregation much more efficient and Cray/Cuda/modern column oriented DBs do similar.
But for Algol-like languages on PDP inspired hardware I do like his convention, if like the example you have a total ordering on the indexes.
But Fortran also changed the way it was taught, shifting from an offset from memory that was indexed down from an address, which makes sense when the number of bits in an address space changes based on machine configuration, to index values.
Technically Fortran, at least in word machines meets his convention.
pointer + offset
It is just the offset is always negative.Re: The Manuscripts of Edsger W. Dijkstra
#50Completely silly fact: knowing 0 about the guy except that he gave his name to the famous algorithm, I had somehow assumed he was Indian. Weird to see a white Dutchman in the picture.