Sean Middleditch » 2003 » October
Python / GTK
So for the first time in a long time, I started a new app using Python. Also, for the first time in, well, ever, I started actually coding w/ GTK+, as well. The result? A nifty actual-functional MUD client, written in a couple hours, in about 137 lines of code.
And thanks to the #pygtk@irc.gnome.org folks, their help was immense when I was an idiot. ;-)
Halloween
So it’s “Night of the Dead” on the LARP field tonight. Should be fun. Especially given my character is an undead hunter. ;-)
Comments
jpablo: are anime conventions rare where you’re at? I’m in Ann Arbor, and we have several small anime “events” each month, and several big ones each year, not to mention all the anime stuff that goes on in the plethora of gaming and sci-fi conventions we have near here. Ann Arbor has got to be one of the best geek towns in the US, for sure. (Altho I’ll admit Seattle is much prettier.)
Garbage Collector
Work is almost done on getting it fully integrated. Scriptix seems to be working just fine with the Boehm-Demer-Weiser collector, but AweMUD seems to be having a little more trouble. Namely, at the moment, Player objects are never freed after the player logs out. Not sure what is keeping it in memory exactly yet.
Cleanups
I love design. Designing a program is many times more fun than writing it, and almost always more fun than using it. I have, over the years, built up a very large amount of Good Sense(tm) when it comes to program design.
The problem is, I’m rather classical in that I never ever follow my own advice. About no fore-thought or design goes into AweMUD nor Scriptix, and development is rather… chaotic.
This results in me needing to go thru and clean things up from time to time. Now is one of those times. Basically, I need to find every feature that is redundant, every low-level architectural point that is over-designed, and rip them out or simplify them.
I’m not sure why I don’t put enough design up front for these project. I think its because I don’t really know what I’m designing, because I have no idea what features are best. AweMUD is, for me, a number of experiments pulled into one. Including Scriptix.
At least, on the upside, I’ve certainly learned a lot from the experience. ^,^
Garbage Collection
The basic work for converting AweMUD and Scriptix to use the Boehm-Demer-Weiser GC is done. Now just the fun part remains: debugging!
Scriptix on its own seems to work fine. With or without incremental mode enabled, its capable of processing quite a good deal of scripts with no errors whatsoever.
AweMUD also runs fine, unless incremental mode is enabled, in which case it crashes in the collector itself, after being invoked by Scriptix from AweMUD. No clue what’s causing this - could be a Scriptix bug that doesn’t manifest when not linked in AweMUD, could be an AweMUD bug, could even be a collector bug (tho I doubt it).
Still, despite the three days (so far only) of bug wrestling, I think the switch from LibSGC to the Boehm GC is a good thing. For one, with only the GC change, Scriptix is tons faster. (LibSGC was *really* inefficient.) Second, in AweMUD, I’ve removed a *lot* more code than I’ve had to add or change. Good things.
Alright, so I can’t stand LibSGC anymore. It seriously was a mistake. “Simple” my behind. ;-)
Looks like its time to start integrating the BWD GC into Scriptix and AweMUD. The library looks easy to use in C, but slightly less easy to use in C++, mostly due to the funkiness of swapping allocators in the STL libraries (assuming your STL library even supports that).
Clearly, tho, having to add gc_alloc to my container declarations is a lot cleaner than the mess one has to go thru w/ LibSGC tho. ;-)
LARP
Went live-action role-playing with some friends. Definitely a different experience. It was tolerably fun, but rather frustrating and boring. Frustrating because, as a first level character, I couldn’t really partake in any action. (I almost died once, getting my arm eaten off by a winter wolf. No fun.) Boring because there really wasn’t that much action anyways.
I’m told once I get to about third level, and thus able to cast more spells (I’m a warrior cleric, that’s all that was available that’s close to what I wanted to be) I can cease with the proscribed “run like a bitch” play method (as the Temple Sergeant put it) and actually stand my own against a goblin or whatnot. (As it was, two or three hits would kill me, and its a lot harder to avoid hits than one would think in the middle of pitched battle.)
I did NPC (non-player character) for a bit, being an orc for a while. I got a bit more action that way, as we weird going about causing havoc and mayham, and generally dying a lot (as orcs do).
It all sounds dorky, even to me, but… your imagination kicks in. When you see 5 guys wearing furs and leathers waving big (foam padded) battle axes running at you yelling barbarian battle cries, you *run*. It’s not, “haha, what dorks”, it’s, “fuck, 5 big-ass barbarians are charging me, I’m gonna *die*!”
And really, it’s not the usual stereotype “geeks” either; no pale, skinny (or obese) geeks yelling “I wanna cast… magic missile!” If you want to be a warrior in platemail weilding a greatsword, you (a) must actually be in platemail, and (b) actually be able to use a (fake) greatsword. The people there look *seriously* impressive/authentic, and the “swordplay” is definitely an artform. Not *super* realistic, since padded pvc is a bit lite compared to steel, and hits that really wouldn’t do much damage still count, but still.
It’s fun. Suspension of disbelief is definitely necessary. ;-)
Class
I think my physics professor highly dislikes me. As in, a lot. I’m not even sure why; I’ve not done anything wrong that I’m aware of, I do very well in class, and otherwise act normal. Maybe it’s just prejudice against the tall dark guys with long hair and earrings… ;-)
Software Packaging
I’m honestly surprised at how often people don’t “get it” when it comes to software packaging. The Autopackage people mostly get it, and the Red Hat devs seem to at least recognize the issue, but others…
Software packaging isn’t the act of compiling software into a mass of bits and shipping it out with a message, “this only works on my platform” doesn’t cut it as soon as someone who doesn’t have years of sysadmin experience wants to use it. I’ve ranted about this three times today, so I’m rather out of stream to go over it again here. ::sigh::
NovaCL and ZMP
I started hacking on an old MUD client I used to work on (based on MUDix), stripping out extraneous cruft and getting ZMP in. I had to rewrite the telnet handling layer, tho; I’m not sure whether to be surprised that so many programmers can’t code network input handling (this is the fourth or fifth app I’ve seen that doesn’t handle telnet properly), or surprised that with the hell UNIX/Linux system calls are (properly handling every exceptional condition is beyond staggering) that anyone can get these things to work at all. ;-)
Anyways, ZMP support. It’s a console clinet, so I can’t play with fancy graphics/font stuff, but I can at least put the protocol thru its paces getting some packages made. I’m thinking an AweMUD online-creation package will be first. Or maybe just a status monitoring package…
Net Profiles
Goofy me decided to (sort of) take yet another project on my shoulders. Disatisfied with the way network connection handling in Linux/UNIX works, I posted a mail to the FreeDesktop list about an idea for a D-BUSized connection manager.
The basic idea is, apps make use of a libnetprofile - when the app tries to access a network/host it cannot reach, it request thru the library (using dbus to a netprofiled) for the network to come up. The daemon queries a set of profiles to find one that claims to provide the network (Internet connections would provide all public-space hosts). A dialog is popped up (thru a D-BUS link to a GUI monitor, if a user is logged in ont he machine) pops up asking if the users wants the connection open (possibly showing a list of possible profiles if more than one match). The netprofiled daemon then uses a backend (selected by the profile) to bring up/control the net connection.
So what happens is, apps can initiate network connections without users needing to manually bring up kppp/gnome-dialer (or other apps, depending on connection method), users have solid and easy control of network configuration, the “modern” roaming network and autoconfiguration we have today can still be used (profiles can detect when they become available/unavailable), and we might even be adding a bit more flexibility.
Now the problem is getting it all coded up, and the specification written, and then getting people to use it. Someone tell me why I keep picking up new projects right after I drop other from lack of time?