Gnome Sort

While search the NIST Algorithms Dictionary for a simple sort algorithm that would be easy to write in CUSP asm, I came across gnome sort, which I’d never seen before.

Gnome Sort is based on the technique used by the standard Dutch Garden Gnome (Du.: tuinkabouter). Here is how a garden gnome sorts a line of flower pots. Basically, he looks at the flower pot next to him and the previous one; if they are in the right order he steps one pot forward, otherwise he swaps them and steps one pot backwards. Boundary conditions: if there is no previous pot, he steps forwards; if there is no pot next to him, he is done.

Awesome! The implementation is 23 instructions in CUSP asm for an arbitrary segment of continous memory.

Where do you see yourself in 5 years?

Ben posted about this over the weekend, and it made me think a bit. When I was just graduating college, and was asked the question, I had a few answers I thought I could give to that.

In 5 years I

  • Would not be working for IBM (false)
  • Would hopefully have gotten to the Olympics (true)
  • Would be married to my then girl friend (false)
  • Would have moved out of the Hudson Valley (false)
  • Would never consider going back to grad school (false)

The most surprising things that happened in that same 5 years were

  • Getting the job in the Linux Technology Center at IBM (the reason I stayed)
  • Starting the LUG, and meeting lots of friends through it
  • Meeting Susan, and all that has happened since
  • Learning to Sail
  • That the Olympics thing actually panned out πŸ™‚

MoinMoin, what a wonderful wiki application

I recently upgraded the MHVLUG website to MoinMoin version 1.5.2, after a long evening of redoing my Moin MHVLUG Theme (requiring some python hacking as well as css changes). The new version features a GUI Editor, which, while not perfect, is really impressive. It is a piece of JavaScript code that formats graphically in the edit buffer when you edit the wiki page. The most impressive part of this is the table support, which has full key bindings that you’d expect from a spreadsheet application. Again, there are still bugs (I reported one today), but what an amazing lowering of the barrier to entry in using Wikis this is.

from trac to moin

I finally decided that I had enough of Trac, the integrated wiki / tracker / scm site, after it appears there are no longer any working versions in svn that support mercurial as the back end source management system. That wasn’t the only reason that I decided to leave trac behind, it was just the straw that broke the camel’s back. I know if I pinged the developers, it would probably be fixed in a short while, but after a month of Trac at work testing things out, I’ve decided that I just like MoinMoin better for a wiki, and the other benefits weren’t something I was really using.

There are a bunch of reasons for this:

  • MoinMoin supports Templates for pages, this makes creating similar content pages (like interview forms for interns) much easier. In Trac I had to cut and past a lot.
  • While it shouldn’t be a big deal, the double click page to edit preference is so nice from a usability point of view
  • I was doing other MoinMoin work on an official wiki where it was convenient to have my own test wiki to toy with, write new Parsers and Macros
  • The benefits of the RSS feed for Trac is heavily mitigated by Mercurial having it’s own RSS feed built in. I also found the RSS that Trac generated to be less than useful, and will probably even make some enhancements to the Mercurial feed as well.
  • There were just enough format differences from Trac to MoinMoin, that it was frustrating me in moving from one to the other.
  • I’m already maintaining MoinMoin for MHVLUG, so one less app to maintain myself is much better.
  • MoinMoin 1.5 just feels slick. The built in styles get everything you don’t need out of the way, and the GUI editor is a good addition to get new people using the wiki.

So has been retired, and is where I’ll be putting all my bits now.

Convenient Linux Printing

One of the reasons I really like Mandriva Linux is that it sets up a lot of Linux applications very nicely out of the box. One of the stellar examples is the way that it sets up CUPS for printing. For instance, when I roam between, home, work, and space, the moment I attach to the network, I knows which printers are there, and those are the ones it tries to print to. I’ve got CUPS servers in all 3 places that server up a sane default, so I never have to pick a printer, and lpr does it all for me.

One of my nits with Mandiva, is I often can’t figure out exactly how it does these things. I figured out that it was using slp for subnet based broadcast (all cups servers with Broadcast enabled send these multicast packets around periodically to self configure with each other), which works fine at home, and at work if I’m wired, but doesn’t solve the whole story. The last bit of the puzzle is the use of BrowsePoll in your /etc/cups/cupsd.conf.

BrowsePoll specifies an IP:PORT that cups should try to poll for printers at the same interval as it is sending these slp packets on the network. Adding a couple of entries there, and I never have to think about printer configuration again. πŸ™‚

More fun with RSS, rpm2rss

I just pushed out version 0.2 of rpm2rss, which I need to announce on FreshMeat still.

This is an idea I came up with last month, as I maintain a number of Mandriva RPMs in a number of locations. Honestly, most of the time I just push them out there, and hope other people figure out what I pushed, but that’s a bad solution.

All this program does is take a couple of well known CPAN modules, RPM2, XML::RSS, and AppConfig (for config file parsing), and brings them all together, with a nice interface and man page. However, it means I can now run this under cron control on my systems, and not have to think about it any more. An example output feed can be found here. Given that I already have 65 URL hits, and 4 subscriptions to the project on FreshMeat, it seems like other people are interested in it as well.

I still need to get up the website listed in the man page of the package, and remerge in my tuxplus stuff to that, but that should be done today.

Getting things done… one six month old project at a time

Over the weekend I finally got around to actually finishing the openwrt install on my Linksys wrt54gs that I first modified back in June. This means I finally have both 802.11g in the house, and I have traffic shaping on my outbound connection.

While not all the kinks are worked out yet, but moving the router from the living room to the office, and actually putting it in line with my upstream provider, was a huge step forward. Let’s see what my next long overdue project is to accomplish…

Science Blog

I’ve been continually annoyed by the fact that current culture has seemed to replace science with technology in many aspects of life. If you stroll into an airport magazine, for instance, you’ll find lots and lots of computer magazines, and will be hard pressed to get a copy of Scientific American.

Online news falls afoul of the same issues. The NY Times Science section is good, at times, but it’s RSS feed is aweful. (And yes, I’ve become one of those people that measures a website’s usefulness on the quality of their RSS.) It is ironic that just before I deleted my Science Times feed, I read an article about Science Blogs in it. I’m not sure how much I’m into Science Blogs of yet, but it seems pretty interesting, especially the combined feed.

The Areas of My Expertise

On the way back from Austin, I strolled into the airport bookstore to get a bottle of water, and do my quick check to see if they actually carried any science magazines (the answer was no, per usual, though there were 12 or so gamer magazines there). However, they did have The Areas of My Expertise sitting out front. After reading the cover, and finding a Dr Who reference early on, I was hooked.

The book reads much like America The Book, though it is structured almost exactly like the Old Farmers Almanac. For instance, every chapter starts with a Lycanthropic Transformation Table, explaining time tables and effectiveness during the different sevenths of the moon cycle, and a brief description, including motos, of all 51 (yes 51) states.

I was enthralled for most of the trip back with the book, and laughing out loud, probably disturbing those around me, for the course of the trip. If you are a fan of dry wit and satire, you should definitely pick up this book.