2016/12/21

Elija Lovejoy and the Mob

Our fate was sealed long before November 8 (and not because the election's rigged):

"To Lovejoy, the greatest threat was not death, but the abdication of one's principles – the selfishness of self-preservation in an era of mob rule. That is the clarity of conscience that bides your time to the grave."
I think this is the first time I've heard about Elijah Lovejoy. The article uses him to make larger points, among them:
The press has no true power if it is afraid to document attacks on the most vulnerable citizens, and to challenge those who abet such attacks... fear of the mob, a fear openly expressed by writers who are targeted by Trump fans.
Now consider Trump posse browbeats Hill Republicans.
"It’s little wonder that Capitol Hill Republicans have papered over their not-insignificant policy differences with Trump, shying away from any statement about the president-elect that might possibly be construed as critical. They’re terrified of arousing the ire of their tempestuous new leader — or being labeled a turncoat by his army of followers."
"Nobody wants to go first," said Rep. Mark Sanford (R-S.C.), who received nasty phone calls, letters and tweets after he penned an August op-ed in The New York Times, calling on Trump to release his tax returns. "People are naturally reticent to be the first out of the block for fear of Sean Hannity, for fear of Breitbart, for fear of local folks."
WTH. He was bullied because he wanted Trump to release his tax returns, a simple request that would help the electorate make an informed decision? Quoting out of sequence:
"In early December, Rep. Bill Flores made what seemed like an obvious observation to a roomful of conservatives at a conference in Washington. Some of Donald Trump’s proposals, the Texas Republican cautioned, “are not going to line up very well with our conservative policies," though he quickly added that there was plenty the incoming president and GOP Congress could accomplish together."
"The TruthFeed post linked to Flores' Twitter handle and Facebook page and listed his office phone number. Soon people were threatening his physical safety and warning that his political career was on the line."
WTH again. He was threatened with violence because he pointed out that conservatives might not agree uncritically with every one of Trump's proposals. Trump is a fascist. He and his followers are using time-tested fascist tactics. What do we do about this?

2016/12/20

Gödel's Loophole

Sometime in the late 80s or then-abouts, when I first read the story of Kurt Gödel's citizenship interview, it was amusing. Morgenstern on Gödel Citizenship:

"[Gödel] rather excitedly told me that in looking at the Constitution, to his distress, he had found some inner contradictions and that he could show how in a perfectly legal manner it would be possible for somebody to become a dictator and set up a Fascist regime, never intended by those who drew up the Constitution."
It's less amusing by the day. Gingrich: Congress should change ethics laws for Trump - POLITICO:
"And should someone in the Trump administration cross the line, Gingrich has a potential answer for that too.
"In the case of the president, he has a broad ability to organize the White House the way he wants to. He also has, frankly, the power of the pardon," Gingrich said. "It's a totally open power. He could simply say, 'Look, I want them to be my advisers. I pardon them if anyone finds them to have behaved against the rules. Period.' Technically, under the Constitution, he has that level of authority.'"
Update 2016/12/22: Gingrich is trying hard to set the stage for Nuremburg II:

2016/12/18

Dave Winer nails it again

Sometimes Dave Winer says things that make no sense to me. Sometimes he says brilliant things so directly that they seem obvious. Ignore Trump as much as you can:

Trump is the outrageous distraction that draws your attention while the magician is doing his magic.

2016/12/09

The Logic of Xenophobia

Censored Photos From Inside U.S. Japanese Concentration Camps - Counter Current News:

"The very fact that no sabotage has taken place to date is a disturbing and confirming indication that such action will be taken." – General John L. DeWitt, head of the U.S. Army's Western Defense Command

A weird new energy market?

CleanTechnica - Community Solar Now Available Nationwide From Arcadia Power:

And it will be people who tend to have lower average electricity bills ... who are actually the ones who will be able to shave the most off their electric bill.
That is because the credit deducted from your normal bill from your utility is a hard dollar amount, based on how many panels you buy, which generate power and get paid a high rate in Massachusetts or Washington. You earn the credits from this solar investment in dollars. Those dollars simply get deducted from your bill.
I don't quite get how this works – what, exactly, is being traded for what; and what is actually being delivered. It has some of the "let's pretend" characteristics of a futures contract.

Shared Solar Is The Next Big Thing In Energy Industry | CleanTechnica

Shared Solar Is The Next Big Thing In Energy Industry | CleanTechnica:

"But the South Australia blackout proved a lie to that. And rather than being the fault of wind energy, as many pretended, the experience has underlined the fragility of Australia's reliance on large centralised generators and huge networks that transport the energy hundred [or] even thousands of kilometres.
Just about everyone agrees that the way to provide a more secure, and low cost grid, is to focus on localised energy, featuring local power and sharing – a concept that Orsini describes as "transactive energy."
The blockchain technology is important because it can offer a "cryptographically secure", distributed ledger that can track where electricity was generated, where it can travel to and who used it."
...
“Any energy system that is running high on renewables, in combination with non renewables and storage, needs to move to market model that recognizes the value of a “negawatt” (the power you don’t use) as well as the value of megawatt. The grid architecture will change very quickly.”
...
“If you are buying your electricity from far away – and if you not paying for that cost, then it is socialised. You never see the real cost. As soon as you start paying for the real cost then the grid re-organises itself.
You will want to pay for stuff that is closer. We used to have no choice but to have a centralised, monopoly grid, but we didn’t need to do that any more.”

2016/11/29

Trump's Lease for his D.C. hotel forbids him from being "an elected official"

Thanks to Daring Fireball for bringing yet another example of corruption to our attention: TTrump's Lease for his D.C. hotel forbids him from being "an elected official"

The Post Office Lease differs from many of Mr. Trump’s other business arrangements. That’s because, in writing the contract, the federal and D.C. governments determined, in advance, that elected officials could play no role in this lease arrangement. The contract language is clear: “No ... elected official of the Government of the United States ... shall be admitted to any share or part of this Lease, or to any benefit that may arise therefrom...”
The language could not be any more specific or clear. Donald Trump will breach the contract on Jan. 20, when, while continuing to benefit from the lease, he will become an “elected official of the Government of the United States.”

2016/11/20

President Obama Claims He Cannot Pardon Snowden; He's Wrong | Techdirt

President Obama Claims He Cannot Pardon Snowden; He's Wrong | Techdirt:

Obama pardoned three Iranian Americans who had not yet stood trial. That happened this year. So for him to say it's impossible to pardon someone who hasn't gone before the court is simply, factually, historically wrong.
There may be reasons why the President doesn't wish to grant a pardon to Snowden, but his stated reasons are completely bogus.

McCain warns Trump on torture, waterboarding - POLITICO

McCain warns Trump on torture, waterboarding - POLITICO:

"I don't give a damn what the president of the United States wants to do. We will not waterboard," McCain told an audience at the annual Halifax International Security Forum. "We will not torture people – It doesn't work."
On Saturday, McCain reminded the audience that torture remains illegal under the Geneva Conventions and was also banned by Congress last year.
That law, signed by President Barack Obama, restricts interrogation techniques to those outlined by the U.S. Army Field Manual — which does not permit waterboarding.
Good on you, Senator McCain. And thank you.

Trump's big infrastructure plan? It's a trap. - The Washington Post

Trump's big infrastructure plan? It's a trap. - The Washington Post:

Trump's plan is not really an infrastructure plan. [... It] doesn’t directly fund new roads, bridges, water systems or airports, as did Hillary Clinton’s 2016 infrastructure proposal [...] Trump’s plan provides tax breaks to private-sector investors [...]
[...] projects that are not attractive to private investors [...] get no help from Trump’s plan. [With the business tax break, it's] a stunning $85 billion after-tax profit for contractors — underwritten by the taxpayers.
[It] isn’t really a jobs plan, either. [...] it funds tax breaks, not bridges [...] simply no guarantee that the plan will produce any net new hiring.
Third, because there is no proposed funding mechanism for Trump’s tax breaks, they will add to the deficit — perhaps as much as $137 billion.
But when the plan is passed and those voters see that it fattens investors’ and contractors’ pockets (but not workers’)[... they will] turn against its backers.

2016/11/17

The 'us and them' divide worked for Putin and it will work for Trump | World news | The Guardian

The 'us and them' divide worked for Putin and it will work for Trump | World news | The Guardian Another informative read.

I have the privilege of being able to convey messages from the future to my friends in the US and Europe.
For someone like Trump or the Russian president, Vladimir Putin, xenophobia is only a means of mobilisation, not an end in itself... Trump and Putin are ecumenical nationalists.
...they are not bound by logic or intellectual decency. Their constituencies have short attention spans, and don’t notice when their leader switches from hating to ... co-opting... That’s what Putin has done with former Chechen independence fighters, who are now playing a key role in his machine of terror.
The anti-Trump marches ... last weekend were all about minority rights... Trump’s spin doctors will have no problem breaking up this movement, pitting its diverse components against each other, the same way Putin did with the Bolotnaya Square protests in 2012.
To beat him, Trump’s opponents need to start everything anew and unite under more universal, and unifying, slogans.
I subscribe through the Guardian's iOS app, which seems to have a discounted rate. Maybe it's time to upgrade to full fare.

2016/11/16

Stephen Bannon Has No Business In The White House | Southern Poverty Law Center

You can sign the Southern Poverty Law Center's petition here.

The Way to Stop Trump | by David Cole | NYR Daily | The New York Review of Books

The Way to Stop Trump | by David Cole | NYR Daily | The New York Review of Books:

The risks are almost certainly greater than those posed by any prior American president...
Whether Trump will actually try to implement these promises, and more importantly, whether he will succeed if he does try, lies as much in our hands as in his.
...if we now and for the next four years insist that he honor our most fundamental constitutional values, including equality, human dignity, fair process, privacy, and the rule of law, and if we organize and advocate in defense of those principles, he can and will be contained.
I worry about this point. If Trump learns the art of spy-ops as taught by Putin's Russia, we will have a hard time.
Americans did not sit back and accept that the executive [under G.W. Bush] was above the law... they protested, filed lawsuits, wrote human rights reports, lobbied foreign audiences and governments to bring pressure to bear on the United States, leaked classified documents, and broadly condemned the administration’s actions as violations of fundamental constitutional and human rights.
Bush did not introduce these reforms because he came to realize his wrongs... But Bush was nonetheless checked—by American civil society, international criticism, and, for the first time in history, the Court and Congress.
Obama’s troubling use of drones to engage in secret targeted killing far from any battlefield leaves Trump an extremely dangerous weapon.
I'll stop quoting. Please go read the entire article.

For the love of all that is holy and good, #StopBannon's appointment – Medium

Practical steps to deter institutionalized white supremacy: For the love of all that is holy and good, #StopBannon's appointment – Medium

President-elect Trump's coal con

Coal country can't catch a break. President-elect Trump's coal con:

"...all those politicians and industry officials and career campaign consultants who spent most of the campaign trying to convince the hard-working people of the coalfields that another boom would be just around the corner – Well, I guess we were supposed to take them seriously, but not literally."

A Trump administration thaw with Russia is "unacceptable," McCain says - The Washington Post

A Trump administration thaw with Russia is "unacceptable," McCain says - The Washington Post:

"...plunged his country into tyranny, murdered his political opponents, invaded his neighbors, threatened America's allies and attempted to undermine America's elections"
It doesn't take a great deal of imagination to see this as a prediction of the future of the U.S.

2016/10/03

Local Wind Energy Development Has Broad Consequences for Golden Eagles

Local Wind Energy Development Has Broad Consequences for Golden Eagles:

"Together, the stable isotope and genetics data indicate that eagle populations are connected across much of North America and often travel long distances."
This puts me in mind of Grace, a recently deceased golden eagle who had been a resident of New Mexico Wildlife Center. Grace didn't have an easy life; she came to NMWC after being found by a road in northern NM, apparently hit by a car, tail feathers pulled by some heartless scofflaw. While in residence at NMWC she participated in several golden eagle surveys throughout the state, tethered in fields near elk carcass to attract other passing eagles. I don't know when/where the results will be published, but my understanding is that they helped confirm a decline in golden eagle numbers in New Mexico. The reasons for the decline are unknown. Coincidentally, while hiking with friends this last Saturday (1 Oct) near Ironton Park, Colorado, we saw several birds circling above a rock outcropping. Several were ravens. One was a small hawk, either a Cooper's or a sharp-shinned. And one, barely discernible in a photo I snapped, looked very much like a golden eagle.

2016/09/29

2015/07/29

A Government of the People, by Some Other People

A couple of years ago I signed a petition asking for a full pardon for Edward Snowden. Roughly two years behind schedule, The White House has responded to that petition. No surprise: TWH has declined to issue a pardon. The Intercept has summarized the errors and misleading statements in the response. Among their points:

Snowden is willing to accept the legal consequences of his acts — but, were he to come home under the current circumstances, [he] would be barred under the draconian Espionage Act from publicly arguing that his leaks were justified.
Ars Technica expanded on this and other inaccuracies in The White House's response. With emphasis added:
Another one of Snowden’s US-based lawyers, Jesselyn Radack, reiterated to Ars that her client is not "running away."
"Snowden is in Russia because of the United States, which revoked his passport while he was transiting through there to Latin America," she said. "How does President Obama think Snowden should have ‘constructively addressed these issues’ when his administration has led the worst crackdown on national security and intelligence whistleblowers in US history? Earlier, President Obama stated that he had passed an executive order that Snowden could have used in order to go through proper channels. That statement was false. Presidential Policy Directive #19 was not implemented when Snowden blew the whistle on NSA and does not protect contractors like Snowden."
The White House is intent on prosecuting Ed Snowden, but it shows no interest in prosecuting those responsible for the illegal collection of bulk call data. Also see:

2015/05/21

Simulators and Aviation Safety

Everything We Thought about Training Was Wrong | Flying Magazine:

"In addition to the benefits technology in the cockpit afford, there are two big trends affecting safety in a positive way. The first is the increased use of simulator technology in preparing students for flight and maintaining proficiency. "
Hanging Out With Someone Who Walked On The Moon | Hackaday:
"David [Scott, Apollo astronaut] told us that the simulations were remarkably accurate. His recollection was the only difference between the simulation and being on the moon was the fact that you were on the moon. Quite an endorsement of the Apollo simulators.
"David is a big fan of simulations. He told us that when traveling into space you want to simulate as much as possible while on the ground so that you get to know the systems and your fellow crew members. Apollo went so far as to simulate parts of the mission with the CM and LM inside of a huge vacuum chamber."


It probably doesn't need emphasis, but Dave Scott was talking about realistic simulations. Simulations need to be sufficiently realistic that, when training scenarios play out in real life, the pilot can recognize what's happening as something familiar.

Aside: I loved this bit from NOVA's "First Man on the Moon", around the 24:19 minute mark:
NARRATOR: Back in orbit, Armstrong kept his cool, figuring out his only remaining option: disengage all the maneuvering thrusters including the one that was stuck and use the re-entry thrusters to counteract the tumbling and regain control of the spacecraft.
SCOTT:
He had to reach up above his head and throw switches under this high-speed roll. That's amazing that he was able to do that and he knew exactly where the switches were, exactly which ones to throw.
SCOTT: I mean, the guy was brilliant.
He knew the system so well that he found the solution, he activated the solution under extreme circumstances, and I gotta say it was my lucky day to be flying with Mr.
Neil Armstrong.

2015/03/04

Pres. Obama: NSA security backdoors are a bad idea

The headline is misleading. He didn't really say that. At least, not on purpose. As far as I know.

From 2 March 2015:

Exclusive: Obama sharply criticizes China's plans for new technology rules | Reuters:

In an interview with Reuters, Obama said he was concerned about Beijing's plans for a far-reaching counterterrorism law that would require technology firms to hand over encryption keys, the passcodes that help protect data, and install security "backdoors" in their systems to give Chinese authorities surveillance access.

Obama said the rules could also backfire on China.

"Those kinds of restrictive practices I think would ironically hurt the Chinese economy over the long term because I don’t think there is any U.S. or European firm, any international firm, that could credibly get away with that wholesale turning over of data, personal data, over to a government," he said.


From 24 February 2015, an exchange between Yahoo's Chief Information Security Officer Alex Stamos and NSA Director Mike Rogers, in which Mr. Stamos challenges the NSA's plan to ban working crypto:

Yahoo's security boss faces down NSA director over crypto ban - Boing Boing:
AS: [...] So, if we’re going to build defects/backdoors or golden master keys for the US government, do you believe we should do so — we have about 1.3 billion users around the world — should we do for the Chinese government, the Russian government, the Saudi Arabian government, the Israeli government, the French government? Which of those countries should we give backdoors to?

[...]

MR: I think we can work our way through this.

AS: I’m sure the Chinese and Russians are going to have the same opinion.

MR: I said I think we can work through this.

AS: Okay, nice to meet you. Thanks.

2014/01/19

Squatting Owls Eavesdrop On Prairie Dogs | LiveScience

The part that caught my eye actually had little to do with the owls:

Squatting Owls Eavesdrop On Prairie Dogs

...prairie dogs have the most sophisticated language yet decoded among non-humans. Recent studies have shown that they have nouns, adjectives, verbs, and adverbs, which they can use to indicate the size, shape, color, and speed of an intruder. The social rodents even have different calls for a tall human in a blue shirt and a short human in a grey shirt.
“In the past, people shied away from the word language, because we didn’t have enough information. But it’s really clear now that’s what it is,” said Con Slobodchikoff, an animal behaviorist at Northern Arizona University in Flagstaff, who studies prairie dog calls.


Growing up, my parents frequently opined that animals of other species were as intelligent, if in sometimes specialized ways, as humans. I bet they'll be pleased by the final paragraph:

“We have for a long time underestimated the ability of animals. We thought they were running on programs of instinct, like little robots,” said Slobodchikoff. “But in reality, they’re far more advanced and far smarter than we give them credit for, and with that acknowledgement we need to give animals more respect than we have been."


As a first step maybe we could stop trying to exterminate prairie dogs...

2013/08/22

For Some Value of "Magic": Bradley Manning's Post-Sentencing Statement

For Some Value of "Magic": Bradley Manning's Post-Sentencing Statement:

"Our nation has had similar dark moments for the virtues of democracy—the Trail of Tears, the Dred Scott decision, McCarthyism, the Japanese-American internment camps—to name a few. I am confident that many of our actions since 9/11 will one day be viewed in a similar light. "


Thanks to Steve Holden for posting the statement. It's well worth reading in its entirety.

2013/08/19

Cameron Proves Greenwald Right

Cameron Proves Greenwald Right:

"Britain is now a police state when it comes to journalists, just like Russia is."


Well put.

I don't care what Edward Snowden's personal character may prove to be. He has done us a huge favor by bringing these issues to the fore. Now we need to pressure our elected representatives to actually do something about the destruction of our civil liberties.

2013/03/03

Prairie dogs in the NM news

[2013/03/03] Local news briefs - The Santa Fe New Mexican:

"CLOVIS - City commissioners have approved a plan to poison prairie dogs in a Clovis park.

The Portales News-Tribune reported that Clovis city commissioners on Friday approved an emergency budget transfer to purchase 250 containers of Rozol rodenticide to reduce the population of prairie dogs at Ned Houk Park.

The move came after several landowners near the park pressured commissioners about the burrowing rodents.

Resident Glenn Eagle said the prairie dogs have eaten his oat crop in the past, and he's worried they will eat the oats again this spring. He said the rodents are destroying the park by eating the grass and making erosion problems worse.

But Clovis resident Susan Hubby says she was concerned about the long-term effects of Rozol on the park's ecosystem."



I'm starting to collect snippets about prairie dogs. They're interesting creatures, and humans tend to regard them in one of two extreme ways: as dangerous pests to be eradicated, or as cute fur balls to be serenaded by Tibetan monks.

Interesting: Gunnison's prairie dogs, the kind we have here in Santa Fe, have 40 diploid chromosomes, whereas all other species have 50.

Also interesting: prairie dog species can vary quite a bit in appearance and vocalization. Compare this excellent, up-close view of some Denver-based black-tailed prairie dogs, by Yuta Murai, with these clips I took of a small Gunnison's colony here in Santa Fe.

Also interesting, and exemplary of extreme human attitudes toward prairie dogs, is the history of their association with bubonic plague. Some people think they "carry" plague and other deadly diseases such as hanta virus. In fact they suffer from plague, which can quickly wipe out almost 100% of a colony; but they don't carry it from place to place as rats do. And they don't carry hanta virus, or spread it in their droppings.

There's plenty more to write about human attitudes toward prairie dogs (and how we invent myths to justify those attitudes), about their "keystone species" status, etc.



Further Reading / Viewing:

  1. "City approves prairie dog poison", Portales News-Tribune, 1 March 2013
  2. "Tibetan Monks on U.S. Tour Take Moment to Bless Critters", Albuquerque Journal North, 10 August 2008.
  3. Animal Diversity Web
  4. "Prairie dogs", by Yuta Murai
  5. "Prairie Dogs", by yours truly
  6. "Man charged with shooting at prairie dogs", Santa Fe New Mexican, 13 August 2012
  7. "Gunnison's Prairie Dog", Endangered Species of the Mountain-Prairie Region: U.S. Fish and Wildlife Services
  8. "Interspecific Comparisons of Sylvatic Plague in Prairie Dogs", Journal of Mammalogy, Vol. 82, No. 4, November, 2001.
  9. "Recovery and Restoration of the Black-footed Ferret (Mustela nigripes)", American Society of Mammalogists
  10. "Resolution on the Decline of Prairie Dogs and the Grassland Ecosystem in North America", American Society of Mammalogists

2011/03/09

Squeeze play?

The Mac App Store (MAS) requires participating developers to pay Apple $99/year plus 30% of gross sales price; only apps which are approved by Apple may be sold via MAS.

Xcode4 was released today on MAS, for $4.99. It used to be included on the OS X distribution DVDs, as a no-extra-cost optional installation.

The beta distributions of OS X Lion is available only through the MAS. As far as I know it does not include Xcode.

Developers are not forced to sell their applications through the MAS. In fact, some types of software, those which require administrator privileges for installation, must be sold outside the MAS.

Still, Apple seems to be edging down a path at the terminus of which developers must pay an annual fee to sell software for use on OS X, and must have that software approved by Apple before it can be offered for sale.

I sincerely hope this isn't what they have in mind.

Thank goodness for Linux.

2011/01/28

Fibers for fuel

And now for something completely incoherent: a ramble about pikas, horned lizards, ruminants, biofuels and genetic sequencing.

Pikas

I recently posted a video about pikas. Like their fellow lagomorphs, rabbits and hares, pikas can live on indigestible grasses thanks to the bacteria in their caecal pouches. A big part of their body mass is devoted to digestive systems, yet unlike ruminants lagomorphs can't pump their food backward and forward to take advantage of the work done by the gut bacteria. So they have to eat their food more than once.

Horned Lizards

Horned lizards also have proportionally large digestive systems, because they eat ants. And that need for a big digestive system is believed to be one reason horned lizard bodies are so spiky. As DigiMorph explains it:

"Ants are small and contain much indigestible chitin, so large numbers of them must be consumed. Hence an ant specialist must possess a large stomach for its body size to process a lot of material. [...] the stomach occupies a considerably larger fraction of the animal's overall body mass [...] than do stomachs of all other sympatric desert lizard species. Possession of such a large gut necessitates a tank-like body form, reducing speed and decreasing the horned lizard's ability to escape from predators by flight."


The full article is well worth reading. It has a lot more interesting info on horned lizards, including the fact that some of them give live birth. I have read elsewhere that the live-bearing species tend to live at higher altitudes, where it would be difficult to keep eggs sufficiently warm.


Ruminants

Ruminants such as cattle can live on grasses. Their food goes back and forward through several stomach chambers while bacteria break down plant fibers.


Biofuels


Cosmos Magazine reports on genetic sequencing of cow gut bacteria aimed at discovering how to break down cell fibers more efficiently. The techniques of the researchers were somewhat gruesome: they inserted nylon sacks of switchgrass through holes in cows' skin directly into their stomachs. The method was considered necessary because the bacteria of interest could not be cultured.

Once they had enough bacteria they removed the nylon sacks and analyzed the bacterial DNA, looking for genes whose products aid in the breakdown of cellulose.

"It is hoped that this research can speed up the process of breaking down switchgrass into sugars including glucose and xylose to be fermented into ethanol."


2010/12/08

Space Exploration Technologies Corporation - Press

Space Exploration Technologies Corporation - Press:

"This marks the first time a commercial company has successfully recovered a spacecraft reentering from low-Earth orbit. It is a feat performed by only six nations or government agencies: the United States, Russia, China, Japan, India, and the European Space Agency."


Congratulations to SpaceX.

2010/12/04

Just Warm Enough - Science News

Just Warm Enough - Science News:

"a massive fungal bloom swept the Earth about the time of the dinosaur extinction."
"...fungi plague plants, insects and other cold-blooded creatures far more often than they do mammals or birds. Putting two and two together, [Arturo Casadevall, a microbiologist at Albert Einstein College of Medicine in New York City ] formulated a theory that the warm body temperatures of mammals and birds might have protected them from fungal pathogens, while diseases caused by fungi might have been a factor keeping the reptiles from rising again."


This is interesting in light of ongoing fungal epidemics: chytrid, which is threatening amphibian populations worldwide; and white-nose syndrome, which is threatening bats in the U.S.

The article does raise questions, t.ex. why would amphibians have escaped this ancient fungal bloom along w. birds and mammals? (The article notes implicitly that body temperature isn't the only factor determining susceptibility to fungal infections.) Is there any causal connection between the fungal bloom and the final demise of the dinosaurs, of which many species were believed to be warm-blooded?

"A fungus called Geomyces destructans infects bats while they are hibernating — a time when body temperatures drop from 40˚ C to about 7˚. “They’re not warm-blooded when they get infected,” Blehert says."


Bizarrely, this could also explain what happens to my feet in the wintertime :)

2010/11/15

Heavenly Intrigue

Danish astronomer's remains exhumed in Prague - Yahoo! News:

"On Monday, an international team of scientists opened [Tyge Brahe's] tomb in the Church of Our Lady Before Tyn near Prague's Old Town Square..."
The book got poor reviews, but the whodunnit isn't done yet.

The 'Israelification' of airports: High security, little bother - thestar.com

The 'Israelification' of airports: High security, little bother - thestar.com:

"That's the process %u2014 six layers, four hard, two soft. The goal at Ben-Gurion is to move fliers from the parking lot to the airport lounge in a maximum of 25 minutes."


It took decades, but in the healthcare reform effort the U.S. finally took a look at what works and doesn't work in other countries.

When will we stop throwing away time, money and constitutional rights and start studying how other countries have addressed the transportation safety problem?

2010/10/28

Rock Recipes

Cooking

Sharp Stone Age spearheads were cooked then flaked - life - 28 October 2010 - New Scientist:
"If you want to make really sharp stone spearheads, do like Stone Age cave dwellers did and cook them first."

Overcooking

Bir Umm Fawakhir: Insights into Ancient Egyptian Mining:
"'The gold-bearing earth which is hardest they first burn with a hot fire, and when they have crumbled it...they continue the working of it by hand..."

Cooking with vinegar

Hannibal - Wikipedia, the free encyclopedia:
"By Livy's account the crossing was accomplished in the face of huge difficulties.[24] These Hannibal surmounted with ingenuity, such as when he used vinegar and fire to break through a rockfall."

2010/09/10

The line between book and Internet will disappear - O'Reilly Radar

The line between book and Internet will disappear - O'Reilly Radar:

"But everything exists within the EPUB spec already to make the next obvious -- but frightening -- step: let books live properly within the Internet, along with websites, databases, blogs, Twitter, map systems, and applications.
"There is little talk of this anywhere in the publishing industry that I know of, but the foundation is there for the move -- as it should be. And if you are looking at publishing with any kind of long-term business horizon, this is where you should be looking[...]
"I don't know what smart things people will start to do when books are truly of the Internet.
"But I do know that it will happen, and the 'Future of Publishing' has something to do with this. The current world of ebooks is just a transition to a digitally connected book publishing ecosystem that won't look anything like the book world we live in now."

2010/09/02

Can Nuclear Waste Spark an Energy Solution?

Can Nuclear Waste Spark an Energy Solution?:

"The idea is to reprocess that spent fuel to generate more power. Proponents say the know-how is available now to address the nuclear proliferation concerns that have bedeviled previous recycling plans. And they say the advanced reactors that would run on that recycled fuel would mark a new level of progress on safety."
'“It’s very clear when you get into details that [nuclear] is the best energy system, bar none,” said Tom Blees, president of the Science Council for Global Initiatives, a nonprofit focused on resources and climate, and author of Prescription for the Planet, a 2008 book advocating the technology. “We have to make a choice—provide abundant energy for the planet or be content with these resource wars we have all the time.”'
"The International Panel on Fissile Materials, a group of arms control and nonproliferation experts from 17 countries[...] noted that sodium leaks have sparked major fires in a similarly designed prototype reactor in Japan, as well as in several operating reactors in France. One of them, the Superphénix commercial-sized plutonium fueled reactor, was shut down in 1998 for political and technical reasons after experiencing high operating costs."


2010/08/30

DRM-Free eBook sellers

Cory Doctorow, via Boing Boing:

" Amazon, Barnes and Noble and Kobo were all happy to carry my books without DRM, and on terms that gave you the same rights you got when buying paper editions. Sony and Apple refused to carry my books without DRM -- even though my publisher and I both asked them to."


I wonder why Apple responded this way, given their stated position on DRM-free music. It would be interesting to know more about the negotiations.

2010/08/17

U.S. Is Bankrupt and We Don't Even Know It: Laurence Kotlikoff - Bloomberg

Via Doc Searls:

U.S. Is Bankrupt and We Don't Even Know It: Laurence Kotlikoff - Bloomberg:

"This is what happens when you run a massive Ponzi scheme for six decades straight, taking ever larger resources from the young and giving them to the old while promising the young their eventual turn at passing the generational buck."


I and my classmates have known this since high school in the early 1980's. But we haven't successfully done anything about it. I voted for Perot and contributed to the Concord Coalition for awhile; nothing more.

How do you visibly alter the momentum of a social system 3.0e8 times larger than yourself?

2010/08/13

iHelp for Autism - - News - San Francisco - SF Weekly

iHelp for Autism - - News - San Francisco - SF Weekly:

"After he began spending 30 minutes at a time on apps designed to teach spelling, counting, drawing, making puzzles, remembering pictures, and more, she sat down at her own computer."


Maybe it is a magical device.

2010/07/20

Bai-Baikonur

Russia confirms shiny new cosmodrome - The Register:

"Putin stressed the non-military nature of the project, and indicated that Russia is keen to cut its reliance on Kazakhstan's Baikonur spaceport."

2010/07/16

Another Toss of the Shuttle

Life isn't so much a fabric as it is a fascinating, intricate tangle of seemingly unrelated things.

I've long been a fan of Richard Feynman's stories. In 1992 I read about his last adventure, a quest to visit Tannu Tuva: "Tuva or Bust." A central element of the story is Tuvan throat singing.

My grandfather had had a distinctive singing gimmick, one which had helped him establish his character of "Frog Millhouse" in old western movies. As I read the description of throat singing in "Tuva or Bust", I began to wonder whether Grandpa had in fact been a country and western throat singer.

Fast forward to 2005. I was living in Santa Fe, not far from the site of one of Dr. Feynman's early adventures. My friend Bobi, who had once worked at Los Alamos, was getting ready to adopt a baby from Kazakhstan. As we prepared for her trip we came across the story of Paul Pena, a blind R&B musician who among other things had written the Steve Miller Band hit, "Jet Airliner." Listening to a San Francisco radio station, Mr. Pena had heard some intriguing vocal music which turned out to be Tuvan throat singing. The music was being aired because a group of Tuvans was visiting the United States, in a cultural exchange visit which was a posthumous result of Dr. Feynman's efforts to visit Tuva.

Paul Pena taught himself to sing in the rumbling style of kargyraa, somehow became connected with the author of "Tuva or Bust", Ralph Leighton, and ended up traveling to central Asia, where he won a prize in a throat-singing competition.

Mr. Pena's adventure, and some of his life's trials, were captured in the bittersweet movie "Genghis Blues."

Almost a year after Mr. Pena died, Bobi departed to Kazakhstan. I went along, and we came together with one of the most wonderful people I've ever known. She's now Bobi's daughter, and my god-daughter.

We made a video of the trip. The obvious choice of background music for the air travel segments was Mr. Pena's "Jet Airliner."


With all of this as background, today I came across an NPR interview with Billy West, who provides much of the voice of Futurama:

On Popeye
I loved Jack Mercer, and I got him. I understood him. And what helped me understand that Popeye voice — it's a high voice and a low voice at the same time — cause when I was a kid, we all used to try to do that and we all stunk. It didn't sound right. So one day, I see this film — it was an independent film called Genghis Blues. And it was about [Paul Pena] ... And he was listening to a world-band radio one night, and he heard this strange noise. And it was a program about Tuvan singers. And Tuvans had a way of singing where they could do one and two voices. And I realized, 'Oh man, that's how this guy did it. Jack Mercer.' [He imitates both voices.] There'd be two voices, an octave apart. And he'd put them together."





2010/07/13

Smart grid emergent

Virtual power plants fill supply gaps in heat wave | Green Tech - CNET News:

"...automated efficiency technology, particularly dialing back electricity usage during peak times, is becoming one of the most effective smart-grid tools for maintaining the balance between electricity supply and demand."

2010/07/11

Scratch for your Phone

App Inventor for Android:

"To use App Inventor, you do not need to be a developer. App Inventor requires NO programming knowledge. This is because instead of writing code, you visually design the way the app looks and use blocks to specify the app's behavior."


PhysOrg.com: Sharp-eyed robins can see magnetic fields

Sharp-eyed robins can see magnetic fields:

"a new study shows that [birds'] internal compass also depends on the birds having clear vision in their right eyes.
Cryptochrome also affects the light sensitivity of retinal cells, which suggests it may also affect sensitivity to magnetic fields. In effect, the magnetic fields create light or dark shadings over what the bird usually sees, and the shadings change as the bird turns its head, giving it a visual compass from the patterns of shading."


Wow.

The urge to quote Shakespeare is almost irresistible.

Via Engadget

2010/07/03

Juxtaposition: American jobs

BusinessWeek posted this on 1 July:
Andy Grove: How America Can Create Jobs:

"A new industry needs an effective ecosystem in which technology knowhow accumulates, experience builds on experience, and close relationships develop between supplier and customer. The U.S. lost its lead in batteries 30 years ago when it stopped making consumer electronics devices... U.S. companies did not participate in the first phase and consequently were not in the running for all that followed. I doubt they will ever catch up...
These [Asian] countries seem to understand that job creation must be the No. 1 objective of state economic policy. The government plays a strategic role in setting the priorities and arraying the forces and organization necessary to achieve this goal..."


BBC News posted this today:
BBC News - US to provide nearly $2bn for two solar energy projects:
"Nearly $2bn... in loan guarantees will be given to two companies to kick-start the US solar energy industry, President Barack Obama has announced...
Abound Solar Manufacturing, will manufacture state-of-the-art thin film solar panels...
Plants will be built in Colorado and Indiana, creating 2,000 construction jobs and 1,500 permanent jobs, the Associated Press reports...
'We're going to to keep competing aggressively to make sure the jobs and industries of the future are taking root right here in America,' he said on Saturday."


Groves's article contains many thought-provoking assertions. Well worth reading.

GIS + global warming = k * Archaeology

CU Researcher Finds 10,000-Year-Old Hunting Weapon in Melting Ice Patch | News Center | University of Colorado at Boulder:

"Over the past decade, Lee has worked with other researchers to develop a geographic information system, or GIS, model to identify glaciers and ice fields in Alaska and elsewhere that are likely to hold artifacts. They pulled together biological and physical data to find ice fields that may have been used by prehistoric hunters to kill animals seeking refuge from heat and insect swarms in the summer months."
"Ninety-five percent of the archaeological record that we usually base our interpretations on is comprised of chip stone artifacts, ground stone artifacts, maybe old hearths, which is a fire pit, or rock rings that would have been used to stabilize a house," Lee said. "So we really have to base our understanding about ancient times on these inorganic materials. But ice patches are giving us this window into organic technology that we just don't get in other environments."


(Via Stone Pages Archaeo News)

2010/07/02

Using Dropbox to implement OS X / iOS app sync?

Hog Bay Software Blog:

"Then the Dropbox public API showed up. That changed everything again. I've never wanted to write and maintain my own simpletext.ws sync service, but there was no other choice. Now I can outsource all that work to Dropbox. But to do this I still need to rewrite my model layer to support Dropbox sync."

2010/06/25

CSS3 3D Transformations

Here's a nice, concise snippet to demonstrate CSS3 3D transformations, from Superted's Toy Story iAd Navigation post:


items[i].style.webkitTransform = matrix.rotate(newAngle, 0, 0).translate(0, 0, 380);


Want to create a "wheel" of images? Rotate each one by its position around the wheel, so it will face the center of the wheel. Then shove it back (along z) to the edge of the wheel.

2010/06/23

IE 9 + Canvas

From twitter:

jeresig IE 9 shipping with Canvas! http://j.mp/cTyuQg


Huzzah!

Hover on Multi-touch Devices

Technical Note TN2262: Preparing Your Web Content for iPad:

"For example, a mouse pointer can hover over a webpage element and trigger an event; a finger on a Multi-Touch screen cannot."


This is certainly true for multi-touch devices available now, but I wouldn't be surprised to see, someday, touch-sensitive devices which are also proximity-sensitive.

Update 2010/07/08: Others are thinking about implications of hover on multi-touch devices: http://trentwalton.com/2010/07/05/non-hover/ via http://news.ycombinator.com/item?id=1497108.

Update 2010/08/14: A recent Ars Technica article, exploring the similarities between the iPad and ST:TNG's PADD, contained a relevant snippet:
"Still, what new frontiers are out there for interacting with computing devices? Michael Okuda believes that removing the touch requirement will bring new advances in gesture-based control. "Once you don't have to physically touch the screen," he told Ars, "I think yet another window is going to open up.""

Stephen Wolfram on Alan Turing

Here's a part of the "suicide" story with which I was not familiar.

Wolfram|Alpha Blog : Happy Birthday, Alan Turing:

"When one first hears that Alan Turing died by eating an apple impregnated with cyanide one assumes it must have been intentional suicide. But when one later discovers that he was quite a tinkerer, had recently made cyanide for the purpose of electroplating spoons, kept chemicals alongside his food, and was rather a messy individual, the picture becomes a lot less clear."

2010/05/25

Growl - The iPad and immersive computing - O'Reilly Radar

This made me chuckle.

The iPad and immersive computing - O'Reilly Radar:

"I love how focused I am using an iPad, versus working on a laptop. New mail isn't constantly arriving; tweets aren't Growling into view; I don't even have an RSS reader installed."


When Growl first appeared I couldn't imagine why a sane Mac user would want it. How could you make fun of Windows and its incessant, work-stopping notification balloons, and want the same sort of behavior on your Mac? Better to see an alert when something goes wrong than to be interrupted by a balloon whenever something works as expected.

Of course, I long ago installed Growl on my desktop :)

It's not (necessarily) as intrusive as the old Windows notification balloons: you can control which apps generate Growl notifications. As with eye-grating page layouts in early desktop-publishing, or blinking text in early web pages, there's always the danger that you'll turn on all notifications because you can.

I do like the ease with which you can create custom Growl notifications for your own scripts/applications. T.ex. when I create a new timestamp in my VoodooPad worklog, Growl pops up a summary of times by task for the day. Were I not so lazy, I could ask it to notify me when long-running distributed compute jobs have finished; etc.

Anyway, it was funny to read the observations on O'Reilly Radar, written almost as though Growl were part of a standard OS X install.

2010/05/11

Sony's getting back in the game?

NEX-3 and NEX-5 coming in July, and an interchangeable lens camcorder in the fall (Sneak Peek: New Sony Camcorder in Development).

I'm not sure what the camcorder will offer over and above the NEX cameras, but to a person living in the bright environs of northern New Mexico that optional optical viewfinder on the digicams is really appealing. SDHC/SDXC memory card support and automatic HDR look nice, too.

2010/04/28

You have mail?

Recently, when opening new Terminal sessions in Mac OS X, I've started seeing a familiar old message before the first shell prompt.

Last login: Wed Apr 28 06:27:11 on ttys006
You have mail.
mymac:~ my_username$


I assumed some system utility had delivered a notification via /usr/bin/mail. What did the message say?
$ mail
mail: /var/mail/my_username: Is a directory


Indeed, /bin/ls showed an empty my_username directory in /var/mail.

Weird.

In any case I deleted /var/mail/my_username/, and the notifications no longer appear in new Terminal sessions.

2010/04/25

A life well lived

Tomi Pierce must have been an amazing person.

via Tim O'Reilly.

2010/04/06

Eric Margolis

Via Tim O'Reilly, a tribute to Mikhail Gorbachev.

Eric Margolis:

"Gorbachev did not plan to destroy the Soviet Union but to reform and revitalize it. But by refusing to hold it together by force, he brought about its doom.
Gorbachev did the world a huge favor."

2010/03/31

Chrome to Include Flash -- Engadget

Chrome brings Flash Player into the fold, trains it to kill iPads? -- Engadget

As of about a year ago I thought Google didn't really care for Flash. It had accessibility problems and was opaque to search engines.

Apparently Adobe have addressed these issues.

2010/02/22

Mercurial, Migration Assistant, and dotfiles

I recently upgraded my iMac. Migration Assistant moved all of my files to the new machine without issue -- or so it seemed.

I had created Mercurial repositories in a couple of virtualenv environments, to track changes locally.[1] I didn't notice that Mercurial had put each virtual environment's .Python file under revision control.

Shortly after completing the migration I made changes in one of these virtual environments. A quick 'hg status' before committing, and...


$ hg status
abort: data/.Python.i@13b27e856c38: no match found!


WTF?

After much investigation it appears that the following has happened.

  1. Mercurial represented the .Python link in its .hg/store/data directory as ._Python.i
    1. The leading underscore appears to be Mercurial's way of noting that the 'P' should be capitalized.

  2. I think Migration Assistant uses ditto to copy files.
    1. ditto saw the leading '._' and concluded this was an orphaned resource file.[2] So it didn't copy the file.

  3. Mercurial knew that it was supposed to have a .hg/store/data/._Python.i file; when it couldn't find it, it decided the repository was corrupted.



Luckily the problem cropped up before I traded in the old machine, so I was able to copy across the missing files manually.

In my experiments, the problem manifested only when the capitalized dotfile was a symbolic link, not when it was a regular data file.

Well... the above write-up contains several unproven assertions, e.g. about the conditions under which Mercurial will create a '._' filename. I'm not really sure whether this is a bug or merely a caveat regarding an obscure corner condition. For now, the easiest workaround is:

Don't Track virtualenv .Python Files With Mercurial.

[Update 2010/02/22: Someone has already filed this as a Mercurial bug.]



[1] (Mercurial makes a great filesystem "undo" facility, useful even for directory trees which you never intend to share with anyone else.)

[2] OS X still supports something ike resource forks. In tarballs and other non-OS Extended filesystems, resource forks are represented as dot-files with a leading underscore. (See Norman Walsh's blog for more info.) For example, the resource fork for a file named 'foo.txt' might be '._foo.txt'.

2010/02/11

Who will buy the lottery tickets?

EOF - The Google Exposure | Linux Journal:

" The 2008 study found half of all clicks come from lower-income young adults."

2010/01/24

U.S. enables Chinese hacking of Google - CNN.com

U.S. enables Chinese hacking of Google - CNN.com:

"In the aftermath of Google's announcement, some members of Congress are reviving a bill banning U.S. tech companies from working with governments that digitally spy on their citizens. Presumably, those legislators don't understand that their own government is on the list."


From llimllib on Twitter via brettsky.

2009/11/12

TextMate, Emacs and META indent-region

[cross-posted from the Desert Moon blog.]

I haven't used GNU Emacs very much since switching to TextMate in 2005. One Emacs feature which I really miss in TextMate is indent-region. It lets you take an entire region of code, whatever its language, whatever its mix of tabs and spaces and indentation widths, and re-format it using your preferred indentation style.

But wait! Emacs has a batch mode, and you can drive it from TextMate. Many thanks to Gragusa's Things for showing the way.

The post on Gragusa's Things is specific to R code, but I'm more interested in re-formatting C and C++ code. Here's my first cut at a general TextMate Bundle to re-format code regardless of the source language:

#!/usr/local/bin/python2.6
"""
Use Emacs to re-indent regions of the current buffer.
Inspired by
http://gragusa.wordpress.com/2007/11/11/textmate-emacs-like-indentation-for-r-files/
"""
import tempfile
import os
import sys
import subprocess

# Use the same filename extension so Emacs will know which
# mode to use.
ext = os.path.splitext(os.environ["TM_FILEPATH"])[-1]
outf = tempfile.NamedTemporaryFile(suffix=ext, delete=False)
pathname = outf.name

outf.write(os.environ["TM_SELECTED_TEXT"])
outf.close()

args = [
"emacs", "-batch", pathname,
# Assume no emacs-startup.el
"--eval", "(setq indent-tabs-mode nil)",
"--eval", '(c-set-style "java")',
"--eval", "(setq c-basic-offset 4)",
"--eval", "(indent-region (point-min) (point-max) nil)",
"-f", "save-buffer"]
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if p.returncode:
print(err)

inf = open(pathname, "r")
sys.stdout.write(inf.read())
inf.close()

os.remove(pathname)


NB:
  1. Due to the use of the delete=False keyword argument to tempfile.NamedTemporaryFile, this command bundle requires Python 2.6+.
  2. TextMate on OS X 10.5 won't, by default, have /usr/local/bin in its path; hence the pathetic shebang.


Anyway, install this as a new TextMate command bundle, assign a Key Equivalent such as ⌘-Shift-R, and enjoy.

2009/11/03

Creating an 'hg ignore' extension

[cross-posted from the Desert Moon blog.]

I often wish Mercurial had an 'hg ignore' command similar to 'bzr ignore'. Turns out it's pretty easy to add one:


#!/usr/bin/env python
"""Ignore pathnames and patterns"""

import os

def ignore(ui, repo, *pathnames):
"""Ignore the given pathnames and patterns."""
outf = open(os.path.join(repo.root, ".hgignore"), "a")
for p in pathnames:
outf.write(p + "\n")
outf.close()
return

cmdtable = {
'ignore': (ignore, [], "hg ignore pathname [pathname]"),
}


To use this, save it to a file such as ${HOME}/platform/independent/lib/hg/ignore.py. Then add the extension to your ${HOME}/.hgrc:
[extensions]
~/platform/independent/lib/hg/ignore.py

2009/09/24

Running TileCache within a Django Application

Punchline

Here is how to serve TileCache tile images from within a Django application.


from TileCache.Service import Service

_service = Service(...)

def get_tile(request):
global _service

format, image = _service.dispatchRequest(
request.GET, request.path, request.method,
request.get_host())
result = HttpResponse(str(image), mimetype=format)
return result


Scenario

You're building a low-traffic Django-based GIS application, and you need to serve your own map layers. You're using TileCache to improve your application's performance. But installation and configuration are hassles.

  • All of your servers must run with the right user and group IDs, so the Django app can expire the tile cache when necessary.
  • Your Django app needs to understand the structure of the tile cache, so it can remove the correct tile images when the underlying data changes.
  • Etc.

standalone_tilecache.png


This would all be much easier if you could serve TileCache requests from within your Django application. They're both Python-based; why not?

django_plus_tilecache.png


The TileCache code base includes sample code that shows how to run TileCache as a CGI or a FastCGI service. I couldn't find any sample code for running TileCache within a Django application, but it was easy to convert the cgiHandler code for use with Django's HttpRequest objects.

Installation Prerequisites

In order for TileCache to generate its own tiles, instead of delegating to a separate mapserver instance, you must already have compiled and installed mapserver's Python mapscript bindings. For instructions on compiling the bindings see the mapscript/python/README file in the mapserver source distribution.

Configuring TileCache


import os
thisdir = os.path.abspath(os.path.dirname(__file__))
def relpath(p):
return os.path.abspath(os.path.join(thisdir, p))

from TileCache.Service import Service
import TileCache.Layers.MapServer as MS

# Create the service 'singleton'.
_mapfile = relpath("../mapserv/data/mapfile.map")

_service = Service(
_cache, # See "Cache Invalidation", below
{
"basic": MS.MapServer(
"basic", _mapfile, layers="basic", debug=False),
}
)


Handling Tile Requests

This is the sweet part. It's derived from the cgiHandler() example in the TileCache source code, but Django's HttpRequest class makes the implementation very simple:


def get_tile(request):
global _service

format, image = _service.dispatchRequest(
request.GET, request.path, request.method,
request.get_host())
result = HttpResponse(str(image), mimetype=format)
return result


What About Feature Info Requests?

I don't know much about the required web API of a WMS server, but it appears as if the same URL must serve both tiles and feature info requests; the type of request is determined by the Request querystring parameter.

Django's dispatch system is based on URL pathnames; I'm not aware of any way to dispatch based on query string parameters. So you'll need to either configure your web server (e.g. Apache) to rewrite WMS requests to distinct URLs provided by your Django app, or you'll need to do some dispatch within your Django app.

Suppose you opt for the latter. Then your urls.py might look something like this:

...
url(r'^wms/$', 'world.views.wms', name='wms'),
...

and in world/views.py you might have this:

def wms(request):
if request.GET.get("request") == "GetFeatureInfo":
return get_feature_info(request)
return get_tile(request)

Cache Invalidation

For my web app, several of the tile layers are derived from a Django model which is updated via the admin interface. Whenever the model changes, the tile cache for the corresponding layer(s) needs to be invalidated, so the images can be regenerated.

The TileCache Cache interface doesn't provide for invalidation. Since I'm using a filesystem-based cache, I subclassed TileCache.Caches.Disk to create a Disk cache which does support invalidation.

import shutil
from TileCache.Caches.Disk import Disk

class InvalidatingDisk(Disk):
"""A Disk cache which can invalidate its contents,
layer by layer."""
def invalidate(self, layerName=None):
if self.basedir:
pathname = self.basedir
if layerName is not None:
pathname = os.path.join(self.basedir,
layerName)
shutil.rmtree(pathname, ignore_errors=True)

2009/09/22

Introducing Google Chrome Frame

Introducing Google Chrome Frame:

"With Google Chrome Frame, developers can now take advantage of the latest open web technologies, even in Internet Explorer. From a faster Javascript engine, to support for current web technologies like HTML5's offline capabilities and <canvas>, to modern CSS/Layout handling, Google Chrome Frame enables these features within IE with no additional coding or testing for different browser versions.
To start using Google Chrome Frame, all developers need to do is to add a single tag:


<meta equiv="X-UA-Compatible" content="chrome=1">
"


I guess that's good news. Makes you wonder why the target audience wouldn't just install Google Chrome. But I suppose this lets people continue to use IE while using modern web facilites on sites which require them.

2009/09/14

TR: China Wind Energy Potential, HVDC

(Just taking notes, trying to understand what HVDC is, what it has to do with variable power sources such as wind, and why it makes buried transmission lines convenient.)

Technology Review: China's Potent Wind Potential:

"The major grid upgrades already under way in China are making extensive use of continental-scale high-voltage direct-current (HVDC) lines, which remain the stuff of supergrid blueprints in Europe and the United States. 'They are leading the world in implementing long-distance transmission schemes,' says Bjarne Andersen, director of U.K.-based consultancy Andersen Power Electronic Solutions and an expert in the ultra-efficient HVDC technology."


Technology Review: Europe Backs Supergrids:
"This summer [2008], for example, a negotiator appointed by the EC convinced France to accept a new transmission connection with Spain, breaking a 15-year impasse over expanding power exchanges between the countries. Use of high-voltage DC (HVDC) technology will enable planners to bury the new line and thereby overcome local opposition to conventional overhead AC transmission lines."


Wikipedia explains how HVDC can have low power losses:
"Power in a circuit is proportional to the current, but the power lost as heat in the wires is proportional to the square of the current. However, power is also proportional to voltage, so for a given power level, higher voltage can be traded off for lower current. Thus, the higher the voltage, the lower the power loss."
"The advantage of HVDC is the ability to transmit large amounts of power over long distances with lower capital costs and with lower losses than AC."


Lots of interesting stuff in the Wikipedia article. This excerpt seems to explain the connection between HVDC and variable power sources:
"Because HVDC allows power transmission between unsynchronised AC distribution systems, it can help increase system stability, by preventing cascading failures from propagating from one part of a wider power transmission grid to another. Changes in load that would cause portions of an AC network to become unsynchronized and separate would not similarly affect a DC link, and the power flow through the DC link would tend to stabilize the AC network. The magnitude and direction of power flow through a DC link can be directly commanded, and changed as needed to support the AC networks at either end of the DC link. This has caused many power system operators to contemplate wider use of HVDC technology for its stability benefits alone."


2009/08/17

ActionScript: TileList, deleting, scrolling backwards

I have a Flex app which shows users a TiledList of chemical structure depictions. Since it can be a large list, it's lazy-loaded from the server as the user scrolls through the list.

Users can delete items from the list, with undo. In order to do this with reasonable performance, once the app has received confirmation from the server that an item has been deleted, it clears out the single deleted item from its local lazy-list.

To undo the deletion locally, the Flex app fills the correct lazy-list entry with an ItemPendingError; that error gets thrown as soon as the TileList tries to retrieve the item.

All of this works okay when the row containing the undeleted item is already visible. On the other hand, if the user has scrolled away from the row where the undeleted item will reappear, then when (s)he scrolls back the TileList simply empties out that item and all of the successive items in the row. Ugly!

ugly_repaint.png


Workaround

When the item is undeleted, immediately try to retrieve it via getItemAt(itemIndex). Catch the resulting ItemPendingError and register an ItemResponder. When the ItemResponder's result or fault method is called, tell the TileList to invalidateList(). If the undeleted item actually contains a value, the TileList will repaint correctly -- no more unsightly gaps.


import mx.collections.errors.ItemPendingError;
import mx.collections.ItemResponder;
[...]
try {
structures.getItemAt(offset);
} catch (e:ItemPendingError) {
e.addResponder(
new ItemResponder(
function(result:Object, token:Object = null):void {
tilelist.invalidateList();
},
function(error:Object, token:Object = null):void {
tilelist.invalidateList();
}));
}

2009/08/10

I like Mike -- General Michael Collins, That Is

This year's John Glenn Lecture Series featured Sen. Glenn, Chris Kraft and the three Apollo 11 astronauts. Michael Collins was as smart, funny and humble as in "When We Left Earth." His talk starts roughly 55 minutes in.

Apologizing for the lecture-unfriendly layout of the IMAX theater, which he helped approve:

"I'm down here in the bottom of a black hole about to be sucked in by gravity..."


After putting up this picture, which he took as the LEM began its descent to the lunar surface:
michael_collins_background_img.png
"I like that photo, it's my favorite one. You see in the little thing there are 3 billion people, and then in the big thing there are two people..."


About the glistening blue earth in the background:
"Serene it is not. Fragile it is. The world population when we flew to the moon was 3 billion people. Today it's over six and headed for eight, so the experts say. In my view this growth is not wise, healthy or sustainable[...]
"Our economic models are all predicated on growth. They require it. Grow or die, or maybe both: the dead zone created by the runoff from the Mississippi into the Gulf of Mexico is now larger than the State of New Jersey, and still growing...
"We need a new economic paradigm that somehow can produce prosperity without this kind of growth."



The video: http://www.youtube.com/watch?v=w9fCPhspOCQ

2009/07/22

Sen. Lamar Alexander on Nuclear Energy

On July 13th Sen. Lamar Alexander held a press conference to propose a low-cost, clean energy plan centered on nuclear energy. I still haven't digested the whole proposal, but it's an interesting read.

C-SPAN has video. Senator Alexander's website has the proposal in PDF format.

One bullet item from the press conference really resonated:

"We want an America in which we are not creating “energy sprawl” by occupying vast tracts of farmlands, deserts, and mountaintops with energy installations that ruin scenic landscapes. The Great American Outdoors is a revered part of the American character. We have spent a century preserving it. We do not want to destroy the environment in the name of saving the environment."


Amen to that! "Energy installations" can be beautiful...

Navajo Power Plant Lake Powell

But I'd hate to see the Taos valley scarred over with wind turbines.

Anyway, just now the most cost effective way to address the electricity needs of the U.S. seems to be to reduce demand, by improving energy efficiency. Going forward, since our population is projected to grow by 44% by 2050, we'll probably still need to increase electricity production.

If we're willing to change U.S. policy on re-processing spent nuclear fuel, Sen. Alexander's proposal could work. France provides an existence proof.



Life Shore Gits Tedious

I was hoping to find numbers on total electricity consumption by country, to compare France's production capacity to our own projected needs. Instead I found this Wikipedia entry, which describes the currently-decreasing per capita electricity consumption of the U.S.; notes that the U.S. still consumes considerably more electricity per capita than countries such as Germany; discusses various ways of measuring national energy efficiency (e.g. energy intensity); describes the relationship between population growth and electricity consumption; and so forth.

Why does the reading list never get shorter? :)

2009/07/21

Unresponsive console.app on OS X 10.5

Recently, when I opened console.app and tried to view either Console Messages or All Messages, cpu usage spiked and console.app became unresponsive. Activity Monitor showed aslmanager using up all of the cpu.

The following discussion thread helped solve the problem. The final required step seems to have been to remove the entire /private/var/log/asl/ directory before restarting syslogd.

Apple - Support - Discussions - ASLMANAGER hogging CPU, resisting fix? ...

Update: It looks like aslmanager first appeared in OS X 10.5.6. It also looks like the asl facility is Apple's replacement for syslogd, created to make it easier to quickly search system logs. From the asl(3) man page: "This API permits clients to create queries and search the message data store for matching messages."

2009/07/18

I really like New Mexico...

... but every once in awhile I wish I was back in Dayton.

Apollo astronauts relive experiences at ceremony

2009/07/15

Bravo Bill Gates

In the same vein as yesterday's half-baked post, Bill Gates has helped make freely viewable (if not downloadable) a lecture series by Richard Feynman.

From CNET:

"Gates first saw the series of lectures 20 years ago on vacation and dreamed of being able to make them broadly available. [...] Tapping his colleagues in Redmond to create interactive software to accompany the videos, Gates is making the collection available free from the Microsoft Research Web site."


The name of the site?
Project Tuva. Nice touch.


The site doesn't seem to load in Safari 4 w. Silverlight 2, but Firefox 3.5 / Mac works fine.

2009/07/14

Lots of offsite backups

[behold, another half-baked post]

The Register says that NASA will on Thursday release 'greatly improved' footage from the Apollo 11 landing. They speculate that this footage is derived from original tapes of the landing, which in 2006 NASA admitted having lost.

I hope NASA makes the new video freely available for download. If they do, they'll get thousands (millions?) of offsite backups for free, hosted by history buffs around the world. And they won't need to worry so much about losing the originals again.

The Library of Congress has already done something similar with the nation's library, e.g. by posting images to Flickr.

Granted, backups are useless if you can't restore them. It should be easy to put out a call for well-known documents such as the lunar landing videos. But LoC has all kinds of documents ranging from famous to obscure, and retrieving them by broadcasting a call to volunteers would be dicey at best.

So it's interesting to see that LoC is launching a pilot program "to test the use of cloud technologies to enable perpetual access to digital content."

2009/07/02

Canada and Japan blocking climate-change deal, Sir David King warns - Times Online

Canada and Japan blocking climate-change deal, Sir David King warns - Times Online:

"Governments previously were able to hide behind the US's intransigence on climate change, he said, but the pro-climate policies being launched by the Obama administration means this is no longer possible. 'The time has come for people to reveal their cards,' he told delegates."


via @TomRaferty by way of @timoreilly.

2009/06/21

The Benefits of a Classical Education

Tim O'Reilly has posted yet another article full of thought-provoking nuggets, in which he answers interview questions for a special report:

The Benefits of a Classical Education

The article muses on ways in which capitalism can be altruistic rather than greedy; bumps up my respect for West Virginia's Robert Byrd, whom I often see as a detriment to Congress; and includes incisive quotes from Alexander the Great and Mark Twain ("While history doesn't repeat itself, it does rhyme"). All this in response to the first interview question.

A Supreme Leader Loses His Aura - NYTimes.com

If only because of the Times's reputation in recent years, I have to wonder how much of this report is real. Still, a compelling read.

Op-Ed Columnist - A Supreme Leader Loses His Aura as Iranians Flock to the Streets - NYTimes.com

@terrycojones has posted a link to the Wikipedia article on Iran's 1953 coup. Among other things I hadn't known that British Petroleum had its origins in the Anglo-Persian Oil Company. http://bit.ly/11q8Oq

2009/06/19

Opponents blast Northwest Quadrant housing project

Santa Fe's northwest quadrant housing project has all of the smells of the malling of Beavercreek, Ohio. City staff will just keep asking for approval until they get the answer they want.

Opponents blast Northwest Quadrant housing project:

"Other residents questioned [...] a plan to pump sewage uphill and other facets.
The housing project on city-owned land would be concentrated on about 122 acres of the 540-acre Northwest Quadrant. The proposal calls for construction of more than 750 housing units, including single-family homes and multi-family complexes that would rise up to three stories tall [emph. added] as well as up to 110,000 [square] feet of mixed-use development that could include commercial uses. "


<Incoherent Pre-coffee Ramblings>

Up to three stories tall... on top of a ridge line. There goes the neighborhood.

Would there be no value in turning this land into public space?

When I first moved to Santa Fe ten years ago, I could walk to the top of the ridge above my apartment and take in a view that encompassed Los Alamos, the Sangre de Cristos, and the Sandias more than fifty miles to the south. The view is still available, and it's on land which city staff wants to bury under multi-story housing.

These days I live "in the hole" of Casa Solana, just to the south of the proposed development. The targeted land is still the best place, for miles around, to watch the fog of a morning storm turn into ragged, fast-moving tufts of cloud.

Of course, when I first moved here the open area was also filled with old mattresses, broken beer bottles and old engine blocks. Human nature is everywhere the same.

Perhaps awesome views are of value mainly to those who have lived too long amid urban sprawl. Even city planners, who must know that scenery is one of the reasons people visit northern New Mexico, believe they will gain more from taxes on developed land than from natural beauty.

"You can't eat scenery." — Victor, "Local Hero"

</Incoherent Pre-coffee Ramblings>

2009/06/16

Palm's Big Opportunity


Via Macintouch:

"An iPhone app developer's world is lonely...
Three parties are involved: the developers (us), Apple, and the customers. For the most part, Apple stands between us and our customers[...] we can't issue refunds, we can only issue a few promo copies, we can't collect upgrade revenue, we can't respond to App Store reviews, we can't provide installation support, and we can't release updates to address customers' issues in a reasonable amount of time. We can't even tell them when the next update will be available, because we honestly don't know. [...] Our customers, like us, are mostly in the dark with this process, and we can't do much to help them.
For the most part, it's just us and Apple in the room.

And Apple's a brick wall.
"


In large part, Palm has based webOS on open standards. The Palm pre user experience is reported to be very good. Sprint (tethering) and AT&T (rug-yanking over data plans) both stink.

So will Palm be able to draw developers, and customers, to its platform by running a less authoritarian app store than Apple's? Will it even try to do so? Here's hoping...

2009/06/12

We are too many

Sciam examines relationships between environmental degradation and population. Still haven't digested it all. This looks like the punchline:

Population and Sustainability: Can We Avoid Limiting the Number of People?: Scientific American:

"...the evidence suggests that what women want—and have always wanted—is not so much to have more children as to have more for a smaller number of children they can reliably raise to healthy adulthood. Women left to their own devices, contraceptive or otherwise, would collectively ‘control’ population while acting on their own intentions."

2009/05/29

The TSA - back in bounds?

AOPA Online: TSA lessens security restrictions on transient pilots:

"According to the new directive, transient pilots who fly into commercial-service airports no longer need to get an airport badge or background check. However, they must remain close to their aircraft, leaving it only to walk to and from the fixed-base operator, service provider, or airport exit. The TSA also has said that it will make provisions for self-fueling operations and grant allowances for emergency situations."


Score one for AOPA.

2009/05/22

...Mentally awake...

Brain Power - At Card Table, Clues to a Lucid Old Age - Series - NYTimes.com:

"Interacting with people regularly, even strangers, uses easily as much brain power as doing puzzles, and it wouldn't surprise me if this is what it's all about."


Heck, I have a hard time just remembering names during introductions...

2009/05/21

H1N1 Death totals

The CSV data from the rhizalabs site does seem to show more than 150 deaths worldwide from H1N1. I'm not sure why the number is higher than the totals quoted elsewhere, but the CSV data does point to an excellent source of summary data: the Mexican government's Health - Mexico website. (I'm not sure about the proper site name. The URL is http://portal.salud.gob.mx/.)

In my previous post I wondered about the distribution of ages in fatal cases. The PDF reports from the Mexican health site present exactly that information (albeit for Mexico only), very clearly. See for example page 4 of http://portal.salud.gob.mx/descargas/pdf/influenza/situacion_actual_epidemia_190509.pdf