Software
Adding ‘addremove’ to Git
I’m a happy git user, but mercurial has a nifty command with no git equivalent: hg addremove. This command removes deleted files from the repository and also adds new files in the current directory. For me, at least, it’s a useful command that I’d like to have. Of course, git is nothing if not flexible, so let’s add this command! I’m using a suggestion for a script that I found here. Add the following lines to your $HOME/.gitconfig:
[alias] addremove = !git add . && git ls-files --deleted | xargs --no-run-if-empty git rm
Tada—git addremove puts new files in the staging area and also removes deleted files. Now you don’t have to pay attention to your hipster friends who try to tell you how great mercurial is.
Gmail: Please Bold the Hidden Labels Button when there are Unread Messages
I love Gmail. It does everything I could possibly want an email client (web or desktop) to do. All of my non-junk email accounts are Gmail or are forwarded to Gmail accounts. That said, occasionally something occurs to me that would make my Gmail experience a little bit better. Sometimes these crop up as Labs features, which I think is great, and is part of why I enjoy using Gmail so much.
› Continue reading
First Thoughts on Scala
Over the past week or so I’ve been looking into the Scala programming language. If you aren’t familiar with it, Scala is one of a group of new-ish languages including Groovy, Clojure, and Nice (as well as new implementations of preexisting languages like Jython, JRuby, and Rhino) that run on the JVM (either interpreted or compiled to Java bytecode). Over perhaps the past decade the JVM has been increasingly seen as an attractive target platform for language development for several reasons:
- Implementation in Java instead of C
- Features like garbage collection, portability, and a huge standard library come for free
- Languages benefit from advances and optimizations in the JVM
(This is part of a trend pointed out as Prediction #4 in a list of 10 predictions about software Steve Yegge made about 5 years ago.) In fact, targeting a virtual machine has almost become the only way to implement new, fancy languages with reasonable performance, portability, and implementation time.
Keyboard Remapping in Windows XP
When I found that I had to use Windows for work, the first thing I did was to install gvim and my usual host of plugins. The next thing was to remap caps lock and escape. I switch these when I’m using Linux because I don’t really ever use caps lock, but I use escape all the time (especially in vim). In Linux it’s a simple .Xmodmap entry:
Interfacing C and Python 3 using SWIG
I like Python, and I use it for almost all of my personal projects and whenever I can get away with it in school. Sometimes, however, (rarely, these days) you’re looking for raw speed. Python, alas, is not the fastest kid on the block, and at these times you might have to turn to a different language to give you the necessary speed. (Another option you might consider first is Psyco.) In these situations it is often the case that only particular operations or functions really have to be fast. Even if you want to write the whole piece of software in C, you might like to use Python to write the front end. There are a lot of different ways to do this, but my favorite is SWIG, because it’s easy and I’m lazy.
64-bit Flash Player!
Today Adobe is releasing an alpha version of a 64-bit Flash player for Linux. I cannot explain how happy this makes me. I have been dealing with shitty 32-bit Flash players running on 32-bit emulation in 64-bit browsers in Linux for about the past five years, and it has caused me nothing but endless annoyance and frustration. Half the time I have to refresh a page a few times because Flash keeps dying, and even when it manages to play it’s a complete coin toss as to whether there will be sound. With my current setup I basically have to close Amarok to play a Flash video if I want to hear sound. Adobe is years late to the party with this one, but better late than never, right?
Facebook Chat, Making My Life More Complicated
When Facebook added the chat feature a few months ago, I found it to be entirely unnecessary. All the people with whom I wished to chat were already in my MSN, AIM, and GoogleTalk contact lists, which are all tied together by Pidgin.