I am alive. Oh, and some IRC stuff too
So apparently I've been busy lately and haven't moved beyond the "infant blog stage" in my blog life. Lucky for me (and you too?), some of the things that have been keeping me busy are relevant to this blog. Recently I've been putting a lot of work into IRC Tools, specifically the client library.
The core of the client library is there and working (parsing messages, handling them, and sending commands). Currently I'm implementing various classes to handle different incoming message types (e.g. the MODE message, or various numeric replies) and classes for outgoing commands. While working on these classes, I've come to the conclusion that the IRC protocol is terrible. It is vague and inconsistent, with different server implementations often creating contradictions in the way certain circumstances should be handled. Let's proceed with a small example.
OUT -- server.home:6667 -- JOIN #test IN -- server.home:6667 -- :TestBot MODE TestBot :+iwx IN -- server.home:6667 -- :TestBot!TestBot@server.home JOIN :#test IN -- server.home:6667 -- :dev.calebd.net 332 TestBot #test :Weeeeeeeee! IN -- server.home:6667 -- :dev.calebd.net 333 TestBot #test CalebD 1284236820 IN -- server.home:6667 -- :dev.calebd.net 353 TestBot = #test :TestBot @CalebD IN -- server.home:6667 -- :dev.calebd.net 366 TestBot #test :End of /NAMES list. IN -- server.home:6667 -- :CalebD!CalebD@server.home MODE #test +v TestBot
Can you spot the inconsistency? If you guessed that it was the MODE message, you're right! The first time it uses the trailing parameter of the message to indicate the mode changes. The next time it uses the message parameters to indicate the mode changes. The first MODE instance is a "user mode" message while the second MODE instance is a "channel mode" message. Why these two need to be slightly different is not obvious to me. I suppose part of the fun in programming an IRC client is discovering these fun little IRC protocol Easter eggs. Moving on...
Thus far I've been using MonoDevelop as my code slinging/debugging tool and testing on Mono 2.6. MonoDevelop is an awesome development tool, but I have run into my fair share of bugs. Most of them while debugging, such as the debugger being unable to evaluate the values of variables. One particularly nasty one resulted in MonoDevelop hanging when a program was executed with the intent to debug. If the program was closed, MonoDevelop would come back to life, fill the "Application Output" window with output, and then exit debug mode (due to the program being closed). I ended up deleting the various user preference files associated with the projects and solution. Apparently that appeased MonoDevelop as it is now happy to debug my project.
Oh, I've also been writing a lengthy post about parsing IRC messages. You'll be seeing that posted here soon. In fact, I'm committing to myself that I should post at least once a week. Let's see if I can make that happen...
Unrelated to all this stuff I'm blabbering about, I've updated the site to Drupal 6.19 and the modules to their latest versions. I've also made a minor tweak to the theme so that IE 9 displays properly. I was in shock when I first opened the site in the IE 9 platform preview and saw that it looked... correct – round corners, drop shadows, and multiple CSS backgrounds all worked. What is the world coming to?!
Goodnight for now, Internet.

Add new comment