Archive for July, 2008

Dark Knight

I’m going to join most people in saying that Dark Knight is a good movie. Heath Ledger’s performance as the Joker is amazing. He manages to bring a layer of plausibility to the character while still being a homicidal maniac. You can almost believe that this character could exist. (I have to note that Roger Ebert’s review of the movie suggests that the Joker is telling the truth about being an abused child, but I think it’s pretty clear from the movie that the Joker was just, you know, joking. He may or may not have been an abused child; the movie doesn’t say.) (Ledger had a number of memorable performances, and his death is a real loss.)

The movie in general doesn’t pull any punches. It’s decidedly more intense than a typical summer movie, but the intensity is psychological rather than the route taken by most action movies: having bigger explosions. Of course, the Dark Knight explosions are still pretty big.

Still, while I recommend Dark Knight, I’m going to have to stay with Iron Man as the best comic book movie. Dark Knight had several problems as a movie. The story was too long and had too many moving parts. The Scarecrow was on screen for about thirty seconds and added nothing to the story. The ordinary people dressing up as Batman didn’t help the plot and I didn’t think they made the point that the story wanted; they didn’t show Batman as inspiration, they just showed crazy people. The Hong Kong sequence didn’t add anything that I could see.

I couldn’t suspend my disbelief about some of the plot; it’s always a bad sign when you start asking yourself during a movie whether something could really work (asking yourself after the movie is normal). The Joker was really crazy; you wouldn’t stay in the same building with that guy. And he didn’t care very much about money. So where did he get his henchmen? And how did he set up all those explosions? Did he spend weeks before the story started getting everything all arranged? The final confrontation in the movie was gripping and plausible and scary; the final decision made by the Batman, in some sense a minor point the movie was building toward, not so much.

For a very comic-booky criticism, Batman’s fighting style was all wrong. There’s just no way the guy in the movie could beat up all those thugs. He has to be both very quick and very strong, and the movie character was slow. The cape is also always a problem in the movies. In the comic books, although nobody ever mentions it, the cape is basically magic; it changes size at the whim of the artist and it never gets in the way. The movie has to have the cape so that it looks like Batman, but without the magic properties it doesn’t really work.

Final note: the movie had a preview of The Watchmen, a movie based on the excellent graphic novel by Alan Moore and Dave Gibbons. The movie pictures looked remarkably like the comic pictures. Unfortunately the comic book is very tightly written and very dense, and smoothly juggles several major characters. The plot barely makes sense, and the charm of the book is the details and the characterization. In other words, the comic is completely unsuited to be an action movie. It’s being directed by Zack Snyder. It doesn’t have any stars known for their acting, unless you count Billy Crudup, who is presumably going to spend most of the movie naked and covered by blue makeup. I don’t have high expectations for the movie.

Comments (2)

Combining Versions

Sun introduced a symbol versioning scheme to use for the linker. Their implementation is relatively simple: symbol versions are defined in a version script provided when a shared library was created. The dynamic linker can verify that all required versions are present. This is useful for ensuring that an application can run with a specific version of the library.

In the Sun versioning scheme, when a symbol is changed to have an incompatible interface, the library file name must change. This then produces a new DT_SONAME entry, which leads to new DT_NEEDED entries, and thus manages incompatibility at that level.

Ulrich Drepper and Eric Youngdale introduced a much more sophisticated symbol versioning scheme, which is used by the glibc, the GNU linker, and gold. The key differences are that versions may be specified in object files and that shared libraries may contain multiple independent versions of the same symbol. Versions are specified in object files by naming the symbol NAME@VERSION or NAME@@VERSION. In the former case the symbol is a hidden version, available only by specific request. In the latter case the symbol is a default version, and references to NAME will be linked to NAME@@VERSION. Versions may also be specified in version scripts.

This facility means that in principle it is never necessary to change the library file name. The versioning scheme lets the dynamic linker direct each symbol reference to the appropriate version. This in turn means that in a complicated program with many shared libraries compiled against different versions of the base library, only one instance of the base library needs to be loaded.

However, this additional complexity leads to additional ambiguity. There are now two possible sources of a symbol version: the name in the object file and an entry in the version script. There is the possibility that two instances of the same name will disagree on whether the name should be globally visible or not–in fact, this is normal, as undefined references will always use NAME@VERSION, not NAME@@VERSION. Symbol overriding can be confusing: if the main executable defines NAME without a version, which versions should it override in the shared library? Which version should be used in the program? Symbol visibility adds an additional wrinkle to this.

The most important issue for the linker arises when it sees both NAME and NAME@VERSION, and then sees NAME@@VERSION. At that time the linker has seen two separate symbols and has to decide whether to merge them. The rules that gold currently follows are these:

  • If NAME is hidden, and NAME@@VERSION is in a shared object, they are two independent symbols, and we do not change NAME or its version.
  • If NAME already has a version, because we earlier saw NAME@@VERSION2, then we produce two separate symbols, and leave NAME@@VERSION2 as the default symbol.
  • Otherwise, we change the version of NAME to VERSION, and do normal symbol resolution.

I recently fixed a bug in this code in gold, which was breaking symbol overriding in a specific case. I wouldn’t be surprised if there are more bugs. As far as I know nobody has worked through all the symbol combining issues and defined what should happen.

Comments (2)

ANWR

I’ve thought for some time that the most sensible approach to the oil in the Alaskan National Wildlife Refuge is to hold onto it until we need it. The amount of oil there is irrelevant to today’s economy. On current trends, the total production would be some 1% of the world’s oil production, not enough to make a real difference.

We should be thankful that we have a reserve of oil in our country, and we should wait on trying to dig it out until we have a real use for it, a use beyond just burning it to move cars around.

As far as I can tell, the only people who would advocate drilling today are those who stand to make money on it now. It would be irresponsible to cater to those people at the expense of the majority.

This thinking is quite separate from the status of the ANWR as a wildlife refuge.

Comments (3)

Drug Laws

Our drug laws don’t work. Immense amounts of money are spent on drugs. Because drugs are illegal, this money goes to criminals. This leads to ghastly levels of violence in places like Mexico and Colombia. Drug money supports the Taliban (admittedly this money is probably mostly from Europe) which spends it on attacking U.S. armed forces. Drug money helps destroy poor areas within the U.S. by ensuring that the wealthiest, most powerful, people are criminals who flout the law.

Why do we do this? Tobacco kills far more people than any other drug. Alcohol destroys many lives. Nobody is trying to make them illegal. This is a clear double-standard.

I think we should legalize most drugs. Relatively minor drugs like marijuana should be regulated and taxed like tobacco (a new source of government revenue which everybody could support). Major drugs like heroin should be illegal to sell but legal to possess and legal to give away to adults. The money we currently spend on interdicting supply should be spent instead on counseling and research on how to end addiction.

Illegal drugs are generally bad for you. Some will fry your brain much faster than alcohol. If drugs are legal, it is likely that more people will try them, and it is likely that more brains will be fried. But there is a trade-off here. We know for sure that making drugs illegal is destroying many lives. We don’t know how many lives will be destroyed if drugs are legalized. We need to find out. The way to find out is for the Federal government to step out of drug regulation and to leave it to the states.

This is a harsh position to take: it means that some people will be hurt. But the current situation is really bad. We need to try something different, not just more of the same.

I’m somewhat surprised that the Republican party doesn’t support this position. Getting the government out of drug enforcement makes it smaller. Eliminating drug laws means giving people the responsibility to look after themselves, rather than depending on the government to look after them. Admittedly the evangelical wind of the party would not support repealing these laws.

I’m very surprised that there is no active debate on this issue. How can our societal consensus be a policy that is so clearly broken?

Comments (8)

eBay

I’m not a serious eBay user. I’ve bought four or five items on eBay over the years. I’ve never sold anything on it. I once did a sales presentation at eBay; they didn’t buy our software.

I was surprised to read in the newspaper that eBay is making a deal with buy.com to sell stuff at a fixed price, and giving buy.com a better deal than small sellers get. eBay is successful right now because they’re the winner-takes-all auction site. If you want to buy something weird, you look at eBay first because it’s where most of the sellers are. If you want to sell something weird, most of the buyers are looking at eBay, so you need to sell there. This dynamic keeps people using eBay.

But buy.com doesn’t sell weird things. If I want to buy something that buy.com sells, I don’t look at eBay first. I look at buy.com. Or I use one of several product search engines.

If I understand this deal, it suggests that eBay is trying to be a product search engine, with the extra feature that you can buy directly from eBay rather than going to the seller’s web site. Amazon does this too for a lot of things. And, frankly, to me, Amazon’s web experience seems a lot better than eBay’s.

By giving buy.com a special deal, eBay is irritating the small sellers. eBay is gambling that the small sellers can’t go anywhere else. But, of course, they can, provided they act as a group. If a substantial number of small sellers move to a different auction site, the buyers will follow them. I think the most important rule for a site like eBay, which relies on being the free choice of many people who can easily make a different choice, is to keep their customers happy.

So eBay, which is by far #1 in their space, is making a move which gives them a risk of losing their #1 slot while trying to become #2 or #3 in a different space. Why are they doing this?

Comments (4)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »