Panic

Panic Blog

Quick Links #2, Cabel

January 23rd, 2010

“All I ask is one thing, particularly of young people that watch. Please do not be cynical. I hate cynicism. It’s my least favorite quality. Nobody in life gets exactly what they thought they were going to get. But if you work really hard, and are kind, amazing things will happen.” –Conan O’Brien

Posted at 9:33 pm 5 Comments

From the desk of Cabel
Portland, Oregon 97205

Unison Access Upgrade

Unison 2 wasn’t the only usenet-related upgrade this week: we’ve also made great improvements to Unison Access, our usenet service.

Remember, to use Usenet, you need two separate things: a Usenet client (that’d be Unison 2), and a Usenet server to access. Some ISP’s provide access, but increasingly, many don’t.

Unison Access is now $9 a month, with unlimited transfer.

That’s right: no transfer limit. And all the trimmings are included: SSL support, a European server, 300 days of binaries, up to 8 simultaneous connections, etc.

There’s more! If you launch Unison 2 with no server configured (or choose “Setup Assistant…” from the Unison menu), you can even try a one-time 24 hour trial of the service, free of charge.

There are a whole lot of excellent choices out there for Usenet service. But since Usenet Access isn’t our bread and butter, we can offer this crazy good deal — one of the best prices you’ll find anywhere.


If you subscribe to Unison Access already, thanks! We’ll keep making it better!

Posted at 3:26 pm 17 Comments

From the desk of Cabel
Portland, Oregon 97205

Unison 2 Now Available

I’ll get right to the point: It’s with great excitement that I announce the release of Unison 2.

I imagine some of you are already gone and downloading. Thanks! For the rest of you: Unison is a Usenet browser. It lets you see, read, listen and download the wealth of content on Usenet servers!

Wh.. what is Usenet? Huh. That’s a little trickier. It goes basically like this: Usenet was really the mother of all internet forums — a ridiculous number of topics and people hosted on a ton of servers that are all kept in sync with each other, across the globe. Before the web, this is how a lot of internet users connected, shared tasty chili recipes, or argued about Kirk vs. Picard vs. Ninjas.

Later, some clever boffins figured out a way that you could also post files onto this global message board. These files would be mirrored to every other Usenet server. And lo, primordial global file sharing was born!

So you’ve got messages, you’ve got files, two groups of users that rarely intersect but each love their Usenet like you wouldn’t believe.

As an app, Unison is definitely a bit niche — “people still use Usenet?” is a question we hear often, but believe me, those that do really do. Here’s how we see it: we may be the only actively developed / modern Usenet client on the Mac right now, it’s the type of app a surprising amount of switchers need and are happy to find, it’s a fun design challenge, and, most importantly, even niches deserve a little love now and then.

So what’s new in Unison 2? We’ve completely redesigned the interface from scratch, unified the browsing experience with an all-in-one view, added a beautiful new group directory, improved message reading with a thread view and thread lines, built in a binary search browser, added automatic UnPAR/UnRAR/skipping of unneeded recovery sets, and much much more.

We’ve also made some significant changes to Unison Access, the companion service we provide. But more about that in the next blog post.

One final note: Unison 2 wouldn’t exist without Dave, who has been working a long time, single-handedly, on this insanely massive update. It’s not an easy app to develop, especially solo, so thanks very much Dave for your hard work!

Posted at 11:43 am 108 Comments

From the desk of
Cabel
Engineering Dept.

Mac OS X Stats: 12/2009

When some of our apps check for updates, they send along the Mac OS X version number, helpful in case we need to send a message to a specific set of OS users. The additional bonus of this (fully anonymous) data is that is gives us a very good look at where our users are, and lets us plan accordingly.

I took the last week’s worth of data — including repeat launches, of course, but mathematically I think it all evens out, which is to say I’m terrible at math and have no idea if that’s true — and made two charts.

Coda

Coda users are famously cutting-edge, and this chart reflects it.

The Leopard/Snow Leopard dominance is strong, and it seems like Coda users are pretty adamant about running the latest and greatest. This makes sense for web developers, who, for the most part, really should be using the latest Safari.

But one chart, and one app, doesn’t tell the full story…


Transmit

With a higher install base than Coda, and a much broader set of users — from web developers, to printing presses, to press photographers, to who knows what — the Transmit results are a bit different.

Hello, legacy!

17% still on 10.4. As most of our future software development is focused on Leopard or above, this means we’ll have to keep our legacy apps around…

As Tim reminds me, 10.4 is the last OS that Classic still runs under, so is it possible that these 10.4 users are dependent on some extremely old piece of software?

If you’re still using 10.4 or 10.5, what is your primary reason for holding back on an upgrade?

(It’s also interesting to compare these numbers with The Omni Group. So similar!)
Posted at 2:53 pm 84 Comments

From the desk of
Dave
Engineering Dept.

Q: “Once in a blue moon” is a rare event. But what does “blue moon” really mean?

calendar-iconThis was the final question last week at Pub Trivia, and our team won the evening with the same answer to this question that almost everyone else gave, probably the answer you’ve heard before: a blue moon means two full moons in one calendar month. This month, December 2009, has a blue moon on the 31, since it also had a full moon on the 2nd. But I had the nagging feeling that I’d read or heard somewhere (probably on QI) that the popular definition is wrong, that the real blue moon isn’t that straightforward. When I got home, Google confirmed it: We were wrong, quizmasters and all.

This idea that a month with two full moons is unusual points out the incongruity between the lunar cycle and our familiar 12 month, 365 day calendar. Month and Moon are nearly the same word–why don’t they mean the same thing? The answer, of course, is that they once did. But nature seems to hate an integer* as much as it reportedly hates a vacuum, so a year isn’t an even 365 or 366 days or 12 orbits of the moon around the Earth; neither does the moon take exactly 29 or 30 days to go around. So the problem is one of successive approximation, dividing one number by another and dealing with the remainder.

A first approximation: the lunar calendar

The moon was a useful timekeeper, despite its reluctance to synchronize with the cycles of the seasons. Instead of having to remember “day 237 after the winter solstice is wheat-planting day”, a farmer simply knew that the eighth moon is the wheat-planting moon. The wheat didn’t care much if one year’s full moon was 11 days earlier (or 18 days later) than the last year’s. Before the unveiling of the Julian calendar in 45 BC (more on that later) nearly all cultures on the planet used a calendar based on the cycles of the moon. (The Mesoamericans are a notable exception, and that 2012 thing is complete malarkey. Just saying.)

calendarjoke2

So here’s the first rounding error: Twelve cycles of the moon take between 354 and 355 days, but it’s 365 or 366 days between winter solstices. Or in other words, every two or three years will have thirteen full moons in it instead of twelve. And this is where the “blue” moon comes in, the moon that’s different from the others. (Though at this time, months and moons were the same thing so there’s not any question of having two of one in the other.) If you have a Stonehenge or other primitive-but-awesome celestial observatory handy (robed druids included) to tell you exactly when the solstice occurs you’ll notice that the phase of the moon and the solstice just about line up every 19 years. (But not exactly. Again, nature versus integers.) And even if you don’t, you’d eventually notice that, on average, 7 of every 19 cycles of the seasons need 13 months instead of 12 to keep everything in sync, or you’ll planting your wheat at the wrong time of year.

One interesting exception to this is the Islamic calendar, which has twelve lunar months and doesn’t adjust to match the seasons. This calendar is used for civil and religious purposes; a separate solar calendar must be used for agriculture. An Islamic, or hijri, year is on average 354.36 days long, so their calendar shifts forward by around 11 days each year relative to the seasons. Ramadan isn’t just on different dates every year (which would be more alarming to us if we didn’t have to deal with Easter), it crosses the seasons and returns to the same time of year every 33 years. This also means their years are counting up around 3% faster than seasonal years: It’s currently 1430 AH in the Islamic calendar, but in the year 20874 (AH and AD) their years will “catch up” with ours.

Next approximation: the solar calendar

In the Roman Republic the months were determined, as in most other cultures at the time, by priests (or imams, robed druids, etc.) who announced the presence of a new moon–and thus a new month–just after sunset. (The word “calendar” comes from the Latin calare “to call out, announce”, by way of kalends, the first day of the Roman month.) The Pontifex Maximus, high priest of the Roman religion, had the additional task of determining how long the year would be, 12 or 13 months, and therefore which day of the week important holidays would fall on–important stuff for a superstitious lot like the Romans. Originally, this was a purely religious role, but by the middle of the first century BC Roman politics had become particularly nasty and the Pontifex Maximus could use the calendar as a political tool, choosing to add an extra month to years when allies were in power or denying an extra month to his enemies.

To what extent Julius Caesar did this after becoming Pontifex Maximus in 63 BC isn’t clear, but 17 years later, in 46 BC, Caesar reformed the calendar, taking the power to define the year away from the position. The Julian reform declared that the Roman Republic would use a 365 day calendar with an extra day every 4 years. (Sound familiar?) In other words, the year was approximated at 365 1/4 days. To align the new calendar with the equinox, though, he had to add another two months to the already extended year, making 46 BC 445 days long. Cicero called this “the last year of confusion”.

One last tweak: our modern calendar

calendarjokeBy the end of the Middle Ages, it had become apparent that the Julian calendar had drifted away from the seasonal calendar. This distressed the Catholic Church terribly because the most important thing in the world for the Catholic Church was celebrating Easter on the correct day. It had spent the previous thousand years trying to sort it out and now it found that their calendar, the calendar that Caesar had set in motion 1600 years before, was missing the equinox by more than a week.

During this time, some very clever people had figured out that the Julian calendar was moving forward around 3 days every 400 years, and came up with a modification to the leap year scheme: Every 100 years would not be a leap year, except for every 400 years. (You may remember that 2000 was a double exception year–it wouldn’t have been a leap year, but it was. So if you weren’t paying attention, you didn’t really miss anything.) In 1582, Pope Gregory XIII announced a reform of the calendar, the new leap year scheme along with a 10-day shift to get the calendar synced back up with the seasons.

The Church and a number of Catholic countries adopted the new calendar on Friday, October 15th of 1582, one day after (Julian) Thursday, October 4th. Protestant Europe resisted this papist conspiracy until the 18th century; the British Empire (including the American colonies) saw Thursday, September 14th follow Wednesday the 2nd in 1752. Sweden tried to make a gradual change by ignoring leap years until their calendar matched the Gregorian, but lost its nerve and switched back to the Julian calendar after 12 years. To make up for a day gained in the interim, they added a 30th of February to 1712. In Alaska, the change took place in 1867 when US took possession of the territory from Russia, which still used the Julian calendar. Because the international date line shifted at the same time, Friday, October 6th was followed by another Friday, the 18th of October.

Time in the future

Modern astronomy tells us that a year is, to within one day in a million years, 365.242199 days long. The Julian calendar put 1 year as 365.25 days, for an error of 7.8 days per 1000 years. The Gregorian calendar put 1 year as 365.2425 days, for an error of 0.3 days every 1000 years. The astronomer Sir John Herschel proposed that the year 4000 and every 4,000th year after should not be a leap year in order to reduce this remaining error to about half a day every 10,000 years, but the standard has not yet been adopted. New calendars have been proposed (mostly to solve the problem of figuring out which day of the week any given date is) but the Gregorian calendar’s ordering of leap years is sufficient to keep the calendar aligned to the seasons as far into the future as we need.

Well, almost. At this scale we begin to see that the speed at which the Earth rotates on its axis isn’t constant, or even predictable. The pull of the moon’s gravity is slowing the rotation of the Earth, making each day longer by a fairly constant 2.3 milliseconds per century, but other factors, most notably shifting mass on and inside the planet, add to or subtract from this by a different amount every year. Since 1967, when the length of a second was standardized in precise atomic terms, days have been between 0.3 and 1 ms longer than the traditional 24 * 60 * 60 = 86,400 seconds. As a result, every once in a while astronomers add a “leap second” to UTC, Coordinated Universal Time. Surprisingly, while just about every year between 1972 and 1999 required a leap second to keep the clock synchronized with the Earth’s rotation, there have only been two leap seconds added in the last ten years. The Earth has sped up just a bit, and no one knows why.

Time in Cocoa

Since this is a Panic Engineering post, I should probably write something about calendars and programming. If you’re not a Cocoa programmer (and even if you are), feel free to skip this–it won’t be on the test.

First, here’s the code I used to find the year that the Islamic and Gregorian calendars meet. The NSCalendar and NSDateComponents classes were introduced in OS X 10.4 to replace NSCalendarDate, and are also available on the iPhone OS. They provide calendar operations such as converting NSDate objects to and from units of years, months, days, etc., and finding the difference between two NSDates. (Since we mentioned it above, it’s worth noting that as far as the OS is concerned every day is 86,400 seconds long. NSCalendar does not know about leap seconds.)

  1. NSCalendar* gregorian = [NSCalendar currentCalendar];
  2. NSCalendar* islamic = [[NSCalendar alloc] initWithCalendarIdentifier:NSIslamicCalendar];
  3. NSDateComponents* components = [[NSDateComponents alloc] init];
  4.  
  5. [components setDay:1];
  6. [components setMonth:11];
  7. [components setYear:20874];
  8.  
  9. // Always use a format string in NSLog, even if it's just @"%@"!
  10. NSLog(@"%@", [gregorian dateFromComponents:components]);
  11. NSLog(@"%@", [islamic dateFromComponents:components]);

And here’s a snippet showing the jump from the Julian to the Gregorian calendar on October 15th, 1582. Be aware that the default NSCalendar uses the Julian calendar before this date. (For “fun”, check out October 1582 in iCal…)

  1. [components setDay:15];
  2. [components setMonth:10];
  3. [components setYear:1582];
  4.  
  5. NSDate* date = [gregorian dateFromComponents:components];
  6. NSLog(@"%@", date); // 1582-10-15 00:00:00 -0800
  7.  
  8. NSDateComponents* offset = [[NSDateComponents alloc] init];
  9. [offset setSecond:-1];
  10.  
  11. date = [gregorian dateByAddingComponents:offset toDate:date options:0];
  12. NSLog(@"%@", date); // 1582-10-04 23:59:59 -0800

OS X 10.4 provided Gregorian, Buddhist, Hebrew, Islamic, Islamic Civil, and Japanese calendars. 10.6 added Republic of China (for calendrical operations only, not formatting), Persian, Indian, and ISO8601, the traditional calendar of ISO8601istan. NSDateFormatter can format dates in any of these calendars:

  1. NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
  2. [formatter setDateStyle:NSDateFormatterFullStyle];
  3.  
  4. NSLog(@"Today's Gregorian date: %@", [formatter stringFromDate:[NSDate date]]);
  5.  
  6. NSCalendar* buddhist = [[NSCalendar alloc] initWithCalendarIdentifier:NSBuddhistCalendar];
  7. [formatter setCalendar:buddhist];
  8.  
  9. NSLog(@"Today's Buddhist date: %@", [formatter stringFromDate:[NSDate date]]);
  10.  
  11. NSCalendar* islamic = [[NSCalendar alloc] initWithCalendarIdentifier:NSIslamicCalendar];
  12. [formatter setCalendar:islamic];
  13.  
  14. NSLog(@"Today's Islamic date: %@", [formatter stringFromDate:[NSDate date]]);

Blue Moons

The article that told me I was wrong about what “blue moon” means (and hilariously refers to that definition as “trendy”) explains that the “two full moons in a month” definition is due to a misreading of the Maine Farmers’ Almanac: the real Blue Moon is the third full moon in a season that has four full moons. Why the third? The first full moon of the season is particularly significant; e.g., the Easter moon. The moons before and after have names as well–the Lent Moon precedes the Easter Moon, whether it’s the third or fourth moon of the winter–so the third moon of four is the extra one. By this definition, 2009 does not have a blue moon, since the full moon on December 31st is after the solstice and belongs to next year’s winter.

For an example of the importance of the sequence of the moons to daily life, consider Charlemagne’s naming of the months of the year (a solar year, but even so), used for over 700 years after his death:

Wintarmanoth, winter month
Hornung, the month when the male red deer sheds its antlers
Lentzinmanoth, Lent month
Ostarmanoth, Easter month
Wonnemanoth, love-making month
Brachmanoth, plowing month
Heuvimanoth, hay month
Aranmanoth, harvest month
Witumanoth, wood month
Windumemanoth, wine month
Herbistmanoth, autumn harvest month
Heilagmanoth, holy month

One etymology claims “blue” comes from belewe, “betrayer”. Imagine if an extra moon showed up and delayed Wonnemanoth for 29 days. Betrayer moon!

A: The third of four full moons in a season

The next day I emailed the quizmaster to let her know how we were all terribly, horribly wrong, that we’d need to recount the scores, possibly have a do-over. She said they’d take either answer.

* A Correction

“Nature hates integers” is a gross oversimplification and ignores not just all of chemistry, where everything happens in even ratios, but the surprising phenomenon of orbital resonance. Pluto and Neptune, for example, are phase-locked in a stable 2:3 resonance: Pluto orbits the sun exactly twice for every three of Neptune’s orbits, and has for millions of years. Our moon’s rotation is locked to its orbit around the Earth due to tidal forces, which is why we only ever see one side of it. For the same reason, the Earth’s rotation is also slowing down and will eventually match the orbit of the moon. At that point, billions of years from now, both a day and a month will last for around 47 of our current 86,400-second-long days. One side of the Earth will face the moon; the other will never see it again.

Posted at 1:52 pm 47 Comments