Watch the Internet die

March 19, 2011 in Personal | Comments (2)

Tags: ,


That’s a plot I’ve been mak­ing based on this data. If the y-​​axis doesn’t make any sense to you, this rep­res­ents the num­ber IP address blocks each of the world’s five Regional Inter­net Regis­tries has left to assign to Inter­net users. North Amer­ica is look­ing pretty safe for a while (hoo­ray). Asia and Aus­tralia are cur­rently expec­ted to run out on April 30, 2011. Bad things are going to be hap­pen­ing then.

I seem to have a thing for plot­ting things.

Plot also avail­able in SVG format. Both should be updated vaguely daily.


Fuel consumption

March 13, 2011 in Personal | Comments (0)

Tags:

The fol­low­ing plot shows our car’s fuel con­sump­tion over the past 16 months. It’s a pretty old car but is still doing kind of mostly okay.

Of note are the two local max­ima at the left and right of the plot which are dur­ing the winter months. The min­imum between fill-​​ups 10 and 20 (roughly) are the sum­mer months. The weather does make a pretty big difference.


Bowling

December 30, 2010 in Personal | Comments (0)

Tags: ,

A video of Jasna bowl­ing the other night.


Freenet and Wikileaks

November 30, 2010 in Personal | Comments (1)

Tags: ,

Sev­eral months ago I wrote about Freenet. It’s tech­nic­ally neat but I was under­whelmed by its util­ity, think­ing an uncensor­able net­work isn’t very neces­sary in today’s Inter­net. I wrote:

The primary value of some­thing like Freenet in mostly-​​​​free coun­tries like Canada would be Wikileaks, I would think. Well there is some of that  —  for instance there’s a frees­ite devoted to the leaked Sarah Palin emails  —  but the fact of the mat­ter is that Wikileaks exists in the “real” cen­sor­able Inter­net and it hasn’t been cen­sored. Or at least not yet. There’s been pos­tur­ing that maybe it will be some day, we’ll see. But the fact that it hasn’t been yet takes away a niche mar­ket for Freenet.

Con­sid­er­ing the reac­tion by the world’s gov­ern­ments to the most recent Wikileaks leak, I may have to recon­sider Freenet’s role a little bit.


Saskatoon

September 18, 2010 in Personal | Comments (0)

Tags: ,

Jasna and I are in Saskat­chewan for a couple days to cel­eb­rate our 4th anniversary: usu­ally we take a little trip or some­thing to cel­eb­rate our anniversary. We haven’t really gone out and done and seen a whole lot, as is our nature: mostly we take the time to hang out together without other dis­trac­tions. We have done a few things, though, and there is a pic­ture album up for the few pic­tures I’ve taken of it.

The high­light so far was our rushed trip last night to Regina to see the Rider game: we almost didn’t make it in time to pick up the tick­ets. It was Jasna’s first time see­ing a live CFL game and it was def­in­itely a good one to see, one of the best games of the year. It was a little chilly — around 0°C — but good times any­way. I cap­tured one of the touchdowns!

Any­way today we’re doing pretty much noth­ing. We went for a walk around the river this morn­ing and we’re going to take a river cruise later this after­noon, but other than that not much of any­thing. It’s pretty awesome.


Online portable password manager

August 27, 2010 in Personal | Comments (0)

Tags:

I’ve pos­ted this else­where, but I feel com­fort­able now post­ing it publicly.

There’s this prob­lem of hav­ing to have a pass­word for every web­site you have an account with, which is a ser­i­ous prob­lem if you have an account on a lot of sites. OpenID was sup­posed to solve this prob­lem by allow­ing you to — securely — share one account across mul­tiple sites, but never took off due to a chicken-​​and-​​egg prob­lem: almost no one uses OpenID which means almost no sites feel the need to sup­port it. Most web browsers will store pass­words for you, but that doesn’t do you any good if you want to access one of your accounts from a dif­fer­ent computer.

You can use the same pass­word — or the same few pass­words — across mul­tiple sites, but this is actu­ally a real secur­ity risk and is some­thing that should be avoided if possible.

So I put together a wee bit of Javas­cript to help man­age pass­words. You have to remem­ber one base pass­word — which should not be from the dic­tion­ary, but oth­er­wise has no con­straints — and from that pass­word it will auto­mat­ic­ally gen­er­ate what your par­tic­u­lar pass­word is for any given site. Your base pass­word is never trans­mit­ted across the net­work. The gen­er­ated pass­words should hope­fully meet the cri­teria of any site you come across: they all con­tain one upper­case let­ter, one punc­tu­ation mark and one numeric digit. If some unscru­pu­lous web­site owner gets your pass­word to one site, it is ver­it­ably intract­able for them to determ­ine your base pass­word or your pass­word to any other site. And it requires you to only remem­ber one site.

I post it in case any­one finds it use­ful or wants to use it for their own pur­poses. If you do want to use it, fol­low these steps:

  1. Steal my HTML doc­u­ment and change around the style, etc., to suit your needs.
  2. Find a place to host the HTML document.
  3. Come up with a base pass­word, hope­fully some­thing harder to guess than “galvatron”.
  4. Determ­ine the SHA1 hash of your base pass­word. You can find online SHA1 cal­cu­lat­ors, but from a secur­ity stand­point it would be prefer­able to cal­cu­late the hash on your home com­puter (e.g., on a Unix-​​based oper­at­ing sys­tem with OpenSSL installed, one can do some­thing like echo –n “gal­vat­ron” | openssl sha1 to cal­cu­late the hash).
  5. In the HTML doc­u­ment, modify the Javas­cript vari­able password_​hash accord­ing to what you just calculated.

The script will then give you pass­words that you should use for sites you sign up for in the future, which you will then never have to remember.


Thesis writing

August 4, 2010 in Research | Comments (0)

Tags: , ,

When I vis­ited Cal­gary last, I explained my bounds infer­ence scheme to Brian. It took most of an entire day of solid explan­a­tions on the white­board before he under­stood what I was talk­ing about, but he didn’t have any sug­ges­tions for how to sim­plify it. “No this is right,” he said. “This is com­pletely the right way to do it.”

Some time later he said “my biggest worry is you’re going to do all this work and no one will ever be able to under­stand it.” Aside from myself, Brian is the per­son who under­stands this best in the world, so it’s dis­con­cert­ing that it took a day to explain it to him. I have low hopes that I’ll be able to put together a thesis which is under­stand­able to my com­mit­tee, but on the other hand I have high con­fid­ence in my teach­ing abil­it­ies, and what is writ­ing a thesis if not non-​​verbal teaching?

Pola is com­plex. The syn­tax and semantics are rather arcane, neces­sar­ily so: if there were any way to sim­plify it we would, and in fact we did put a few sim­pli­fic­a­tions in. The typ­ing sys­tem is mod­er­ately if you are well versed in type the­ory; if you don’t have a strong back­ground in type the­ory I can only ima­gine it appears as a tangled vine of thorny bushes, where each thorn is recurs­ively a tangled vine of thorny bushes some­how. The bounds infer­ence sys­tem is prob­ably even worse, though only because it hasn’t been done before and I’ve had to con­jure it from the ground up. I feel most con­fid­ent about the bounds infer­ence because it’s my biggest con­tri­bu­tion but also because it’ll be the easi­est to make self-​​contained and not have to worry about whatever nota­tion is con­ven­tional or canonical.

There are mul­tiple ver­sions of Pola, vari­ations I sup­pose, which I keep mostly in my head. My thesis is focused on the “polynomial-​​time with unfolds and with duplic­a­tion by peeks” vari­ant of Pola, which I think to be the most use­ful, though prob­ably the most annoy­ing to deal with. Most of the stuff I’ve writ­ten up I’m now rewrit­ing in a new nota­tion which will hope­fully be easier to understand.

A couple weeks ago my friend Angela came to my office and we chat­ted about theses. I don’t know whether to describe the pro­cess of writ­ing a thesis as van­ity or futil­ity. Maybe it’s just com­pul­sion. Whatever it is, it doesn’t seem totally sensical to con­sume so much effort and one’s twind­ling men­tal health into it. “Remem­ber: nobody cares” she said. It’s become a bit of a man­tra for me. Even if my work goes com­pletely for­got­ten and truly no one cares, I can’t help but pre­tend that people do any­way and do everything prop­erly. Every week I spend at least a couple pan­icked hours tying up loose ends that I’m entirely con­vinced no one would ever notice were loose to begin with. This dili­gence includes put­ting most of my days into dream­ing up ways to rep­res­ent things to make them easier to under­stand, even if no one fully will.

The fur­ther I get the more I notice the hacker part of me try­ing to over­take the aca­demic part of me. It’s tempt­ing to just strike out my entire chapter 3 and say “yeah ser­i­ously just down­load the soft­ware and play with it. You will learn more in 5 minutes of play­ing around than you will reread­ing this stu­pid chapter a hun­dred times”.

Man this entry soun­ded depress­ing. It’s all worth it when you do fin­ish a sec­tion, though. You do get a bit of a rush when you finally word some­thing really eleg­antly and you can visu­al­ize your com­mit­tee nod­ding along think­ing “well that’s clear. Why did put so much emphasis on some­thing that’s so simple?”


Our media server

July 26, 2010 in Personal | Comments (3)

Tags:

I can finally show off my week­end pro­ject! Well okay the vestiges of it star­ted a couple week­ends ago and it bled into this morn­ing by a couple hours, but I think it still counts as a week­end project.

Jasna and I don’t have cable or an antenna for our TV, which means we down­load everything we watch, or bor­row it from friends on rare occa­sions. My Mac­Book was start­ing to run near the end of its use­ful life as my main work com­puter — the track­pad was becom­ing unus­able which meant I couldn’t depend on it when trav­el­ling — but it’s still got some life in it as a server. It was wire­less net­work­ing (no cables to string around), uses very little power, is com­pletely silent, comes with media soft­ware (Front Row) and comes with a remote con­trol, is really small (less than 2cm tall), which makes it more or less the per­fect media server.

The only down­side is it was a pain to get shows onto it to watch, as you have to search for the shows manu­ally, down­load them, then copy them manu­ally over to the server. So, I decided to make a web interface.

Check here for screen­shots of the new web inter­face for the media server. EasyN­ews, our Usenet pro­vider, provides very handy ser­vices like global searches, thumb­nails and AutoUn­RAR­ing. A big bene­fit to this is not hav­ing to wait until some­thing has fin­ished down­load­ing it before watch­ing it. So far I’ve got ser­vices for down­load­ing from Usenet — which is where we get almost all of our TV shows to watch, down­load­ing CFL games from TSN and just upload­ing indi­vidual files from your browser. At some point I need to set up schedul­ing so that it auto­mat­ic­ally down­loads new epis­odes of shows when they’re released, but I guess that’s for another weekend.

I’m kind of embar­rassed at how proud I am to have actu­ally fin­ished it in a week­end like I’d planned, espe­cially con­sid­er­ing I haven’t done any web devel­op­ment in years and years. The astute of you may have noticed I used straight-​​up CGI instead of tech­no­lo­gies the cool kids are using: no love from me for PHP or RoR or Ajax or any­thing. Since I haven’t put any pass­word secur­ity in yet — that’s for another week­end yet — and the box is pub­licly address­able via IPv6 I’ve had access to the web inter­face to just within our local net­work, but if IPv6 takes off some day it’ll be cool to be able to down­load movies while I’m away from home.


Rock Point

July 23, 2010 in Personal | Comments (0)

Tags: , ,

Jasna and I just got back today from a spur-​​of-​​the-​​moment camp­ing trip. We’d been want­ing to have a couple days just for the two of us for a while now, and our sched­ules aligned, so why not? We thought camp­ing would be more fun and relax­ing than any­thing else, and I’ve wanted to see the towns along the Grand River forever, so we com­bined the two and went to Rock Point Pro­vin­cial Park: it’s vir­tu­ally right where the Grand River emp­ties into Lake Erie and neces­sit­ates driv­ing along the Grand River, a fairly nice drive.

I’ve got a grand total of 3 pic­tures from the trip and I’m happy with that. It wasn’t the sort of trip to you take to take pic­tures of. Appar­ently the park is known for its fossils, but we didn’t go hunt­ing for those, either. We went down to the beach a few times — twice for moon­light swims — and spent most of the rest of our time in our camp­site sit­ting around and talk­ing and enjoy­ing one another. We got a nice camp­site with fairly good pri­vacy and shade, and none of the camp­sites dir­ectly around us were taken. It was pretty much the per­fect couple of days, only because we were together.

Jasna bought me an e-​​reader! She actu­ally 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 read­ing. It’s a Kobo, which I adore. I’m actu­ally a bit of a freak in that I’m some­what anti-​​paper: I often prefer read­ing on screen to read­ing on paper; maybe it’s a side-​​effect of grow­ing up with a com­puter. The Kobo has a really beau­ti­ful dis­play and is easier for me to read than any­thing I’ve ever read from, CRT, LCD or paper. The dis­play can’t refresh very often — maybe once a second or some­thing like that — and it’s super low-​​powered which makes it unsuit­able for any­thing but read­ing, which suits me fine. I have only two com­plaints: firstly, that the font size is typ­ic­ally too big, but that’s a cri­ti­cism of the books that are format­ted for it, not the device itself; and secondly, that it’s really dif­fi­cult to skip for­ward or back­ward a lot of pages at a time. With paper it’s easy to do a bin­ary search for the page you want, but the Kobo seems determ­ined to make you do a lin­ear 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 genu­inely relax. It turns out that’s about half an hour, ha! I’m still more or less pleased with how the thesis is progressing.


Watching CFL games on Linux

July 2, 2010 in Personal | Comments (5)

This art­icle is for you if you’re a Cana­dian foot­ball fan, you don’t have cable TV, you use an oper­at­ing sys­tem which doesn’t run Microsoft Sil­ver­light (such as Linux) and you can’t afford to go out to the bar all the time to watch foot­ball games. I may have described only one per­son (myself), but just in case there’s another per­son out there, I will describe to you how to watch your foot­ball games. I should say that while I’m no law­yer, my under­stand­ing 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 import­ant part is to install rtm­p­dump, a util­ity which you will use to actu­ally down­load the video stream. I’m using a rel­at­ively ancient ver­sion of rtm­p­dump and I don’t think it mat­ters par­tic­u­larly which ver­sion 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 down­load — some­thing of the form http://​watch​.tsn​.ca/​c​f​l​-​g​a​m​e​s​-​o​n​-​d​e​m​a​n​d​/​w​e​e​k​-​1​-​a​l​o​u​e​t​t​e​s​-​v​s​-​r​o​u​g​h​r​i​d​e​rs/ (one of the best foot­ball games I’ve seen in a long time, incidentally) — as an argu­ment. It then extracts the clip IDs for each quarter (includ­ing over­time, if needed), determ­ines the rtmp URL for each video clip, and down­loads the video files in sequence.

#!/​bin/​bash
match_​name=$(echo “$1″ | sed ‘s,\(http://.*\)\(week-[^/]*\)\(.*\),\2,’)
q=0
# get through all the videos (quar­ters) linked to by the given game (“epis­ode”)
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/​d​a​t​a​f​e​e​d​/​f​l​v​/​u​r​l​g​e​n​j​s​.​a​s​p​x​?​vid=$i | sed ‘s@\(.*\)\(rtmp://.*\.flv\)\(.*\)@\2@’ | tr –d ‘\n\r ‘)
        echo “sav­ing from $src
        echo “sav­ing to $match_​name-$q.flv“
        rtm­p­dump –r $src –o $match_​name-$q.flv“
        q=$(($q + 1))
done
# cre­ate dummy file so we don’t know before­hand if a game went into over­time
if [ $q –eq 4 ] ; then
        touch $match_​name-$q.flv“
fi

It’s worked well for me but there are cer­tainly no guar­an­tees about it. CTV could break it eas­ily if they so wanted (if you’re read­ing this, CTV, please don’t be mean­ies. Let’s be BFFs). The only unfor­tu­nate down­side to it is that CTV poten­tially loses out on some advert­ising rev­enue. My recom­mend­a­tion is to stare extra hard at the com­mer­cials to make up for it on the days you do go out to the bar to watch a game. Head­ing out to the sta­dium — at the very least whenever the Riders are in town — would also be a nice way to sup­port the league and TSN for put­ting games up online.