Aiming for #2

Recently, I lost several weeks worth of data. I’m not talking about code or documents, but something almost equally valuable to me. I lost several weeks of bash shell history. You see, I rely heavily on bash’s Ctrl-R feature to find previous commands. It’s an amazing feature; every time I’m watching another person use bash and actually manually type out something like


for the 20th time in a row instead of Ctrl-R con RET, I have to resist the urge to lean forward and hit Ctrl-R for them.

Bash was designed a long time ago to run on big high-uptime multiuser servers, so I accept that it isn’t proper Crash only software. The only time bash saves the history of commands you’ve typed is when the shell cleanly exits. It will happily run weeks at a time, and if your computer locks up, you accidentally hit Ctrl-Alt-Backspace, whatever…boom. All gone.

This was not the first time this has happened to me. However, I decided it would be the last. I considered downloading the bash source code. Thinking about it more though, I realized that bash probably had no notion of a mainloop where I could just g_timeout_add(7000, save_history). Then there were other considerations such as trying to do all this in a portable fashion, and the fact that I was somewhat annoyed at the time that my last hacking on GNU software was just seeing the light of day in the Emacs 22 pretests 5 years after writing it.

I’ve always been interested in shells (in the sense of primarily text-driven interfaces). I wrote a simple one for the Mugshot server that turned out to be surprisingly useful relative to how long it took me (a few hours) to write.

Did you know that GNOME Terminal is the #2 Linux application (almost certainly tied with bash if it was counted) according to Mugshot?
Anyways, I’ll stop rambling about the backstory here and get to the point.

Hotwire is my prototype of an interactive hybrid text/graphical shell for developers and sysadmins.

The developer wiki explains a lot more about what it is, so if you want to learn more you should click there first (if you read this far, you probably already did), then keep reading here.

Hotwire is definitely still in the prototype stage; there are bugs and things that could be better. You’re not going to rpm -e gnome-terminal today.
However, what I’ve concluded thus far is that not only is replacing the combination of terminal+shell+/usr/bin/ssh feasible, we can do a lot better.

At this point, you get another story. A few months ago I had Windows on my new laptop, and I decided to try using IE7. It had tabs, which I required. I wondered how usable it would be relative to Firefox. For a little while I used it, was surfing around, making tabs…and it seemed OK, except…there was something wrong with the URL bar. It actually took me a little bit to realize what it was – its completion doesn’t strip of ‘www.’ as a prefix (or something), and its ordering of completions seems to be alphabetical rather than Firefox’s by-recency.

Just like Ctrl-R in bash, I rely on Firefox’s intelligent URL completion in the address bar. I never use bookmarks. IE7 was just not usable for me because of this. I downloaded Firefox. Now of course there are other good reasons to use Firefox, but what really motivated me to click that download right then was the completion.

I like to think Hotwire has some small-scale but big-impact fixes like this. Now for you those fixes may not be the same as me. Personally, I love the fact that history is searched and displayed by default, but for you perhaps it’s the fact that the ‘rm’ command moves items to ~/.Trash instead of deleting them permanently (opening the door to an ‘undo’ command). Maybe for someone else who loves nautilus-open-terminal, it’s having some of the functionality of both in one window.

I could go on, but Hotwire is only just about a week and a half old, and it doesn’t yet have that many amazing features. But again, what really strikes me is how much potential there is. Being written in Python, it’s so easy to hack. If right now it doesn’t have that fix for the terminal/shell you always wanted to do, it’s probably really easy to add. It’s also a framework where we don’t have to care about backwards compatibility with considerations such as the output of the ‘ls’ command, what keybindings do, etc. It’s a canvas, on which we can sketch out and prototype interesting new ideas for a new developer/sysadmin shell.

If you’re interested in hacking, check out the Developer page, clone the source tree, and send patches/feedback to the Google group.

Initial Public Offering

So now seems like a good time to recreate a personal blog. I lost mine when my personal (physical) server died and was too lazy to start one up again.

If LiveJournal is good enough for jwz, it’s good enough for me. (This is what I said originally, but it completely ate the first version of this blog post right after I typed all of it out because I tried to click on a help item then use the browser back button, which I am still angry about while I am trying to retype this, but anyways)

I thought Havoc’s post on the GNOME Online Desktop (and he deserves some sort of medal for the name) was very good. It has started some sub-discussions, one of which is about Gimmie and Big Board direction.

The first thing I want to say to Alex in particular – I have always had a great deal of respect for you and the cool software projects you have created. Gimmie is a great project.

As for the details, I want to avoid all the he-said/she-said stuff and just say that basically, in my opinion it would not have made sense to prototype the Big Board direction starting from Gimmie’s codebase. At least up until now and for the near future.

Gimmie’s scope for the most part has been to improve the panel, and in my opinion does this very well. Does it also replace your panel? Yes, but the Big Board scope is quite different and larger – it is part of a prototype for an online desktop.

For example, the Big Board codebase also includes Havoc’s experimental code to sync GConf with an internet server.

Also in the interest of prototyping, we decided to reuse a large amount of infrastructure that we have developed for the Mugshot server. This has made it a lot easier for components such as the photo slideshow “stock” (the term for Big Board widgets, obviously!) – there is zero configuration involved with it. It goes out and gets your Mugshot contacts, retrieves their flickr/youtube etc. thumbnails, then slideshows them. If we’d wanted to do this in the Gimmie context, we would have had to add infrastructure to the code for “external accounts” (mugshot term for data like flickr username), and also code to talk to the Flickr API, poll YouTube feeds, etc. And that would leave open the question of how you find out the flickr usernames for your contacts.

Another example is Havoc spent a few hours figuring out how to talk to the Google APIs and get a list of your online Google docs displayed in the sidebar. And most of that time as I understand it was battling Google’s crazy everything-is-an-atom-feed API. If we’d wanted to do this starting from Gimmie, we would have had to figure out the harder question of how it iteracts with Gimmie’s code for local documents, what operations made sense, etc., in addition to writing the code to talk to Google.

In code terms, if we had tried to do this as Gimmie patch, a lot of it would have been of the form:

if mugshot_mode():

which probably isn’t very useful for Gimmie’s current userbase right now.

Longer term, it does make a lot of sense to figure out how to reuse/integrate/merge with/write-plugins-for existing components such as Gimmie/gnome-panel/nautilus/GConf etc. But I hope this post explains why the Big Board is not a “Gimmie clone” anymore than Gimmie is a “panel clone”, and why we’ve been prototyping in a new codebase.

Originally I had written more extensively here but I’m going to post this now before it gets eaten again.