February 17th, 2005


Cross-platform GUI stuff

With the release of mono 1.1.4 it now includes the Cairo-backed GDI+ on Linux, atop which System.Windows.Forms is then implemented.

So you can build one .exe GUI app and run it on Windows, Linux, and even OS X. Craziness.

I've been thinking about the dozen ways to do this lately:

-- Qt 4.x which is now GPL on Windows. Pro: Mac, Windows, Linux, no dependencies. Con: C++, commercial for mac.

-- Perl-Gtk. downside: no mac, tons of dependencies, no good installers

-- Gtk# on Windows: runtime, installers

So it seems that System.Windows.Forms on both Mono 1.1.4 on Linux and the native Windows .NET libraries are the best bet. And C# as a language is pretty reasonable.

Alternatives? Think end-user experience.

P.S. If you install mono 1.1.4 and play with this, be sure to add this to $SYSCONFDIR/mono/config:

<dllmap dll="gdiplus.dll" target="libgdiplus.so.0" />

And make sure /usr/local/lib is in your library search path (LD_LIBRARY_PATH or /etc/ld.so.conf)

Drive tester

After the big Internap power failure recently, we no longer trust any storage product to work as advertised.

I wrote a program to test disks/RAIDs and Matthew's been running it, finding out that, indeed, disks and RAIDs lie.

The test works like this:

-- Matthew goes to storage vendor with his laptop and crossover-connects his laptop and the server to be tested.

-- Matthew runs the server half of my disk tester on his laptop.

-- Matthew then runs the spewer client on a raw(8)-ified disk partition. the client picks random 16kB-aligned offsets on the partition and picks a random 32-bit number which it writes in hex (%08x) over a 16kB range. it reports to the spewserver both BEFORE and AFTER the disk write.

-- the server notes what the client said it was about to do and what it reported doing.

-- let it run for awhile....

-- Pull the power...

-- server notices client hasn't sent anything in 3 seconds, quits, writing out a map of what 32-bit number pattern should be at each sector.

-- power on server

-- copy map file laptop (spewserver) to the server, run spewclient in verify mode. it dumps a histogram of errors per seconds-before-powerloss:

Histogram of seconds before end:
3 31
4 7
5 1
65 1

Well, the 3 seconds is really because the "end" is considered time AFTER the 3 second timeout, so that's kinda a bug. That should read 0,1,2 seconds before, not 3,4,5. But see how there are 31 regions that are bogus at t=0, 7 at t=-1, and 1 at t=-2?

That means something was lying, and we don't buy that hardware until we get it configured so it doesn't lie.

First time using a mouse

Dina's grandpa has never had or used a computer, but he's been wanting one for some time. He's like 80 or something, but he's big into technology. He got all excited when he saw Dina's phone show my face when I called her once while she was over there. Wide-eyed he asked, "Can you see them now when you talk to them?" Dina said no, and he just kinda sighed sadly and looked away. This guy wants the future.

So... with moving my house and the office (where most my old computers live), there were plenty of extra parts to build him a pretty nice computer.

We brought it over last night and I got my first experience introducing them to a mouse. It was a crazy experience watching them learn it. I had to bust out a lot of analogies about the mouse and the Internet. I opened up the computer and showed them all the (few) parts and what they do, so it wasn't so mystic.

The setup is Linux, GNOME, and GDM logging them right in without a username/password.

Yesterday they learned to turn it on, play Blackjack, and shut it down. Also minimize and maximize, so they can switch between games while she cooks.

Saturday we show them the Internet and how not to fall for Nigerian scammers.

XM radio can blow me

Is it just me (and my dad), or does XM Radio sound like an over-compressed mp3 coming through a tincan telephone?

My XM radio free trial is expiring soon and there's no way in hell I can pay for that sound quality. Cut some stations and give each station more bandwidth. Christ.

But I hear Sirius is worse?