Wednesday, February 13, 2013

Easy solution to the melting ice caps

People are always belly-aching about how the polar ice caps are melting. "Oh, the sea level is going to rise and flood coastal cities!" Blah blah blah, as if this is some unsolvable problem.

But, as we all know, human ingenuity knows no bounds, and there is a simple, cost-effective solution to the "problem" of arctic ice melting: just re-freeze it. A quick back-of-the-envelope calculation reveals how simple this solution would be.

  • According to the Polar Science Center at the University of Washington, the arctic pole is losing an extra 280 km³ of ice per year beyond the seasonal fluctuations.
  • Ice has a density of 0.9167 g/cm³, so 280 km³ (2.8e17 cm³) is 2.56676e17 grams of ice lost per year.
  • 1 Watt can freeze 8 grams of water per hour, according to the ever-trustworthy beowulff on the Straight Dope message boards.
  • The state-of-the-art nuclear reactor design is the European Pressurized Reactor, which, for the low-low price of $11 billion, pumps out a hefty 1,600 MW
  • A single EPR could freeze (assuming 100% efficiency) 1.28e10 grams of water per hour, or 1.12e14 grams per year.
  • It would therefore take 2.56676e17 / 1.12e14 = 2,291 EPRs to re-freeze the yearly arctic ice loss. At $11 billion a pop, that's $25 trillion to build enough power plants to stop the melting of the polar ice caps

So all this worrying about melting ice caps just boils down to a lack of creativity. For a mere $25 trillion, we could build 2,291 nuclear reactors in the arctic circle and use them to run giant freezers. It's so obvious, I can't believe nobody's thought of it before.

You're welcome, world.

Monday, December 17, 2012

Using a Wiimote in Mupen64plus

After much head-wall-banging, I got a Wiimote to pair successfully with my computer and work as a controller in Mupen64plus! There was a lot of trial and error, so I've created a guide to getting a working setup so future generations don't have to go through what I did. The details are in this git repo, which includes detailed instructions and config files.

Wednesday, December 12, 2012

Trying an Android ROM

Against my better judgment, I am going to take another shot at installing a ROM on my phone. The battery life could use some improvement, and people have claimed that some of the 3rd-party ROMs can help with that. I know I have promised myself not to play with ROMs on my phone again, since the result is usually a big waste of time with nothing to show for it, but this time is different.

Brace yourselves for a follow-up in which I immediately regret this decision.

Tuesday, December 11, 2012

Another Ubuntu update, another b0rked system

*sigh*

I updated to 12.10, and Alt+middle-click to resize windows was broken. After about an hour of circular Googling, I found the correct incantation to sprinkle. For some strange reason, the setting org.gnome.desktop.wm.preferences.resize-with-right-button was set to true. Set it back to false and the system returns to its former functioning state.

Sunday, November 18, 2012

Better than "Understanding OOP"

I came across a page talking about the joys of OOP via this blog post. The original page was a thing of horror. I modified the Elisp code from Irreal, adding a few additional features:

In addition to equality matches, it can match using regexps and arbitrary functions. Let's see Java do that in 20 SLOC.

Saturday, September 29, 2012

Voting third party and government job "creation"

This is copy of an email I sent to my dad just now.

My concern about the libertarian candidate, besides the fact that he cannot win,

That's no reason not to vote for him. A well-functioning democracy requires a choice of more than the people who are "obviously" going to win. Otherwise, it isn't democracy so much as a decree by the political parties who will be the next president.

My is that his economic plans are hopelessly naive. He pretends that, given Congressional cooperation, one could dramatically cut spending in 2013.

Again, for democracy to work, you need people who are going to do more than what will easily pass.

My The prospect of a much smaller cut is labeled the fiscal cliff and would send us into recession.

I'm not so sure it would be quite that bad. It strains credulity for a trillion-dollar increase in federal spending to be little more than an academic nuisance, but a symmetric decrease to bring about the apocalypse.

I might love to see federal spending go down to 15% of GDP, but if that happened in one day we would have a depression that would make the 1930's look like the good old days.

It just seems weird that spending can shoot up by an enormous margin in one year, but for it to drop by the exact same amount would throw the country into ruin. As a counter-example, I would point to the demobilization following WWII. Government spending fell through the floor, yet the economy boomed, even as it had to absorb the mass of people coming home from the war.

Since Obama will carry MA by a landslide, I want the message of my protest vote to be unambiguous. Voting for Romney says my concern is economic. Voting for a fringe candidate could mean anything.

Well, the fringe candidate has a much clearer message: that neither of the two parties offer particularly attractive directions for the country and that both parties are to blame for the mess we're in.

Besides, whether you vote Democrat, Republican, Libertarian, Green, Wizard, or not at all doesn't make a measurable difference in the outcome of the election, so you might as well vote for your highest preference. See the paradox of voting.

Since you personally are never going to be the tiebreaker, vote for the person who most closely matches your preferences. But what if everyone thought that way? They don't. You are not a collective. And your choice of candidate does not effect a change in other people's voting behavior.

As long as the Republicans hold the House we may stave of the Spanish food riots here. I have great sympathy for them, but they are still thinking there is the alternative of just spending more of that free money.

Incidentally, this is one of the reasons I am in favor of a smaller role for government: there's no one to whom to complain when things don't go your way. People riot against the government in the hopes that the bureaucrats will deign to bestow to each according to his need. Against whom do I riot if the ending of Mass Effect 3 is a major letdown? I can raise money for charity in protest of the botched opportunity, or send ending-related colored cupcakes to the developer's offices (both of which people did), but that's about it. The most impactful thing I can do is refuse to buy their products in the future, since I possess all of the power in that relationship. I bear the burdens and benefits of my actions.

When the target of protest is the government, on the other hand, I can lobby or attempt to vote myself a job and cash. Politicians can try to sell me a free lunch, and since my vote is infinitesimal, which way I vote doesn't have any personal ramifications. It is quite understandable that the Spanish and Greeks want jobs, but when the government is seen to be the solution to unemployment, the focus changes from job creation to job bestowment.

Thursday, September 20, 2012

Change GTK keybindings from Emacs back to default

Like any virtuous person, I use Emacs for everything, and so tried out using Emacs key bindings for all GTK applications generally. After a year or so of working like this, I have decided to go back. The main problem is that other applications can't handle the awesome power of Emacs. Firefox, for example, uses C-k to jump to the search box, but if you are in the location bar, C-k will run the equivalent of kill-line which means that in order to get to the search bar, you have to remove focus from the location bar. Not convenient.

Since I do all serious typing within Emacs anyway (using the It's All Text! addon to edit textareas in Emacs), I figured I might as well take full advantage of the standard key bindings of the lesser programs.

A lot of the guides online talk about editing .gtkrc-2.0 or setting /desktop/gnome/interface/gtk_key_theme through Gconf, but this has ceased to work under Gnome/GTK 3. To fix it, you need to set the value through gsettings (which uses dconf>) rather than gconf:

$ gsettings reset org.gnome.desktop.interface gtk-key-theme

Why would they break backwards compatibility? Who knows. Also, due to the brilliance of the Gnome 3 developers, the data for dconf is stored in some opaque binary blob, rather than the straightforward XML files used by gconf. This is a huge step backwards from the Unix philosophy for what appears to be no change in functionality.

It's things like this, along with brain-dead vomit that is Gnome Shell (or Unity), that have convinced me that all of the Linux desktop developers have simultaneously taken crazy pills and have gone insane. Why else break perfectly good code and interfaces in favor of less functional and less useful crap?