Archive for December, 2004

Earthquake intensity is powerlaw distributed

Thursday, December 30th, 2004

Distribution of the top 5 thousand earthquakes in the year 2000.The chart on the right shows one point for each of the top five thouand earthquakes in the united states during the year 2000. The largest was a magnitude 8 and appears in the upper left and is plotted as rank one on the horizontal axis (well, it would if I hadn’t dropped the top point, so the second largest is in the upper left). The smaller the earth quake the larger it’s rank order on the horizontal. The vertical axis is the energy released by the earthquake, estimated from the reported magnitude. This grainy look of the plot is because the magnitude was reported using only two digits. The data is from here.

In conclusion the distribution of earth quake sizes is a power law. The social network of dirt?

Earthquake Trends

Thursday, December 30th, 2004

This breathless New York times op ed piece by the author of the interesting light popular science book on Krakatoa sent me off to see if I could get any hard facts about tends in planetary earthquakes.

The table given on this page enumerates so called major earthquake counts for the years 1967 thru 2001. If you fit a linear curve to that data the trend is slightly downward. Major earthquakes are those between 7 and 8 in magnitude. Large ones are called said to be great.

The table given on this page is for the years 2000 thru 2004, it includes the recent two great earthquakes. Each step up in magnitude denotes a factor of 32 in the amount of energy released. So if you weigh all those numbers by the energy involved you get a slight trend upward.

My conclusion from this very amateur attempt to get at the facts. No. The earth is not becoming more cranky; well at least not in the seismic aspect of it’s personality.

So save your worry for something else.

Displacement and Common Lisp

Tuesday, December 28th, 2004

Displacement is an economic or cultural process where by a community of practice wakes up one morning to discover that the tide of history has left it high and dry. The displaced community is not, necessarily, at fault in these stories. The archetypical example of displacement was the introduction of a new technology into northern england that displaced the tenant farmers from their land holds. In that case the displacement unfolded pretty quickly because their legal claim to their land was based on leases; so when the lease came due and the land’s lord wished to convert to the new paradigm they were, well, displaced. The technical innovation that displaced the farmers was a more robust breed of sheep coupled with a fad for sheep.

In the software industry displacement happens when an existing language community - Cobol, Fortran, whatever - wakes up one morning to discover that the industries current fast growing network effect is taking place outside their community. Some communities manage to catch up by quickly piling on the tools, design patterns, etc. etc. required to play in the new world.

The Common Lisp made one mistake back in the 1980s that helped with it’s displacement. This mistake was around graphic user interfaces. When the Mac came out it redefined how graphic user interface interaction would take place. It set a standard for the interaction. This standard featured the idea of a current selection. First the user would use his mouse to accumulate the selection. He’d select the window/document to work on. He’d adjust the view to bring the thing he wished to modify into view. He’d then select that object. Only then would he browse a selection of commands to affect the object. Who knows if that’s the best design; but it certainly became the standard approach.

Meanwhile over in the older graphic user interface communities the command loop worked quite differently. For example selection was often entangled with mouse location. For example if you moved the mouse over an window or an object the object was automatically selected - but that’s only an example.

In the Common Lisp community a really unbelievably elegant user interface tool kit emerged known as CLIM (or Common Lisp Interface Manager). But this beautiful elegant thing had no concept of “the selection.” As a result it was totally irrelevant to the building of the kinds of user interface that were demanded by those working where the action was. Great ideas displaced by no particular fault of it’s own.

Microsoft had an analogous brush with displacement when the Internet broke out and desk top suddenly became marginalized. Microsoft has, historically, been better at mustering the sense of fear and panic necessary to respond to displacement events. So when it became clear they were at risk they reacted.

The Common Lisp community endures. I still use and prefer it for all kinds of tasks.

But, recently I’ve been concerned by what looks to me like a another displacement threat - character sets.

Emacs is a key complement to the Lisp community; and quite a few others. Emacs has amazing character set support, both the major variants (GNU Emacs, and XEmacs). The support is uniquely powerful. The approach emerged in a branch of emacs known as Mule and more recently has getting folded back into Emacs. All the input output streams can be configured to declare their encoding schemes. The internal strings and buffers are especially clever. The usual trick for systems having to tackle this problem is to normalize all the characters into one standard format, typically unicode. Mule’s approach is different; buffers in a mule enhanced emacs retain their character encoding. Load a file of Big5 characters and point at an arbitrary character in the string and mule emacs knows that’s a big5 character; paste a string of unicode characters into that buffer and now you have a buffer who’s characters are in assorted character set encoding in a way analogous (but with a different implementation) the way that you can have a buffer with characters in assorted fonts. That I find the mule design so cool reminds a bit of how cool I found the CLIM design; but at this point I’m feeling a bit paranoid.

So on the emacs front things are in in pretty good, even very good, shape. It’s all a bit rough around the edges though. The emac communities are still holding mule emacs at arm’s length so you often have to build the mule variant by hand. You often need to get the version of emacs that’s ahead of the stable release curve to capture the features you need. Font support is both amazing and frustrating. If your running under X then you can get a large set of international fonts and after a mess of suffering you can get your GNU emacs or xemacs to use them. One curiosity of the mule buffer design is that a character encoded in one character set may not have a font to render it only because the only font you have installed able to render that cute character happens to be laid out using a different character set. That’s a big pain on the Mac which has beautiful fonts but I can’t see how to get to them from unicode characters sets in emacs.

Over on the Lisp side of things the story is slowly resolving it’s self. There are a _lot_ of really fine commercial and open Common Lisp implementations. Each one has a slightly different story about how and when the unicode problem is getting addressed. The best unicode support in an open implementation happens to be in the slowest implementation. The implementation I’m using today (Steel Bank Common Lisp, or SBCL) has very fresh unicode support.

It’s taken me almost two weeks to get a working tool chain for this stuff. I have tried a lot of combinations and experianced a lot of crashes where both Lisp and Emacs die horrible recursive deaths choking as tried to display or transport characters down pipelines. Currently I’m running the lastest released beta version of XEmacs, build from scratch to get mule support. I’m running that under X on my Mac; so I’m using the open international X fonts. I’m running the bleeding edge versions (CVS Head) of both SBCL and Slime (the emacs< ->lisp interaction mode). [Hint: (setf slime-net-coding-system 'utf-8-unix)]

I'm happy to report that I can now stream unpredictable UTF-8 streams thru reasonably long chains of tools and it all works. Everything in my tool chain except the fonts is beta or bleeding. I'll be really happy when I've got the database linkages working.

If this was 1995 I'd be less concerned about displacement; but it's 2004. The good news is that the problem is getting solved.

Frustrating condensation

Monday, December 27th, 2004

Two stories about the slope of the power-law curve; both drawn from a delightfully rich book about the suburbs that I’m reading.

First, steam engines.

Steam engine trains were slow to attain speed and then they were slow to decelerate. Cities in the Eastern United States developed railroad suburbs at one point in the 19th century. Developers would buy up land on the periphery, build a railroad line and then sell the fantasy of suburban living to the well to do. The nature of steam engines meant that the stations on these lines were pretty far apart; often 2-4 miles apart. Residents around each village would walk to the station so the developments appeared as beads along the line with gaps between that remained undeveloped.

Second, city size.

The largest city in the United States is … Anchorage Alaska!

The presumption in the 18th and 19th century was that the destiny of a successfully village was to become a city. That villages were seeds that grew into mighty cities. The states arranged their laws to enable this presumably natural evolution. As a village grew it would fill out some forms, petition the state, and mature to the next level of status. Each status brought with it more governance powers.

At the same time growing cities would absorb their peripheries. A thriving city would annex the periphery to provide additional space as the city expanded. The platform of services provided by the city (sewage, water, paved streets, police, education, economics…) provided an attractive force. A crisis in the service infrastructure of the peripheral communities might accelerate the condensation; riots on the periphery, water supply problems, etc. Sometimes the developers and their transportation overlays drove the process. They wanted the promise of city services in their brochure, so they would push for annexation.

Starting with Brookline in Boston this all changed. As the cities expanded they began to reach the railroad suburbs. The railroad suburbs were run by a very wealthy class. Since the wealthy needed support services and there was little alternative transportation the working class lived adjacent to their employers. For these communities the spreading urban periphery looked pretty threatening. They weren’t being offered union with the thriving downtown; they were being offered union with the rough unfinished edges.

So when the time came in the natural order of things for the city to annex these well off parts of the periphery these well connected communities declined. Brookline was the first. In many parts of the country that turned out to be reasonably easy to do. All they had to do was petition the state to move up a notch or two on the evolutionary ladder toward becoming a city.

The result was east coast cities were soon encircled by a choker of small incorporated villages. The cities stopped growing.

Historically annexation is the single largest means of increasing a city’s population. Cities in parts of the country that didn’t suffer this pattern have kept growing and thus a city like Houston has grown a lot while older cities like Boston haven’t. For reasons that I’m totally unaware of Anchorage is really vast, in land area.

I see this thru the lens of the power-law distribution. First that the technology of the steam engine frustrated condensation. Secondly that a happenstance of governance coupled with the legacy of the railroad suburbs frustrated the condensation of the cities.

The trade off made in these condensation stories is always between the efficiency of a unified standard versus the diversity of a mess of different standards. There is an interesting tail to tell about how these cities who’s growth was frustrated sought out means to work around the inefficiencies it created. Regional authorities began to emerge; for example regional water, school, trash, police districts. These are substitutes for city governance. In some cases the state became the locus for provisioning the platform of necessary services.

Acceptance?

Sunday, December 26th, 2004

shock denial anger acceptance?