To celebrate the dawning of November, I have a really ridiculous hardware question (as you may have guessed from the title of this post).
Does anyone out there, in the whole of the internet, know where one might find and, ideally, purchase a compact cassette data drive? Yes, those funny things that we used to listen to music on in the 80s can also be used to store data. If anyone could help me find some such hardware and, ideally, some Linux drivers for it I would be very appreciative.
[Edit: Some further research has shown that the data on such drives is stored in an analog manner, and therefore is essentially just a recording of the 'sound' of the digital data. So any old tape player should do so long as it can be hooked up to the audio in/out of the computer. Proper software to demodulate the analogue signal is, of course, necessary, but there's plenty of stuff already out there to build on (it would basically just be an acoustic coupler). The only problem with using a standard tape player is that it's not going to be computer controlled and so will need to manually be stopped and started as necessary.]
I've been using WebFaction for my hosting for a while now, and have been extremely pleased with them. In addition to the fantastic service I've received, I've been very impressed with the intelligent way they have their servers setup. They've clearly done a lot of work to make things as modular as possible which makes it insanely easy for me to run multiple sites with very different requirements seamlessly on the same server.
Basically what they've done is segment out all of your different websites into 'applications'. Each application in represented as a directory in your ~/webapps/ directory, and is essentially a self-contained environment with it's own apache instance, and, in the case of a Django app, it's own $PYTHONPATH. The end result is that even though all the websites are being stored and run from within my home directory, they're entirely modular, can have different, or different versions of the same, dependencies installed, and can be shut down and restarted independently of one another. On top of all this is a fantastically simple custom web-based control panel that I'm pretty sure is built with Django.
I've been so impressed with how well this setup works, that I've decided to duplicate it on my home server for development purposes. Currently I do pretty much all my development work on my Gentoo Linux powered ThinkPad. To that end I've installed Apache, MySQL, PostgreSQL, SQLite, Python, PHP, &c.; to allow me to mimic the live sites as closely as possible and to allow me to continue working when I don't have internet access (such as when I'm flying or visiting Jessi's family out beyond the reach of broadband). This works very well, but as I'm just using a basic Apache install, without any VirtualHosts, it's not nearly as flexible and means I can really only work on a single site at a time with some work necessary to switch back and forth between projects. Of course most of the time I just use Django's built-in development server when working with Django, but I do end up relying on Apache sometimes, and I'd like to set up my home server as a more complete development environment for both myself and some friends I can grant VPN access to. So to that end I've been looking into WebFaction's setup with the idea of re-implementing it myself.
Turns out it's pretty simple. Simple enough that I almost feel like I should have thought of it myself. Basically, WebFaction's setup scripts create a new 'app' in your ~/webapps/ directory, and populate it, most importantly with a copy, owned by your user, of the Apache executable, some scripts to start, stop, and restart that executable, and an httpd.conf file that sets the (in the case of a Python-based app) $PYTHONPATH variable to include a ~/webapps/yourappname/lib/python2.5/ directory allowing each site to maintain it's own dependencies independently (you can also put things in your ~/lib/python2.5/ for global dependencies if you want). Oh, each application also gets it's own copies of the necessary Apache modules to the same effect. Each application's Apache instance(s) is set up to listen to a different (non-80) port. The end result of this is an extremely simple, extremely modular setup that works fantastically.
Obviously I've left out a step here. If each Apache isntance is listening to a different, non-80, port, how does your traffic get to your actual site? This is the one part that I can't really just peek into the configuration files for, because it doesn't (as far as I can tell, which makes sense) live on the same server as my sites. I assume that what's happening is that WebFaction's name servers are simply pointing requests to (for example) joshourisman.com:80 at my.webfaction.server:portnumber. Again, a simple, yet elegant solution that allows for easy customization and expansion.
I haven't yet tried to implement this setup myself (I first want to move my server from FreeBSD to Linux (which now that I'm using full-time again I'm just much more familiar with), but there's nothing about it that's particularly tricky. Really, the routing is probably going to be the hardest part, but I'm planning on replacing our rather lackluster TrendNet wireless router with a Linux box which will give me much greater control and (hopefully) better reliability.
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.
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.
I posted a while ago about my plans for our TV setup. In the intervening months I've made a few changes to my plans and taken a big step towards getting it all set up.
The biggest change is that I've removed MythTV from the picture. Originally I was planning on either building my own MythTV powered HTPC or buying a TVease Zodiac MythTV system. It appears that TVease has gone out of business, so that's now out of the question. But in the course of my research on building a MythTV box, I realized that it would be a similar price and far far easier for me to just buy my HDHomeRun through Elgato and get their EyeTV software with it. I can then just run it on a Mac Mini using Pyetv to control it all through Front Row.
With that in mind, I've now purchased my HDHomeRun from Elgato, and am currently watching the Detroit and Dallas in the Stanley Cup playoff live in a window next to my browser as I write this. We've also get it scheduled to automatically record Lost and Grey's Anatomy.
So far I really like the EyeTV software. With the HDHomeRun we've got two tuners so we can do picture in picture and/or record one thing while watching another (or just record two shows simultaneously). I've had no problems or complains with either the software or hardware so far, though I have had a few problems actually introduced by my computers. For some reason, my iMac occassionally loses its AirPort connection which means it loses its connection to the HDHomeRun. As a result, our recording of the latest Grey's Anatomy stopped after 7 minutes. Fortunately this won't be a problem with the final setup because I'll just connect the Mini to the network via ethernet. On the plus side, the 802.11n network I setup for my iMac gives me no problems watching two HD shows simultaneously. The other problem we've run into is that occasionally the reception isn't that good. But that's easily fixable by just getting a better antenna, which won't be hard to do since we're currently using some cheapo rabbit ears.
All in all, I'm pretty confident that this is going to work out well. And it will be easily upgradeable if we decide we want to get cable and/or sattelite (probably sattelite because if we're paying all that money I'm going to want Setanta Sports).
For the past week or so, I've been running FreeBSD on my MacBook. So far, I've got to say, I absolutely love it. I have a lot of experience running a range of Linux distributions on all sorts of hardware including both PPC and Intel Macs, but just a week or so of FreeBSD usage has convinced me of the OS' value over Linux.
A standard FreeBSD install is incredibly simple. If you don't want to dive into any messy details you don't have to (though you do need to be comfortable with the fact that you're going to be using a curses interface rather than a real GUI). You could probably have a full, working install of FreeBSD, complete with X.org, in 15-30 minutes if you didn't want to do anything crazy.
I, of course, wanted to do some crazy things. Namely, I wanted to have it running on Sun's ZFS, which took a little extra work. If you just want to run FreeBSD on your MacBook easily, I highly recommend this howto from Goddess-Gate.com. It's very good and very easy to follow (just remember that you might not use a French-layout keyboard and you'll be fine).
To start things off, after partitioning my drive with BootCamp, I used this ish.com howto to get a minimal FreeBSD install running with ZFS. At this point, my Airport card was working with the built-in drivers, which was absolutely stunning after all the work and effort I've put into trying to get WiFi to work with Linux in the past. After that I took a few tips from zenspider to get the basics setup like configuring my own user with sudo privs, and ZSH as the default shell (I'm a fan of things that start with Z, I guess...). After that, just a few tips from the Goddess-Gate.com howto as well as the MacBook page o the FreeBSD wiki (the wiki page will be important later) got me to a basically complete and usable stage.
In addition to the basics, I installed the e17 window manager, which so far I really like, gvim and xemacs, for my basic work needs (traditionally I'm an emacs guy, but lately I've been playing around with vim a lot), Opera for web browsing and some of the KDE packages, though I don't want or plan to use KDE, I just wanted a few of the applications to play with (Konqueror and Kate), so I removed all the KDE packages other than kdebase and it's dependencies.
At this point I only had a few issues with my install:
- the trackpad - FreeBSD currently has no support for advanced features with the MacBook trackpad. The synaptics drivers available in FreeBSD don't recognize the USB trackpad that Apple uses, so you're forced to use basic mouse drivers which means no two-finger scrolling or right-click. The best solution out there (and I'll address this in a bit) is to configure xbindkeys so that F10 sets your mouse button to left-click, F11 sets it to middle-click, and F12 sets it to right-click.
- fn key - FreeBSD also currently has no support for the fn key on the MacBook keyboard which means that the home, end, pgup and pgdn keys are unusable. This isn't a huge deal as you can use various other keybindings to the same effect, but it's annoying.
- battery monitor - For some reason the battery monitor widget that comes with e17 only sort of works with my MacBook. If my battery is full, it says so. Otherwise, it just says 'DRIVER'. Oddly enough, this doesn't seem to indicate an actual driver problem, because I can get the full info on my batter at the command line including time remaining and all that fun stuff. Since the information is obviously all available I'm going to try and patch the e17 widget to work with a MacBook when I've got the time. Meanwhile, I'm sure that other battery monitor probably work, though I haven't had a chance to try any yet.
- Firefox - I simply have not been able to get Firefox to work properly. I've tried various ports (firefox, firefox-devel,linux-firefox, and linux-firefox-devel), but sometimes they fail to compile, and even when they do, they won't run. Since I've got both Opera and Konquerer installed I'm just going to ignore this issue until Firefox 3 is released and makes it into the ports tree.
Other than those four things, everything else has really been a dream in terms of ease of setup and use. And, I'm happy to announce, I've come up with a better solution to the right-click issue!
You have to install xvkbd and then add the following to your .bindkeysrc:
"xvkbd -text '\m3'"
Control + b:1
"xvkbd -text '\m2'"
Alt + b:1
This will allow you to use ctrl-click for right-click, as in the Mac OS, and alt-click for a middle-click.
The one caveat, which Rui Paolo, writer of the MacBook entry in the FreeBSD wiki helped me discover, is that you have to compile the latest version of xvkbd yourself, as the one in ports is outdated and doesn't work for this. So I'm going to work on building a new port with the latest code. The lack of a simple way to right-click was the one thing that was really bothering me with my FreeBSD install, so this is a pretty huge deal as far as I'm concerned.
Well, that was a very long and geeky post. Now I have to get ready for my international flight tonight.
Like many others I upgraded to Safari 3.1 last night. Also like many others I'm now encountering the 'shift bug' in Gmail. If you haven't yet read about it, what happens is that for some reason in Gmail on Safari 3.1, and apparently only in Gmail Safari 3.1, when you hit the shift key (or caps lock key) in the body of the message it changes focus. The result of this is that it's impossible to enter capital letters or any other character that requires the shift key suchs as '$' in the body of your message. Basically, Gmail is unusable in Safari 3.1.
There is a workaround for most people: at the top right of your Gmail page you may see a 'newer version' link. If you go to that and then select US English as your language, this apparently fixes the problem. Unfortunately, the 'newer version' link isn't available in the Google Apps Gmail, which is what I use.
The other fix, of course, is to simply use a different browser. I'm a big fan of Safari, and have been using it exclusively pretty much since it was released. I've tried Firefox a number of times, but never really liked it that much for a variety of reasons. But like others, this problem hasn't really left me with much of a choice. So I'm writing this post from Firefox 3 beta 4 which, I have to say, isn't too bad. It definitely, as others have said, uses far less memory than Firefox 2, which is a big part of the reason I generally don't use Firefox. I'll keep using it for a while and we'll see how it goes.
The other reason I generally stick with Safari is the tight integration with OS X, as well as the .Mac bookmark syncing. But I have been looking into cross-platform alternatives to .Mac, because it would be nice to have a solution that would work with other OSes as well (the price issues doesn't bother me so much because it's such a useful product and it's actually pretty cheap if you have a family pack). The one real issue with switching away from .Mac for me is that I make pretty extensive use of Yojimbo which uses .Mac to sync it's SQLite database and Transmit which uses .Mac to sync bookmarks. Not to mention my use of Apple's Address Book and iCal because they sync not only with my other computers through .Mac but with my iPhone. So if anyone can recommend a solution that would allow me to replicate all that functionality across multiple *nixes (specifically OS X, Linux, and FreeBSD), I'd appreciate it. ;)
This will be my second post written from my iPhone. I'm currently in the middle of nowhere in Illinois at Jessi's mom's house. We'll be here until the 30th, which means I'll have some work to do on the trip. On my previous visits here there was always a wifi network available from one of the neighbors who was kindly sharing his sattelite Internet connection with the rest of the town (it's a very small town and they can't get cable or DSL out here). Sadly it turns out that someone had been using up his monthly bandwidth allotmen so that's no longer available to me. Hence me writing this entry from my iPhone.
Fortunately, I came prepared to work without Internet access. I had planned to do some work on the flight over here, so before I left I created a new Parallels virtual machine and installed a copy of Gentoo Linux in it, and set up a lighttpd server with PHP and Python running in FastCGI as well as SQLite and MySQL so I could do both PHP and Django development without having to only guess at whether or not it would actually work (technically this wasn't necessary for Django since it comes with a lightweight development server built-in, and OS X comes with SQLite installed standard, but I figures I might as well).
I also tried setting up Tinyproxy on my iPhone so I could share my iPhone's EDGE connection with my laptop for browsing, but for some reason it doesn't seem to be working even though I had no problem with it at home.
The end result is that, even though I have no real Internet access to speak of, I can still do my work. I can even keep in touch with everyone thanks to my iPhone and meebo, and, if the need were to arise, I could always set up an SSH tunnel through my iPhone and get SFTP access to my webserver (or any other, for that matter) that way. So even way out here where they don't even have DSL, I'm still fully connected. This is one of those times where, even though I spend pretty much all my time working with technology, I'm still completely amazed by it.
Now, I believe, it's time for dinner.