July 26, 2010 in Personal | Comments (3)
Tags: silly
I can finally show off my weekend project! Well okay the vestiges of it started a couple weekends ago and it bled into this morning by a couple hours, but I think it still counts as a weekend project.

Jasna and I don’t have cable or an antenna for our TV, which means we download everything we watch, or borrow it from friends on rare occasions. My MacBook was starting to run near the end of its useful life as my main work computer — the trackpad was becoming unusable which meant I couldn’t depend on it when travelling — but it’s still got some life in it as a server. It was wireless networking (no cables to string around), uses very little power, is completely silent, comes with media software (Front Row) and comes with a remote control, is really small (less than 2cm tall), which makes it more or less the perfect media server.
The only downside is it was a pain to get shows onto it to watch, as you have to search for the shows manually, download them, then copy them manually over to the server. So, I decided to make a web interface.
Check here for screenshots of the new web interface for the media server. EasyNews, our Usenet provider, provides very handy services like global searches, thumbnails and AutoUnRARing. A big benefit to this is not having to wait until something has finished downloading it before watching it. So far I’ve got services for downloading from Usenet — which is where we get almost all of our TV shows to watch, downloading CFL games from TSN and just uploading individual files from your browser. At some point I need to set up scheduling so that it automatically downloads new episodes of shows when they’re released, but I guess that’s for another weekend.
I’m kind of embarrassed at how proud I am to have actually finished it in a weekend like I’d planned, especially considering I haven’t done any web development in years and years. The astute of you may have noticed I used straight-up CGI instead of technologies the cool kids are using: no love from me for PHP or RoR or Ajax or anything. Since I haven’t put any password security in yet — that’s for another weekend yet — and the box is publicly addressable via IPv6 I’ve had access to the web interface to just within our local network, but if IPv6 takes off some day it’ll be cool to be able to download movies while I’m away from home.
July 23, 2010 in Personal | Comments (0)
Tags: holiday, Jasna, thesis
Jasna and I just got back today from a spur-of-the-moment camping trip. We’d been wanting to have a couple days just for the two of us for a while now, and our schedules aligned, so why not? We thought camping would be more fun and relaxing than anything else, and I’ve wanted to see the towns along the Grand River forever, so we combined the two and went to Rock Point Provincial Park: it’s virtually right where the Grand River empties into Lake Erie and necessitates driving along the Grand River, a fairly nice drive.
I’ve got a grand total of 3 pictures from the trip and I’m happy with that. It wasn’t the sort of trip to you take to take pictures of. Apparently the park is known for its fossils, but we didn’t go hunting for those, either. We went down to the beach a few times — twice for moonlight swims — and spent most of the rest of our time in our campsite sitting around and talking and enjoying one another. We got a nice campsite with fairly good privacy and shade, and none of the campsites directly around us were taken. It was pretty much the perfect couple of days, only because we were together.
Jasna bought me an e-reader! She actually bought it before we’d planned on going on the trip, but I guess this seemed a good time to give it to me, and give me an easier time reading. It’s a Kobo, which I adore. I’m actually a bit of a freak in that I’m somewhat anti-paper: I often prefer reading on screen to reading on paper; maybe it’s a side-effect of growing up with a computer. The Kobo has a really beautiful display and is easier for me to read than anything I’ve ever read from, CRT, LCD or paper. The display can’t refresh very often — maybe once a second or something like that — and it’s super low-powered which makes it unsuitable for anything but reading, which suits me fine. I have only two complaints: firstly, that the font size is typically too big, but that’s a criticism of the books that are formatted for it, not the device itself; and secondly, that it’s really difficult to skip forward or backward a lot of pages at a time. With paper it’s easy to do a binary search for the page you want, but the Kobo seems determined to make you do a linear search.
I did bring my laptop, but only so I could do just enough work to make my guilt levels fall to the point where I could genuinely relax. It turns out that’s about half an hour, ha! I’m still more or less pleased with how the thesis is progressing.
July 2, 2010 in Personal | Comments (3)
This article is for you if you’re a Canadian football fan, you don’t have cable TV, you use an operating system which doesn’t run Microsoft Silverlight (such as Linux) and you can’t afford to go out to the bar all the time to watch football games. I may have described only one person (myself), but just in case there’s another person out there, I will describe to you how to watch your football games. I should say that while I’m no lawyer, my understanding is that what I describe here could become illegal should Bill C-32 pass, and we all hope it won’t.
The first and most important part is to install rtmpdump, a utility which you will use to actually download the video stream. I’m using a relatively ancient version of rtmpdump and I don’t think it matters particularly which version you use.
From there all that is needed is a way to get the rtmp URLs of the game you want. To use the script below, you give it a link to a game you want to download — something of the form http://watch.tsn.ca/cfl-games-on-demand/week-1-alouettes-vs-roughriders/ (one of the best football games I’ve seen in a long time, incidentally) — as an argument. It then extracts the clip IDs for each quarter (including overtime, if needed), determines the rtmp URL for each video clip, and downloads the video files in sequence.
#!/bin/bash
match_name=$(echo “$1″ | sed ‘s,\(http://.*\)\(week-[^/]*\)\(.*\),\2,’)
q=0
# get through all the videos (quarters) linked to by the given game (“episode”)
for i in $(wget –q –O — “$1″ | fgrep ‘#clip’ | sed ‘s/\(.*#clip\)\([0 – 9]*\)\(.*\)/\2/’ | uniq) ; do
src=$(wget –q –O — “http://esi.ctv.ca/datafeed/flv/urlgenjs.aspx?vid=$i” | sed ‘s@\(.*\)\(rtmp://.*\.flv\)\(.*\)@\2@’ | tr –d ‘\n\r ‘)
echo “saving from $src“
echo “saving to $match_name-$q.flv“
rtmpdump –r “$src” –o “$match_name-$q.flv“
q=$(($q + 1))
done
# create dummy file so we don’t know beforehand if a game went into overtime
if [ $q –eq 4 ] ; then
touch “$match_name-$q.flv“
fi
It’s worked well for me but there are certainly no guarantees about it. CTV could break it easily if they so wanted (if you’re reading this, CTV, please don’t be meanies. Let’s be BFFs). The only unfortunate downside to it is that CTV potentially loses out on some advertising revenue. My recommendation is to stare extra hard at the commercials to make up for it on the days you do go out to the bar to watch a game. Heading out to the stadium — at the very least whenever the Riders are in town — would also be a nice way to support the league and TSN for putting games up online.
June 26, 2010 in Research | Comments (0)
Tags: bounds, conference, Pola, thesis
Check out the picture gallery. Even though it was all category theory, and consequently I can follow almost none of the other talks, it’s still a wonderful conference to go to. It’s a nice atmosphere, a good mixture of grad students, professors and professors emeriti.
After the conference I stayed in Calgary for another couple weeks working on my thesis and going through bounds inference in detail with Brian. Unfortunately, and excitingly, we found a big problem with the mixture of coinductive and inductive recursion which can take one out of polynomial time. I may write on that more at some other time, but only after I think of a good way to describe it, at which point the first place it will appear is my thesis.
June 10, 2010 in Research | Comments (0)
Tags: bounds, conference, family, Pola
The following fffffffuuuuuuuuuuuu describes most of my life for this week:

I’m flying out to Calgary Sunday morning and then heading to Kananaskis for FMCS. My code is already working for many cases, but it’s not as complete as I’d like it to be. I’d like to do a proper demonstration of bounds inference when I give my talk. It’s a pretty laid-back conference so, truth be told, even if I don’t get it totally working by then I can still just demo what I have, or just not demo at all.
I went to FMCS once before, in 2004 at the end of my undergrad. It’s a very nice conference, less formal than most, which makes it a lot more fun and a lot more productive, I think. After the conference I’ll be hanging around in Calgary for another week or so working on my thesis and hanging out with the parents. Good times.
June 9, 2010 in Personal | Comments (4)
Tags: OpenSolaris, rants
I bought a new laptop a couple days ago. For the past 6 years I’ve been using Macs just about exclusively; for the past 3 years or so it’s been my MacBook that’s been my main machine. However, for the past several months I’ve been increasingly annoyed with the MacBook: the case is cracking; the trackpad button is sticking; and, something which matters to very people other than me, Apple has been slow in fixing some bugs and the source code wasn’t available for me to fix them myself. So, after much deliberation, a couple days ago I picked up a Toshiba Satellite, on sale and marked down even further because it was a demo model. According to the specifications it’s better than a modern MacBook in pretty well every way, and at about one quarter the price. The only downside was it didn’t run OS X, which I was becoming disillusioned with anyway.
I intended to run OpenSolaris on it because I quite like the technologies in OpenSolaris. Unfortunately OpenSolaris’s hardware support is very poor, but the laptop I bought looked like it had the highest chances of working, and it was very highly rated by Consumer Reports as well. After trying various OpenSolaris distributions and developer builds, I’ve come to the conclusion that it’s not going to work, at least not yet. It was probably naïve of me to think I could get my wireless card working under OpenSolaris.
(more…)
May 29, 2010 in Personal | Comments (1)
Tags: space
Every now and then I find something that blows my mind at how awesome the Internet is. The first mind-blowing experience for me was more than 15 years ago, when I discovered the Future Crew’s home BBS in Helsinki, Metropoli, was online, and I wouldn’t have to wait months to get the latest demos out of Finland anymore.
Today it was finding 360º panoramas of the moon. Check it out right now. I’ve always wondered what it would be like to stand on a foreign world. And yes, I’ve seen the movie Moon, but it didn’t quite do it for me. These panoramas were really amazing for me, though, probably the closest I’ll ever get to standing on the moon myself.
The Apollo 17 panorama is probably my favourite due to the geography of the area, the boulders and “mountains”. The Apollo 12 panorama is nice just to appreciate how ghetto the lander was and how incredible it is that NASA was able to pull the missions off so well given the technology of the time.
May 28, 2010 in Research | Comments (0)
Tags: conference, family, holiday, Pola
I’m going to be going to attending FMCS 2010 in Kananaskis — not far from Calgary — in a couple weeks. I’ll be giving a talk on the implementation of Pola in some capacity, though I haven’t figured out how broadly scoped or what to focus on.
I’m getting pretty psyched about it. The conference will be fun if it’s anything like I remember FMCS 2004 to be. The location is amazing. Plus after that I get to spend some time in Calgary with my parents and hanging out with Brian and, probably most importantly but least awesomely, working on my thesis.
May 22, 2010 in Personal | Comments (1)
Tags: rants
Today’s xkcd is so validating. I first stumbled across the GNU manifesto probably in 1996, when I was in high school. I wanted to teach myself C and a good way to do that was to use the DJGPP compiler, which led me to GNU. I didn’t really think much of it at the time except that these “Free Software Foundation” people took software way too seriously, but I was happy to have a free compiler to play with.
(more…)
May 12, 2010 in Personal | Comments (0)
Tags: assembly, Itanium, writing
I’ll make a research-oriented entry before long; I promise. I’m starting to get towards writing up some of the cool stuff in my thesis.
I’ve started writing an Itanium tutorial. That document will magically update every now and then as I write more. On the one hand it’s slightly embarrassing how much I’ve written — it’s almost half as much as I’ve written for my thesis so far — but it’s an entirely different kind of writing. There’s really no rigour at all to it. I don’t have to worry about proving things or citing things; I’ve never proofread any of it. I just write whatever pops into my head, which makes it very quick and easy. Primarily it’s for my benefit, so I don’t forget anything and so that it forces me to figure things out more concretely than I would otherwise.
(more…)