All he could think about was I’m too young for this.
Got my whole life ahead.
Hell I’m just a kid myself.
How’m I gonna raise one.

All he could see were his dreams goin’ up in smoke.
So much for ditchin’ this town and hangin’ out on the coast.
Oh well, those plans are long gone.

[Chorus:]
And he said,
There goes my life.
There goes my future, my everything.
Might as well kiss it all good-bye.
There goes my life…….

A couple years of up all night and a few thousand diapers later.
That mistake he thought he made covers up the refrigerator.
Oh yeah……….he loves that little girl.

Momma’s waiting to tuck her in,
As she fumbles up those stairs.
She smiles back at him dragging that teddy bear.
Sleep tight, blue eyes and bouncin’ curls.

[Chorus:]
He smiles…..
There goes my life.
There goes my future, my everything.
I love you, daddy good-night.
There goes my life.

She had that Honda loaded down.
With Abercrombie clothes and 15 pairs of shoes and his American Express.
He checked the oil and slammed the hood, said you’re good to go.
She hugged them both and headed off to the West Coast.

[Chorus:]
And he cried,
There goes my life.
There goes my future, my everything.
I love you.
Baby good-bye.

There goes my life.
There goes my life.
Baby good-bye.

There Goes My Life—Kenny Chesney

Wasn’t there enough suffering before GOD invented the toothache?

For the past couple days, my teeth have been on the blink again, lol. I just spent most of the day with an excruciating pain between my jaw, ear, and forehead, of which being stabbed in the face with a knife would hurt less. I could take the amount of toothache pain itself for a week without flinching, but it’s the extra pains it causes that get to me. Having the pain at the base of my ear, makes it so even the the sound of the radio hurt, which rules out playing most games. My forehead aching like a headache from the seventh level of DooM, just makes it a pain to concentrate on rocket science lol.

I started the antibiotics on a schedule, so I won’t need to worry about taking it during working hours, and spent about an hour / hour and a half putting heat on it, to try and sooth the pain and make sure the fuck doesn’t swell up on me again. We also picked up a thing of naproxen, benzocaine, and pizza fixings; my interest is in the last two. Yes, my stomach is never far from mind o/. The benzocaine one, is basically a mild anesthetic for dealing with dental pain, a friend recommended  clove oil for the same purpose, but the supermarket didn’t have it.

Hopefully the antibiotics can keep this from getting nasty and the benzocaine product should help deal with when the pain gets nasty. FWIW the naproxen is probably better then paracetamol/aceteminophen that I’ve been making do with. I also have a small bit of Hydrocodone/Aceteminophen that the dentist proscribed for pain, but really it’s roughly equal to Tylenol lol.

When I take something, you know I’m hurtin’, because I’m more apt to slam my head into a wall first.

Updating Qt, hehe.

Tonight I updated SASs TeamSpeak 3 server, and discovered that my TS3 client was too darn out of date to work with it, haha. After updating things, I also noticed in the nifty about dialog they shipped, that the version of Qt used, denoted the GNU LGPL v2.1.

It has been a good while since I updated Qt on my windows system, last time was about one year ago. So I dropped by Qt’s website to download an updated SDK, and also found that they had MinGW and Visual C++ 2008 library packages available. Last time I really focused on Qt/C++ development, Microsoft Visual C++ was just becoming supported by the Open Source Edition (OSE), having long been supported by the commercial editions of Qt.

In perusing the website, I noticed that GPLv3 is now also a supported license for Qt. They really have gone through a few licenses over the years, I still remember when the OSE was a chose between GPLv2 and their own Qt Public License agreement.

While I really hate doing cross platform development in C++, Qt is both the least painful widget toolkit I’ve ever seen, and really makes the process *a lot* less painful. Well, as less painful as dealing with template implementations between GNU/MS C++ compilers anyway.

It is note worthy that the SDK only includes the necessary library files to link using MinGW, the port of the GNU Compiler to Windows. So if you plan on using Microsoft’s compiler, you will want the vs2008 package, or the source code if you need to shoe horn into an older version.

One thing I like about all the *decent* operating systems shipping a system compiler on their install disk, that usually means pre-compiled packages will be in sync with your compiler. Microsoft Visual C++ is not quite so lucky, since being a separate product, most people shipping binary packages of libs/headers, usually support 7.1 or 8.0 instead of 9.0. Oh well, maybe when VC10 is released :-/.

Thoughts on recent SAS resignations

The more I look at the facts, the more I am convinced that this was a mutiny in spirit. Out of the first wave of people to resign: it appears to me that there are 3 core factions to it. One group, was overruled against by GCHQ, the other carries Rasa’s infection for placing their own ways above SASs, and then there’s Rouge.

When GCHQs ruling wasn’t to their liking, it seems that a few people decided that they know better then the ones in authority. That same “I’m right, GOD is wrong” attitude has built many a house on sand… I’m glad [SAS]’s was built on titanium reinforced concrete.

A few, are people who have stiff necks and know they will never have the subversion of [SAS] that they desire, a man who once refused to teach SOPs comes to mind. This is what I mean by “Rasa’s infection”.

Some time ago, even I lost all my faith in GCHQ, when it looked like a set of RvS-centric SOPs would be fast tracked through and every word I ever said to hold this clan together would become a lie. Every member of GCHQ proved themselves to me, except for Rouge. He lost that fight, and I’m starting to feel that his involvement is because he lost, and the ideal of [SAS] as one team, two games, won out.

So I suppose, having been given judgement, and deciding that the highest court in the land is not better then their own, a few people decided they can do better.  I really pitty Timbo and Scout, if they organise a clan under Rouges armchair generalship.

A little size of fun.

Generally, I’m rather finicky about making assumptions about the sizes of types, and even conversions between signed and unsigned types. Although I occasionally skirt dangerous gronud, such as feeding a function pointer into a object pointer, and expect to be able to cast the void* back to the function pointer (basically implementation defined by C, but required by POSIX), I also tend to make notes of when (fully aware) I do things that are non portable, but not necessarily obvious. At least in the example case I just mentioned, I didn’t know that was dangerous ground until I reviewed code under -pendantic, and scratched my head at the required warning message.

Normally I take things in stride, and just cringe when I see, “Portable” software doing stupid things like using unsigned int where they mean uint32_t, or the (flawed) assumption that a pointer to xyz will be as large as an object of xyz. So I thought I’d just take a look see here, and then wrote a program to display it in bits rather then bytes, since most of the folks I know will better get the picture that way :-o.

Also being a practical man, I kind of like to know what is off the edge of the map, just in case I some day have to jump off o/.

Here is a simple program to solve my curiosity:

 #include 
#include
#include
#include
int
main(void) {

    printf("sizeof(char)t= %u-bitsn", sizeof(char)*CHAR_BIT);
    printf("sizeof(char*)t= %u-bitsn", sizeof(char*)*CHAR_BIT);
    printf("sizeof(wchar_t)t= %u-bitsn", sizeof(wchar_t)*CHAR_BIT);
    printf("sizeof(wchar_t*)t= %u-bitsn", sizeof(wchar_t*)*CHAR_BIT);
    printf("sizeof(short int)t= %u-bitsn", sizeof(short int)*CHAR_BIT);
    printf("sizeof(short int*)t= %u-bitsn", sizeof(short int*)*CHAR_BIT);
    printf("sizeof(int)t= %u-bitsn", sizeof(int)*CHAR_BIT);
    printf("sizeof(int*)t= %u-bitsn", sizeof(int*)*CHAR_BIT);
    printf("sizeof(long)t= %u-bitsn", sizeof(long)*CHAR_BIT);
    printf("sizeof(long*)t= %u-bitsn", sizeof(long*)*CHAR_BIT);
    printf("sizeof(long long)t= %u-bitsn", sizeof(long long)*CHAR_BIT);
    printf("sizeof(long long*)t= %u-bitsn", sizeof(long long*)*CHAR_BIT);
    printf("sizeof(size_t)t= %u-bitsn", sizeof(size_t)*CHAR_BIT);
    printf("sizeof(size_t*)t= %u-bitsn", sizeof(size_t*)*CHAR_BIT);
    printf("sizeof(float)t= %u-bitsn", sizeof(float)*CHAR_BIT);
    printf("sizeof(float*)t= %u-bitsn", sizeof(float*)*CHAR_BIT);
    printf("sizeof(double)t= %u-bitsn", sizeof(double)*CHAR_BIT);
    printf("sizeof(double*)t= %u-bitsn", sizeof(double*)*CHAR_BIT);
    printf("sizeof(long double)t= %u-bitsn", sizeof(long double)*CHAR_BIT);
    printf("sizeof(long double*)t= %u-bitsn", sizeof(long double*)*CHAR_BIT);
    printf("sizeof(ptrdiff_t)t= %u-bitsn", sizeof(ptrdiff_t)*CHAR_BIT);
    printf("sizeof(ptrdiff_t*)t= %u-bitsn", sizeof(ptrdiff_t*)*CHAR_BIT);
    printf("sizeof(intptr_t)t= %u-bitsn", sizeof(intptr_t)*CHAR_BIT);
    printf("sizeof(intptr_t*)t= %u-bitsn", sizeof(intptr_t*)*CHAR_BIT);

    return 0;
}


The C standard defines CHAR_BIT in limits.h, as being the number of bits  for the smallest object that is not a bit field, roughly meaning that CHAR_BIT = number of bits in a byte, for all practical intents and purposes. Like wise, the sizeof operator is defined as returning the size of its operand in bytes, as an implementation defined unsigned integer value having the type size_t, from stddef.h. For the fuckos out there, the standard also says that a char object is large enough to store any character of the basic execution set (A-Z, a-z, 0-9, space, plus the required punctuation and control characters—roughly a character set of 99 symbols that fit within a single byte), and that those characters will have a non negative value while doing it. It also declares that sizeof(char) == 1. From this we can infer that sizeof(x) * CHAR_BIT should be the size of x in bits, and that ‘x’ is basically as good as off the edge of the map, for any x that you can’t make on my grandmothers type writer.

Having the size of each type followed by a pointer to it displayed, is mostly done to emphasis that a pointer to a size, means dick all about the size of the pointer. You’ll notice an interesting connection between pointer size and your hardware however. Gee, that just doesn’t sound right, LOL.

Some examples:

Run on FreeBSD 8.0-STABLE i386:

sizeof(char)    = 8-bits
sizeof(char*)   = 32-bits
sizeof(wchar_t) = 32-bits
sizeof(wchar_t*)        = 32-bits
sizeof(short int)       = 16-bits
sizeof(short int*)      = 32-bits
sizeof(int)     = 32-bits
sizeof(int*)    = 32-bits
sizeof(long)    = 32-bits
sizeof(long*)   = 32-bits
sizeof(long long)       = 64-bits
sizeof(long long*)      = 32-bits
sizeof(size_t)  = 32-bits
sizeof(size_t*) = 32-bits
sizeof(float)   = 32-bits
sizeof(float*)  = 32-bits
sizeof(double)  = 64-bits
sizeof(double*) = 32-bits
sizeof(long double)     = 96-bits
sizeof(long double*)    = 32-bits
sizeof(ptrdiff_t)       = 32-bits
sizeof(ptrdiff_t*)      = 32-bits
sizeof(intptr_t)        = 32-bits
sizeof(intptr_t*)       = 32-bits

and FreeBSD 8.0-RELEASE amd64:

sizeof(char)    = 8-bits
sizeof(char*)   = 64-bits
sizeof(wchar_t) = 32-bits
sizeof(wchar_t*)        = 64-bits
sizeof(short int)       = 16-bits
sizeof(short int*)      = 64-bits
sizeof(int)     = 32-bits
sizeof(int*)    = 64-bits
sizeof(long)    = 64-bits
sizeof(long*)   = 64-bits
sizeof(long long)       = 64-bits
sizeof(long long*)      = 64-bits
sizeof(size_t)  = 64-bits
sizeof(size_t*) = 64-bits
sizeof(float)   = 32-bits
sizeof(float*)  = 64-bits
sizeof(double)  = 64-bits
sizeof(double*) = 64-bits
sizeof(long double)     = 128-bits
sizeof(long double*)    = 64-bits
sizeof(ptrdiff_t)       = 64-bits
sizeof(ptrdiff_t*)      = 64-bits
sizeof(intptr_t)        = 64-bits
sizeof(intptr_t*)       = 64-bits

I also have access to 32-bit versions of Windows NT and OpenBSD running on Pentium 4-grade hardware, but don’t feel like booting the wintel tonight, I’m to comfortable with Dixie hehe. Perhaps I will run the program on other systems and implementations, for the sake of testing, and add it to this entry as a comment.

Bad omen or coincidence?

Something rather odd just happened to be about ten minutes ago. I was changing the dogs potty pads, when one of my grandfathers paintings on the wall, literally tilted to one side, going crooked. In my family, I reckon most people would call that a bad omen, but me, well, I have fewer superstitions, normally.

Took a step up on the step stool, and tilted it back, when I noticed that the hanging cord sliding on the hook, looked ‘thinner’ now. So I took it off the wall, remarking that I’m too short for this stuff, and examined it. Sure enough, the old wire cord was badly frayed, practically looking like barbed wire; the spot where it’s been hanging from for years, was quite noticeably narrower then the rest. I reckon the picture probably dates back to the 60s, give or take a decade; not sure when he did most of them.

Coincidentally, the painting is of Christ on a hill top with his arms out.

Silly thoughts about the history of C/C++ coding

Note, this is meant to be taken more tongue-in-cheek then seriously, take offense at your own expense 8=).

  • All the fun C library extensions can be blamed on UNIX, less intelligent systems still don’t implement them ^_^.
  • Most of the stupid type systems out there are reminiscent of the Win16 API, watch out for the Hungarians in the group.
  • Too much programming for Windows can lead to strange tattoos, that’ll get you sued unless you’re a pioneer.
  • There’s enough C++ Hungarian in the gaming industry, to make you want to go parler français with the ladies instead.
  • If you want to sit in your own little world, stick to mobiles or Macs; or ask the Free Software Foundation for this weeks KoolAid.
  • It’s alright if you need a road map to find your way through all that DDE/OLE/COM/ActiveX/DCOM mess and their variants, so does Microsoft: that’s why they invented .NET for your InterCOM.
  • Watch out for the babes in the null pointer cafe.
  • sizeof(foo) ≠ sizeof(foo*); unless thou hast vilolated the tenth commandment.

Wew it’s been a jumpin’ hopin’ day!

I was up all night fiddling with Code::Blocks and Stargella, plus work this morning, and ideas for an interesting project. However it’s a project that would call for C++, and I hate C++, lol. I like C, but hate C++… funny. On the upside, I’ve finally gotten Stargella builds sorted out, and I’m tempted some what to hunt down and eliminate ‘itches’ here and there, but I’m not sure whether or not patches would be welcomed for some things that seem to be, to be good ideas. They’ve accrued a fair number of open patches and bug reports, so I don’t think it’s a highly active project. The code base is only about sixty some thousand lines, not to big for all it does.

Sigh, nothing but work on the horizon o/. At least there’s something on TV tonight that I haven’t seen before, the original Night of the Living Dead. Geeze, what is it with all the zombie flicks lately? Compared to what I’ve seen of the remake (beginning / last half), it certainly has a more spirited beginning, bah I need some pop corn lol. I’ve no idea ottomh what they filmed it in, but it does give an interesting feel to the movie, different then most contemporary films of the era.

A “D’oh!” moment admid success :-/

Today launched operation breadsticks, a little mission meant to explore the idea, “What if the Haitian earthquake was man made?”. First map was Made of Stone, a map I haven’t really played since before joining [SAS]. I setup the `Tactical Operations Command` centre near the spawn point, and adapted the callsign Valkyrie 62, much like in the LO to China.

Everything went fairly smooth, search team rescued the secret hostage and moved deeper into the building, took a few hard to avoid causalities, and we aced the op. Where things went hairy, was the second map. For some reason only Escrt could spawn correctly and all the terrorists were missing :-S. So after plan B to hot fix it went belly up, I called for plan C and let the members have fun on the first map.

I’m taking the week off from everything except ‘work’ (lol), but intend to sort things in my rest time. Ok, so hacking up a map in unreal ed is not restful… but it’ll be worth it. Because we need to be able to spawn, I have to fix the map to *properly* support multiplayer, it was necessary to postpone map #2. Since there were no tangos either, I’ll have to create a proper scenario; in the mean time, I can just release a tangoless version that people can train on. Then when things are ready, any given weekend, we’re back in action!

🙂

The price of pissing me off.

A word of warning, this post contains quite a bit of profanity after the jump break

After being up until well past 0400 last night, setting up a decent SCons build set on FreeBSD, for testing— its usefulness to this project. I started setting up the required config tweaks today on the Windows machine.

When suddenly, I found a odd difference between how the same SCons versions behave on FreeBSD/unix and Windows, in fact, this kind of thing is why I’ve given up on the more popular CMake.

lib = os.path.join('#', outdir)
#
# For some really mother fucking stupid reason, Glob('*.$OBJSUFFIX') works
# on FreeBSD scons 1.2.0_20091224 but not on the Win32 scons 1.2.0_d20091224
# from the installer. So we have to use this fucking method, which will require
# us to wrap it in exceptions in case OBJSUFFIX is None or missing totally on 
# platform X.Y.Z. from fucking hell -- I fucking hate software build tools.
#
src = None
try:
    src = os.path.join('#', outdir, '*'+str(env['OBJSUFFIX']))
except:
    print("Fatal error: I can't make libs from object files without a file "
          + "extension. TERMINATING THIS SCONSCRIPT")
    import sys
    sys.exit(127)

env.StaticLibrary(lib, Glob(src))



# edit: an explanation of why subst() isn’t used in place of the [] look up: once you violate the consistency part, I’m not going to trust that there will be an $OBJSUFFIX to subst() on.

I was going to make most of this code a simple library function for the sake of code reuse, instead of having a virtual copy/paste of the same few SConscript files between all my games source modules—after this, I’ll stick to having one of those comment blocks in each source modules SConscript file as appropriate.

Generally I like SCons, it’s rather similar to what I’ve invisioned as the “Perfect build tool”, even though SCons still requires about 3 x the amount of work for Stargellas build system then tmk should. However, SCons is here today, tmk won’t be for a long time. What annoys me, is that SCons is still just as bad as all the other build tools out there.

For crying out loud people, it is the year twenty first fscking century…. and asking some consistency of our modern build tools, still demands limiting ourselves to the 1970s era make tool from PWB/UNIX.