Time loops: The Terminator #

In the Terminator series (movies and TV show), there are some odd time loops.

  • John Connor sends Kyle Reese back in time. Kyle and Sarah have a son, John Connor. But John sent Kyle back in time only because of Skynet. Without Skynet, John wouldn't exist. The timeline protection hypothesis suggests John can't kill Skynet.
  • Skynet sends a Terminator back in time. The Terminator's arm and CPU are left behind. The technology in that CPU is what Dyson uses to build the beginnings of Skynet. But Skynet sent the Terminator back in time only because of John Connor. Without John, Skynet wouldn't exist. The timeline protection hypothesis suggests that Skynet cannot destroy John.

How did we get into this circular timeline in the first place? I think it's reasonable for the initial timeline to exist without the loop. John could be someone else's son. Skynet could be developed without the Terminator's CPU. But once they start messing with time, they got into this circular dependency, where they only exist because of each other. I'm not sure they can get out of it though. It's similar to the grandfather paradox, except there are two parties trying to kill each other.

The Matrix series, which coincidentally also was about war between machines and humans, might give us a way out of the Terminator paradox. Agent Smith was trying to destroy Neo, and to do so he was willing to destroy the world. Neo sacrificed himself, which meant Smith no longer had a purpose, and Smith was destroyed at the same time as Neo. So perhaps John and Skynet have to destroy each other simultaneously. Or perhaps, as in The Matrix, the humans and machines call a truce, and both John and Skynet stop fighting far in the future, but only after the war that leads to both of them being created.

Emacs: full screen on Mac OS X #

The methods for toggling full screen on Emacs/Mac vary by version. I've reorganized this post to document what I've used for various versions of Emacs. As of 2012-11-01 I was using the Yamamoto Mitsuharu version of Emacs, which has a very nice full screen mode; as of 2014-01-01 I switched to the Emacs 24.4 nightlies from EmacsForMacOSX.com, but I also suggest looking at the railwaycat emacs build, which is also available on Homebrew.

Carbon Emacs 22.2

You can run M-x mac-toggle-max-window to toggle full screen mode, with no menubar. This is handy enough that I've bound it to ⌘ Cmd+Return, which is similar to what some Linux and Windows apps use to toggle full screen mode.

(define-key global-map [(alt return)] 
Carbon Emacs 22.5

They seem to have removed the function from 22.2, but you can get it back with this code from Vebjorn Lsoja:

(defun mac-toggle-max-window ()
  (set-frame-parameter nil 'fullscreen 
    (if (frame-parameter nil 'fullscreen)
Yamamoto Mitsuharu's Emacs Port

Use the mac-toggle-max-window function definition above.

GNU (Cocoa/Nextstep) Emacs 23

Neither approach above works with this version. Instead I'm using a patched version of maxframe.el, and this function from the EmacsWiki page:

(defvar maxframe-maximized-p nil "maxframe is in fullscreen mode")
(defun toggle-maxframe ()
  "Toggle maximized frame"
  (setq maxframe-maximized-p (not maxframe-maximized-p))
  (cond (maxframe-maximized-p (maximize-frame))
        (t (restore-frame))))
(define-key global-map [(alt return)] 'toggle-maxframe)

Unfortunately this doesn't hide the menubar or titlebar.

For other versions, check the EmacsWiki page to see if there's a method that works on the version you run, or check this page for Aquamacs.

Labels: , ,

Setting the Carbon Tax #

The carbon tax is a tax on CO2 emissions. It aligns incentives of business (profit) and society (stable climate) by giving businesses an opportunity to make more money if they find ways to reduce their CO2 emissions.

One open question with the carbon tax is how to choose the tax rate. Several countries already have a carbon tax, but they seem to set it at a fixed rate, or increase it by a fixed amount each year. Even the Carbon Tax Center says, “There is no magic formula or right number”. I think they're approaching it wrong. Carbon taxes are essentially prices on carbon emissions. Governments shouldn't set prices, and they shouldn't set carbon tax rates either. The market should do it, with a little help from the government.

First, we should decide what level of CO2 emissions are “sustainable”. You can think of this as the “supply” of available emissions. There is no need to go below this level, although doing so will not be harmful. We should be able to continue emitting at the sustainable level for thousands of years. This level is then set as the eventual sustainable target.

Our current emissions are rather high. We can think of this as “demand”. Since demand is higher than supply, we need to raise prices (the carbon tax rate, currently 0% in the U.S.). We need to decide when we want to reach the sustainable level, and then interpolate target levels from the current level to the sustainable target. This might be a straight line for simplicity, but could also be an S-curve or exponential decay.

For example, let's say that the current CO2 emissions are 6 billion metric tons, and we decide that 1 billion metric tons, combined with more forests, is sustainable. Let's further suppose that we want to reach this target in 10 years. That means we need to reduce emissions by 0.5 billion metric tons each year, so we set our target for 2009 to 5.5, 2010 to 5.0, 2011 to 4.5, etc., until 2018, at 1.0 billion metric tons.

Each year (or perhaps every month), we look at the current level of emissions and the target level, and increase or decrease the carbon tax rate. If we're emitting more than the target, we'll increase the tax rate. If we're emitting less (which may happen in a few years, if all the businesses are competing to increase profits by reducing emissions), then we decrease the tax rate. By altering the tax rate in this way, we can stay close to the target.

The problem on the business side is that if the tax rates change every month, there's a lot of uncertainty (just as for any prices that change suddenly every month), and it's hard to change plans that quickly. What will likely develop is an insurance market. Insurers will sell insurance that the tax rate won't go up much, and businesses will buy the insurance to hedge against sudden increases. Does this eliminate the incentives for businesses? No! They're now paying insurance and taxes. The cost of insurance is set by the likelihood at the tax rates will go up. The insurance industry is in the best position to guess this, because they'll be visiting the businesses to determine how quickly emission reductions are going into place. The insurance companies will then be able to predict the future emissions, and set insurance rates based on that. Since they're the ones making payouts when businesses (collectively) don't reduce emissions, the insurance companies will then have an incentive to push businesses to act sooner. They also have the incentive to share techniques across businesses. They make more money when businesses collectively reduce emissions.

Most carbon tax proposals use a fixed price and hope that the output will decline. Most cap-and-trade proposals use a hard limit on emissions, and a variable, potentially volatile price. The variable carbon tax rate proposal combines aspects of both approaches. It uses variable prices, but they're varying less often; it uses a target instead of a hard cap, which allows businesses to buy more time; and it generates revenue for society. With a market based scheme, incentive are aligned. Society will want reduced emissions, businesses will want to reduce tax rates (by reducing emissions), and insurance companies will want to reduce payouts (by convincing businesses to reduce emissions). If businesses fail to reduce emissions, they pay an ever increasing compensation to society for the delay. Furthermore, the open question of what to set the tax to, which is open to lobbying, is replaced by the question of how much to change the tax, which I think is harder to game. This scheme also tells you when we've achieved our goal: emissions are at the sustainable target level. Even at this level, we continue the carbon tax to prevent emissions from going up, and we continue to take in revenue from those businesses that produce emissions. This will keep our emissions near the sustainable level.

Labels: , ,

Why I got a MacBook Air #

Carrying case for the MacBook Air
My Air in its carrying case

I bought a MacBook Air. You know, that small puny computer that's been called a toy. The one that's overpriced. The one that fits in a manila envelope. Ha ha. I'm not going to review the product, but instead I wanted to explain why I ended up getting one. I wouldn't have gotten one if my MacBook hadn't deteriorated (due to my abuse), but since it was time to buy a computer, I spent a month evaluating how I use the computer, and ended up choosing the Air.

I've always been someone who enjoys the biggest, fastest, most powerful computer he can get. Until a few years ago, that's what I got. Back when people used CRTs, I got a 21" Sony that could display 2048x1536. I love high resolution (and still do) and love big screens (still do). Dual core? 64 bit? Lots of RAM? Love it! However…

Four years ago at work, I was assigned to a project in which I had to work in several different offices. They gave me a laptop for this. Eww. Tiny keyboard, slow processor, tiny screen, only 1400x1050 resolution. At the time Linux wasn't suitable for laptops so I got Windows on a Thinkpad. When I was in my main office I used my Linux workstation with a nice 20" LCD running at 1600x1200. But when I was away from there, I used the laptop with Cygwin + ssh + X to run things on my desktop, but display them on the laptop. It was less productive than having the big screen and full keyboard, but it was more productive than having nothing.

Then I discovered something. Portability is nice. Really nice. Really, really nice. I wasn't just working on that laptop in a few offices. I could work on the couch with the laptop in my lap. I could take it to meetings and show people the UI design on a projector. I could take it home and work from home. I could sit outside (if the lighting was right). The ability to move around was worth a lot to me. I found that although at my desk, the laptop is less productive than my desktop machine, the ability to move around (for example, find a quiet space away from distractions) made me more productive overall.

About two years ago I realized that even when I was back at my desk, I was still using my laptop. I almost never used the desktop machine directly. I did use it all the time for running programs. The laptop was a “dumb terminal” (X11 plus browser) for my desktop machine, and I could take it anywhere.

Once I realized how nice portability was, I decided to get a laptop at home. I wasn't thrilled with the idea of getting Windows, especially given that they'd be transitioning everyone from XP (which was reasonable) to Vista (which I'd heard horror stories about). So I decided to switch to Mac. I would've never switched when they had Mac OS 9 on PowerPC chips, but once they had a Unix base and on Intel chips, it became a reasonable option for me. I got a MacBook Pro. I've been reasonably happy with it.

Just as I transitioned from desktop to laptop at work, I found that I use the laptop for everything at home. Everything except games. For games I want Windows XP, a full sized trackball, a full sized keyboard, a big screen, a fast CPU, a fast graphics card, and nice speakers. I got none of this on the laptop. But for browsing, email, programming, editing, photos, music, and just about everything else, the laptop is great. So I now have a gaming desktop machine for games (and photos — I love Picasa on Windows and find iPhoto on Mac to be unpleasant) and a laptop for everything else.

At this point, a faster laptop wouldn't be any better, because I already have all the speed I need. I want: more battery life, lower weight, a screen that can be used outdoors, and higher reliability. Unfortunately none of the laptops I looked at were great. I'm sticking with Mac for now, but unfortunately the lightweight Mac laptops don't have great battery life (my Thinkpad got 7 hours, and newer ones can get 11). The Air does have a lower weight than my current laptop. With the flash drive I'm hoping for higher reliability, especially since I move around a lot when using the computer, and a majority of my crashes have been while moving the machine around. I generally prefer matte screens to glossy, but I've talked to several people who use glossy and say that it's much nicer than it initially seems. 64 GB is slightly small (100 GB is more than I need), but after going through my data and removing all the waste (like Apple's Mail app keeping two copies of all my emails, and the iPod sync program keeping a second, bloated copy of all of my photos), I think it'll be fine.

The Air seems like a reasonable upgrade for me, not for the usual things people want (CPU, graphics, RAM, disk, etc.), but for the things that matter to me (weight, size, reliability, portability). The standard complaints about the Air don't bother me: slow (it's as fast as my computer was two years ago, and somehow that didn't seem slow to me), battery isn't swappable (In 4 years I've never taken the battery out of my laptops), it's expensive (it does seem a little high, but that's always how it goes with early adopters, so if you're price sensitive, wait a few years), no DVD player or ethernet or firewire (I already don't use these).

My priorities have changed over the years. I used to want big: high speed, big storage, big screen, big computer, big keyboard, big mouse, high pixel count. Now I want small: low power consumption, low weight, easy to move around, ability to use anywhere. I can put the big stuff on servers; all I really want to carry around is a terminal — I can access my data remotely. The Air seems to be a good step in that direction.


The future of food #

Imagine a world in which the way food tastes and the nutrition are independent. You could eat vitamin-fortified soylent green and make it taste like pizza or bacon or ice cream or chocolate cake. It's just like those dreams programming language people have of having surface syntax independent of the parse tree, so that you can have many different syntaxes on the same program. It's like those movies where the evil villain wears pink.

In the future, what you see, smell, taste, feel, and hear doesn't have to match what's on the inside.

Bacon Salt is one of the early pioneers in this future of food. I hope to see many more.

Labels: ,