Live data from Hacker News

Numbering should start at zero (1982)

cs.utexas.edu

251–260 of 309 posts

Re: Numbering should start at zero (1982)

#251
post #187

Earlier quoted context omitted.

Zero is a natural number. It is in the axioms of Peano arithmetic, and any other definition is just teachers choosing a taxonomy that best fits their lesson.

> Zero is a natural number. It is in the axioms of Peano arithmetic, and any other definition is just teachers choosing a taxonomy that best fits their lesson. It is, but it need not be. In the category of pointed sets with endofunctor, (Z_{\ge 1}, 1, ++) and (Z_{\ge 0}, 0, ++) are isomorphic (to each other, to (Z_{\ge 937}, 937, ++), and to any number of other absurd models), so either would do equally well as a mod…

I think I’m missing something here. PA defines x * 0 = 0 for all x. So while we could take (Z+, 1, ++) as a model of it, we would be imposing a completely different definition of multiplication than the usual. Would this not be simply choosing to label 1 as 0 and work from there?

Re: Numbering should start at zero (1982)

#252

Earlier quoted context omitted.

He also hated Lisp

I don't know of evidence that he did. But Dijkstra left us a famous quote: "LISP has jokingly been described as “the most intelligent way to misuse a computer”. I think that description a great compliment because it transmits the full flavour of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts." This is obviously a compliment; it even mentions that word.…

"I must confess that I was very slow on appreciating LISP’s merits. My first introduction was via a paper that defined the semantics of LISP in terms of LISP, I did not see how that could make sense, I rejected the paper and LISP with it."

https://www.cs.utexas.edu/~EWD/transcriptions/EWD12xx/EWD128...

Re: Numbering should start at zero (1982)

#253
post #192

Earlier quoted context omitted.

> zero represents an absence of quantity and doesn't appear in Nature From one point of view, zero never appearing in nature is exactly an example of it appearing in nature! From another point of view, do you not think a prairie dog has ever asked another prairie dog, "how many foxes are out there now?" with the other looking and replying "None! All clear!"? Crows can count to at least 5, and will count down until th…

> From another point of view, do you not think a prairie dog has ever asked another prairie dog, "how many foxes are out there now?" with the other looking and replying "None! All clear!"? type PrairieDogFoxCount = NoFoxesAllClear | SomeFoxes 1..5 | TooManyFoxes type CrowCount = Some 1..5 | UpsideDown 5..1 type HumanProgrammerCount = 0..MAXINT type HumanMathematicianCount = 0..∞ My point is: "No Foxes - All Clear" is…

> using this definition everything is Natural, including fore example Complex numbers, which is obviously incorrect

No, that's not "obviously incorrect", nor does it invalidate my argument: that is my exact argument. Complex numbers appear in electromagnetism, in exactly the same sense of "appear", as whole numbers appear in herds of sheep. Which is to say, it's the simplest and most useful model of the situation. And what's more natural than one of the four fundamental forces of nature? And the weak & strong nuclear forces have even more esoteric math structures appearing in their most parsimonious models as well.

> "No Foxes - All Clear" is not the same thing (the same level of abstraction) as 0.

In your model. In my model, it is the same thing. All models are wrong; some models are useful. Which one is more useful? Almost always, the one with 0 as a natural number. What about this:

    type PrairieDogFoxCount = NoFoxesAllClear | JustOneFox | ACoupleOfFoxes | SeveralFoxes 3..5 | ManyFoxes
I can make any model as complex as I want; that does not prove some other model wrong.

Re: Numbering should start at zero (1982)

#254
post #247
post #178

Where I live and maybe where you live our ages are zero based although no one seems to like me calling their baby zero years old.

Well, "three months old" does sort of imply "zero years and three months". But thank you for reminding me that I am zero centuries old. More decades old than I would like, but zero centuries.

Just a youngster!

Re: Numbering should start at zero (1982)

#255
post #220

Earlier quoted context omitted.

Reddit does it

[citation needed] I've never seen that claim before. I can imagine that some subreddits do something silly like this but Reddit itself?

Sorry you’re right. Some subreddits do, they display a little prompt explaining it before you reply.

Re: Numbering should start at zero (1982)

#256
post #52

Earlier quoted context omitted.

A lot of Lua users are kids playing Luanti or Roblox or WoW who also spend a little time modding them—mostly editing textures or 3-D model meshes, but also scripting. Lua is a small and simple language which can be learned easily, prefers to produce incorrect answers instead of throwing exceptions when confronted with ambiguous situations (for example, permitting undeclared variables), has an interactive REPL, is mem…

Okay, fair enough. I stand corrected.

I didn't intend to be correcting you. You weren't factually incorrect about anything; you just have different objectives than Lua's designers.

Re: Numbering should start at zero (1982)

#257
post #209
post #11

I 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 mean, I think "ordinal" and "zordinal" would work.

or Ordinal and Cardinal, meaning ordering and counting respectively

Re: Numbering should start at zero (1982)

#258

Earlier quoted context omitted.

An index is a specific kind of number, but so is a count. Indexing should clearly start from 0. It leads to far more elegant code and lower risk of off-by-one mistakes.

Then why do the scientific computing languages start at 1? Fortran started at 1 before C was invented.

It's a misguided attempt to appeal to mathematicians.

Re: Numbering should start at zero (1982)

#259

Earlier quoted context omitted.

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.

I want to be rude. The mix of "The same consideration applies to coordinate systems:" and "r u positioning urself..." in the same message is ridiculous to me and I can't take anyone seriously who speaks like this. It's not illegal or immoral, but it is at the very least, demonstrably distracting from their own actual substantive point. Here we all are talking about that when they otherwise had a perfectly good observ…

Stuff like this could be an innocent attempt to obfuscate one's stylometric fingerprints. I just read around it like mistakes from ESL commenters.

Re: Numbering should start at zero (1982)

#260
post #187

Earlier quoted context omitted.

> Zero is a natural number. It is in the axioms of Peano arithmetic, and any other definition is just teachers choosing a taxonomy that best fits their lesson. It is, but it need not be. In the category of pointed sets with endofunctor, (Z_{\ge 1}, 1, ++) and (Z_{\ge 0}, 0, ++) are isomorphic (to each other, to (Z_{\ge 937}, 937, ++), and to any number of other absurd models), so either would do equally well as a mod…

I think I’m missing something here. PA defines x * 0 = 0 for all x. So while we could take (Z+, 1, ++) as a model of it, we would be imposing a completely different definition of multiplication than the usual. Would this not be simply choosing to label 1 as 0 and work from there?

> I think I’m missing something here. PA defines x * 0 = 0 for all x. So while we could take (Z+, 1, ++) as a model of it, we would be imposing a completely different definition of multiplication than the usual. Would this not be simply choosing to label 1 as 0 and work from there?

Despite the name, in the usual mathematical meaning of the term, Peano arithmetic does not define arithmetic at all, only the successor operation, and everything else is built from there. Once we have those, for the model (Z_{\ge 0}, 0, ++), we certainly usually do define x0 = 0 for all x; and, you're right, if for the model (Z_{\ge 1}, 1, ++) we defined x1 = 1 for all x (as no-one could stop us from doing), then we'd just be dealing with "0 by another name." But it might be equally sensible, if our model of Peano arithmetic is (Z_{\ge 1}, 1, ++), to define x1 = x for all x, in which case we recover the expected arithmetic.

Post reply on HN