Computers

Using notify-send to Slack Off Efficiently

Thursday, December 17th, 2009 | Linux, Programming | No comments

I’ve been working on a big project in MPI and the execution times on my code are annoyingly long (on the order of minutes). I like to keep my work in a separate workspace from my browser to minimize distractions, but then when I set my code running and head over to visit reddit or something I often don’t notice when my code finishes. Today it occurred to me that this would be a good use for libnotify. There is a command-line utility called notify-send (you should have it if you have a recent version of Ubuntu; not sure about other distros) which gives a simple interface to libnotify, so I whipped up a tiny script to call it:

#!/bin/bash
 
EVAL_STRING="notify-send -u normal -t 5000 -i info \"Task completed\" \"$@\""
eval $@; eval $EVAL_STRING

I put it in a folder which is in my path, and now I just do

$ notify ./takes_forever

and I know as soon as it’s done. OK, back to work.

Tags: , ,

Gmail: Please Bold the Hidden Labels Button when there are Unread Messages

Tuesday, July 21st, 2009 | Blog, Software, Technology, Web Design | No comments

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

Tags: , ,

First Thoughts on Scala

Tuesday, July 14th, 2009 | Programming, Software | No comments

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.

› Continue reading

Tags:

Dark and Disquieting Portents

Wednesday, July 1st, 2009 | Web Design | 2 comments

Have you noticed an increase in the margin on the left side of the Google search results page recently? My coworker started noticing it yesterday, but I thought it was just him. Then I noticed it when I got home, and saw it mentioned on Twitter as well. The weird thing is the platforms where it shows up. My friend first started noticing it with Firefox 3.5 on Windows. I noticed it at home with Firefox 3.0 on Ubuntu, and on this Windows machine I see the effect with Chrome, but not Firefox 3.5 or IE 7:

› Continue reading

Ctrl-C is Back

Saturday, June 13th, 2009 | Blog, Web Design | No comments

My (indirect) host, fsckvps.com, was pretty messed up by hackers using a HyperVM exploit. Fortunately, the server I use seemed to be OK, but the DNS servers were down and due to one thing and another I wasn’t able to set up alternate nameservers until just now. I’m using free service from afraid.org. It seems kind of slow, but it’s definitely better than nothing. Anyone know of any alternatives? Is it possible to roll my own?

There is a slight improvement; http://www.ctrl-c.us/ now redirects to http://ctrl-c.us/ :-)

OK, it’s now way past my bedtime. I’m getting up in just a few hours to go on another epic hike. Pictures to follow.

Keyboard Remapping in Windows XP

Tuesday, June 2nd, 2009 | Linux, Software, Windows | No comments

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:

› Continue reading

Interfacing C and Python 3 using SWIG

Monday, April 27th, 2009 | Blog, Linux, Programming, Software, Technology | 1 comment

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.

› Continue reading

Tags: , , ,

64-bit Flash Player!

Sunday, November 16th, 2008 | Blog, Linux, Software, Technology | 1 comment

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?