And so passes another black day

I’m rather glad to be heading back to work, and happy to see the 12th go. January is generally regarded as an off month in my family… January 12th, 1989 is the day my father died, as well as my parents wedding anniversary—what a peachy combination!

While I try to respect my families history, it’s also a matter I try not to dwell on for very long. *sighs*.

Bye bye work week!

Finally finished with a nutty schedule, this week is a bit more free, although I’m still working on the weekends. Things have been erratic lately, I’m not sure if that’s a good thing or a bad thing. Honestly, I like it when things are shaken up a bit, although routine does help with planning events around working hours!

My dreams have been a rather nasty torrent lately, mixing interesting possibilities with programming, and more moribund territory. On the first, I’ll skip journaling, to the second, it’s mostly revolving around C and OpenGL, I’m even dreaming of coding these days o/, and as to the third, somethings are too grisly to be worth recollection.

I’ve managed to get everything done today, and still find about an hour or so to take a much needed ‘break’, haven’t had one of those in a coon’s age. For now, I’ll probably take in a quick game of Quake or some Raven Shield. Later tonight, I need to mull over some more of the OpenGL issues and such. Oy, scratch that, dinners on the roll. It seems, one thing that never does end, is my ability to think 8=).

All in all, I’m looking foreward to Monday—I’m off work :-D.

*sigh*

There’s nothing todo, other then pass time and work across open projects :-/. Normally I would be working today, but the snow and ice has pushed into into Saturday, which is probably good fortunate since I’m scheduled for working most of the weekend anyway o/.

I’ve all but been going stir crazy for the last couple of days, although on the productive side, I’ve had some time to study OpenGL in greater depth. Ahh, joy. Can’t even blog in peace…  hours go by through interruptions.

The last couple of days have only been marginally productive :-(. The infrastructure for Stargellas console is virtually complete, except for the prerequisite renderer code. Soon it’s time to move on with the usual loop, progressing to [SAS] related projects, then cycling to EPI, and back again to my usual loops.

My dreams have been someone erratic lately, but so far, have remained quite consistently the opposite of whatever I’m thinking about when I drift off to sleep. I’m not sure if that’s a good thing or not. It seems no matter what, it’s virtually impossible to sleep without thinking, short of working myself to exhaustion. While maintaining a deep holmesian focus seems to be great for pushing everything out of mind, keeping that up for more then a few weeks is staggering :-/.

One good thing to come of today in particular, was scoring a 95% on the driver’s practice exams on the relevant state website. I can’t help but wonder, if some of the multiple-choice answers were intended for evaluating brain damage, but hey, maybe I’ll pass it. I’ve also found out that out here at least, being in my current age group, I could forgo the learners permit and skip straight to an exam for a full driver’s license, but rather would prefer the proper chance for learners-time. Although, I still expect family to fsck me in the end o/.

A fairly full work week is starting off tomorrow (the one luxury of being off Mondays, is work begins Tuesday). If it wasn’t passing 02:22 local time, I think I would grab a snack and read the a few standards cos, but alas, time to hit the hay, eh, pillow.

Much of the last few days has been spent in toying with data structures, and testing a few dozen hash functions for use with a simple hash table module. It’s actually the first time I’ve ever had to implement a hash table myself, lol. It’s a fairly simple creation built on top of chaining.

The perfect hungry mans analogy for those that know squat about data structures: let’s say you want to find a recipe for peanut butter cookies in a cook book. You could thumb through every couple pages of the book, looking for cookie recipes, or even flip over to the index in back, and depending on the quality of the index, hunt down by looking down the index and systematically checking all cookie references; linked lists and arrays more or less work similar. A hash table is more like a table of contents: you flip open the book, go to the ToC, and find the section with the cookie recipes, then flip to that page and start flipin’ every few pages until you find the one you want.

Hash tables work essentially the same way, you feed in the key (peanut butter cookies, yum), hash it down to an index to where you can find the target. Although hash functions that don’t collide (often enough to care) are possible, when you have to bind the generated index within a given size, the odds of several different keys sharing the same index skyrockets. So instead of a direct 1 to 1 mapping, you have a needle to which haystack mapping.

My implementation uses a dynamic array of bucket lists that are allocated with HashTableCreate(), each element is a list: every key is hashed then squashed down to the size. When a new key:value is inserted, it gets added to the bucket list. On look up, the key is hashed back to the same value in order to find the correct list, in which to hunt down the correct entry.

One reason I chose separate chaining, other then it fits with how my brain works; many schemes for open addressing (the alternative), feels more like something I would think up, in order to skip writing a hash table >_>. Although, I must admit the possibilities of  open addressing combined with quadratic probing are interesting; I’m more in favour of the chains. While I doubt my implementation is memory efficient—since the only two design goals were to be faster then a (pure) linear search and quick to hash out the code, it undoubtedly has it’s flaws. For the sake of testing how it effects the intended usage, I may try augment/replace the current behavior of prepending new entries to the lists with moving last requested keys to the head, or switch to using red-black trees in place of a linked list.

I spent several hours testing different hash functions, using a small input set of words and a larger system dictionary file for testing. HashTableCreate() allows one to specify which hash function should be used, and it’s possible to override with a user supplied one. In testing, I’ve found using hash functions created by people with a background in mathematics, works significantly better then my own, as duly expected lol. Other then dealing with hash function issues, the rest was a cake walk.

Of geeks and logs

Took it ‘easy’ yesterday, played some games and the only work that got done, was fairly light debugging / library installing / feature adding. Originally I planned to setup expat, libxml2, and libxslt under MinGW/MSVC, but called it a night after expat. Found an interesting thread on Daemon Forums, which shows either I really need to get a life, or a good nights sleep.

Grabbed a trio of cookies, put on the simpsons, and went to bed early, around 0100R; the easier solution :-o.

Had a fair bit of trouble getting to sleep as always, but being winded helps. By a quarter to 0700R, I had already woken up three times :-/. It was a half past noon when I finally got out of bed, not being disturbed makes for an interesting opportunity to sleep like a log and enjoy crazy dreams lol.

For my p resent activities, I’ve merely worke don importing my Live Journal entries from February 2009, into Blogger. I don’t think I’ll make my goal of having it all done before 2010 arrives, but alas, it will get done eventually!

Local time is reading 01:40R, so it seems that I’ve survived another Christmas on this rock. Much of the day, has really been spent trying to avoid the holiday altogether, for all practical intents and purposes. At least I got plenty of C code written for my games :-/.

The only real good thing out of the day, was a the ecard a friend sent—my one smile of the day.

It has been a some what hectic day, logged off around 0400R last night and couldn’t sleep, by the time I finally started to doze off, ma started shouting and jarred me awake again :-(.

Fast forward to like 0815 this morning and she does the same damn thing, I’ve had about 3 hours sleep, tops. Getting back to sleep is unbearable, improbable, and time passes slowly. Fast forward again, to about 1045R, and I’m thusly awoke again. In fact, by this point, I’ve had sooo little sleep, that I didn’t even realise that I was having a dream, until I was woken up! Went back to bed and finally got up sometime after 1200R, to be used yet again as a cheap slave…. I’m tired of being nothing more then an asset.

The only positive things so far, is I’ve had time (~1 hour) to play with my file server with only a half dozen interruptions or so. For me, that’s a blessing.

No idea what I’m going to do for the rest of the day, I’m not really in a good mood…. and there’s nothing much that I can get done right now, that is not going to result in headaches later. I fucking hate my life here.

I just had some fun :-D

Was walking to the mail box, and on the way back an older man asked if I was cold—like normal, I’m out in sandals, shorts, and T-shirt and it’s freezing cold out.

“Nope”
“Wow, you must be part escamo or something”
“I was born in Flordia, so I love it: beats 90 degrees!”

😀