My Poor Car

I got my car back from the shop on Tuesday. The saga started two weeks ago when I went to drive home. The clutch went straight down and didn’t pop back up. I had it towed to the Audi dealer service center, which is close to work, the next day. The problem turned out to be a leak in the slave cylinder. Then, they took the clutch apart to find and replace parts that had been damaged by the leak. Luckily, the whole thing was covered by the factory warranty which transfered to me when I bought it new.

They also gave me a loaner in the middle of last week. I was getting tired of walking to the grocery store. And taking the bus and train to work. It was an Audi A4 Avant S-line, a much nicer car than my A3. I like my A3 more. It handles better and accelerates faster and is nice enough for me.

I had noticed that the clutch was feeling different. In fact, I forgot to ask them about it when I took it in for regular maintenance the week before it failed. I am little worried that it failed after only 34,000 miles. Hopefully, it won’t be in the shop any time soon. This was the third, and longest, time in a month. A month ago, I had the lower front bumper cover replaced after I scraped it on a crub and the side ripped out.

Maemo SDK on Fedora 9

I got the Maemo SDK installed on Fedora 9. The instructions are pretty complete.

First, Scratchbox needs the compat VDSO mode enabled. This is done by echo 0 > /proc/sys/vm/vdso_enabled. Also, Qemu requires mmap_min_addr set to 4096. These can be set permanently by adding the following lines to /etc/sysctl.conf.

# scratchbox support
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096

On my desktop, which is x86_64, compat VDSO can only be set with the vdso32=0 kernel command-line option. Also, the scratchbox installer script checks for i386 architecture. It needs to faked out like this: setarch i386 ./

VIA padlock support in OpenSSL

The VIA C7 processor also has padlock encryption acceleration support. Linux support was added a while ago.

First, the automatically load the padlock module, add the /etc/sysconfig/modules/via-padlock.modules file.

for i in padlock; do
    modprobe $i >/dev/null 2>&1

Second, to use it for internal kernel encryption, add to /etc/modprobe.conf.

alias aes padlock

Third, OpenSSL can be configured to use padlock. To see if your OpenSSL was compiled with padlock support, do openssl engine padlock. You can see the speed difference by comparing openssl speed -evp aes-128-cbc to openssl speed -evp aes-128-cbc -engine padlock. To use padlock engine by default, add the following lines to the top of `/etc/pki/tls/openssl.cnf.

#enable padlock engine by default:
openssl_conf = openssl_def

engines = openssl_engines

padlock = padlock_engine

default_algorithms = ALL

Unfortunately, the version of openssh in Centos 5 does not use the padlock engine. Engine support was added to openssh in 4.9p1 (bug 1437). It looks like there is a bug with engine support which is fixed in OpenSSL 0.9.7h. It looks like Ubuntu Hardy has patched its packages.

VIA RNG on Centos

The J7F4 mini-ITX motherboard that I got for my home server has a VIA C7 processor. One of the feature of the processor is the PadLock Security Engine with hardware RNG. This is especially useful on a server since they are limited in entropy sources. Linux kernel has support for the VIA hardware RNG in the via_rng module.

Next, install the rng-utils package with the rngd daemon. It reads entropy from the hardware RNG, /dev/hwrng, and feeds it to the kernel entropy pool for /dev/random.

Unfortunately, the package is missing an init.d script to start the service (see redhat bug 215371. The /etc/rc.d/rc.sysinit actually has a commented-out line to start rngd. Download the script from the bug and put it in /etc/init.d/rngd. Add the service, chkconfig --add rngd, and start it, service rngd start.

Oregon Brewers Festival

After OSCON ended, I went to the Oregon Brewers Festival on Friday afternoon. This is the first time I have gone after living in Portland for five years and loving beer. I rode my bike downtown; they had guarded bike parking. The cost was $4 for the mug, $1 for tokens which give a taste (or 4 give a full glass). When I went, the tents were fairly crowded but there weren’t long lines for the beer or the restrooms.

First, I had a full glass of Flying Fish Bourbon Barrel Abbey Dubbel which is a delicious Belgian-style Dubbel. Then, I had tastes of Rogue Ales Imperial Porter, Boulder Beer Sweaty Betty Blonde, Green Flash West Coast IPA, and Laurelwood PNW Pils. I deliberately tried to get beers from non-locals breweries since I seen many of the local beers in bars or stores.

OSCON: Friday

On Friday, I made it to the morning keynotes. None of them were really informative but were entertaining and funny.

I attended ZFS: Bringing Terabytes Under Control by Jay Edwards. He mainly talked about using ZFS on Solaris for large storage systems. The biggest advantage of ZFS is the nice management tools for creating pools and filesystems. RAIDZ, which is RAID5 with tracking of which blocks need to be rebuilt, sounded neat. The copy-on-write behavior which makes snapshots and clones easy sounded very useful. He mentioned some of the problems between the impedance mismatch between smart ZFS and smart hardware. ZFS assumes that the hardware is dumb and lies which causes performance problems with smart drive arrays.

Next, I went to Running Your Programming Language on Parrot by chromiat and Patrick Michaud. They talked about how to write parsers and compilers for Parrot using the Parrot Compiler Tools. The tools make it easy to write a Parrot compiler for a language by doing a parse grammar and AST grammar to transform the source into an AST; the tools can produce PIR from the AST. It sounded like the new tools are being used for more languages and should improve the progress in getting languages implemented on Parrot.

OSCON: Thursday

After staying up late on Wednesday night, I slept late on Thursday and missed the keynotes. I went to Matt Tucker’s talk on Jingle: Cutting Edge Open Source VoIP describing the Jingle extension to Jabber that allows voice chat and other multimedia. Jingle is the standardization of the Google Talk protocol for voice chat. One thing that sounds good about Jingle is that it reuses the ICE, STUN, and RTP standards for making the connections through firewalls and NAT. Jingle replaces SIP and SDP for the session setup with much nicer XML language. It sounds like Jingle isn’t meant to replace SIP for making phone calls with hardware but instead to provide standard multimedia chat for instant messaging.

I skipped the next session talk and worked on my computer instead. After lunch, I went to Next Generation Version Control Systems by Sam Villian. He talked about bzr, Mercurial, and git, the three modern distributed version control systems. He talked about why distributed version control is better than centralized ones like Subversion. I liked is distributed systems are more transactional with commits not relying on a server. Also, these distributed systems are more descriptive and keep track of the DAG of the history instead of having to be told about merges and renames. He also talked about how the distributed systems allow the stable development model with each change getting a branch that is merged into an always-stable branch when ready. In comparing the systems, the main thing is that bzr is slow and doesn’t scale as well to large repositories. git is harder to use and impossible to install on Windows. It is really fast and produces compact repositories. Mercurial sounded nice with a speed comparable to git while being easier to install and use.

Next, I went to Jesse Vincent’s talk on Building Domain Specific Languages in Perl. He was talking about so-called internal DSLs where an easy-o=use dialect of Perl is used for a specific domain. He mentioned a couple of tricks to persuade the Perl parser to support a simplified syntax including installing helper functions, using prototypes, and returning closures. He mentioned a couple of DSLs that they had invented for Jifty: Jifty::DBI, Object::Declare, Template::Declare, and Jifty::Dispatcher. Template::Declare was interesting since it is a templating system that instead of embedding code in text or using a special language just uses special Perl code with functions for HTML elements. This allows refactoring and modularizing the templates like code.

Finally, I went to the Perl Lightning Talks, a bunch of five minute long talks. They are just long enough to advertise a project, perform a rant, give a brief summary of a longer talk, or sing a song. I remember some of the same talks from last year. Some of the projects I bookmarked where Yahoo UI Library, qpsmptd, Move My Data, DashProfiler, DBD::Grofer, and Perl 5 Wiki.

OSCON: Wednesday Afternoon

In the afternoon, I went to more OSCON sessions. First, I went to Nested Data Parallelism in Haskell by Simon Peyton-Jones, the same guy who gave the keynote talk I went to. This time, he was talking about extending the Haskell compiler to do data parallelism. Flat data parallelism is when a computation is split into chunks and processing distributed across processor. Nested data parallelism is where the depth and complexity of the algorithm depends on the data so it isn’t simple to split up. Flattening transformation can turn these problems into flat ones that can be chunked. Also, multiple steps can be fused together into single ones. The special syntax and data parallel extensions they wrote for the GHC allows the compiler to do these transformations. He pointed out that this is only possible with purely functional languages. He thinks that functional languages are the future for scaling to multiple cores.

Next, I went to Hacking with (and on) Gears by Andy Boodman from Google. He talked about Google Gears a browser extension that supports offline applications written in Java. It adds a local server for caching files. A database module with embeds SQLite in the browser for local database storage. And a worker pool of threads for running background JavaScript tasks. He showed how these could be used to write an application, like the new Google Reader offline mode, that downloads the files, stores data locally, and synchronizes the data to the live site. The big problem left unanswered by the framework is the synchronization and conflict resolution problems. I thought it was interesting that the pieces were generally useful JavaScript extensions that would be useful outside of offline apps.

Next, I went to Hecl: Open Source Scripting for Mobile Phones by David Welton. Hecl is a dynamic scripting language for mobile phones. It is interpreter, written in Java, and designed to run on J2ME. It has a very simple syntax based on Tcl. The interpreter runs in a tiny amount of space. It has support for making widgets and basic GUIs.

Finally, I went to Using Puppet to Manage Your Network by Luke Kaines. I went to a talk on Puppet last year. This talk was much better since he talked about how Puppet works and how it could be used instead of vaguely talking about why it was useful. Puppet has definitely gotten some recognition since this talk was well attended. Most of the content was familiar to me from working with Puppet but I learned a couple of things about reporting changes and modules.

OSCON: Wednesday Morning

I am going to the OSCON sessions today and the rest of the week. I missed most of the keynotes this morning. I did Transactional Memory for Concurrent Programming by Simon Peyton-Jones and Haskell guy at Microsoft. He described the idea of transaction memory as the alternative to locking for concurrent programming. Transactional memory basically wraps critical sections in atomic transactions. It was somewhat interesting since Parrot is talking about using STM. GHC is a Haskell implementation with STM. He talked about how transactional memory requires blocking with retry and waiting until the memory read changes. He also talked about how useful systems add choice which instead of blocking does an alternative.

I also went to Performance Whack-a-Mole by Josh Berkus. He talked about how to solve database performance problems. He gave a couple of rules to tracking the problems which he called moles. Most problems are not really database problems and are at other levels of the stack. Most slowdown is caused by a few big problems. You can only see the worst problem which hides the others. Different classes of apps have different performance problems. Web apps tend to read heavy and have issues with connections and caching. OLTP have locks, transactions, IO write problems. Data warehousing has IO issues with bad queries. He also talked about doing a baseline inspection for common problems, benchmarks, microbenchmarks, and profiling.

I also went to Care and Feeding of Large Web Applications by Perre Harkins. He talked about the issues dealing with deploying and releasing a large web application in Perl. I was most interested in the system he described of installing CPAN modiules. They have their own tool for deploying specific versions of modules. He also mentioned automating database updates, simplying the configuration, testing, and doing version control and branches.

Starcraft on Linux and Mac

My coworkers and I have gotten addicated to Starcraft again. The question is how to run it since my only computers are Linux and Mac.

Starcraft under Wine on Linux works pretty well. There are some issues with the display changing resolution that makes it hard to switch back to the desktop and resizes programs. There is a problem with some of the menus not clearing the screen which results in a jumble of text.

Starcraft under CrossOver Mac on the Mac works but not well. The CrossOver installer is nice; it makes managing installs easy. But Starcraft runs slowly. The mouse is jerky and unresponsive.

Starcraft under VMware Fusion running Windows 2000 on the Mac works pretty well. I used the free VMware Converter to turn the Windows 2000 partition on my old desktop into a VMware virtual machine. One of the nice things about VMware Fusion is that I can run the same virtual machine on Linux and Mac.

Another option for running it on Mac is to use the Mac version of Starcraft. The Mac version was originally made of Mac OS 9 and is PPC. Blizzard has a Mac OS X installer that allows it to run on Mac OS X. Supposedly, Rosetta is fast enough with running the PPC binary under Intel. Unfortunately, I have the Windows CD of Starcraft. It is possible one of my coworkers has the Mac version and I can use my CD key with that.