Thursday, December 24, 2009

Full text search indexing in sqlite3

I guess I'm a little behind the curve, but I just discovered that sqlite3 has full text search capabilities (appropriately dubbed "FTS3") a la Google. FTS3-enabled tables are actually built atop virtual tables, about which I also just found out.

Anyway, there's a great write-up about it and how to use it here.

Wednesday, December 23, 2009

Using ext4 when compiling your own kernel

My parents finally upgraded to a new computer this past weekend so I took their old one (PIII, 384MB SDRAM) and turned it into a file server. I used gentoo to build it and was surprised how little time it took to actually configure (compiling was a different story...). I had an old 120 GB PATA hard drive lying around so I partitioned it as follows:
  • /dev/sda1 | ext2 | 100MB (/boot)
  • /dev/sda2 | ext4 | 15GB (root)
  • /dev/sda3 | swap | 1GB
  • /dev/sda4 | ext4 | 104GB (/mnt/whatever)
It was all pretty standard: upgrade to sys-devel/gcc-4.4.2 and sys-libs/glibc-2.11-r1, `make menuconfig`'d sys-kernel/hardened-sources-2.6.28-r9, made sure I included baked-in support for ext4, and compiled. After waiting half an hour (literally -- `time make` took ~32 mins!), I rebooted and was welcomed by an unfamiliar message in my system log:
EXT4-fs: dm-5: Filesystem with huge files cannot be mounted read-write without CONFIG_LSF.
Fortunately, my root partition mounted cleanly and the error only applied to /dev/sda4. Googling around*, I discovered that the "huge_file" feature is implicit when running mkfs.ext4. I saw 'CONFIG_LSF' in the kernel config and the documentation said it was only necessary for files 2TB or larger -- clearly nothing I'd need to worry about -- so I didn't include it in the kernel.

Instead of recompiling my kernel, I figured I'd just reformat the partition without huge_file support. Yes, recompiling the kernel would've been a pain, but reformatting seemed like the more ideal/elegant solution -- especially considering this partition was barely 100GB. The default behavior for mke2fs.ext* can be found in /etc/mke2fs.conf (on gentoo, at least), and the culprit looks like this under the ext4 block:
features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize

* http://old.nabble.com/Bug-509893:-e2fsprogs:-mkfs.ext4-produces-unusable-filesystem-td21193293.html

Monday, December 21, 2009

Secretly updated version of MidpSSH for BlackBerry

If you've used MidpSSH for Blackberry, you'll find that the most recent version available from the website it hopelessly out of date (last updated March 2008). If you've never heard of it, shame on you! Its the only BlackBerry SSH client of which I'm aware, and if you have a BlackBerry and use *nix, then you'll most certainly find it useful.

Anyway, while I was researching which of the myriad versions of the application to install on my new Curve 8900, I stumbled upon an old BerryReview article that links to an updated version not listed on xk72.com! It's listed at version "1.7.4 beta 2" and has a timestamp of Oct 2008 -- so its now just plain out-of-date (not hopelessly).

The big features added to this release (according to the article) include:

  • BIS-B support (depends on carrier on which ports you might be able to work, IE on mine they block port 22, but I just changed my sshd port of linux box to a higher port,). When configuring the host, just add :PORT (so it would be IP.OF.SERVER:PORT)
  • WIFI support
  • Application is signed in order to gain access to some RIM protected APIs
I was appropriately skeptical but I figured I'd give it a shot and the changelog given is very accurate! I was able to connect to my home linux server over both WiFi and BIS (T-Mobile EDGE) whereas previously I had to be connected to a WiFi network; said server's SSH server is also open to a port other than 22, and specifying that in the connection preferences allowed me to connect; and I wasn't presented with the "untrusted application rah rah" warning when I downloaded and installed it. It also seems noticeably faster, but then that's probably just because I'm coming from an old Pearl 8120.

Unfortunately, I doubt we'll be seeing many updates to this application anymore, but this should certainly hold me over until someone else decides to pick up the ball. Besides, its not like SSH standards change very often. The source code is available to anyone enterprising enough to tackle such a huge project for the BlackBerry community.

Site hosting the application for OTA install:
http://www.deltatech.com.mx/midpssh/beta2/midpssh-bb-ota.jad

Thursday, October 15, 2009

The Gervais Principle of Mangement

A very eye-opening piece. Great idea using the Office as an example. Its almost scary how realistic this is at times. Obviously the Peter and Scott Adams Principles to which he refers are almost laughable, and were probably designed more to be narrow glimpses into an otherwise complex system, but I believe Rao may be on to something.

[via Slashdot]

Thursday, August 6, 2009

The Japanese are so novel

Another example of a combining existing technologies to make something very novel. The nerd in me had his jaw drop and head shake at how freakin' cool this is.