Showing posts from 2007

Hot Chips Conference archives

Curious about the internal designs of GPUs, CPUs, and game consoles? Tired of lame articles full of uninformed speculation and fanboy rants? Then check out the archives of the "Hot Chips" conference, an annual conference where computer chip designers get together to brag about their latest chips. The conference presentation slides are all online, and they're full of good technical information on GPUs, CPUs. and even game consoles. Of course, presenters often gloss over any technical problems with their chips, so you won't get the full picture. But these presentations offer a detailed technical look inside otherwise secret system architectures.

(For what it's worth the web site is poorly organized, and many links are broken -- you sometimes have to edit the URLs slightly to find the correct links.)

Some highlights:

Reality Co-Processor, Ken Hayes (Silicon Graphics, Inc.) - All about the Nintendo 64.

Gekko: A PowerPC compatible processor supporting high-performance 3D …

Nintendo Wii security defeated by the Tweezer Attack

According to a presentation at the 24th Chaos Communication Congress, hackers have apparently been able to defeat the Nintendo Wii game console's security system using tweezers to bypass the hardware memory protection.

The way it works is that the Wii runs in two modes: a GameCube emulation mode, which has access to just 1/8th of the total memory, and Wii mode, that has access to all the memory.

Hackers had already figured out how to run their own code in GameCube mode. So the trick was to run their code in GameCube mode, then use the tweezers to short out the address lines to allow the hacker's code to access parts of rest of the memory. By shorting different address lines different portions of memory were made available. By collecting enough shards they eventually mapped all of memory.

Apparently the Wii operating system keeps its digital signature keys in this protected memory, and once the digital signatures were found it was possible to sign and run homebrew code on the Wii.

Searching for old web pages: The Wayback machine is cool!

I was searching for information on LINJ, a Lisp language that compiles into human-readable Java code. Unfortunately, the LINJ web site, is currently offline.

Luckily, it turned out that the Internet Archive Wayback machine had cached both that page, and the download files that that page had pointed to. Very cool!

Similarly, I was looking for the source to the Windows CE port of Quake 3, and found that the project's web site had been abandoned and taken over by spammers. Luckily the Wayback machine had cached both the original web page and the downloads.

Let this be a lesson to you aspiring open source developers out there: It's better to store small open-source projects in a large "won't-ever-go-away" source repository like SourceForge or Google Code than to use your own vanity domain hosting. Of course, even using a large popular repository is not failure-proof. Some large code repositories from …

Why the Farmers won

I've been thinking about Lisp lately. A powerful language, with many excellent features, but not hugely successful. And I thought of one reason why:

The excellent book Guns, Germs and Steel hypothesizes that agriculture displaced hunting and gathering because people who practiced agriculture stayed in one place, and were able to have one child per year, as opposed to the hunter-gatherers, who had to wait until their children were old enough to walk before having another child. This reproductive rate difference was amplified by the ability for a given unit of land to support more farmers than hunters. As a result, agriculture displaced hunting even though individual hunters were far healthier (as seen by their skeleton height) than the farmers that displaced them.

So it is possible for a poorer technology to displace a better one, if it has compensating advantages. And I think that's what's hit Lisp. C and Java, which are each less powerful and more wordy than Lisp, are m…

Back to Mac

This week I converted my family's main computer from Vista to OS X. (It's a Mac Mini).

We pretty much use it for web surfing, web email, really old DOS children's games, and photo editing. Macs do that pretty well.

I still have a Vista machine that I use for the excellent Windows Media Center -- love the record-by-keyword feature and the free programming guide.

But for day-to-day use we're back to the Mac.

Alternative language blues

I've spent roughly 4 years of midnight-engineering time looking into the cool languages to see if they would make game programming easier or more fun. Haskell, Ocaml, F#, Erlang, Scheme, Lisp, D, Factor, Scala, Python, I've looked at them all.

F# held my attention for quite a while, but now my platform-of-choice has moved away from F#'s design center. (I'm into Linux-based mobile platforms now.) And to be honest, I'm still happier in a C-like language.

I'm depressed. Sure, I learned a lot about fancy language features, but I could have written quite a few games in plain-old-C++ (or C#, or Java or Flash or Basic) in the same time.

P.S. Someone else has done this more impressively than I have. Do a Google Groups search for Brandon van Every, who has had a five year odyssey to find the perfect non-C++ game programming language. I corresponded with him back when we were both interested in O'Caml. Since then he's managed to annoy pretty much everyone by harping…

Lisp Hacking and Science Fiction

I've been poking around with Lisp and Scheme again, and am reminded of some of my favorite science fiction books (warning, plot spoilers follow):

Verner Vinge's "A Fire Upon the Deep" begins with a group of scientists mining an ancient civilization's web archives. They need to build interpreters for the ancient civilization's programs. All goes well until they reconstitute a malevolent AI that they spend the rest of the book fighting.Piers Anthony's Macroscope involves a group of people trying to decode an Extra-Terestrial message, that other ETs are trying to jam. Over the course of the book your opinion as to which group of ETs has humanity's best interests at heart changes back and forth several times.Any number of SF stories are set in the far future where people poke around in the ruins of a once-great civilization. (See Gene Wolfe, Cordwainer Smith.)

Working with Lisp reminds me of these books. Lisp's a seductive, ancient, powerful language t…

More evidence that garbage collection is expensive

As seen on Lambda the

Quantifying the Performance of Garbage Collection vs. Explicit Memory Management

We compare explicit memory management to both copying and non-copying garbage collectors across a range of benchmarks, and include real (non-simulated) runs that validate our results. These results quantify the time-space tradeoff of garbage collection: with five times as much memory, an Appel-style generational garbage collector with a non-copying mature space matches the performance of explicit memory management. With only three times as much memory, it runs on average 17% slower than explicit memory management. However, with only twice as much memory, garbage collection degrades performance by nearly 70%. When physical memory is scarce, paging causes garbage collection to run an order of magnitude slower than explicit memory management.

The Economics of Selling a MacBook on Craig's List vs. Ebay

I just sold my MacBook over the web. I sold it on Craig's List. I also considered using eBay, but Craig's List turned out to be a better deal, for both buyer and seller.

The reason is that listing and selling on Craig's List is free, while selling on eBay is expensive, especially for items priced higher than $500. First, there's the listing fee of $0.20, then the Final Value fee of $0.50 + 3.25% * price. But wait, there's more: EBay all-but-requires you to use their PayPal service to settle transactions, and PayPal in turn requires you to use a "Premier" account if you receive more than $500 in eBay payments in one month, which you automatically would if the item you're selling is more than $500. Using a "Premier" account requires that you pay PayPal 2.9%+$0.30 per transaction, even for cash transactions. (The processing fee is less if you are doing a high volume of business through them.)

So the total eBay selling cost is in the range of 6.15…

Xbox 360 Fall 2007 update adds DIVX/MP4 video support

The Fall 2007 Xbox 360 dashboard update (coming December 4th) will add support for DivX and MP4 playback.

Video FAQ

This is great news for Xbox 360 owners who want to watch video encoded in these formats. I'm surprised that Microsoft did this, because these formats compete with Microsoft's own WMV format. While the benefit to consumers is obvious, I'm not sure what the benefit is to Microsoft. I'm guessing they did this to both improve the "watch your PC's videos on your Xbox" story, and also to match an existing PS3 feature.

Game resolution issues

This morning I fired up Mario Galaxy 64 on my new Wii for some early-morning platforming. I happened to sit closer to the screen than I normally do. Yuck! The jaggies were suddenly very apparent and very distracting. But when I moved back to my normal viewing distance, the jaggies were gone, blurred out by my poor vision.

It's no wonder that HDTV and HD gaming in general is not taking off as quickly as consumer electronics companies hoped -- the benefits are just not that apparent to normal eyes at normal viewing distance.

Jaggies aside, Mario Galaxy 64 is great fun! A very smooth difficulty curve, and gorgeous graphics. Right now I'm working my way through the candy level. (I have seven stars.)

Had brunch at Salty's

I had a very nice birthday brunch at Salty's on Alki.

Here's a variety of different ways of linking to Salty's on Google Maps:

Search Result
Search Result with traffic

A place that isn't Salty's at all

My initial Wii impressions

I finally got a Nintendo Wii this weekend. Wii's are in fairly short supply right now, so I couldn't find one at a reasonable price on-line. If you live in the Seattle area, here's my Wii-finding tip: Fred Meyer stores get deliveries on Wednesdays, Fridays, and Sundays, meaning that calling a Fred Meyer store at 7am on Sunday morning to check if they received a new shipment is a good way to find a Wii.

The total cost, with tax, an extra controller, and a component video cable was around $350.

I've got Wii Sports, Wii Play, and will be picking up Mario Galaxy this week. The primary users will probably be my kids, although I am very interested in trying out Mario Galaxy.

As a former Xbox 360 developer, I couldn't help comparing the Wii to the Xbox 360. So far I give the Wii high marks for:
It's small and quiet.It starts up quickly.
The dashboard UI is very clean and pleasant.The low-res (480p component) graphics are quite good. I did occasionally see jaggies, for exam…

Macbook Ubuntu Woes, back to OS X

Well, for what it's worth, I've switched my MacBook from Ubuntu Linux back to OS X. Ubuntu Linux worked, but had lots of little problems:The wireless driver worked, but it's range and speed was much less than under OS X. For example, sitting on the couch in my living room I got 4 bars with OS X but just two bars with Ubuntu. (Now, of course, the two operating systems could be reporting the same information in different ways. But actual network activities OS X seems faster and more reliable.)The connectivity to Windows file shares is much more reliable. With Ubuntu I could not reliably use VLC to play AVI movies off of a Windows Vista file share. The AVI movies would always timeout sometime in the first few minutes of play. With OS X I have no problem.I couldn't figure out how to get suspend and resume to work right in Ubuntu. As a result, battery life was not as good.The trackpad never felt good. And a single-button computer will always be a second-class citizen in Lin…

A Paper Leopard

I am disappointed by the new version of Apple OS X that was released this weekend. The UI has gone backwards in several areas. In particular, the translucent menus are hard to read, and the default "space theme" wall paper is ugly. So far it feels like a service pack with a bonus backup program.
I suspect that Apple is suffering from the same problem that Microsoft was with Vista, namely  "How do you improve on a very good existing product?" In addition, I suspect the company's attention over the past year was focused on developing the iPhone, and perhaps not enough attention was paid to Leopard.

Still, I'm not sure what they could have done better -- Desktop OSs are pretty much of a solved problem.  But I suspect that as the hype wears off people will start to question whether Leopard is a significant improvement.

Ubuntu Studio - nice idea, poor execution

Ubuntu Studio is a nice idea in theory, but the execution is lacking. The goal is to create a version of Ubuntu optimized for media creation by:
Bundling the best available open-source media creation tools.Using the real-time Linux kernel, for reduced latency when mixing audio.Using a desktop color scheme that doesn't make artistic people ill.The problem is that there are a lot of rough edges:
By using a non-standard kernel, the release has problems supporting wireless hardware, such as the wireless hardware present on my first-gen Intel Macbook.By using a cool-but-low-contrast color scheme, the UI is difficult to read on a screen-dimmed laptop.Some of the bundled free content creation tools are pretty weak compared to the commercial equivalents. (I'm thinking of GIMP and Blender in particular.)The wireless hardware support issues make this a non-starter release for me, but I enjoyed giving it a whirl.

Never trust a Doctor on how easy it is to use Linux

I recently read a positive review of Linux by a man who said he was a doctor, not a programmer, and that he found Linux very easy to set up and use.

That's great, but you have to take recommendations like that with a grain of salt. I'm not a doctor, but three of my siblings-in-law are doctors, and a fourth is a nurse, and one thing I've noticed is that medical professionals are extremely good at following technical directions. I think it's a skill that comes from how medicine is practiced -- you diagnose the patient, then apply a recommended treatment. Just like debugging a computer problem!

Maintaining Linux, like maintaining a patient's health, requires researching a scattered body of knowledge and deciding how to apply a mass of conflicting advice. Both tasks reward careful study, and exact replication of the recommended treatment. For doctors this way of working is second nature, but I don't think laymen will find it so easy.

Customizing Ubuntu 7.10 on Macbook

I've been tearing down and reinstalling Ubuntu 7.10 all weekend, trying to get wireless video playback to work well. Here's my list of tweaks, all of which are unrelated to wireless video playback:
I personally like the Edubuntu 7.10 distribution more than the stock Ubuntu distribution. Edubuntu has a nicer default visual theme and some nice educational games.Apply customizations from the MacBook Ubuntu ForumI just set up my keyboard so that the lower Enter button acts as the right mouse button.Make text better:System:Preferences:Appearence:Fonts:Subpixel SmoothingThe Google Toolbar for Firefox has a bug where bookmarks won't load. A work-around is to use the Synaptic Package Manager to install libstdc++5 and its dependencies.
In order to get the keyboard "Mute" button to work, open System:Preferences:Sound and select all the channels in the "Default Mixer Tracks" list. (Hold down the Control key while clicking on each channel.)

I've Installed Ubuntu 7.10 Final on my Macbook

I was up early this morning to get the Ubuntu 7.10 final release. I used the Ubuntu torrent (1700 downloaders) to download the file, and had the ISO image within an hour. Pretty neat!

In theory I didn't actually need to install Ubuntu 7.10 final. In theory it would be just as good to start with a late release candidate and apply patches. But I wanted a clean start.

I did run into an odd glitch during the install: the Macbook LCD display was corrupted when I first booted up off the LiveCD. I did a cold reboot and all was well. Go figure.

Comparing the Microsoft and Google tool chains

About six months ago I left Microsoft for Google. One of the big differences between the two companies is the tool chains that they use. Microsoft mostly uses its own tools, many of which they also offer to sale to third parties, while Google uses mostly open-source tools. I thought people might be interested in seeing the differences. Note that my experience may not be representative of most Microsoft or Google employees, because I was not working in the main-line part of Microsoft (I was in the Xbox team), and I am not currently working in the main-line part of Google. So in both cases I am not familiar with the specialized tools that each company has developed for doing its mainline work.

Here's a table comparing the tools I used at each company:

Visual Studio
Eclipse 3.3
I give Visual Studio the edge on debugging UI and IntelliSense. But Eclipse has some nice features, such as showing errors in the scroll bar.
C++, C#
C/C++, Java
Microsoft C++ i…

Laptop buying advice

A friend recently asked me for advice on buying a laptop for a college student. Here's the advice I gave them:

These days laptops from different companies are all pretty similar. They use roughly the same parts, and are built in exactly the same Chinese factories. So I would try to figure out roughly what configuration you wanted, and then shop for the best deal, pretty much ignoring the manufacturer.

The first decision, and the only one where the manufacturer matters, is whether you want a Macintosh or a non-Macintosh. The benefits of a Mac are:
Great support if you happen to live near an Apple Store.Check if you do by looking here: are fashionable.Macs can run Apple software in addition to regular Windows software.Macs have good resale value. (Although laptops in general are very fragile, so it's likely that your laptop will break before you resell it.)The disadvantages of a Macintosh are:
About 30% more expensive than other brands, especially i…

Learning about Git

Lately I've been learning the git source code control system. It's a distributed version control system, which means there is no central repository. It's especially good for working on multiple branches.

Everyday GIT with 20 Commands

Alas, currently it doesn't work well on Windows. (Due to many of its utilities being written in a hodge-podge of Unix shell scripts. Pretty lame. If they'd just used C, Perl, or Python it would have been very easy to port.)

The Linux Guide for Windows Users

A nice overview of Linux for Windows users. It's a little bit dated, but still contains lots of good advice:

He has a number of good Linux-related essays on his site, it's worth poking around.

Linux in a Windows-centric home network

I was a happy Microsoft employee for many years, and as a result, I run multiple Windows Vista machines at home. My family and I are happy with the system, especially the Vista Media Center / Xbox 360 combination that we use as our Digital Video Recorder, so I'm in no hurry to try and replace my Windows servers with a Linux ones.

This leaves my poor Ubuntu 7.10 Macbook as something of the odd man out. Over the past few weeks I've been learning how to configure it to work with my mostly Windows network.

Wireless Networking

This worked out-of-the-box. If I recall correctly, I had more trouble connecting to my home wireless network when running Apple Macintosh OS X 10.4.

Hah, for what it's worth, my wireless router is a Linksys router that's running Linux, so effectively there's no Windows involved. But I wanted to mention that wireless networking and Internet connectivity worked well out-of-the-box.

Connecting to a Windows Vista File Share

Here's where I ran into my fi…

Linux Goes Where?

Now that I have changed jobs, I've decided to try changing blog hosts as well. Older posts can be found here: Grammerjack at

This blog will probably have a lot of "Linux newbie" posts, as I am trying to learn Linux, after a long time away from unix systems.

I hope these posts will prove helpful, or at least entertaining.

Ubuntu 7.10 Beta Issues

I'm still getting used to using Ubuntu 7.10 beta on my Macbook.

Unresolved Bugs
The bottom task-switcher bar sometimes disappears.
Firefox doesn't quit cleanly - it always crashes.No big deal, this just means that I need to deal with a "do you want to restore" dialog every time Firefox starts up.
Macbook Audio can't be muted.
This appears to be a long-standing Ubuntu / Macbook bug, due to the way Macbook audio muting is implemented. Someone needs to write a driver, and unfortunately audio driver writers don't seem to care much about Macbook laptops.

Resolved Bugs
Support for a one-button trackpadChoose System:Administration:SynapticUse synaptic to install the mouseemu package to allow F11,F12 buttons to emulate middle and right mouse clicks.Phantom button clicks while moving the mouse:Choose System:Preferences:Mouse:TouchpadUn-check "Tap to Click".Choose Close.
Problems connecting to Windows Vista Printers and Windows Vista Shares: See my post on this: Linu…