Sean Middleditch » 2003 » August

Cleaning

So I’ve done a bunch of cleaning in the house lately, along with some furniture rearranging, trashing of old/gaudy/broken furniture, and rewiring some network drops.

It’s nice, as I finally have a computer in my room (aside from just in the den/office) so I can get privacy when the other people living here start irritating me. Which, with the new proximity of my younger sibling’s desk, may be much more frequent.

AweMUD Templates

Not to be confused with C++ templates, I started on the template implementation for AweMUD. Templates being definitions of, say, an item, which is shared among multiple instances of the item.

This has been a serious pain, however. It has uglified a good deal of code, and a few problems are so far unsolvable. For example, each entity in existance has a list of “actions”, which are sets of data and scripts to be run when a particular action is performed on/with the entity. Normally, you can lookup an action, and modify it if need be. With the templates, you can’t just lookup the action on an entity and modify it, since you may be getting back the template’s action, which needs to be static for all the instances of the template in existance.

While it’s somewhat easy to deal with in C++ (one method for getting a const pointer to the action instance for using it, and another for getting entity local action instances for editing), it gets much more complicated when we realize we need to support Scriptix, as well. Scriptix can’t differentiate between const and non-const data, especially given how pointers are cast and encoded to pass around in the VM. The only workable solution there is to make two different Scriptix types, one for const actions and one for non-const actions, which is just an ugly solution.

I don’t think there is a solution, tho, which will leave everything as clean and pretty as I like my code to be. Drat.

Blackout

So, yes, it was most miserable. They (the power company) told us it might have taken until tonight to get power on, which rather worried me - four days with no power is rather gruesome for a true-blooded geek like me.

Oops

So I’ve spent the whole day making massive changes to a MUD client I used to maintain (the old terminal version of MUDix, before Enigma took it back again). I was running some scripts to change the app name; namely, a script to find all occurances of mudix_ in the source and change it. Silly me had a typo in the script, and it ended up over-writing all the source files not with updated source, but blankness. Joy. 8 hours down the drain.

Java

Another MUD client project I’ve been working on is a web-client sort of thing. The idea is to make the UI and logic and all that in JavaScript, using HTML/CSS. I’d just use a Java applet for the actual network communications.

The problem is, I don’t really know Java that well. This applet writing attempt has been a large lesson in humility.

I Have Returned

I am back from my vacation. And, as I rather expected, that sucks. ;-)

The trip was, for the most part, absolutely wonderful. I spent the week with my best friend in Seattle, seeing sights and otherwise just “hanging out.” There were a couple things that were pure torture (which I must refrain from mentioning in the event she reads this ;-) but again, the trip as a whole was wonderful. I’m very very sad it’s over already.

One thing I learned tho is just how much living with the parents sucks. I really really need a raise so I can afford to live somewhat on my own, with other people my age, doing other-people-my-age stuff.

Another thing I learned is that I’m attribute to homosexual males. This is just my luck, yes? I’m not against them or their life style or anything, just I find it rather irksome that the only person in a year to hit on me is male.

Coding

Despite having taken my laptop, several useful textbooks, and setting up a wireless connection at my friend’s house, I managed to accomplish absolutely nothing on my vacation so far as coding goes.

I planned on borrowing my friend’s PowerBook while she was at work to do OS X porting work on Scriptix/AweMUD, but the lack of time combined with my unfamiliarity with OS X made that not happen. I think I’d need to install the Fink utilities to get a real build environment, but I didn’t want to start messing around with that kind of stuff on someone else’s machine. Guess I still have a work-related excuse for buying a Mac, then. ;-)

School

Silly me forgot to take my psychology textbook with me on my trip. I’ll just have to play catch-up this weekend. Which rather sucks, because (oddly enough) I really need an emotional and physical rest after my “relaxing vacation.”

On the upside, it’s a good subject to be studying while doing said recovery. ;-)

Preparing

Way too much preparing yet to be done for the trip. I hate being last minute, yet I always am.

Type Extending

A nifty new feature I added to Scriptix today is the abilit to “extend” a built in type. For example, take the AweMUD Player class. It represents the information of a connected player, and controls the telnet connection as well. Now, say you want to add a new feature to Player - like a method to nicely print out a health/damage report. Before, you’d have to do things the C way: make a global function, take a player as the first argument, and so on.

Now, tho, you can just “extend” the Player class. Extendign just lets you add (new) methods to an existing type. So you can add on the show_health() method.

Because of the dynamic way Scriptix works, you still need a self parameter (similar to Python) in order to get the player into the method. Which makes it still not as convenient as C++. But, at least, you don’t pollute the global function namespace, and you can type something nice like player.show_health() vs. player_show_health(player) to invoke the method.