Monday, June 30, 2008

A minor feature I should add to Deadwood

A feature I should add to Deadwood: When it is reading the cache from disk or writing the cache to disk, it would be nice if there was an optional progress bar.

Shouldn't be too hard to implement.

- Sam

Wednesday, June 25, 2008

Final release of Schoolbook Zillions file.

As I mentioned in a blog entry from a year ago, I have had a lot of interest in chess variants, and have worked on and off on making a "Zillions" file for a variant I "invented" over two years ago, Schoolbook Chess.

Well, this variant never caught on. Only two or three games of this variant have been played where I wasn't one of the players of the variant, and only about two dozen human-vs-human games of this variant have ever been played. I went to a lot of work on this variant; I used computer-vs-computer games (having the computer play itself a number of times, using a couple of programs that can play Schoolbook) to come up with a number of mating positions. I did some opening analysis. I added some annotated games. No one was interested; chess players are averse to the idea of changing the rules of chess, and people in the chess variant community are too interested in their own "invented" variants to pay serious attention to other people's variants.

So, I am putting Schoolbook chess to rest. I have made a final version of the Zillions file for Schoolbook; I added four more mating positions (with one exception, all of these are from computer-vs-computer games played in August of 2007), made a PDF file of all 20 total mating positions, and this will be my last release of the Schoolbook zillions file.

The file is available here:
Now that this is released, I am declaring Schoolbook dead. I have other geek projects (MaraDNS, ObHack) that have generated more interest and that I contribute more to the world working on.

- Sam

Tuesday, June 24, 2008

I had dinner with my neighbor

My lovely neighbor, who I have mentioned here before, made a really wonderful dinner last night of broccoli with cheese, lettuce, beans, tortillas, extra-hot salsa verde, some yogurt on the side, and lemonade to drink.

Over dinner, we had some really enjoyable conversation in a mix of Spanish and English.

She's a really close friend. I'm happy. :)

Saturday, June 21, 2008

Review: LG KP 115a

The LG KP 115a is a little-known cellphone; I have seen very little information about it posted on the internet. It is a small, low-cost (About $60 US, including activation and a number of minutes on Telcel' s network) cell phone with mp3 ans image viewing support (but no camera). It appears that this cell phone is only available in Mexico; LG has no information about this phone on their web page.

The built in mp3 player is reasonably good; the majority of songs play without problems, but there are noticable glitches with a handful of songs I have encoded from my CD collection using the LAME mp3 encoder. The most annoying glitches are in the song La fuerza del destino by the 1980s Spanish-language group "Mecano" ; no matter what LAME settings I used (noshort, no joint stereo, only joint stereo, etc.), I was unable to make this song play without noticeable glitches and places where the singer sounds like as though she is singing underwater.

The phone also has a FM radio that my friend Sinai is using right now to listen to music. It allows one to listen to music, but (probably because of pressure from the RIAA) doesn't have the ability to record from the radio.

The phone has a basic voice recorder; it can only record to the phone' s memory. Since the phone has very limited memory (measures in kilobytes, not megabytes), it can only record about three minutes of voice. Fortunately, it is possible to move voice records from the internal memory to an external SD memory card.

The built in image viewer is basic; it has problems with large images and it' s best to make images small 128x128 jpeg files for best results, so I took a number of pictures of family and friends and converted them down to be small jpeg files so I can show pictures to my friends.

The KP115a has a slot, in the back under the battery for putting in a MicroSD memory card. Telcel' s official position is that you can' t put a MicroSD card larger than 1gb in this phone. This is incorrect: The phone works fine with 2gb SD cards, as long as they are formatted with FAT16. The directory hierarchy is unusual; music has to be placed in a folder named " Sounds" off of the root directory and pictures in a folder named " Images" off of the root directory. It is possible to have sub directories, but the mp3 player will only add mp3 files in the "/Sounds" folder to playlists. You can play mp3s without using playlists, fortunately, and even have the mp3 player repeat all of the songs in a single folder. To change folders requires user intervention.

There is no USB support for this phone; the only way to upload or download files is to remove the microSD card and put it in your computer. The phone doesn't use standard headphones and it is not possible to buy an adapter for standard headphones in Mexico, although they do seem to exist on the internet. The built in headphones earbuds of questionable value; it is hard to hear songs on a noisy bus unless the song was mastered very loudly (I actually reprocessed my favorite song, Glyder by Jonn Serrie, to be as loud as possible so I can hear it on the bus)

Compared to my old Nokia 6010, the voice quality leaves a lot to be desired. With one family member who lost a lot of their hearing during military service, he could not understand me until I turned on the built in speaker phone and talked as loudly as possible in to the phone' s microphone. Talking to my friend Ivonne on streets or other places with background noise is problematic, requiring me to put the phone up against my ear and to have her sometimes repeat herself for me to understand her. Reception is also more spotty than the reception on my old Nokia.

So, the LG KP 115a is a basic-low cost cell phone with mp3 playback capability. You get what you pay for, basically, but this is a reasonable option for having as a second phone number or as a backup cell phone that can play mp3s on the side. It can be used as a primary cell phone as long as the majority of one's calls are done indoors or other quiet locations, and the people one has conversations with have good hearing.

Friday, June 20, 2008

Another Deadwood bug

Another Deadwood bug I have found is that the chroot_dir dwood2rc parameter doesn't work in Cygwin (nor mingw). Also, the default rc file location should be "/etc/dwood2rc" instead of "dwood2rc" in the current working directory.

Like I said before, no show-stoppers, so these bugs won't get fixed until mid-July (or later).

Tuesday, June 17, 2008

Deadwood bugs to fix

OK, while I'm still on break from MaraDNS, using Deadwood for the last day or so has popped up a number of bugs:
  • The Google bug.'s DNS reply is in the form "Cache for one day: is a CNAME for; Cache for one hour: has the ip" Deadwood 2 only looks at the first TTL for a DNS packet and use that to determine how long to cache a reply; Deadwood 2 should look at the first 2 (or first N) TTLs and cache the entire reply for the minimum TTL Deadwood sees (right now Deadwood 2 caches for one day when it really should only cache it for one hour)
  • "Resurrections" (being able to use expired entries when it's impossible to contact an upstream server) are broken.
  • There are a number of '-Wall' warnings when compiling it with GCC 4 with '-O3' or in MinGW's gcc compiler.
  • A keyboard interrupt signal should be caught, writing the cache to disk when stopped from the keyboard.
So, Deadwood is a little buggy. But no show stoppers. My plan right now is to not touch the code (except by using it) until mid-July, then start work on cleaning up Deadwood.

Monday, June 16, 2008

Deadwood 2.00 released

Deadwood (I chose this name because it's a term in one of my favorite games, Gin Rummy, for cards that don't yet help you win) is the code that will eventually become MaraDNS' next-generation recursive resolver.

Basically, I wrote MaraDNS' recursive resolver back in 2001, and learned a lot about how DNS and recursive resolution works. This recursive resolver was never meant to be permanent; even when I was designing it, I made some decisions based on me rewriting the resolver once I understood how DNS recursive resolution really works.

For example, I chose to use threads to make implementation of the resolver easier. In addition, CNAME support is, at best, a hack in the recursive resolver.

Well, by early 2002 the resolver was working and I knew I was going to have to rewrite it. I even had plans to rewrite the recursive resolver as far back as 2002.

Well, MaraDNS being an open source project and all, things took longer than planned. I went back to college, put MaraDNS on the back burner, graduated from college; updated and released MaraDNS 1.2 (with the same old hackey recursive resolver) in late 2005 after graduating from college and before getting steady employment. Then I got employed again and MaraDNS went on the back burner again.

In the meantime, last fall I hadn't had steady employment, so I started work on the new recursive resolver. Since I enjoyed playing gin rummy, I named the new resolver "Deadwood". After three months of work, I had a fully functioning non-recursive non-threaded caching nameserver, with far cleaner code and some features MaraDNS doesn't have, such ipv6 support (Thanks to Sarton) and as the ability to write the cache to disk.

Well, this was essentially ready to go in December, then life came back and I was so busy with work (and developing a friendship with my neighbor who is now a very close platonic friend) I didn't have time to answer MaraDNS support mail, much less get Deadwood polished up.

Well, I finally took care of the support mail problem by just cutting off all email support for MaraDNS, so I can concentrate what little energy I have these days for MaraDNS development on polishing up Deadwood.

This weekend, I fixed a bug in Deadwood that made writing the cache to a file difficult, and also got the code to compile in MinGW (Windows without Cygwin) again. I have verified that Deadwood 2 works both in Windows using Cygwin, and in Linux as a native binary. Deadwood should also work as a native Windows binary, but without the ability to read and write the cache to a file (I need to figure out how to do signals in Windows).

I have made a tarball of Deadwood 2.00, which has full documentation and can be downloaded here:

Now that I've done that, I'm going on an official break with MaraDNS. I hope to return soon to continue work on Deadwood. Please don't bug me with MaraDNS issues unless you have found a security bug in MaraDNS

Friday, June 13, 2008

avahi-autoipd is evil

There is a process in Ubuntu called "avahi-autoipd" that is absolutely evil. What this process does is go out of its way to sabotage any attempt to have a static IP in Ubuntu. I've configured /etc/network/interfaces to use a static IP. avahi-autoipd ignores this configuration. I then had to use "ifconfig" and "route" to manually give my computer a static IP. avahi-autoipd then, 90 seconds later decides I don't want a static ip, erases my static ip and tries to get a DHCP ip (which doesn't work, since there isn't a DHCP server).

I tried killing the avahi process. Some evil daemon then ressurects the avahi process so that it can remove my IP 90 seconds later.

I finally did a "sudo rm /usr/sbin/avahi-autoipd" and rebooted the computer; the monster that decides I can't have a static IP is finally dead.

I'm sure there's some exotic recipe to make avahi behave. I don't care. I have better things to do with my time than to configure some new fangled daemon that doesn't work. The daemon should not be disabling static IPs every 90 seconds, end of story.

Now, I'll see if dhcp works. If not, I'll compile the dhcp client that comes with Busybox, which is, at least simple and not prone to failure.

My other Ubuntu rant: Making backups to a DVD-RW with a UDF filesystem is dog slow. We're talking hours to copy 50 megabytes of data. On a DVD-RW that I could burn in 15 or 20 minutes. Why is this so dog slow?

Linux sucks.

Monday, June 2, 2008

MaraDNS email support suspended

Due to a hectic work schedule, I no longer have time to personally answer MaraDNS support email. I apologize for any inconvenience caused. The only MaraDNS email I will answer is security bug reports.

If you wish help with MaraDNS, please join the MaraDNS mailing list. To join the mailing list, send an email to with the word "subscribe" in the subject and body of the message.

If you have a security report, please still send me an email.