Thursday, February 08, 2007 

http://www.geekculture.com/joyoftech/joyimages/560.png

Gmail's Mail Fetcher now works for me! As of today, I can now read my reilly.org email through Gmail, instead of the crappy webmail interface that NetIdentity provides. Much, much nicer.

I still prefer to read my email with a real email client, like Thunderbird, but I don't have POP3 access from work.

In related news, it looks like anyone can sign up for Gmail. You no longer need to be invited.

posted on Thursday, February 08, 2007 7:49:49 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Wednesday, February 07, 2007 

Doctor Who and the French Dalek

Via Andrew Sullivan, an extremely well cut YouTube mashup of Doctor Who and Monty Python.

posted on Wednesday, February 07, 2007 8:58:18 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Tuesday, February 06, 2007 

http://www.cartoonstock.com/newscartoons/cartoonists/efi/lowres/efin299l.jpg

Last year, the Washington State Supreme Court handed down its wrongheaded decision on same-sex marriage.

In a delightful piece of political theater, WA-DOMA has just filed ballot initiative I-957:

If passed by Washington voters, the Defense of Marriage Initiative would:

  • add the phrase, “who are capable of having children with one another” to the legal definition of marriage;

  • require that couples married in Washington file proof of procreation within three years of the date of marriage or have their marriage automatically annulled;

  • require that couples married out of state file proof of procreation within three years of the date of marriage or have their marriage classed as “unrecognized;”

  • establish a process for filing proof of procreation; and

  • make it a criminal act for people in an unrecognized marriage to receive marriage benefits.

The intent is to challenge the court's ruling which declares that a “legitimate state interest” allows the court to limit marriage to those couples able to have and raise children together, and hence it is permissible to bar same-sex marriage.

The initiative attacks the specious rationale for the court's ruling. It also attacks the framing that so many of the bigots use.

Three initiatives are planned:

  • Make procreation a requirement for legal marriage.

  • Prohibit divorce or legal separation when there are children.

  • Make the act of having a child together the equivalent of a legal ceremony.

As the sponsor of I-957 freely admits in his rationale, these are all absurd, and if passed, would be struck down by the Washington Supreme Court. He intends to undermine the reasoning of social conservatives who have long claimed that procreation is the sole purpose of marriage.

I'll sign the petition as soon as I get my hands on one, even though my own marriage would be annulled by the terms of the initiative.

posted on Wednesday, February 07, 2007 7:55:38 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

http://www.georgevreilly.com/blog/content/binary/printf.png

In my post about Printf Tricks a couple of years ago, I mentioned that "%n is dangerous and disabled by default in Visual Studio 2005."

I got email today from someone who was porting a large codebase to VS 2005. He was getting an assert from %n and he needed a way to get past it. He intends to fix the uses of %n when he has a chance.

I spent several minutes digging around in MSDN and came up with set_printf_count_output. Wikipedia's Format string attack page led me to Exploiting Format String Vulnerabilities, which describes in detail how %n (and %s) may be exploited.

In short, if you have printf(unvalidated_user_input), instead of printf("%s", unvalidated_user_input), then placing %n into unvalidated_user_input can lead to printf writing arbitrary data into memory.

posted on Wednesday, February 07, 2007 7:19:18 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Monday, February 05, 2007 

http://images.amazon.com/images/P/0380815931.01.MZZZZZZZ.jpg

Title: In the Beginning ... Was the Command Line
Author: Neal Stephenson
Rating: 2 stars out of 5
Publisher: Perennial
Copyright: 1999
ISBN: 0380815931
Pages: 151
Keywords: sociology, business
Reading period: October 2006—February 5, 2007

This is a rather strange, rambling essay about the state of the computer industry, historical accidents, and Windows vs. Mac vs. Linux, favoring Linux. Written in 1999, it has not aged well. Stephenson has a fascination with the command line and a disdain for GUIs.

By using GUIs all the time we have insensibly bought into a premise that few people would have accepted if it were presented to them bluntly: namely, that hard things can be made easy, and complicated things simple, by putting the right interface on them.

I agree with that statement, but not with his overall thrust (and I'm a Linux user and an inveterate command-line dinosaur). Good UI design is hard and we need new and better metaphors, but command-line interfaces should not be foisted on the average user.

posted on Tuesday, February 06, 2007 3:04:16 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, February 04, 2007 

content/binary/irish-survey.jpg

In last week's newsletter from the Irish Heritage Club, I read about a survey of Irish-born residents of Washington state.

SEATTLE-NEWS@IRISHCLUB.ORG, FRIDAY, JANUARY 26, 2007, PART-1

IRISH SURVEY - Irish-born residents of Washington State are being asked to complete a 32-question survey in connection with a PhD. research project sponsored by Seattle's Irish Immigration Support Group. The goal is to take a snapshot of Irish-born people living in the Seattle area who left Ireland in the 1900s, mostly those who left Ireland after WW-II. If you or someone you know is willing to participate, please contact Melissa at 206-229-8512 or melissae@irishclub.org.

I filled it out and emailed it back to her; it was fairly painless. I just spent some time with Melissa in an (optional) follow-on interview.

As she says in the survey:

If you look at the history, traditions and stories about the Irish in America, much of it comes from the east coast and the post-Famine era. The condensed version is that people left Ireland to get away from the oppression of the British, the lack of economic opportunities, and to work to send money to their families in Ireland. Once in the US, Irish immigrants faced discrimination based on their religion, their birth place, and a rash of stereotypes about the Irish as lazy, drunkards and brawlers. They worked hard, earned success and managed to make a place for themselves and their children in the US.

She wants to find out what's true for the first-generation Irish immigrants who are living in the Northwest today. The traditional take is still partially true, especially for the older generation who arrived in the 1940s or 1950s. It's far less true for many of the more recent immigrants, such as myself, who were part of the great Irish brain drain, now greatly slowed by the Celtic Tiger.

About 15 years ago on the soc.culture.celtic newsgroup, someone asserted that 80% of those born in the 1930s emigrated from Ireland in the 1950s. I found that incredible and asked him for some proof. He pointed me towards Lee's Ireland 1912-1985, where indeed I found that statement. The 1940s and 1950s were extremely difficult for Ireland, but losing 80% of your young people is truly horrific. Some fraction may have returned later, but most were gone forever.

Melissa is still looking for people to complete the survey. Tell her I sent you.

posted on Monday, February 05, 2007 5:20:18 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

content/binary/JesusCamp.jpg

Inspired by Drinking Liberally, I've founded my own little progressive movie club. It will meet at my house on the first Wednesday of every month. We show a progressive film, followed by a discussion. Typically, these will be political documentaries, but you can also expect to see non-political documentaries, fiction, and even the occasional right-wing piece for contrast.

The first film will be shown this coming Wednesday. Here's the announcement that I just sent out:

We'll show ONE of the following movies on Wednesday, February 7th. Those who show up will make the choice.

  • Jesus Camp. A growing number of Evangelical Christians believe there is a revival underway in America that requires Christian youth to assume leadership roles in advocating the causes of their religious movement. Jesus Camp follows a group of young children to Pastor Becky Fisher's "Kids on Fire Summer Camp" where the kids are taught to become dedicated Christian soldiers in God's army and are schooled in how to take back America for Christ.

or

  • Black Gold. Multinational coffee companies now rule our shopping malls and supermarkets and dominate the industry worth over $80 billion, making coffee the most valuable trading commodity in the world after oil. But while we continue to pay for our lattes and cappuccinos, the price paid to coffee farmers remains so low that many have been forced to abandon their coffee fields.

Come at 7:30pm and socialize. The movie will start at 8:00 sharp. If you like, bring a snack or drink to share.

content/binary/black_gold_the_movie.jpg

Send me email if you want more information.

posted on Monday, February 05, 2007 1:05:44 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

content/binary/cantwell-seehearspeak.jpg

I got a reply from Maria Cantwell's office, regarding the email that I sent about Attacking Iran. Clearly no brain cells were used in sending out this form response.

Dear Mr. Reilly,

Thank you for contacting me to express your concerns for the development of nuclear weapons in Iran. I appreciate hearing from you on this important issue.

As you may know, international nuclear inspectors continue to monitor whether Iran is developing nuclear weapons. Such a program would be in contravention to the nuclear non-proliferation agreement that Iran has signed. In November 2004, the countries of Britain, France, and Germany negotiated an agreement with Iran, in which Iran agreed to cancel its nuclear programs. Unfortunately, Iran has recently backed away from its commitments. The International Atomic Energy Agency (IAEA) has reported that Iran is accelerating its nuclear fuel enrichment activities and has failed to comply with international nuclear inspectors. Specifically, Iran began resuming uranium conversion in August 2005 and then announced its intentions to begin research on enriching uranium in February 2006.

On March 29, 2006, the United Nations Security Council issued a Presidential Statement on Iran 's nuclear programs requesting that Iran suspend its uranium enrichment programs within 30 days and cooperate with the IAEA. Iran failed to comply with this Presidential Statement.

On May 31, 2006 the Bush Administration decided to change course and join diplomatic talks with Iran, along with the United Kingdom, France, and Germany. I believe that the United States must engage in real diplomacy and work with Russia, China, and other countries to deal with Iran. We cannot permit Iran to build or acquire nuclear weapons.

During the debate on the Defense Authorization bill, Senator Joseph Biden (D-DE) introduced an amendment calling on Iran to suspend its enrichment program and to cooperate with the International Atomic Energy Agency. The amendment was agreed to, with my support, in a vote of 99 to 0.

Please be assured that I will continue to press for progress towards a verifiable diplomatic solution.

Thank you again for contacting me to share your thoughts on this matter. Finally, you may be interested in signing up for my weekly update for Washington state residents. Every Monday, I provide a brief outline about my work in the Senate and issues of importance to Washington State. If you are interested in subscribing to this update, please visit my website at http://cantwell.senate.gov. Please do not hesitate to contact me in the future if I can be of further assistance.

Sincerely, Maria Cantwell United States Senator

For future correspondence with my office, please visit my website at http://cantwell.senate.gov/contact/index.html

I hate phoning politicians' offices, but clearly email isn't achieving much.

posted on Sunday, February 04, 2007 8:55:56 PM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

content/binary/laptop-woes.jpg

My laptop scared the crap out of me last night. I came home to find it in a completely unresponsive state: it would not wake up. The hard disk LED was a solid green. I power cycled it and it refused to boot.

It did, however, boot from a Kubuntu Edgy CD, but it did not recognize the hard disk. In desperation, I booted into the BIOS and played with the disk-related menus. That fixed the problem, but I don't know what went wrong, and my faith is shaken in the reliability of this system.

I bought the laptop just over three years ago, shortly before I quit Microsoft, as a replacement for the work laptop that I had been using. It's served me well. I have a reasonably beefy desktop system of the same age, but I almost always use the laptop instead. It's a Compaq Presario X1012QV, with a 1.3GHz Centrino, a WXGA screen, 35GB hard disk, and 1280MB RAM. It had 512MB RAM originally, but I replaced one of the 256MB sticks with a 1GB stick last year, making it more pleasant to use.

For several months now, I've been planning to buy a new Vista-ready laptop this spring, with a Core 2 Duo, ~100GB disk, and 2+GB RAM. I want a 64-bit CPU so that I can occasionally run Win64; e.g., to update the Win64 port of Vim. I'm severely tempted by Apple and expect to end up with some kind of Mac laptop — my first ever Mac. I was hoping to hold out until Mac OSX 10.5 (Leopard) comes out sometime this spring, but the latest rumors say that it's "edging the very limit of the definition of 'Spring' — i.e. mid-June". If the Presario craps out on me again, I'll replace it in short order.

Whether I go with Mac or stick with a PC, I'll continue to run multiple OSes. Kubuntu Linux has been my primary operating system since last June, and I think it's unlikely that Vista will replace it. OSX may well do so.

posted on Sunday, February 04, 2007 9:19:32 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [3]

http://images.amazon.com/images/P/0743247965.01.MZZZZZZZ.jpg

Title: Lake of Sorrows
Author: Erin Hart
Rating: 4 stars out of 5
Publisher: Simon & Schuster
Copyright: 2004
ISBN: 0743247965
Pages: 329
Keywords: mystery
Reading period: 29 January-3rd February, 2007

This is the second mystery featuring Nora Gavin, an American forensic pathologist living in Ireland. The body of a ritually murdered Iron Age man is found preserved in a bog, and Gavin is called in to examine the body. Shortly thereafter, another similarly murdered body is found in the bog, but this one is wearing a wristwatch.

Hart writes lean, clear prose, with believable characters, and a not-completely improbable plot. Her Irish characters sound and act like Irish people, rather than refugees from a Lucky Charms outtake.

My main complaint with this book and its predecessor, Haunted Ground, is that all of the characters are damaged, limping through life, struggling with depression or anger. There's something wrong with a cheerful mystery, but these are a bit grim. This book ends on a positive note, however.

posted on Sunday, February 04, 2007 8:34:52 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Thursday, February 01, 2007 

Via Digby, a warning about the Bush Administration trying to gin up a case for war against Iran. Arthur Silber and Scott Ritter have things to say.

I just sent the following letter to my Senators, Patty Murray and Maria Cantwell, my Representative, Jim McDermott, and to Senator Russ Feingold.

Senator:

It is quite apparent that the Bush Administration is working up to provoking a war on Iran. We went through this before, in the leadup to the Iraq war in 2002.

I hold no brief for Iran. They are bad actors in the region. Clearly, they have worrisome nuclear ambitions. And they have little love for the U.S.

But somehow, we survived more than 40 years of Cold War against a far greater threat, without ever going to war with the Soviets.

As Scott Ritter points out at http://www.thenation.com/doc/20070205/ritter a Democratically-controlled Congress will share responsibility with Bush should we start an unnecessary war with Iran. Only Congress can declare war; do not forfeit that right to the president again.

Let there be hearings. Let a real case be made for war with Iran. And if our national security is indeed at stake, then do what you must. But if it is not, then shut this down now.

There is a great moral question at stake here. (Never mind the logistical difficulties of starting another war when the Army is already stretched too thin.) We cannot, must not, silently acquiesce to another war.

Go, thou, and do likewise.

posted on Friday, February 02, 2007 7:55:59 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

http://graphics8.nytimes.com/images/2007/01/23/magazine/28meals.600.jpg

Michael Pollan, in a long article in last Sunday's New York Times Magazine, writes about Nutritionism

In the case of nutritionism [an ideology], the widely shared but unexamined assumption is that the key to understanding food is indeed the nutrient. From this basic premise flow several others. Since nutrients, as compared with foods, are invisible and therefore slightly mysterious, it falls to the scientists (and to the journalists through whom the scientists speak) to explain the hidden reality of foods to us. To enter a world in which you dine on unseen nutrients, you need lots of expert help.

... 

Another potentially serious weakness of nutritionist ideology is that it has trouble discerning qualitative distinctions between foods. So fish, beef and chicken through the nutritionists’ lens become mere delivery systems for varying quantities of fats and proteins and whatever other nutrients are on their scope. Similarly, any qualitative distinctions between processed foods and whole foods disappear when your focus is on quantifying the nutrients they contain (or, more precisely, the known nutrients).

... 

But what about the elephant in the room — the Western diet? It might be useful, in the midst of our deepening confusion about nutrition, to review what we do know about diet and health. What we know is that people who eat the way we do in America today suffer much higher rates of cancer, heart disease, diabetes and obesity than people eating more traditional diets. (Four of the 10 leading killers in America are linked to diet.) Further, we know that simply by moving to America, people from nations with low rates of these “diseases of affluence” will quickly acquire them. Nutritionism by and large takes the Western diet as a given, seeking to moderate its most deleterious effects by isolating the bad nutrients in it — things like fat, sugar, salt — and encouraging the public and the food industry to limit them. But after several decades of nutrient-based health advice, rates of cancer and heart disease in the U.S. have declined only slightly (mortality from heart disease is down since the ’50s, but this is mainly because of improved treatment), and rates of obesity and diabetes have soared.

He concludes with some recommendations:

To medicalize the diet problem is of course perfectly consistent with nutritionism. So what might a more ecological or cultural approach to the problem recommend? How might we plot our escape from nutritionism and, in turn, from the deleterious effects of the modern diet? ... So try these few (flagrantly unscientific) rules of thumb, collected in the course of my nutritional odyssey, and see if they don’t at least point us in the right direction.

1. Eat food. Though in our current state of confusion, this is much easier said than done. So try this: Don’t eat anything your great-great-grandmother wouldn’t recognize as food. (Sorry, but at this point Moms are as confused as the rest of us, which is why we have to go back a couple of generations, to a time before the advent of modern food products.) There are a great many foodlike items in the supermarket your ancestors wouldn’t recognize as food (Go-Gurt? Breakfast-cereal bars? Nondairy creamer?); stay away from these.

2. Avoid even those food products that come bearing health claims. ...

3. Especially avoid food products containing ingredients that are a) unfamiliar, b) unpronounceable c) more than five in number — or that contain high-fructose corn syrup.None of these characteristics are necessarily harmful in and of themselves, but all of them are reliable markers for foods that have been highly processed.

4. Get out of the supermarket whenever possible. You won’t find any high-fructose corn syrup at the farmer’s market; you also won’t find food harvested long ago and far away. What you will find are fresh whole foods picked at the peak of nutritional quality. Precisely the kind of food your great-great-grandmother would have recognized as food.

5. Pay more, eat less. The American food system has for a century devoted its energies and policies to increasing quantity and reducing price, not to improving quality. There’s no escaping the fact that better food — measured by taste or nutritional quality (which often correspond) — costs more, because it has been grown or raised less intensively and with more care. ...

“Eat less” is the most unwelcome advice of all, but in fact the scientific case for eating a lot less than we currently do is compelling. “Calorie restriction” has repeatedly been shown to slow aging in animals, and many researchers (including Walter Willett, the Harvard epidemiologist) believe it offers the single strongest link between diet and cancer prevention. ... To make the “eat less” message a bit more palatable, consider that quality may have a bearing on quantity: I don’t know about you, but the better the quality of the food I eat, the less of it I need to feel satisfied. All tomatoes are not created equal.

6. Eat mostly plants, especially leaves. Scientists may disagree on what’s so good about plants — the antioxidants? Fiber? Omega-3s? — but they do agree that they’re probably really good for you and certainly can’t hurt. Also, by eating a plant-based diet, you’ll be consuming far fewer calories, since plant foods (except seeds) are typically less “energy dense” than the other things you might eat. Vegetarians are healthier than carnivores, but near vegetarians (“flexitarians”) are as healthy as vegetarians. Thomas Jefferson was on to something when he advised treating meat more as a flavoring than a food.

7. Eat more like the French. Or the Japanese. Or the Italians. Or the Greeks. Confounding factors aside, people who eat according to the rules of a traditional food culture are generally healthier than we are. Any traditional diet will do: if it weren’t a healthy diet, the people who follow it wouldn’t still be around. ... In the case of the French paradox, it may not be the dietary nutrients that keep the French healthy (lots of saturated fat and alcohol?!) so much as the dietary habits: small portions, no seconds or snacking, communal meals — and the serious pleasure taken in eating. (Worrying about diet can’t possibly be good for you.) Let culture be your guide, not science.

8. Cook. And if you can, plant a garden. To take part in the intricate and endlessly interesting processes of providing for our sustenance is the surest way to escape the culture of fast food and the values implicit in it: that food should be cheap and easy; that food is fuel and not communion. ...

9. Eat like an omnivore. Try to add new species, not just new foods, to your diet. The greater the diversity of species you eat, the more likely you are to cover all your nutritional bases. ...

posted on Friday, February 02, 2007 6:56:37 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, January 28, 2007 

http://images.amazon.com/images/P/0812571029.01.MZZZZZZZ.jpg

Title: Uther
Author: Jack Whyte
Rating: 3 stars out of 5
Publisher: Tor
Copyright: 2001
ISBN: 0812571029
Pages: 916
Keywords: historical, fantasy
Reading period: 13-28 January, 2007

This is the seventh volume of the Camulod Chronicles, Jack Whyte's sprawling retelling of the Arthurian legend. Whyte is consumed by the backstory of the legend, so much so that the sixth book The Sorceror Metamorphosis ends with young Arthur drawing Excalibur from a stone. The first two books, The Skystone and The Singing Sword, tell of the founding of the Colony of Camulod by two far-sighted Romano-Britons, Caius Britannicus and his brother-in-law Publius Varrus, who foresee the collapse of the Roman Empire. The third book, The Eagles' Brood, tells of their grandsons, Caius Merlyn Britannicus and Uther Pendragon. Narrated by Merlyn, that book shows them growing up as inseparable friends, who fall out in adulthood. The next three books, The Saxon Shore, The Fort at River's Bend, and The Sorceror Metamorphosis, detail Merlyn's efforts to raise Arthur from infancy to adulthood, largely in secrecy.

This book, Uther, is a parallel novel to The Eagles' Brood, told from the perspective of Uther, shedding light on the more mysterious events of the earlier book. It is sufficiently different from the earlier book that it stands in its own right. Uther is the king of the Celtic people of Cambria, though he spends much of his childhood at his cousin's home in Camulod. Much of the book concerns Uther's long war with Lot, king of Cornwall, and Uther's secret relationship with Ygraine, Lot's queen, and the mother of Arthur. Merlyn is a secondary character.

Whyte's tendency to towards longwindedness has grown worse as the series advances, and this book would have benefited from a firm-handed editor.

Moderately enjoyable, but recommended mainly for completists who have read the rest of the series.

posted on Monday, January 29, 2007 7:46:35 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Thursday, January 18, 2007 

http://farm1.static.flickr.com/139/361368452_53d59bbaf4_m.jpg

I recently learned about string pods and chain pods. In essence, they are pocket-sized monopods. You screw a six-foot string into the tripod socket of your camera, step on the other end of the string, and pull it taut. The tension on the string reduces camera shake.

http://farm1.static.flickr.com/141/361368374_5cf6927148_m.jpg

My string pod tutorial shows how I made the string pod, as well as some before and after shots.

Before now, I used to try to find a handy surface or wall to brace the camera, when taking photos without flash. Often there isn't such a surface. I have a little 3-inch pocket tripod that I carry with me all the time, but I haven't used it much.

A Flick thread on low-light, no flash, hand-held photography makes several good suggestions. The best is to set the 2-second timer, which gives the camera a chance to stabilize after pressing the trigger.

posted on Thursday, January 18, 2007 8:34:40 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Saturday, January 13, 2007 

content/binary/SeachtainNaGaeilge.gif

Culture Shock

When I reviewed The Wrong Kind of Blood, I adverted to the culture shock that I experience whenever I visit Ireland.

The Ireland that I left eighteen years ago this week was emerging from decades of social repression at the hands of the Catholic Church. Contraceptives were illegal until 1979 and when first introduced, could only be obtained by prescription from a pharmacy. The prescription requirement was dropped in 1985, and other restrictions were lifted in the Nineties, so that they're now sold by dispensing machines in many pubs.

Homosexuality was criminalized by the same Victorian laws that sent Oscar Wilde to Reading Gaol for two years. The laws were seldom enforced, but most gay people were closeted. Those laws were repealed about fifteen years ago, leading to a more open gay community. Same-sex marriage has been proposed, though it has been turned down for now.

Abortion is still illegal. There were huge debates about it in the Eighties, mostly regarding a successful constitutional amendment to make it even more illegal.

The Catholic Church still plays an important role in the lives of older people, but for many of my generation and younger, the only time they see the inside of a church is for hatches, matches, and dispatches.

I still remember how upset my mother was twenty years ago, when one of my unmarried cousins became pregnant. Now, one in three children are born outside of marriage.

The Church is increasingly being seen as irrelevant. The Irish Church, like the American Church, acquitted itself very badly in the matter of paedophile priests.

There's less and less of the backward, priest-ridden country that Joyce and others railed against.

(The moralistic Presbyterians who controlled Northern Ireland were, if anything, even more oppressive than the Catholic Church in the Republic.)

It is the economic changes of the Celtic Tiger that are more immediately obvious to the visitor.

Glimmers of economic hope were appearing after joining the European Economic Community (now known as the European Union) in 1973. But unemployment was high throughout the Eighties: nearly 20% nationwide; much higher in deprived areas.

Emigration had been the safety valve for decades. 80% of the generation born between 1930 and 1940 emigrated. Eighty percent! The Forties and the Fifties were particularly hard in Ireland, then entrenched in benighted economic isolationism.

Now the country is awash with money. The property market spirals ever upward, scaling new heights of insanity. Nondescript houses in the right parts of Dublin go for millions of Euros. It is all but impossible to buy one's first house. Middle-aged parents are remortgaging their paid-off houses, to lend their adult children enough to make a downpayment.

Former emigrants have returned. Once homogeneous, the country is now awash in immigrants from Eastern Europe, Africa, and Asia. Supermarkets now have a special section stocking Polish food!

While we were in Ireland in November, we saw John Boorman's dark new film, The Tiger's Tail, which addresses many of the problems that the new wealth has brought. Greed and corruption were always present in Irish society, but the scale is much worse. The disparity between rich and poor is growing to US levels.

The Irish Language

Last week, my friend Eric sent me a pointer to a blog post at Languagehat which linked to an an article in the Grauniad by a native Irish speaker, Manchán Magan, who set off on a trip around Ireland with one self-imposed handicap, not to speak a word of English.

Despite 25% of the population claiming that they can speak Irish, in practice, it's closer to 3%. Magan encountered great difficulty in finding people who would even attempt to respond to him in Dublin, and not much better elsewhere. He ends on a somewhat hopeful note, having encountered some children speaking a fluent, modern dialect of Irish; children who attend the Gaelscoileanna, the all-Irish schools that are increasing in number everywhere.

We Irish call the language of our ancestors "Irish", not "Gaelic". The Irish name for the Irish language is Gaeilge.

The Irish language was long associated with rebellious nationalists, and the British came close to killing off the Irish language in the nineteenth century, helped along by the disproportionate effects of the Famine and emigration upon the Irish-speaking regions.

Once the Irish Free State (later the Republic) achieved independence in the 1920s, the teaching of Irish became compulsory in Irish schools. All applicants to public sector jobs were supposed to be proficient in Irish. Irish became the official first language, with English relegated to second place.

You might think that this would lead to a revival of Irish. Not so. The Wikipedia article on the Irish language quotes the author of a comprehensive survey on the state of the language:

'It is an absolute indictment of successive Irish Governments that at the foundation of the Irish State there were 250,000 fluent Irish speakers living in Irish-speaking or semi Irish-speaking areas, but the number now is between 20,000 and 30,000.'

The Wikipedia article goes into more details.

From my perspective, the main problems were the appalling way that Irish was taught and the lip service paid to the notion of reviving Irish.

Most Irish people of my generation left school after 14 years of having this difficult language shoved down their throats by the Irish Taliban, the humorless old fuckers with misty-eyed dreams of maidens dancing at crossroads. It was all stick, no carrot. Little effort was made to engage people, to make them enjoy the language. Instead, it was taught in a dry, academic fashion, placing more emphasis on the analysis of tedious poems than on conversation.

The Israelis managed to revive Hebrew, turning it into a modern language spoken by seven million people. The Irish have nearly killed off Gaeilge.

[The title of this post, Ta Fuck-All Gaeilge Agam, is a pun. Tá focal Gaeilge agam (Taw fuc'l Gayl-guh ah-gum) means "I have a word of Irish" or, less obliquely, "I speak Irish." The cúpla focal (couple of words) are the handful of Irish phrases that Irish people are wont to toss into their speech. I did leave school with a modest grasp of Irish, but not nearly as good as my French or my German.]

posted on Sunday, January 14, 2007 2:47:48 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

http://images.amazon.com/images/P/0060825464.01.MZZZZZZZ.jpg

Title: The Wrong Kind of Blood
Author: Declan Hughes
Rating: 4 stars out of 5
Publisher: William Morrow
Copyright: 2006
ISBN: 0060825464
Pages: 312
Keywords: mystery
Reading period: 12-13 January, 2007

Ed Loy has returned to Dublin after 20 years in Los Angeles to bury his mother. An old friend asks him to find her missing husband. This sends him into a viper's nest of corruption among property developers and upwardly mobile gangsters, as he confronts the demons of his past.

Loy, after his long, self-imposed exile, finds a very different Dublin to the one that he left. The economic miracle known as the Celtic Tiger has wrought huge changes over the last 15 years, catapulting Ireland from a country that haemorrhaged emigrants to having one of the highest living standards in the world. The less desirable consequences include out-of-control house prices, enormous traffic congestion, and a gap between rich and poor that rivals the United States'.

I emigrated from Ireland in 1989, so I experience some of Loy's culture shock whenever I visit Ireland.

Hughes has written a taut, effective hard-bitten detective novel, which casts a critical eye on modern Ireland. Ed Loy, in the best PI tradition, has a perverse streak, a little attitude problem, and a fondness for drink and women. Well-worn elements, but not often applied to the mean streets of Dublin's gated communities.

posted on Sunday, January 14, 2007 12:29:37 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Friday, January 12, 2007 

http://www.georgevreilly.com/blog/content/binary/PythonBatch.jpg

Batchfile Wrapper

I've made some significant changes to my Python Batchfile Wrapper. The main virtue of this wrapper is that it finds python.exe and invokes it on the associated Python script, ensuring that input redirection works.

I've also adapted py2bat to work with my wrapper. I'm calling my version py2cmd.

Here's my latest batch file, which is shorter than its predecessor.

To use it, place it in the same directory as the Python script you want to run and give it the same basename; i.e., d:\some\path or other\example.cmd will run d:\some\path or other\example.py.

 @echo off
 setlocal
 set PythonExe=
 set PythonExeFlags=-u

for %%i in (cmd bat exe) do (
for %%j in (python.%%i) do (
call :SetPythonExe "%%~$PATH:j" ) ) for /f "tokens=2 delims==" %%i in ('assoc .py') do (
for /f "tokens=2 delims==" %%j in ('ftype %%i') do (
for /f "tokens=1" %%k in ("%%j") do (
call :SetPythonExe %%k ) ) ) "%PythonExe%" %PythonExeFlags% "%~dpn0.py" %* goto :EOF :SetPythonExe if not [%1]==[""] (
if ["%PythonExe%"]==[""] (
set PythonExe=%~1
)
)
goto :EOF

This is sufficiently cryptic that it merits some explanation.

The first set of nested loops attempts to find python.cmd, python.bat, and python.exe, respectively, along your PATH:

 for %%i in (cmd bat exe) do (
for %%j in (python.%%i) do (
call :SetPythonExe "%%~$PATH:j"
)
)

The %%~$PATH:j expression searches the PATH for %%j (i.e., python.cmd, etc). If it's found, the expression evaluates to the full path to %%j. Otherwise, it evaluates to the empty string. I've bracketed the expression with double quotes in order to handle spaces in directory names.

The SetPythonExe subroutine simply sets %PythonExe% to %1 if and only if %PythonExe% doesn't already have a value and %1 is not empty:

We can't set %PythonExe% directly in the loop. As explained at for loops and variable expansion, environment variables in the body of the loop are evaluated once before the loop starts and won't change until after the loop terminates:

 :SetPythonExe
if not [%1]==[""] (
if ["%PythonExe%"]==[""] (
set PythonExe=%~1
)
)
goto :EOF

Note: the %~1 notation strips off any surrounding double quotes. (ss64.com has details on parameter syntax.)

The square brackets and double quotes are necessary to make it all work if either %PythonExe% or %1 contains spaces. Getting this right was one of the hardest parts of the whole exercise.

The second set of nested loops are scarier:

 for /f "tokens=2 delims==" %%i in ('assoc .py') do (
for /f "tokens=2 delims==" %%j in ('ftype %%i') do (
for /f "tokens=1" %%k in ("%%j") do (
call :SetPythonExe %%k
)
)
)

The outer loop runs once: assoc .py yields .py=Python.File and %%i is set to Python.File. Running ftype Python.File yields Python.File="C:\Python24\python.exe" "%1" %* (on my machine).

The second loop also runs once: %%j is set to everything on the right-hand side of the =.

The third loop also runs once: %%k is set to the first token in %%j, "C:\Python24\python.exe", which is passed in to SetPythonExe.

At this point, %PythonExe% will have a value if python.cmd (or python.bat or python.exe) existed on your path, or the .py extension was registered.

If it doesn't have a value, then the invocation of "%PythonExe%" will fail, setting %errorlevel% to 9009:

 "%PythonExe%" %PythonExeFlags% "%~dpn0.py" %*
goto :EOF

%PythonExeFlags% was set to -u at the beginning of the script. As explained in my Python Batchfile Wrapper post, this treats stdin, stdout, and stderr as raw streams, instead of transliterating \r\n into \n. If you want cooked input, simply remove the -u.

The "%~dpn0.py" notation yields the absolute path to the Python script with the .py extension sitting beside this batch file: another example of parameter syntax.

Finally, goto :EOF ends execution of the batchfile, skipping the :SetPythonExe subroutine.

Whew!

py2cmd

You can have a batchfile sitting alongside a Python script as above, or you can have a self-contained batchfile cum Python script.

py2bat has been kicking around for years. It takes a Python script and turns it into a batchfile, by relying on a couple of tricks.

I've adapted py2bat into a new script, py2cmd. In essence, the generated batchfile looks like this:

 @echo off
REM="""
... set PythonExe as above ...
"%PythonExe%" -x %0
goto :EOF
"""

# python code starts here
# ...

When this file is executed by cmd.exe, the control flow should be obvious. Disable echoing to the screen, a funny-looking REM, set %PythonExe% as before (not shown), invoke python.exe with the -x flag on the current batchfile, and finally skip past the rest of the file.

When Python is invoked with the -x flag, it skips the first line of the script (@echo off). The second line sets the variable REM to the multiline string which continues down to the closing """ below the goto :EOF. Everything after that is the original Python script. All the batchfile nonsense is wrapped up inside the REM variable.

Download py2cmd.

Other Wrappers

Fredrik Lundh's ExeMaker generates a stub executable to launch a Python script with the same basename. It requires that Python already be installed on the target machine. I couldn't get ExeMaker to work properly. The stub executable leaves me at the Python interpreter's interactive prompt.

py2exe takes a Python script and bundles up all the Python support files to make it run on a machine that doesn't have Python installed. Works fine for me, but you get 4MB+ of associated runtime. Massive overkill if the target machine is known to have Python installed.

posted on Saturday, January 13, 2007 2:49:31 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]

content/binary/olbermann_countdown.jpg

Keith Olbermann was on fire tonight, condemning the insanity of escalating a lost war that the American public so clearly wants no more of.

Only this president could look out over a vista of 3,008 dead and 22,834 wounded in Iraq, and finally say, “Where mistakes have been made, the responsibility rests with me” — only to follow that by proposing to repeat the identical mistake ... in Iran.

... 

And yet — without any authorization from the public, which spoke so loudly and clearly to you in November’s elections — without any consultation with a Congress (in which key members of your own party, including Sens. Sam Brownback, Norm Coleman and Chuck Hagel, are fleeing for higher ground) — without any awareness that you are doing exactly the opposite of what Baker-Hamilton urged you to do — you seem to be ready to make an open-ended commitment (on America’s behalf) to do whatever you want, in Iran.

... 

The lives of 21,500 more Americans endangered, to give “breathing space” to a government that just turned the first and perhaps the most sober act of any democracy — the capital punishment of an ousted dictator — into a vengeance lynching so barbaric and so lacking in the solemnities necessary for credible authority, that it might have offended the Ku Klux Klan of the 19th century.

... 

Before Mr. Bush was elected, he said nation-building was wrong for America.

Now he says it is vital.

He said he would never put U.S. troops under foreign control.

Last night he promised to embed them in Iraqi units.

He told us about WMD.

Mobile labs.

Secret sources.

Aluminum tubes.

Yellow-cake.

He has told us the war is necessary:

Because Saddam was a material threat.

Because of 9/11.

Because of Osama Bin Laden. Al-Qaida. Terrorism in general.

To liberate Iraq. To spread freedom. To spread Democracy. To prevent terrorism by gas price increases.

Because this was a guy who tried to kill his dad.

Because — 439 words in to the speech last night — he trotted out 9/11 again.

In advocating and prosecuting this war he passed on a chance to get Abu Musab Al-Zarqawi.

To get Muqtada Al-Sadr. To get Bin Laden.

He sent in fewer troops than the generals told him to. He ordered the Iraqi army disbanded and the Iraqi government “de-Baathified.”

He short-changed Iraqi training. He neglected to plan for widespread looting. He did not anticipate sectarian violence.

He sent in troops without life-saving equipment. He gave jobs to foreign contractors, and not Iraqis. He staffed U.S. positions there, based on partisanship, not professionalism.

He and his government told us: America had prevailed, mission accomplished, the resistance was in its last throes.

He has insisted more troops were not necessary. He has now insisted more troops are necessary.

He has insisted it’s up to the generals, and then removed some of the generals who said more troops would not be necessary.

He has trumpeted the turning points:

The fall of Baghdad, the death of Uday and Qusay, the capture of Saddam. A provisional government, a charter, a constitution, the trial of Saddam. Elections, purple fingers, another government, the death of Saddam.

He has assured us: We would be greeted as liberators — with flowers;

As they stood up, we would stand down. We would stay the course; we were never about “stay the course.”

We would never have to go door-to-door in Baghdad. And, last night, that to gain Iraqis’ trust, we would go door-to-door in Baghdad.

He told us the enemy was al-Qaida, foreign fighters, terrorists, Baathists, and now Iran and Syria.

He told us the war would pay for itself. It would cost $1.7 billion. $100 billion. $400 billion. Half a trillion. Last night’s speech alone cost another $6 billion.

And after all of that, now it is his credibility versus that of generals, diplomats, allies, Democrats, Republicans, the Iraq Study Group, past presidents, voters last November and the majority of the American people.

Oh, and one more to add, tonight: Oceania has always been at war with East Asia.

Mr. Bush, this is madness.

You have lost the military. You have lost the Congress to the Democrats. You have lost most of the Iraqis. You have lost many of the Republicans. You have lost our allies.

You are losing the credibility, not just of your presidency, but more importantly of the office itself.

And most imperatively, you are guaranteeing that more American troops will be losing their lives, and more families their loved ones. You are guaranteeing it!

This becomes your legacy, sir: How many of those you addressed last night as your “fellow citizens” you just sent to their deaths.

And for what, Mr. Bush?

So the next president has to pull the survivors out of Iraq instead of you?

Bush sent troops into an Iranian consulate in Iraq last night, invading the sovereign territory of Iran. Is he trying to provoke Iran into a war too? How does he propose to fight it? Is he trying to bring on the end times?

Feh!

posted on Friday, January 12, 2007 8:11:13 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Wednesday, January 10, 2007 

http://images.amazon.com/images/P/0441014011.01.MZZZZZZZ.jpg

Title: Pushing Ice
Author: Alastair Reynolds
Rating: 4 stars out of 5
Publisher: Ace
Copyright: 2006
ISBN: 0441014011
Pages: 464
Keywords: speculative fiction
Reading period: 4-9 January, 2007

Fifty years hence, Janus, one of the moons of Saturn, suddenly leaves its orbit and starts heading for Spica, 260 light years away. Only the mining ship Rockhopper can intercept what is now apparent as a long-dormant alien artifact and learn something about it. Things go wrong and the ship crash lands on Janus, as it heads towards Spica at near-relativistic speed. The crew splits into factions led by the captain, Bella Lind, and the chief engineer, Svetlana Barseghian, once the best of friends, now implacable enemies.

Reynolds tells an exciting tale of big ideas, hard science, and clashing personalities.

Recommended.

posted on Wednesday, January 10, 2007 8:29:57 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Monday, January 08, 2007 

content/binary/MindMapSpeech.png

I gave a speech at Freely Speaking Toastmasters this evening, on Mind Mapping. You can see a shrunken version of the mind map for the speech above. Clicking on it will lead to the full-sized image.

I created the mind map with Freemind. Here's the speech mindmap as a Freemind document.

I thought the speech went quite well. It was speech #8, working with visual aids. I drew a partial version of my speech's mind map on a white board ahead of time, and drew a couple of mind maps on a flip chart during the speech. The second one was a two-minute brainstorming session on increasing club membership.

I had intended to record the speech and turn it into a podcast, but I forgot.

Usually, I write out the words of the speech ahead of time, rehearse it several times, fine-tuning the words, and then deliver the speech from a handful of notes.

This time, I never wrote down anything except the mind map itself. I did have a printout of the map in front of me, though I didn't refer to it often.

posted on Tuesday, January 09, 2007 7:46:09 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Thursday, January 04, 2007 

http://farm1.static.flickr.com/141/336010760_60ec3f674d_m.jpg

This recipe comes from my mother, who has used it for many years.

Fruit-based Christmas cake is considered a treat in Ireland, not a thing of horror, as so many Americans regard it.

12 ozs

butter

12 ozs

brown sugar

12 ozs

plain flour

1 tsp

salt

12 ozs

raisins

12 ozs

sultanas

6 ozs

dried currants

6 ozs

candied peel

4 ozs

glacé cherries

4 ozs

walnuts, optional, cut in half

2 ozs

angelica, optional

4-5

eggs

Makes 9" round cake in a 3" tall cake pan.

Note: For the raisins, you can substitute stoned muscat raisins or valentias if you wish. Be careful to only take the stone and leave the flesh. I usually cut them in half as they are big.

Soak all fruit overnight in some whiskey (approx half cup) or brandy. Stir and cover.

Line tin with buttered greaseproof paper (two layers) on sides and bottom. Must be 3" taller than tin. Put brown paper around outside to prevent burning: prevents base being burned.

Cream butter and sugar very well: about 10 mins in a beater. Whip eggs together and sieve flour. Gradually add eggs slowly and alternate with some flour (it might be better to do this by hand to prevent curdling). Add rest of dry ingredients. Lastly add soaked fruit. Stir and pour into lined tin.

Before putting into oven, make a 3" wide scoop in centre of top; glaze cake with some milk to prevent cracking. Cake takes approx four hours to cook. If getting too brown, put some paper on top for last half hour. Don't open oven before that.

Cook on 2nd shelf from the bottom. My oven in Dublin I cook at 300F for 1 1/2 hours and reduce to 250F for 2 1/2 hours.

While still warm, pierce top several times and pour in a little whiskey. Leave in tin overnight.

The cake may be made several months ahead of time. Keep in an airtight container. Every few weeks, drizzle a little whiskey on it to keep it moist.

In mid-December, the cake should be covered with a layer of marzipan icing. It should then be decorated with a layer of royal icing.

Update: 2008/03/31: Emma posted several blog posts about the Christmas Cake that I made in 2007: making the cake, making marzipan, and icing the cake.

posted on Friday, January 05, 2007 6:41:01 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Quicksilver
Title: Quicksilver: The Baroque Cycle, Vol. 1
Author: Neal Stephenson
Rating: 3 stars out of 5
Publisher: William Morrow
Copyright: 2003
Pages: 927
Keywords: historical fiction
Reading period: 10 December 2006–4 January, 2007

The first of three equally long volumes of historical fiction by Neal Stephenson, who is better known for his speculative fiction. This is a prequel of sorts to Cryptonomicon, featuring the distant ancestors of the Waterhouse and Shaftoe characters.

Quicksilver primarily takes place in late 17th century Europe, the baroque era where giants such as Newton, Leibniz, Hooke, and Huygens brought about a new understanding of the world. Daniel Waterhouse, a Puritan scholar, moves among them, knowing that he is not a good enough Natural Philosopher to be their equal, while he also moves through the courts of King Charles II and James II. Jack Shaftoe, who styles himself the King of the Vagabonds, moves in far less reputable circles. The two men do not meet, but they are both tied to the remarkable Eliza, who rises from being a Turkish harem slave to becoming both a French countess and a Dutch duchess, by working as a double agent for the Dutch against the French.

It's an engaging tale, conveying a good deal of the intellectual and political ferment of the times. However, both Daniel and Eliza seem anachronistic to me, like characters transplanted from the twentieth century. Stephenson works in a variety of styles ranging from straight narrative, to short plays, to long epistolatory chapters. He throws in other anachronistic touches too, such as Leibniz referring to the growing incidence of 'canal rage' amongst the gondoliers of Venice.

At 900 pages, it's far too long. Stephenson's editor should have reined him in. I would have enjoyed it more at half the length.

posted on Friday, January 05, 2007 6:02:04 AM (Pacific Standard Time, UTC-08:00) 
#    Comments [0]
Sunday, December 31, 2006 

http://images.amazon.com/images/P/0596100833.01.MZZZZZZZ.jpg

Title: Window Seat: The Art of Digital Photography & Creative Thinking
Author: Julieanne Kost
Rating: 3 stars out of 5
Publisher: O'Reilly
Copyright: 2006
ISBN: 0596100833
Pages: 148
Keywords: photography, photoshop, creativity
Reading period: 30 December, 2006

Julieanne Kost, a Photoshop evangelist for Adobe, flies 200 days a year. For the last five years, she's been taking photos out of airplane windows.

This book is part pretty pictures, part a meditation on creativity, and part a Photoshop tutorial.

It is said that a picture is worth a thousand words. That must be why the word count is so low. In the first 120 pages, there are eight pages of text on creativity, and one page of text for each of the following seven chapters. The book concludes with twelve pages of text in an appendix on Imaging Techniques, a high-speed introduction to photo manipulation in Photoshop.

The rest of the book is pictures. Pictures of clouds, pictures of fields, of mountains, of the sea, pictures of sunrises and sunsets. Great photos, even if the subject matter is a little repetitive.

The appendix shows several examples of before-and-after shots, and she's worked some wonders, though you'd expect no less from a Photoshop Evangelist.

Ultimately, the book is unsatisfying. Both the creativity and the Photoshop sections are too cursory to be of much value. It is more successful as a book of photographs, but I would have appreciated more commentary on the photos themselves. Why choose this one? What caught her eye in the first place? The choices of composition and cropping. What worked, what didn't.

Too bad.

posted on Sunday, December 31, 2006 9:09:25 AM (Pacific Standard Time, UTC-08:00)