Josef “Jeff” Sipek

Firefox

You may have heard me say that Firefox sucks. Well it does, but today, I accidentally found something that makes it suck less than what I thought.

Go to some page with text, and press the slash key and type something! Very nice. I like my applications to understand slash as "search" (vim, less, etc.). Now, if only it did regular expressions ;)

Making Version Control Systems Really Go Boom

This is a part 2 of my adventures of making version systems go boom.

As I described before, I need to version some reasonably large files. After trying Mercurial and Git, I decided to go with git as it presented me with fewer problems.

To make matters worse than before, I now need to version 3 files which are about 2.7GB in size each. I tried to git-add the directory, but I got this wonderful message:

$ git-add dir/
The following paths are ignored by one of your .gitignore files:
dir/ (directory)
Use -f if you really want to add them.
$ git-add -f dir/
fatal: dir/: can only add regular files or symbolic links

Wha?

  1. I don’t have any .gitignore files in this repository
  2. Adding a directory like that worked (and still works!) on other directories

Really painful. Time to experiment, but first I run git-status to see what other files I have not committed yet, and I see everything listed except the directory!…So, I moved one of the files to the top directory of the repo, ran git-status — the file did not show up — but tried to add it anyway:

$ git-add file
fatal: pathspec 'file' did not match any files

Ok, this time around, I at least get an error message which I’ve seen before. It is still wrong, but oh well. Thankfully, the program that uses these files has be made in such a way that it can handle filesystems which don’t support files larger than 2GB. I regenerate the file, now I have 2 files, the first one 2GB and the other 667MB. git-status displays both — great! git-add on the smaller file works flawlessly, but…you guessed it! Adding the larger file dies? Which error message?

fatal: Out of memory, malloc failed

Yep, great. My laptop’s 1GB of RAM just isn’t good enough, eh? I’m not quite sure what I’ll do, I’ll probably scp everything over to a box with 2+GB RAM, and commit things there. This really sucks :-/

Update: I asked around on IRC (#git) where I got a few pointers and the code confirms things…it would seem that git-hash-object tries to mmap the entire file. This explains the out of memory error. The other problem is the fact that the file size is stored in an unsigned long variable, which is 32-bits on my laptop. Oh well, so much for files over 4GB. I think, but I’m not sure - I’m too lazy to check — the stat structure may return a signed int which would limit things to 2GB — which is what I see.

Comment Spam, Part Deux

This is a continuation of Comment Spam from almost 6 months ago. Recently, I noticed that a lot of the comment spam I get appears to contain MD5 hashes. Here’s an example, with all the spam parts smudged.

MD5 comment spam

I wonder why the spammers decided to include a hash in the comment. It could be an interesting way to eliminate duplication of spam — but I’m not sure that it would help them all that much.

And just if are curious, the IP is in China’s range.

XFS & ext3

So, here’s a mini-rant…There are just as many XFS complaints as ext3 complaints on the linux-kernel mailing list. Yep. It is that simple. I can’t stand the fact that some people make a big deal out of complaints about XFS, but are oddly silent (or ignorant?) of the fact that there are just as many “problems” with Ext2/3. I’m not even considering Ext4, as it is in development.

Stupid People

Some people are outright stupid. Thankfully, there are people that are able to make fun of the stupid people, and still give constructive criticsm in the process. Very amusing, in my opinion.

Comment Spam

So, I’ve been getting a lot of comment spam lately — you can’t see it because I moderate it all. It is not a fun activity, so I looked at the available anti-comment spam plugins for wordpress. I have only one thing to say: They all suck. I looked at at least 7 different ones, which were neat in different ways, but they all suck. They force you to modify some “magic” php files. Sure, I understand the code, but the thing I don’t understand is the fact why? I’m no wordpress expert, but I am sure that there is a way to hook into it somewhere. This would easily allow me to upgrade wordpress at will without the fear of having to re-“apply” these hacky “plugins.” Shame. If I didn’t have an aversion to PHP, I might have written one, good one myself. I hope that the plugin authors/the wordpress folks see this, and fix it.

XFS, ext3 and 16TB

So, I was in #linuxfs on OFTC, and a whole discussion happened about XFS and ext3. Eric Sandeen was working on fixing up few bugs in ext3 to make it work on 16TB of storage. I couldn’t help but mention XFS. The discussion then evolved into XFS is a large pile of code that is really nasty in places (I do agree with that) but it still performs very well. Eric pasted a link to this image (I copied it for archival purposes.) which shows the code size of XFS over time. It is actually kind of scary.

XFS code size

Double u, tee, ef

You can look at this post as either a sequal to a post I made few days ago, or as another sequal to a post I made about a year ago.

So, while doing some more cleanup, Dave Quigley discovered this gem in Unionfs:

for (bindex = bstart - 1; bindex >= 0; bindex--) {
        err = copyup_file(dentry->d_parent->d_inode,
                          file, bstart, bindex,
                          file->f_dentry->d_inode->i_size);

        if (!err)
                break;
        else
                continue;
}

The particular piece of interest is the if statement:

if (!err)
        break;
else
        continue;

What does it mean? If there is no error, we break out of the loop. Makes sense. If there is an error, we go to the top of the loop. Makes sense…right? Well, what happens if you reach the end of a for loop? We go to the top of the loop! See the brain damage? We are at the end of the loop, so we don’t need an explicit continue statement.

Here’s the if statement the way it should be (for completeness):

if (!err)
        break;

Oh, so simple, it almost brings a tear into one’s eye.

Funny, but sad

So, I was happily browsing around the internet, when I clicked on this one link which opened a new window in firefox. At first, I almost burst out laughing. But by the time, I made the screenshot, I was very annoyed. Here’s the screenshot:

Free software

The wording is really crappy. I, as an open source/free software supporter, don’t like this very much. (I am more of an open source than free software person.) It will confuse people that don’t know any better - just like people call GPL/BSD/etc. licensed software "freeware." Grrrr. Can’t you get it? Freeware is the crap you get for Windows. Free software and Open source refer to more than that. Maybe I should send the screenshot to RMS, and let him raise hell :)

Curse thee!

Rocky is thee, road to satisfaction. Fore two nights and one day I have traveled thee, and now I stand, look back, and see thy nature. Thou art twisted. O curse thee! Why wouldn’t you maketh my laptop’s filesystem that of good kind? O curse thee twice! Why must thee make me use a filesystem of bad kind? O curse thee thrice! Why must thee be so rocky? Is Hans responsible? O curse thee, Hans! Two nights and one day I have spent trying to move my data to a filesystem of good kind.

Powered by blahgd