1340: "Unique Date"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

Mikeski
Posts: 1099
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: 1340: "Unique Date"

Coyne wrote:(In fact, this is the way we do it. The bicentennial celebration back in '76 started on January 1, but independence was declared July 4, 1776.)

I suppose we could say the preceding year was "2013 O.C." (old calendar), but it was also the first year before 1 A.P.. So wouldn't it be possible we would also call it 1 B.P?

Or look at the Japanese calendar system based on their Emperors... the current era is Heisei; AD 2014 is Heisei 26. But Heisei 1 started on January 8th 1989, not January 1st, as the previous Emperor passed away on the 7th. So the first 7 days of January 1989 were the entirety of the Showa 64 "year", and the remaining 358 days were Heisei 1.

If two emperors should pass on in the same year, I suppose that Gregorian-calendar year would wind up split across three different Japanese-calendar "years".

(Though they don't count "backwards" through time as B.C. years in the Gregorian calendar do, it still demonstrates that there's no need to call the first year after the epoch "year zero".)

Pfhorrest
Posts: 5440
Joined: Fri Oct 30, 2009 6:11 am UTC
Contact:

Re: 1340: "Unique Date"

ucim wrote:If we get used to treating 0 as "The first number", a lot of the angst would go away.

Aside from the problems already mentioned of making ordinal counts confusing (4 is the 5th number, etc), if the first year after the epoch were the year 0 WE (Whatever Era), then shouldn't the first year before the epoch be the year zero BWE? And now we went and ruined our nice math-friendly year system, and introduced confusion to ordinal counting.

Honestly I think the computing practice of counting from zero (and of having signed ints with the sign bit set not equal to the negative of the same int without the sign bit set, but rather one number less than that, e.g. 011111112 = 3276710 but 11111112 = -3276810) are just hacks designed to fit one more item into a list or array, and not something we should be emulating in the general world where we're not always trying to cram as much data as possible into as few binary digits as possible. We can count from 1 as is natural, rather than 0; and we can afford to have "-x" mean just the additive inverse of x as is natural, rather than making it mean one less than the additive inverse of x just because "-0" is redundant with "0".
Forrest Cameranesi, Geek of All Trades
"I am Sam. Sam I am. I do not like trolls, flames, or spam."
The Codex Quaerendae (my philosophy) - The Chronicles of Quelouva (my fiction)

gmalivuk
GNU Terry Pratchett
Posts: 26765
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: 1340: "Unique Date"

Unless the Monumental Event happened across midnight between two old-calendar years, just call the year it happened 0ME. Then the year after it happened will be 1ME and the year before can be 1BME or -1ME.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

hausen
Posts: 1
Joined: Wed Mar 12, 2014 2:42 am UTC

Re: 1340: "Unique Date"

poxic wrote:
gormster wrote:So... does the date in the comic change every day?

It's a static .png, so maybe not.

On the other hand, it's Randall, so maybe.

Since Randall is so nice to post the comics under a permissive license, we can "fix" it for him: jsfiddle.net/Lej6m/4/ (*).

I've only tested this fiddle under Chrome 32 (**) and Firefox 26 (**). YMMV.

(*) can't make it a clickable link, or else this post is marked as spam.
(**) yeah, I know, not the latest and greatest but I have too many tabs open, just like Cueball in 1328.

Mikeski
Posts: 1099
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: 1340: "Unique Date"

Pfhorrest wrote:(and of having signed ints with the sign bit set not equal to the negative of the same int without the sign bit set, but rather one number less than that, e.g. 011111112 = 3276710 but 11111112 = -3276810) are just hacks designed to fit one more item into a list or array, and not something we should be emulating in the general world where we're not always trying to cram as much data as possible into as few binary digits as possible. We can count from 1 as is natural, rather than 0; and we can afford to have "-x" mean just the additive inverse of x as is natural, rather than making it mean one less than the additive inverse of x just because "-0" is redundant with "0".

The "negative zero" thing has existed in the past; it's called a one's-complement architecture. Signed integers without negative-zero are two's-complement. The logic circuits that do math in two's-complement are simpler than in one's-complement. So it's a "hack" (read: elegant implementation) for speed and efficiency, not for "holding one more item" (or holding an item one larger, assuming it's negative.)

orthogon
Posts: 3075
Joined: Thu May 17, 2012 7:52 am UTC
Location: The Airy 1830 ellipsoid

Re: 1340: "Unique Date"

Mikeski wrote:
Pfhorrest wrote:(and of having signed ints with the sign bit set not equal to the negative of the same int without the sign bit set, but rather one number less than that, e.g. 011111112 = 3276710 but 11111112 = -3276810) are just hacks designed to fit one more item into a list or array, and not something we should be emulating in the general world where we're not always trying to cram as much data as possible into as few binary digits as possible. We can count from 1 as is natural, rather than 0; and we can afford to have "-x" mean just the additive inverse of x as is natural, rather than making it mean one less than the additive inverse of x just because "-0" is redundant with "0".

The "negative zero" thing has existed in the past; it's called a one's-complement architecture. Signed integers without negative-zero are two's-complement. The logic circuits that do math in two's-complement are simpler than in one's-complement. So it's a "hack" (read: elegant implementation) for speed and efficiency, not for "holding one more item" (or holding an item one larger, assuming it's negative.)

Also, what Pfhorrest describes isn't actually one's or two's complement. Having 11111111 represent -127 is sign and magnitude. In two's complement, 11111111 represents -1 and 10000000 represents -128. To convert a positive number to a negative one, you invert all the bits and add one. This sounds kind of crazy, but as Mikeski points out, two's complement makes arithmetic simpler, at least addition and subtraction.

It's easy to build adders and counters that work modulo M=2N: basically that's what you get by default if you just let the last carry go hang. Numbers in Z that differ by M are indistinguishable, and when you define a number as two's complement, all you're doing is defining which range of Z you consider the values to represent. It can help to think of numbers as being like angles. We can decide to have all angles be positive, so we have angles in the range 0 to 359 degrees. Or we can decide that we will call anticlockwise angle up to half a turn positive, and that clockwise angles are negative, hence an angle represents a number in the range -180 degrees to 179 degrees. Adding a positive angle is just an anticlockwise rotation, and adding a negative angle is clockwise. But we know that a clockwise rotation of 90 degrees is just the same as an anticlockwise rotation of 270 degrees, so the same angle that represents +270 in unsigned represents -90 in signed. Note how the difference is just in our interpretation. The angles go on doing their thing irrespective of whether we call them signed or unsigned.

The same thing happens with adders - the circuit is the same whether the numbers are signed or unsigned. The only difference is if you want to detect overflow, in which case you need to examine the carries into and out of the most significant bit. What you're doing is equivalent to making sure you didn't go through the +180/-180 discontinuity illegally.

I doubt that the extra code representing -M/2 was a motivation. Actually it's one of the inelegant aspects of the system, since you are unlikely to want more negative range than positive, and when calculating -x you need to handle the case specially because there's no corresponding positive representation. In principle you could say that the 1000...0 code represents +M/2 instead, but you lose the elegance of the top bit being a sign bit and make detecting overflows harder.
xtifr wrote:... and orthogon merely sounds undecided.

speising
Posts: 2353
Joined: Mon Sep 03, 2012 4:54 pm UTC
Location: wien

Re: 1340: "Unique Date"

Coyne wrote:
speising wrote:
Coyne wrote:
Klear wrote:
stickler wrote:
CharlieP wrote:1. There was no Year "0" (1 BC preceded AD 1)

I used to remember it as BC=Before Christ and AD=After DChrist.
But the lack of year 0 means that it was "One year before Christ", and a year later it was "One year after Christ".
What happened to the missing year?

I'm guessing everybody was too drunk to remember.

I've read that the A.D. referred to the dominance of the Lord over sin, hence, 1 A.D. was the first year of his dominance. Retroactively, therefore, 1 B.C. was the last year before the year of--the first year before his dominance. Therefore no zero year, which sort of makes sense from that perspective.

tell me, if 24.12.0001 was the day jesus celebrated his first birthday (nominally), what was the date a year earlier, when he was born?

Still 1.

are you saying that 1 year before 24.12.0001 was 24.12.0001?

Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1340: "Unique Date"

Coyne wrote:
Klear wrote:
stickler wrote:
CharlieP wrote:1. There was no Year "0" (1 BC preceded AD 1)

I used to remember it as BC=Before Christ and AD=After DChrist.
But the lack of year 0 means that it was "One year before Christ", and a year later it was "One year after Christ".
What happened to the missing year?

I'm guessing everybody was too drunk to remember.

I've read that the A.D. referred to the dominance of the Lord over sin, hence, 1 A.D. was the first year of his dominance. Retroactively, therefore, 1 B.C. was the last year before the year of--the first year before his dominance. Therefore no zero year, which sort of makes sense from that perspective.

Whatever, I'm sticking to my booze theory. They must have been ashamed and so they invented a religion to cover it up.

PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: 1340: "Unique Date"

gmalivuk wrote:And I would assume people were capable of keeping track of that, so even if the numbering of years changed a few times over the centuries, leap years probably continued to happen every 4. Like, even though nobody alive at the time thought of 4AD as the fourth year of anything special, I suspect it's a safe bet that the February that ended 2,010 years-and-a-bit before today had an extra day in it. (Yes, I know I could just look this up, but I'm lazy.)

You'd probably win that bet, since it appears that the Julian calendar leap year cycle was maintained properly through Roman times (after an initial stuff-up); of course the AD year numbering convention wasn't adopted until the sixth century. For the messy details see Year numbering.

In the early years of the Julian calendar's use, the Romans stuffed up the leap year calculation. The Julian calendar wasn't developed by Romans - they weren't renown for their mathematical or astronomical prowess, so Julius Caesar outsourced to the best experts he could get. But unfortunately, there was a misunderstanding over the leap year rule which went uncorrected for several decades!

From Context of the reform
Caesar returned to Rome in 46 BC and, according to Plutarch, called in the best philosophers and mathematicians of his time to solve the problem of the calendar.[11] Pliny says that Caesar was aided in his reform by the astronomer Sosigenes of Alexandria[12] who is generally considered the principal designer of the reform. Sosigenes may also have been the author of the astronomical almanac published by Caesar to facilitate the reform.[13] Eventually, it was decided to establish a calendar that would be a combination between the old Roman months, the fixed length of the Egyptian calendar, and the 365¼ days of the Greek astronomy. According to Macrobius, Caesar was assisted in this by a certain Marcus Flavius.

From Leap year error
Although the new calendar was much simpler than the pre-Julian calendar, the pontifices initially added a leap day every three years, instead of every four. According to Macrobius, the error was the result of counting inclusively, so that the four-year cycle was considered as including both the first and fourth years; this was perhaps the earliest recorded example of a fence post error. After 36 years, this resulted in three too many leap days. Augustus remedied this discrepancy by restoring the correct frequency. He also skipped three leap days over 12 years in order to realign the year. Once this reform was complete, intercalation resumed in every fourth year and the Roman calendar was the same as the Julian proleptic calendar.[34]

The historic sequence of leap years in this period is not given explicitly by any ancient source, though Scaliger established that the Augustan reform was instituted in 8 BC. Several solutions have been proposed, which are summarised in the following table. [...]

Some may find this stuff dead boring; but I'm kind of fascinated by how the ancient world dealt with its IT problems.

PinkShinyRose
Posts: 834
Joined: Mon Nov 05, 2012 6:54 pm UTC
Location: the Netherlands

Re: 1340: "Unique Date"

gmalivuk wrote:Unless the Monumental Event happened across midnight between two old-calendar years, just call the year it happened 0ME. Then the year after it happened will be 1ME and the year before can be 1BME or -1ME.

Wasn't this exactly the point? I thought the moment Jesus was born was supposed to be the start of the calendar, meaning the event happened at the turn of the year.

rmsgrey
Posts: 3630
Joined: Wed Nov 16, 2011 6:35 pm UTC

Re: 1340: "Unique Date"

PM 2Ring wrote:Some may find this stuff dead boring; but I'm kind of fascinated by how the ancient world dealt with its IT problems.

You think Y2K was tricky. Try updating Stonehenge to account for daylight savings time!

PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: 1340: "Unique Date"

rmsgrey wrote:
PM 2Ring wrote:Some may find this stuff dead boring; but I'm kind of fascinated by how the ancient world dealt with its IT problems.

You think Y2K was tricky. Try updating Stonehenge to account for daylight savings time!

As Pratchett says, it's "always cheaper to get a new 33-Megalith Circle than upgrade your old one".

aquarius
Posts: 7
Joined: Thu Nov 09, 2006 12:41 pm UTC

Re: 1340: "Unique Date"

PsiSquared wrote:After all we have almost 8000 years to get used to the idea (and to implement it in our computers).

Betcha a fiver that it gets fixed at quarter to midnight before the big clockover, though.

Actually, a fiver at compound interest for eight millennia would be quite a lot of money (by which I mean ALL THE MONEY). I perhaps rescind that bet, on the off-chance that I'm around to be collected from.

gmalivuk
GNU Terry Pratchett
Posts: 26765
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: 1340: "Unique Date"

aquarius wrote:
PsiSquared wrote:After all we have almost 8000 years to get used to the idea (and to implement it in our computers).

Betcha a fiver that it gets fixed at quarter to midnight before the big clockover, though.

Actually, a fiver at compound interest for eight millennia would be quite a lot of money (by which I mean ALL THE MONEY). I perhaps rescind that bet, on the off-chance that I'm around to be collected from.
I'm not sure what the problem is, because it's not like a fiver is all the money you have right now, so if the rest also increases in value over 80 centuries at the same rate, it'll be the same fraction of your total wealth that it is now, which I'm assuming is a fairly small fraction indeed.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

Posts: 76
Joined: Tue Nov 06, 2012 1:41 am UTC

Re: 1340: "Unique Date"

Here's my one-size-fits-all solution to all that arguing about the year zero and ad/bc/bce: languages aren't logical!
So there!

Somebody wanted to know about a site which does many calendars
side by side.

http://www.fourmilab.ch/documents/calendar

has many; you put in a date for thousands of years in the
past or future and it gives the date on several different calendars.

Let's remember to commemorate

3-14-15 9:26:53.5 am or pm, you get two chances that day.

Davidy
Posts: 221
Joined: Sat Dec 01, 2012 1:18 am UTC

Re: 1340: "Unique Date"

...unless (depending on your interpretation of "our system") you're in Europe on the third day of October, this year.
"It's only funny until someone loses an eye, then it's still funny but they can only see it in 2-D."

gmalivuk
GNU Terry Pratchett
Posts: 26765
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: 1340: "Unique Date"

"Our system" is most likely supposed to mean ISO 8601 or something like it, in which case that sequence could only ever refer to the tenth day of March in the year 2014CE.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

Mikeski
Posts: 1099
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: 1340: "Unique Date"

"IT IS x-y-z". That date won't happen again, no matter what order x, y, and z are in. If it's referring to 3rd oct 2014, then the comic isn't wrong, it's just set in the future.

Flumble
Yes Man
Posts: 2248
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: 1340: "Unique Date"

Davidy wrote:
image

...unless (depending on your interpretation of "our system") you're in Europe on the third day of October, this year.

Why "Europe"? I'm in Europe (anecdotal evidence is the best evidence) and I've never ever seen YYYY-DD-MM.
I understand that you find it strange that some countries (in Europe) used DD-MM-YYYY instead of MM-DD-YYYY, but only sensible people AFAIK use big-endian mode and always as YYYY-MM-DD.

Mikeski wrote:"IT IS x-y-z". That date won't happen again, no matter what order x, y, and z are in. If it's referring to 3rd oct 2014, then the comic isn't wrong, it's just set in the future.

At least every |x||y||z| it will be x⊕y⊕z.

Steve the Pocket
Posts: 705
Joined: Mon Apr 23, 2007 4:02 am UTC
Location: Going downtuuu in a Luleelurah!

Re: 1340: "Unique Date"

orthogon wrote:I wouldn't be so confident that we could get the general population to use zero-based indexing, though I'm pleased to see innovations like Platform 0 at King's Cross station in London.

Frankly, I don't think there's much point to using zero-based indexing in computing much either; back in the day, it was done to maximize available memory, but nowadays we have plenty of that and very few things that lend themselves to maximums of 2^x or 2^x-1, unless they involve existing constructs that we set up for that very reason (like RGB codes). In cases where we're just blindly indexing — assigning numbers to a finite number of things — I've always favored using zero as a catch-all for "none of the above" or "invalid entry" or whatever the system lends itself to. I got in that habit when I started programming text adventure games; the rooms were numbered from 1, each exit had a value stating which room it led into, and a value of 0 meant that there wasn't a door there.

Not sure how that would apply to year numbering. I'd say it could be used to represent an unknown date (or a case where a date does not apply where it usually would), but then we've got 00:00:00 as a perfectly valid time so I dunno.
cephalopod9 wrote:Only on Xkcd can you start a topic involving Hitler and people spend the better part of half a dozen pages arguing about the quality of Operating Systems.

Baige.

Coyne
Posts: 1101
Joined: Fri Dec 18, 2009 12:07 am UTC
Location: Orlando, Florida
Contact:

Re: 1340: "Unique Date"

Flumble wrote:
Davidy wrote:
image

...unless (depending on your interpretation of "our system") you're in Europe on the third day of October, this year.

Why "Europe"? I'm in Europe (anecdotal evidence is the best evidence) and I've never ever seen YYYY-DD-MM.
I understand that you find it strange that some countries (in Europe) used DD-MM-YYYY instead of MM-DD-YYYY, but only sensible people AFAIK use big-endian mode and always as YYYY-MM-DD.

I've seen YYYY/DD/MM, in an IBM product on their mainframe system z/OS (the product is DFHSM). It's not only confusing, but annoying, too. I don't know where it was actually written, though.
In all fairness...