Older blog entries for elanthis (starting at number 196)

Anti-Spam

Seems spam is getting a little more frequent on the blogs comments here. As a simple fix, I've added a feature that requires a simple math expression to be evaluated and the result entered. If the entered result is incorrect, no comment will be posted. The math expressions are always addition using two numbers in the range of one through nine. I figure, if you aren't capable of answering the question, you probably don't need to be posting to my blog anyhow.

[#] Comments

KANAR - Finally!

Finished up another KANAR event last weekend. It's been two months since the last, so I'm quite glad to have been able to go again. The next event is at the end of this event, on the weekend of Halloween. Always fun in a fantasy LARP where the GMs like to toss powerful undead out by the bucketload.

The weekend wasn't too bad. A bit light on the combat/NPCs. A lot of the people that usually NPC (including myself) were a bit pre-occupied as our normal characters. ::sigh:: There was especially a lack of low-level monsters, which would have been nice for our handful of newbies that came this event.

Of the two friends I wanted to drag out, only one managed to make it. He had a great time though, and plans on returning for the next event. Glad he enjoyed it.

[#] Comments

Ouchie

Eek, am I sore.

Friday was the day I increased most of the weights in my workout by 10 lbs., because I'd hit the upper limit on the lower weight settings. So that put me a little sorer than a normal workout. Saturday was a party in which I spent 4 hours in constant field battle with no breaks other than several short and quick gupls of water. Sunday was the last day of the Michigan Rennaissance Festival, in which I walked around all day on my already sore muscles. Thus, today, I'm having trouble moving. Seriously, I wasn't sure this morning I'd be able to get my pants on due to the pain in my back and legs reaching down to pull 'em up.

And you know what? I love it. Thrashing your body makes you feel so much more alive than sitting around doing nothing all day on a computer. Getting out and doing something is so much more fun than just sitting there. Sure, I'm in pain; that pain just means I spent my weekend well. ;-)

Festival was productive. Spent most of it sitting around talking to friends. Also picked up some items I've been wanting at last-day prices. Got a new ring (finally) for my left hand (a nice silver piece of celtic knots), a very small potion bottle necklace (useful for the LARP), and some leather armor for the upper torso (which I look quite sharp in). All in all, I spent <$400. ($290 for the armor, $40 for bracers, $30 for the ring, $12 for potion bottle, $17 for entrace fee, adds up to $389. If you add food and drink that might push it over $400, I guess.)

In any event, next weekend is the LARP again (finally), so I'm planning on having fun. I have a couple friends I'm making newbies of by bringing them out, hopefully they enjoy the experience. I'd like them to come out this event as their first versus the next, as the next it will be a lot colder, and it'll also be Halloween, meaning the big bad undead type monsters will be out, and those can be... painful. Nothing quite like a lich walking through town laying death spells on everyone in sight. Ah, the memories...

I didn't get crap down with AweMUD or my contract jobs this weekend. As I said above, I was having way too much fun doing physical activity sorts of things.

The fatigue I have right now tho from the combination of my recent insomnia and my exertions over the last several days is making it rather hard to get any work done now, though. Seriously considering heading home. Although, I suppose, I might get more work done if I stopped writing in the blog and just got to work... ;-)

To quote Ron White: "I didn't get where I am today by worrying what I'd feel like tomorrow."

[#] Comments

Bloody Joke

yeupou, haruspex: you guys need to learn how to take a joke. ;-)

Honestly, the only reason I picked MIT over the GPL was because I didn't feel like making a tarball, and didn't feel like copying the whole of the GPL license into the source file. Granted, I ended up not even feeling like including MIT license in the source file, so that reasoning is probably moot.

I'd relicense as GPL, except that also is too much effort, especially for a silly ~20 line python script.

I apologize to you for my sins against Saint Stallman and the Church of GNU. (Hint: yes, that too, was a joke.) ~_^

[#] Comments

Syndicate to Advogato

mathrick: I'm using a very simple Python script run from cron to export my WordPress entries to Advogato using the XML-RPC interface.

It needs a small table modification to the WP install; currently, it is just used to mark when an entry has been syndicated to Advogato. It does this by marking the post ID Advogato gives back when the post is made. Because it keeps the ID, it can theoretically allow you to edit a post in WP and have those edits get posted to Advogato as well. I haven't gotten my installation to do so yet, though. (I probably should, because I have made some edits to WP entries after they've been syndicated...)

I took the script, stripped out my user names and passwords, added some docs, and added an extra configuration option for the permalink address. I haven't tested these modifications, I may have introduced a bug, you are warned. Also, the permalink format is still somewhat hard-coded; you can easily change the URL, but if you are using a different permalink URL structure, you'll have to modify the code a bit. It could be made to just take a copy of the permalink format you enter into WP itself and auto-handle any WP permalink format, but I don't have much reason to do that myself. I'll take any modifications and put them on my copy; or you're free to officially maintain the script.

MIT licensed. The GPL can keep its dirty hands off my code.

You can download it here: repost.py

[#] Comments

Education

My younger sister brought home her progress report from school. On it are several scores the teacher thought we should know about, both good and bad. She thought it was important to tell us that my sister scored only a 65% on her "vacabulary" quiz.

We're writing up a progress report to send back to the teacher with my sister tomorrow. On it will be the scores: Spelling, 65%; Irony, 100%.

[#] Comments

Network Code == PITA

The Telnet Proxy for mudmagic.com is just about finished. We had some problems for the last week or so. I added a feature to track the number of connections from each host (to be able to limit them), and the linked list code had a bug that caused an infinite loop. Only, despite expecting that code to be the part causing the lockups, having debugger output to back up that hunch, and having looked directly at the line of code causing the problem some 50 times, I just couldn't see the problem. One of those instances where you just need someone other than the person who wrote the code to look it over, I guess. I rewrote the linked list code from scratch to get it working, and only afterwards did I finally see what the old code was doing wrong. Namely, when unlinking an entry, it did (last->next = current) instead of (last->next = current->next) like it was supposed to. Drat.

Anyways, I've also, having had this learning experience in writing networked code, decided to gut and rewrite the network code in AweMUD. The basics are in place and working great, although there are some more features I need to re-enable and some API cleanups to work out.

The biggest motivator to wanting the new code is an old bug in AweMUD where the connection tracking code had a bug (do you see a pattern here?) in which it would lose count and end up deciding that there were many connections from a particular host that wasn't connected at all.

The second biggest motivator is my need for perfection in my code, and the fact that the network code in AweMUD was crap. And incorrect in places. (Like wanting to call send() on a socket even though it might block.)

[#] Comments

Debuggers Are Wonderful Things

tenglin: Or, instead of crafting all that custom code and modifying tons of source files and so on, you could just learn how to use a debugger properly and get all that for free without needing to modify or hack anything. ;-)

Here's a link to the on-line version of the GDB Manual.

[#] Comments

Telnet Proxy

Mr. Ellis of MUDMagic.com offerred me a contract to develop a simple but robust telnet proxy for his site. He has made available a new Java MUD client applet. However, applets, for security reasons, can only connect to the host the applet is run from. Therefor, to be able to support connecting to all the MUDs listed on mudmagic.com, a proxy is necessary. The original coder didn't write a very nice proxy, however, as it apparantly had all sorts of lockups and the like.

The proxy I wrote for him is running much nicer. I didn't really accept the contract; I instead offerred to write it for free, as sort of a community contribution thing. It's actually my first real threaded application. And works perfectly. Go me. ^_^

It really is a super simplistic app. It listens on a port for connections. For each connection it spawns a thread. The thread waits for a single command line of the form "connect [host] [port]". Once it gets that, it checks in a list of host/port combination read in from a simple text file to see if the connection should be allowed. if so, it connects to the server, and just forwards bytes back and forth between the two connections. That's it.

I need to do a few more small features for it, and it's complete. For example, it needs to timeout connections if they aren't active. I'd also like to have it track the number of connections from each client address. Currently, we have a limit on the number of clients; a malicious user could DoS the service by just making a ton of connections. With a per address limit, it will then at least require a DDoS - and there's not a whole lot you can do about that kind of stuff anyhow.

I also noticed that I should probably clean up the code that loads in the host list. It locks and unlocks many times as it runs. (Actually, it doesn't do any locking - but calls a lot of functions that do.) A client could connect in the middle of a host list refresh and, as the list is incomplete, get booted off and flaged for trying to access a host that isn't allowed. Moving all the code to the reload function (the only function that calls the other functions) and just using one lock/unlock set would fix that.

The proxy is BSD licensed, btw.

[#] Comments

My Hero

http://primates.ximian.com/~dobey/?date=2004-09-14 - if I read that right, that means there's soon to be a simple WebDAV server for sharing data in $HOME. If it allows (or can easily be modified to allow) operation without needing GNOME and requiring system authentication for read/write access, this can fill my need for a simple WebDAV daemon for sharing files on my file server from any host running any OS. (At least, all the major OSes/desktops support WebDAV.)

Dobey rules!

[#] Comments

187 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!