2008-08-31

Thumbnailing in Nautilus

I was just using my laptop and things started slowing down and swapping like crazy and the other application began freezing. Not this again, I though. So, I switched to doing some tasks on the command-line where I got the notice that there was insufficient space left on my hard disk!

Oh dear, I thought, this must be because of the GNOME source code and my build of it. Well, I went about looking for other sources of junk to remove to free some small amount of space. Eventually. A few megabytes here, a few megabytes there. Actually a rather small lunch, but throwing stuff away can be expensive for my heart. Then, however, I found my free lunch! When I tried to check the size of the ~/.thumbnails directory, nothing happened! It kept working on it, and working on it, and working on it, to no avail. I thought: does the programme do anything stupid that requires more space than I have free? Well, that seemed improbable, so I decided to do a heuristic: find out how many files there are there and the average size of a small set of them. I had about 190,000 thumbnails averaging 50kB each! 36 minutes later, they were removed and I had 9GB back!

Some things I wish thumbnailing in GNOME would do:

  • prevent thumbnails from being generated for files within ~/.thumbnails. (That way, you won't infinitely generate them for infinitely many of them
  • either generate the hashed filenames from a hash of the actual file and not its path, so that way, if I move it or make a duplicate, I won't end up with multiple thumbnails; OR, when files are moved (at least in GNOME applications, which doesn't help my terminal behaviour), find the old thumbnail hashed from the old path and then rename it to a hash of the new path. I can see how the first would slow down thumbnailing, though I have a suspicion that the image down sampling isn't that fast either.
  • Better file system organisation of thumbnails. Right now, tens of thousands will accumulate in ~/.thumbnails/normal :|
  • A limit and some accurate way to determine when it was last used, so we can purge ones we never look at after a few months.

So, it's Open Source: why don't I try to do some of this myself? Well, I might, once I get work out of the way to-day :)

2008-08-26

Back It Up.

Blogger has changed its user interface slightly again. I am also back to using the "Blogger in Draft" dashboard. Yay.

I'm mostly writing this to document the copy command I use to merge directories these days:

cp -av --backup=numbered foo/* foo2/

I'm terrified of dataloss. That's why I use --backup=numbered. I usually merge too many files to make -i interactivity viable. -v verbosity helps me find out what things were backed up (would have conflicted), and -a preserves permissions and timestamps.

Actually, I think I should further investigate rsync. I want something that won't create backups if the files are truly the same (by checksum, or is time+size enough?) but does create unique backups elsewise. Actually, it sounds like this will do the trick

rsync -abz --progress

Right now, I'm orchestrating back-ups for my girlfriend and me. I have a 500GB external HD and she has a 250GB HD. I'm currently packing up the 500GB's contents onto her HD and then will be backuping up her HD and my own to the 500GB external HD. Going through an old backup, I realised that I had lost some files along the way, perhaps just through gross negligence. I'm not sure. I hope to one day retrieve my girlfriend's files locked away on her dead HD from a few months ago. Sigh.

2008-08-22

Found via Language log:

Question to Radio Yerevan

Is it correct that Grigori Grigorievich Grigoriev won a luxury car at the All-Union Championship in Moscow?

Answer

In principle, yes. But first of all it was not Grigori Grigorievich Grigoriev, but Vassili Vassilievich Vassiliev; second, it was not at the All-Union Championship in Moscow, but at a Collective Farm Sports Festival in Smolensk; third, it was not a car, but a bicycle; and fourth he didn't win it, but rather it was stolen from him.

2008-08-17

Spontaneous Update

I have quite a bit to write, and never any time to write it, all of a sudden. So, let's begin with contentless updates, hint at more, and then not indulge you any farther, hurrah?

Work Shirt Drama

At work, we get to dress casually throughout this summer. However, after that, we need to be more formal, to better impress potential clients who will go "Wow, look at how well dressed these people are! This is but one more point in favour of giving them my business!" It sounds shallow, yes, but apparently it works. Anyway, this necessitates a minor expansion to my wardrobe. It amuses me that, while at TRIUMF, most of my wardrobe would easily have been considered as business casual. I had a lot of formal-looking shirts at the time (though not dress shirts). In the 3 years since, I have a more casual wardrobe (not that I actually purchased much in the way of clothing), and left almost all of my formal wear back at my father's. I am impressed by how much it could change without me actively making any effort. I wonder what I will look like fashion-wise in another 3 years! Oh, the shallow prospects! I wonder whether I am shallow. Anyway, shallowness combined with incredible cheapness makes it very difficult to purchase new dress shirts. My requirements are that they fit (15" collars are too small, 16" collars are almost too big!), that they be black (I have actually put great effort into resisting the accumulation of black clothing- however, as my girlfriend notes: I look excellent in a black dress shirt), and that they cost me $15 or less! I investigated Zellers (poor selection of sizes, but nice prices), the Bay (poor prices, but a great selection of sizes), several miscellaneous outlets (prices or sizes always close, but not close enough), Winners (the worst place to look; it was in utter disarray), and Sears, where they had the best deal: 2 dress shirts for $20. Sadly, any package that came with a black one was accompanied by a white one. White isn't so very bad, but I already own one white shirt. OH THE SHIRT DRAMA.

I also acquired snazzy new shoes, but not the snazzy new jackets, found at Zellers. I will upload a photo, or claim to, and then never do it. I have an interest in minimising consumption. I needed shoes, more or less, due to the degradation of the only pair I own. That pair I've only had for four months, though, so they may be called a bad investment. I never really expected them to be very durable, and I abused them. At 4x the price of the last pair (which were $7, by the by), I am optimistic that my new shoes should make at least a year.

Olympian

I don't care about the Olympics, more or less. However, I have, in the past, enjoyed Kendo. Recently, in part due to my girlfriend resuming karate, I am considering resuming Kendo. However, I must find a dojo locally that does not take itself too seriously. The Burnaby one is particularly strict. I cannot bring myself to treat a lot of things very seriously anymore. My irreverence has grown. I seem to take late buses seriously enough, though... Ack! I will become Samurai once more.

I hear from a friend of my girlfriend who has been teaching English in Japan that the cuisine there isn't very vegetarian friendly, due to an inclination to include fish or fish-derivatives in many or most dishes. Yikes! Perhaps I should continue to admire their culture from afar.

Regarding the Olympics, I am mildly disappointed that Canada has started accruing medals. I was pleased to see the National Post list animals who can commonly best our best athletes in speed, weight-lifting, swimming, and jumping. Hurrah for the animal kingdom. They're never invited, mind you.

I have been fascinated by the International situation situated around Russia much more in the past few weeks. Russia seems to have acted rather cleverly. More than I would expect from most modern national governments. Not that my expectations are at all informed.

Dreams

Strangely, I saw my mother in a dream the other day. Do you know how, sometimes, a possibility has passed on, the feeling that, perhaps it might one day just resume being as it was, being possible? In this dream, I saw her at home with my father, and they were both quite happy, and I decided not to draw any attention to the improbability of the situation. I was quite content, despite the illogic, to let it be and be very happy with it. I think it was spurred by seeing a lady who looked like my mother sitting outside of my work the other day. I came very close to approaching her and asking her whether she was German, just to make sure. In reality, logic reigned supreme, sadly. Note to self: sabotage logic.

Sunday's Best

"Sunday's Best" is a neat album released by a friend of mine: Mike Harloff. He's an Ontarian who went to my high school, and the album is very nice. It is a bit mellow but not sad. It is soft but still indie. His Last.fm profile.

More to say

There's more to say, of course, and, of course, I won't say it. I have spent enough time away from bed and I cannot spare anything further! However, I would like to advocate Indie Bird's latest game, Swarm. It's a simple, fun, polished Indie game.

Good night

2008-08-16

When your children borrow your hammer, do you assume that it's to build a fort? a treehouse? Do you ever stop to think that they're just going to smash eggs in bird nests and the skull of your neighbour's poodle? I don't, because I do not have kids. Remember: uncertainty is born of child labour. Sometimes the U.S. seems like a child with a hammer. Unrelated is this comment from John McCain on Russia vs Georgia:

In the 21st century, nations don't invade other nations.

Sir Nils Olav, a knighted member of the Norwegian Guard and resident penguin at the Edinburgh Zoo, captivates me. It is imperative that, should Edinburgh ever be imperilled, that Norway deploy him to its defense, I feel. I do someday home that animals and humans might one day interact on a closer level of understanding.

I have sort of lost my blogging voice. Hmm.