Josh Ourisman » On the other hand

The saga of the television continues

June 29th, 2008

A couple of weeks ago, Memorial Day Weekend actually, Jessi and I finally got a TV. I had been planning on a 42" Olevia 720p display with no tuner, because it was an incredibly good deal on Newegg, but then I found an even better deal at Best Buy, and was able to get a 42" Insignia 1080p display with a tuner for just about $100 more. So we've now got a 42" 1080p TV hooked up to some cheap rabbit ears I picked up at Radio Shack. It's pretty awesome just for the irony factor of that alone, but with those cheap rabbit ears we're able to pick up a good 20 digital stations, about half of which are in HD as well as a number of analog stations. So we'll be able to watch, for example, the Olympics in all their HD glory without the need for cable or satellite.

As I've mentioned before, my intention has been to set up some sort of HTPC to manage the content for the TV. I went back and forth before deciding on ElGato's EyeTV on a Mac Mini over MythTV on a PC, but in the meantime I didn't really want to spend the $500+ on a mini, so I set up an old gaming PC I built a couple years ago and hooked it up to the VGA input on the TV. At first, just to try and get things going quickly I installed Ubuntu on it. This proved to not really work at all. Ubuntu could see, but not use the integrated sound card on my motherboard, and video without sound isn't very fun. I probably could have fixed that with a little tweaking, but there was a bigger problem: my 5-ish year old Athlon 64 3000+ just didn't appear to be up to the task of playing HD video. I decided to give it a real test: a 1080p rip of the BluRay version of The Fifth Element in a matroska container using H.264 encoding. Basically, it just didn't work at all. So I decided to scrap that idea and just set it up with MythTV for now so we can at least watch TV with basic PVR options.

I threw an Gentoo on it, and got MythTV running (with sound!) and started planning out the new system to replace it. Then I figured, what the hell, my entirely system from the kernel to mplayer has been compiled from source and optimized for the Athlon 64 architecture, I might as well give the HD video another shot. Amazingly, mplayer opened the 1080p matroska video and played it. Success! It did have some issues with the audio going out of sync, but some command line flags fixed that ('-cache 8192 -autosync 1' is what ended up working). So, it appears, a 1.8 GHz single core Athlon 64 can decode 1080p H.264 in real time! This discovery vastly dropped the minimum hardware requirements, and thus the cost, of a MythTV based HTPC so I decided to give that option another look. A bit of research later, and I was able to spec out a full HTPC with HDMI output and all that good stuff for just about $200.

It's hard to argue with those numbers, so it looks like I will be going with a MythTV solution after all. I'll be using a 2.2 GHz dual-core Athlon 64 X2, which my experiment suggests will be more than adequate for what I need and, of course, powering it all with a fully optimized Gentoo install. I'm going to keep the old gaming PC running as my backend for all the storage so I don't need to cram too much into the tiny little case I'm getting for the HTPC, and trying to figure out the final design for that system is proving to be an interesting problem in it's own right, but I'll write more about that later in what I'm sure will be a fascinating exposition on the relative merits of various advanced filesystems and the several different UNIX-like operating systems that love them.

Some fairly large computer news

May 31st, 2008

I've been working away from home more and more often lately, and the 13" screen on my MacBook has been feeling more and more restrictive. So I decided to replace it with a something bigger. Obvoiusly my first thought was a MacBook Pro, but they're just so expenssive that it's hard to justify the cost. So instead, I bought a ThinkPad. I got a T61 with a 15" WSXGA+ screen, 802.11n, dual-layer dvd burner, 2.5 GHz Core2Duo... basically the exact same features (and even hardware probably) as a MacBook pro. The biggest difference? I spent less than $1000 dollars on it.

This is actually my second ThinkPad; I had an x61 that I bought in college and actually used as my main computer when I first moved to Boston because my PowerMac was in-transit and I didn't have anything else. I've also been impressed with the ThinkPad line, the higher end ones have very nice build quality, and they're popular enough with the Linux crowd to have good Linux support. So, for the second time in my life, I'm running Linux as my main OS (specifically Gentoo Linux on kernel 2.6.25 with the tuxonice patches).

The biggest issue with using Linux was finding the appropriate replacements for my commonly used apps. Most of them were Easy: Firefox stays the same, I use Google Apps to host my email so no problems there either. For instant messaging I was planning on using Pidgin, but ended up going with Kopete because after trying it out, I just like it better (that's right, I'm using KDE, 3.5 for now). The biggest challenge, was trying to find something to replace TextMate for coding in. I absolutely love TextMate, and take advantage of a lot of its advanced features all the time. Fortunately, back when I was a CS student, I got nice and familiar with Emacs, and was well aware that, even if the functionality I wanted wasn't built in, someone's probably created an add-on for it, and if not it would be pretty simple for me to do it myself. Turns out I was right.

I haven't completed all my Emacs modification yet, but so far just two little scripts have given me most of what I was looking for. First was yasnippet, which provides a snippet feature that works in pretty much the exact same was as TextMate's. Someone even wrote a script that will download TextMate bundles directly from the repository and covert the snippets they contain to work with yasnippet. You can't do much better than that. I'm also using emacs-textmate which provides an Emacs minor mode that emulates some more of TextMate's behaviors; specifically, it adds in the ability to automatically insert paired characters, so if you type '(' it automatically inserts ')', and handles deleting them gracefully as well.

There were a few other features that I use extensively in TextMate as well that weren't provided by either of these add-ons. Fortunately, it was relatively simple for me to implement them myself (with a little help from a friendly Emacs guru on the Gentoo forums) and patch emacs-textmate to provide it. Specifically, I duplicated TextMate's auto indent feature by adding an extra keybinding to emacs-textmate to bind the return key to the built-in Emacs function newline-and-indent. I also bound M- to a new function of my own creation defined thusly:

(defun open-next-line()
(interactive)
(move-end-of-line nil)
(newline-and-indent))

This duplicates the behavior of command-return in TextMate, which is pretty much the same as 'o' in vi[m]. I'm still working on how to duplicate command-shift-return, which inserts the appropriate line ending character based on language (';' for C and C-like languages, ':' for Python, &c.;) and then opens and goes to the next line. But I don't think that will be too hard once I learn a little more elisp. After that I just need to figure out how to duplicate Textmate's tag closing function, which is a huge time-saver when coding HTML.

All in all, I'm quite happy with my new computer. Things may not be quite as pretty as in OS X, but they can be if I just put a little work in to making them so (I've already got e17 installed, which comes close and with some more tweaking may replace KDE as my default environment). As much as I love Mac OS X, there is definitely a strong argument to be made for Linux, at least for people who aren't afraid to get their hands dirty with the command line and a good old text editor. Even with just a couple days spent adjusting the system, I think it's already at a point where I could see using it full time, maybe even prefer it to OS X. Which is really saying something when you consider that I've been a Mac user for about 24 years.


copyright © Joshua Ourisman 2006-2008 all rights reserved