Wednesday, December 29, 2010

Bullets In The Gun

They used to call me lightening
I was always quick to strike
had everything I own in the saddles on my back
I had a reputation for never stayin' very long
just like a wild and restless drifter
like a cowboy in a song

I met a dark haired beauty
where they laid the whiskey down
in southern Arizona
in a little border town
She had to dance for money
in that dusty old saloon
I dropped a dollar in the jukebox
played that girl a tune, yea

Never see it comin' 
It just hits you by surprise
It's that cold place in your soul
and that fire in her eyes
That makes you come together
like wild horses when they run
now the cards are on the table
and the bullets in the gun, yea

She was sittin' on my lap
we still had shots to kill
when a man pulled up who owned the bar
in a cadillac deville
grabbed her by her raven hair
and threw her in the floor
said no free rides for the cowboys
that ain't what I pay you for, no

She jumped up and grabbed my pistol 
stuck it in the fat man's back
said open up the safe
and put your money in the sack
tied his hands behind him
and put a blindfold on his eyes
if you're dumb enough to chase us, man
you're dumb enough to die

Never see it comin'
it just hits you by surprise
it's that cold place in your soul
that fire in her eyes
that makes you come together
like wild horses when they run
now he cards are on the table
and the bullets in the gun

We rode across the border
down into mexico
when yo're runnin' from the law
ain't that where everybody goes?
we came to a town
with a name I couldn't spell
she gave me what I came for
in that Mexican motel

I woke up to sirens
and the sound of runnin' feet
There were 50 Federales
locked and loaded in the street
she grabbed my 44
I grabbed the money in the sack
she kissed me for the last time
and we headed out the back

Every gun was on us
and every heartbeat poundin'
there's only one thing left to do
when they got you all surrounded
she fired that old pistol
but we didn't stand a prayer 
money hit the gravel
bullets filled the air, yea

Never see it comin' 
it just hits you by surprise
it's that cold place in your soul
and that fire in her eyes
that makes you come together
like wild horses when they run
now the cards are on my table
and bullets in the gun

bullets in the gun
bullets in the gun
bullets in the gun

Bullets In The Gun—Toby Keith

Missing an old run down Ford

Appropriately Ford Tempo's have been haunting my dreams all morning. Yesterday ma made the final decision to scrap Rosie, which brought the price of the cars value by weight. Before we left, I took one more picture:

From Rosie & Noëlle

So that's officially the end of an extremely old friend. The only good thing I can say, they will likely keep her around for a parts draw until they need to liquidate some cars or run out of usable parts.

Monday, December 27, 2010

Nothing like family to rack up bills for you.

O.K. so while we were at the car dealer, we had to get all the car insurance crap sorted out while finalizing things. Bad news is obviously, a slightly higher cost but good news is full coverage.

Getting pissed with the insurance company e-mailing her about the changes, she's gone ahead and made changes to that. So now I have to contact the dealer and get that updated with the policy changes, and she has effectively increased the projected insurance bill in the process.

As far as I'm concerned, she just forfeited an equivalent share of her share of my regular pay cheque, or owes me monthly!
Something about sorting through receipts made me vaguely think that I need a filing cabinet and I should likely print out my digital receipts where applicable. Then I remembered I hate paper, and I mean I really hate paper. That is when it hit me.

I don't need no freaking file cabinet, I can just store files in a secure dropbox and be done with it. Plus it's possible to effectively "Scan" papers off my phone by using the camera and uploading them. Victory is mine on the war against wasting valuable trees  :-).

Now the real question is with the sorry state of our traditionally decrepit power grid, what does more damage to the earth lol—more paper or more PC usage.

Saturday, December 25, 2010

Rosie & Noëlle

Well, it's taken a while but I've finally gotten around to getting the pictures off my phone, nuts almost wrote car... that's a headache for you. Yesterday on the way home and after getting both cars here, I took a few pictures of each.

An awfully long time ago, my grandmother dragged us across the Ford dealer and came home with a used 1993 Tempo GL, same light blue that she always got. Don't know how long it took but it was dark by the time we left, felt like all day. I'm sure we walked the property at least twice!!!




Maybe the Tempo isn't an important model to many people but for me, it's a slice of history. My memory of that car goes back as far as the guy at ford explaining how the radio worked during the test drive. It's the same car that my grandmother put a curse on after the alzheimer's took her off the road. Same car that took us all to disney world, and again left me with numb legs the first time we came to Newnan. It's the car my brother learned to drive in the parking lot, by giving the seat belts a real run for their money. IIRC, it was a Sports Authority parking lot. Like wise, it's the the first car I was in an accident with when ma was turning right at the intersection and someone ran a red light and creamed us on the way to pick up my brother from work. I can still remember countless times in that car. On the same coin, it is also the car that I learned to drive in. Yeah, a little HSC straight four engine with a three speed automatic, that can peel out like a flash yet still go smooth at a low crawl and rattle all the way.




I learned how that car responds, what she is capable of, where the rattles come from, and how to manoeuvre it to her the edge of her envelope. To compensate for all the damage, I've even had to learn how to drive with minimal help beyond wheels. To starve off Murphy, I usually give myself margins measured in feet when driving but know that car enough to only need inches. What can I say, we've known each other a long time, even closer since I got to start driving. At some point, my mother had nick named the car "Rosie" after Katharine Hepburn's role of "Rose Sayer" in the African Queen. It's kind of stuck, and well, beats referring to it as "Car" :P. So, I refer to this car as Rosie whenever `the family ford` or her make/model isn't the only appropriate form of address. Whenever I hear Somewhere With You on the radio, I'm gonna be thinking of Rosie.

My family never really took much care of that car, so it's always been a mess, fluids almost never checked beyond anti-freeze (my mother is paranoid about that), oil changes more like 2 or 3 times in 17 years, tyres when they're flat, etc. Most things taken into the car, have stayed there for /years/ and it's been used like a trash can for as long as I can remember. I've never volunteered to clean out the car, because I know I'm the only asshole who would keep it clean. After taking pictures of the interior, I threw some of the trash out when I was unloading Rosie.



My mother's never given a crap about keeping the car clean. You've always had to move something before sitting in my brothers car, and I don't think most people seem to care. Well in my case, if it comes in with you, it better go out with you, or ya gettin' out and walkin' the rest of the way!

The 2007 Ford Taurus SE that I got yesterday, seems to have gotten the nick name Noëlle. Something that ma suggested, it being Christmas time and all. Where as Rosie and I, could probably described as a crazy pair, I would say that Noëlle is a more sensible car at heart. Maybe we'll rub off on each other lol. 

Me being me, of course, I'm opting for the spelling Noëlle rather than the more common (here) form of "Noel" as in the song. That is of course for linguistic reasons.


While getting everything sorted yesterday, I went about checking the things I had to forgo at the car dealer, and top off the fluids. Didn't need much of anything really and the tyres are basically new... kind of refreshing from running on next to nothing lol. Noëlle is clean on the inside and I intend for things to remain that way. While I doubt it will stay as it is, right now the engine is so clean you could practically eat off it, but that might offend the car :-/.

So far I've put >= 200 miles on it between the drive home, a trip to Griffen, and us going up to Carrollton for dinner last night. Having a full set of mirrors, working turn signals, and gasp, high beams that actually work, is shockingly different.


The real question I reckon, is whether or not it survives until 2024, +/- me, hehehehehehe.

I've been waiting twenty years for this picture


What can I say, it's a brother thing >_>.

Thursday, December 23, 2010

Every drivers right of passage...

While not /quite/ as time consuming as my grandmother dragging us across F.O.R.D. motors cica 17 years ago, it seems almost the entire day has gone to procuring a car. Didn't think there would be any savings on time >_>.

Went down to a dealer called Navigator up in Marietta this afternoon, nice little drive actually. Spent the morning at Enterprise Rent-A-Car. Since I wasn't able to get a ride up there, and well, being a stubborn, gundanium headed person, I'm not gonna skip out on an appointment (and a good deal) that easily, no matter how much my mother complains. I didn't push the old car into work tomorrow because I was worried it would damage the vitals; if the mechanic is giving it a death sentance however, well I know how far she can go. We're both tough old, crazy birds in that way. I love that car.

To make my mother 'happy', I got a rental for the day instead of tempting fate. Can't say that the Kia Spectra is particularly inspiring as a car but it'll do the job fine when you need one. Took long enough between my mother and Enterprise, that we were running late—so for a change I drove like a proverbal bat out of hell.Yeah, just like one of my friends likely does... I'm thinking of you Escrt!!! Usually I go around the speed limit and let people going much faster than that pass me at will. But hey, if people are making me almost an hour late and everyone else on the express way is doing 80+, I'm riding with traffic when safe to to do so.

Must admit, I'm used to driving a car that only has a passenger side view mirror: so having a driver side view and rear view mirror, is almost like having a HUD :-/. Coming home,  it felt alien to use the mirrors, instead of having to drive straight and look over my shoulder whenever changing lanes to the left. I guess it's fitting, as someone whose usually the train harder, fight easier type, that I've had to deal with a car that has next to null driver aids (unless you count power steering and good breaks, hehe).

Financing a used car is a lot of paper work, I probably signed and or initialled my name a good 40 times today. Overall the interest rates I'm getting are so miserable that after everything is said and done, it's like paying for a new car instead of a used car, but I'm fine with that. If I had the cash laying around un-needed, I would just buy the car outright like my grandmother, instead of paying double that when everything is said and done.

My main concern was the drive away costs, because I'd like enough of my pay left over to drive into work after the holidays ^_^. One reason I tried the dealer I did, their way of doing the down payment is you pay about the normal price but it's split into 3 chunks instead of an initial lump sum. Basically 50% of the down payment followed by a pair of cheques for 25% in place of the regular payments. The regular payments ain't so bad either, so it's just the interest rate is very high, thus making the cost more a lot more than the cars resale value. I'm fine with that. I just want a good car, not extra wealth.

In the end I got a white 2007 Ford Taurus SE. Breaks ain't as good as Rosy's, nor does it quite have the pick up of that old '93 Tempo GL, but it is more to my taste than the other cars I've taken on a test drive. The best of which, was rather like my brothers car, and I don't really like his car lol. The Taurus has a lower fuel efficiency ratings than I would like, but by contrast it's a Vulcan V6 rather than an old HSC straight-4. It's also an American car, which means it'll stay put together with duct tape and chewing gum, which is kind of cool.

Except for the fluid levels, I inspected it as thoroughly as I could without having a tool kit on me; and I'll check the fluid levels tomorrow when I get a chance. I liked that the tyres are in great shape (I'm used to having steel showing). Ironically a lot of things have changed: shifter is on the steering column (old style) rather than on the floor like every car I have ever seen. The parking brake is even a foot pedal/pull release instead of the lever type I've always been exposed to. For my mother, it's reminiscent of 1960s fords lol. Engine and car body is what I really focused on with the Taurus - I can seem direct similarities to the Tempo's engine, especially the alternator and belt design, but it is a rather different beast. I've spent enough time staring down Rosy's engine, that it ain't hard to figure out what is what, in as much as I know what I'm looking at that is. I'm a programmer after all, not a mechanic.

Much to my distaste, this Taurus also has the same "Power everything" mentality as my mothers Tempo. Power locks, power windows. I remember when those were optional "Luxaries" on cars... yeah. If you've got kids or something, I would recommend it but other wise I view power windows/locks as just another moving part that can break down. Modern key less entry systems are kind of nice though. To the interior, the only thing I really car about is that the radio works, so I can stop using my phone and ear buds :-).

Me being me, of course looking at the trunk space, all I could think of is "Wow, you could fit three bodies in this thing". Yeah, lol. Seems that newer cars really go for a snub noise, big engine, and large ass compared to the things I grew up with; which were rather more like cardboard boxes on wheels.

Either way, I am happy. Got a car, it's an improvement, and I ain't totally broke yet. While I really don't care much for FORD in general, I'll admit, I would rather have a car that rattles with a good engine than have a car with a shitty engine and no rattles. Even if this Taurus rides pretty dang silent right now, I have never known a ford that didn't start to rattle eventually. It's not a sign of trouble, it's a sign of FORD engineering lol.

Tomorrow if things don't totally Murphify, I'll take some pictures of both cars. Need to go pick up the old Tempo from the parking yard at Enterprise, so ma will be driving my Taurus and I'll coax the old girl home. Now as long as my mother doesn't crack up my car and Rosy doesn't halt and catch fire, we ought to be O.K.

I love that damn old car...

Monday, December 20, 2010

I hate missing a day's work

Today started off like a normal day, except for  the cars recent transmission problems getting, eh, worse. So instead of a nice Monday at work, I end up missing work and taking it into the the mechanics. Whose advise is run it til it dies. Of course that gets my mom banannas.

So I've spent time looking at used cars. There goes a nice 50% of incom, that would other wise be getting saved  :-/. The ironic thing? Years and years ago, this is the kind of time frame I thought I might end up having to get a car... lol.

Sunday, December 19, 2010

*yawn* it's a lazy wazy afternoon, and I feel somewhere between taking a siesta and getting into some code, before I go back to work tomorrow lol.

Spent some time screwing with my phone, GPS, updated maps, blah, blah. Personally I think that a touch screen is better than a mouse, worse than a keyboard; although interestingly swype seems to be handy with a terminal emulator! Maybe on a much larger display, an on screen keyboard might cut it for general typing needs. Also put in a bit of time seeing what level of integration I can get between Android and my `usual` work flow. So/so.

What I really would like? Is a CRUD interface to 'everything', that I could use from my unix shell, a gui, or perhaps, even my phone. Preferably I would like something Mail like in terms of interface. Something that could roll news feeds, e-mail, task management, calendaring, facebook, etc all into one thing. Like a big data funnel. On my weekends off, I've been grokking around for libraries that would help interface with the services I use, like my calendar: something increasingly important ;).

On the other side is the issue, what language is ideal to the mixture, and how many weekends would it take to get something, 'useful' ? Honestly, I like dynamic languages for the features. JavaScript and Lisp will never be pretty to look at but they really rock. By contrast more static languages are often easier to  enforce ahead of time type checking but lack sexy features. I rather prefer it when the compiler can tell me, "Oops" before I execute a program, but I'd rather not have to code my way around the languages artificial limits either. Hmm, can't have everything I guess.

So, to be perfectly honest, I have no idea what I'm doing for the next few hours lol.

Saturday, December 18, 2010

Ahh, it feels good to be able to sit with my laptop and update my journal for a bit! That's kind of a down side to such a long drive to work, I usually get home to late to focus on blogging anything. Hopefully that will change in the near future, courtesy of leaving Newnan.

Today, I slept in as it were: rolled out of bed circa 0900, where as for work I've been setting my alarm for 0600. Most of my time has been spent on the rather tedious subject of logistics and budgeting. It won't be long until I know how much the regular pay cycle is going to be, but a little simple math and margining gives me a suitable ball park for plotting. The other thing that I've been looking at, is apartments closer to work. How I run the numbers, I also leave myself a comfortable margin!!!

Driving to work every day is around 140 miles per day across two highways and two interstates. Moving could reduce that closer to a 20-25 mile drive, which means a hell of a lot of less money spent on gas. Like 2 gal/day instead of 6 gal/day. Being able to eliminate the hike down the I-85 alone, is a net savings to be honest. Taking the Atlanta bypass, the speed limit is only 55, same as on a normal highway outside of school zones. Where as on the I-85, the speed limit is 70 at this end and drops to 65 within city limits. In actuality, people tend to go well over the speed limit out here lol. This old ford burns through gas once you start going past ~45mph; and over 60 it sucks gas like, well I won't use that analogy here but those who know me well can guess what I would think <_<.

Geographically, if I could find something near the areas that I have outlined, it's much less of a commute. But e.g. getting to other things, like the airsoft field or church would become a good long drive. I'd rather commute weekends than weekdays, when you combine the time and money saved with moving closer to work. When they interviewed me, they didn't demand I/we move, they only asked if I would be willing to. Really, I don't mind the commute, but it would be nice to still have free time left in the day when I get off work, that isn't spent driving home lol.

As things work now, my mother is seeing 1/3 of my net income after tithing. That's what she got out of my first weeks pay, and what she'll get out of this pay cycle as well. Moving would rearrange that equation. Namely that money would then represent a decent months rent, and the savings out of the petrol budget could help with bills or fill in extra slack if the rents a little higher. I think it would be fair enough to my mother, that if instead of giving her a percentage of my pay cheque, I alleviated her biggest monthly bill, it would be a fair trade. She would also worry less if it's a short drive to work, and I would be more at ease knowing my mother is taken care of, than if I was out on my own and she was at the other end of the metro area! I would also miss the dogs if I moved out :'(, and I really can't count on my brother to lift a finger lol. Friends have been telling me for many years he should get off his arse, but I know both that ma is the only mother I've got, and I'm the only stooge that's going to look after her. Maybe I'm weird, but I don't throw people out just because I don't "Need" them, especially family.

So in theory, between the pay from my new job and her staple income, it's possible to pay rent, pay (and trim) bills, and still have part of my regular pay to save away in the bank (or a mayonnaise jar). That's something I couldn't do without my mother: have enough left to save after rent, bills, and a car. I know what it's like to live with things tight, heck, I'm not a penny pinching S.O.B. in a family of spenders for nothing! I want to stuff away part of my income, so there's something there for a rainy day. I'm not willing to blow every cent I make before the inks dry lol.

Yeah, I'm kind of the family freak... the one who saves money :-/.

Right now, my plan is to start calling some of the places I've tracked down and inquiring about details. Principally I need to know if their are any suitable units available, and how the animals would impact things. To be acceptable to me, any place of residence has to accept the dogs and the bird. Simple. Like wise a decent internet connection is required.

Hmm, maybe I can get my mother to finally throw crap out that we ain't used in over ten years...... O.K that is probably to much to hope for, LOL!

Saturday, December 11, 2010

Why after spending the work week with dynamic languages, do I feel like sitting down with C++?

Tuesday, December 7, 2010

If the traffic and the weather keeps up as it's doing, I think I'm sleeping later and googling if those packets the army uses to warm your hands in gloves, are available to civilians lol. Me and this tough old ford are making it across them 70 miles like Han Solo and the Falcon pulling the Kessel run xD.

Never thought I could honestly long for that Floridian sunshine, but hey, while they're breaking out the fur coats, they still got +20F on us here in Georgia lol.

Monday, December 6, 2010

Dang I just struck a double early off a late, lol.

Overslept this morning until my brain remembered the alarm clock had already gone off! Still I made it to work with plenty of time to spare. Plus I left work on time and hit the traffic jams just right, got home at a good time. In plenty of time for dinner of course :-D.

Can you really beat getting to work early and marginal traffic on the way home on a Monday?

The company I'm working for is basically doing an 8-hour work day. Since I'm in front of a code editor most of the time, there isn't that much that can just 'Explode' into late hours right now, so I've generally been leaving a little bit late or on time, and getting there early. If I'm supposed to put in an 8 hour day, that's what I'll do, but I'm more concerned about getting to work early than I am about leaving on time. I don't care much if, e.g. I'm 20 minutes late leaving work. So long as things get done!!! It's like yeah, could get most of X wrapped up tonight... but not get off work when I am technically "Supposed to", so I do what I can and maintain notes.

I keep a note of what I need to do next time, what to do before I leave, on what I'm working on, etc. Bonus points being, that those notes are separate from my personal ones, so I can't screw up finding them again lol.

Things seem to be pretty cushy compared to what I've been subject to over the years. Thanks to time spent in my mother's business, I'm no stranger to a work day that can leave you feeling FUBAR, or that burns through time like a sieve. Want to really see your time fly, try working 0400-2000. That will shaft you; I spent several months doing that back in cica 2008. Most of the stuff with ma's business however, was usually crammed into 4-6 hour days. From my own time on the computer @ home, I'm basically used to working on things until I pass out, so that's closer to 20-hour days sans food/bathroom/interrupts.

Unlike home, an interrupt at work is more like an occasional knock on the door jam. It's down right peaceful... kind of funny really. Past few months, I've been thinking about how tired I am of always being burned through but never having time to recharge. Regular 8-hour days seem to be rejunvinating me.

Out of all the things I've experienced, I never thought I could look forward to having to get up and go to work!

Sunday, December 5, 2010

How to tell if your phone is female, or if Linux is smarter than Windows XP

O.K. so my phone has been giving me a message every time I plug it in, asking whether I want to turn on USB mass storage for mounting or charge her off the USB. So today I plugged it into my desktop, and I'm scratching my head trying to figure out where I turn it on because it just starts charging.

You know that your phone is female, if you plug her in and she starts to CHARGE instead of asking you to MOUNT her >_>.

Conversely you know that Linux must be smarter than XP, when the phone does ask about mounting if plugged into a Linux laptop instead of a Windows XP machine <_<.

Yeah, lol.


Seems that I'm not the only one who hated it, since this year 94.9 The Bull hasn't been straight on Christmas music since the day after Thanksgiving. Man, I love Christmas but ahem, if I wanted to hear the songs all month, I would sing them.

*Dances with glee*

Friday, December 3, 2010

Hmm, seems that I've survived my first week! Started work on the 30th, and got lost as hell for about three days straight trying to find the place. Now that I know my way around, and I'm getting there early. Alarm goes off at 0500, I'm usually awake by 0400, and I try to be on the road between 0530-0630. Today the lights weren't even on yet in Engineering when I showed up lolol. As long as I can be on the Interstate by 0700, I can get there with time to spare, and no body is picky about when I show up. It's basically an 8-hour work day with 3-hours of driving / over 220 kilometres each day. On the upside, I'm doing about $15/day in petrol in a car that's well below the modern norm for fuel efficency, so whatever a regular weeks pay cheque nets, fuel costs ought to be staying a float.

My first day was essentially getting up to speed. One of the guys there, Steve got me started installing the OS on my work station, introduced me to the guy responsible for setting up my access to stuff, etc. While at home I'll usually take like a week to break in a new setup, I kept stuff on my work station pretty light. I'm there to work not customise things, besides all I really care about is a decent command line environment and having the tools needed for getting stuff done. Made sure to bring my laptop and loads of stuff on my flash drive just in case. Since it's so far from home and moving isn't going to happen overnight, I travel well stocked with Miles' old backpack. That reminds me, I still need to eat the candy I stored in it xD. Since there's no strict dress code, I've even gotten to keep my boots :-).

The second day, wasn't very productive IMHO. Mostly cursing at some warts in one of the libraries being used, it's a binding to a lib' written in another language, so it's not always perfect. Rest of the time was largely filling out the paper work for being hired. I can't really complain about the paper work, since both the chef finacial officer and the woman from human resources helped me sort that stuff. Just got one thing left to do fir that, and I'll be mapping that out over the weekend. To the library thing, all I can say is that I'm inclined to agree with my superior about it. It's better to keep the code base more natural to the implementation language we're using, than cuddling up to the libraries more static interface. Reading the code already in place, also shows me a few things about who I'm working with.

Being the Fraking New Guy (FNG) on deck, I'm a wee bit cautious about draconian issues. Generally I know what I'm doing well enough to figure stuff out but, eh, somewhere between programming and business its kind of easy to ruffle peoples feathers over little things and I'd rather not do that at first. So I'm trying to avoid walking into any walls so to speak. There doesn't seem to be a lot of fixed policy about anything programming related and everything is quite laid back at the company, so I guess there's nothing to worry about. Except getting tongue twisted explaining things lol. With my mother always telling me off whenever I'm on VoIP, I've gotten more used to typing all day than speaking. When Matt, my superior told me about the instant messengering system, I was happy as a clam!

Thurs/Fri were mostly spent trying to get stuff done, got a bit finished yesterday but didn't have it ready for commit untill today, along side some other stuff. Really not sure what kind of pace is expected of me for generating results, but since I don't have my mother interrupting me all the live long day, I'm getting more done in much less time than I'm used to doing it at home. I like it, kind of wish it was more like 10-12 hour days, so I could get more done at work lol. Doubt there are enough hours in the day to get done the amount of work I feel should be done. On my way out, I let my superior know what branch I pushed stuff out to and said I'd catch up on the remaining things tomorrow. What a curious look came when he reminded me tomorrow is Saturday xD.

After so many years of having to operate on a mentality like, "O.K. it's the weekend.... time to cram as much work in as possible before Monday", I find it kind of hard to not be working on the weekends... :-/. Guess I can spend it on my own projects or something. If it wasn't supposed to be like an 8 hour work day, I would just sit and let it roll with how much I can get done and when. Habbits, whether it's a 10 or 18 hour day, I'm used to staying at it. Although I must admit, 8 hours isn't bad. Only real interruption is going to the bathroom and taking a lunch break; although ma would kill me if I work through those >_>, today I took a pen & pad with me, so that I could think ahead while eating. For what I've been doing for years, I've had to put up with trying to concentrate with a constant string of interupts. When your brains in the swing of things, having a massive context switch thrown at you dozens of times a day, is kind of like being hit by an eighteen wheeler. That's one reason I love being able to sit working at the office instead of waiting on my mother hand and foot all day while trying to get crap done \o/.

So far I like this job quite a lot. Out of the handful of interrested parties, this employer seemed like the best fit, and it's finally a chance to work at something that's more up my ally. If I survive the 90-day probational period, things ought to be good for a while. Coming home on the highway tonight, I was thanking the LORD for answered prayers. Feels almost like I've died and gone to heaven... nice place to work, good people, relaxed environment, and a there's supposed to be a steady pay cheque to boot. It's unbelievable how much I hate being idle, now I'm working. Murphy's law has been on my ass a lot lately, yet it's like I've been blessed. At least, it's a glimpse of what life can be, and I hope it lasts for years.

And the only bad thing I can say about the job, is having to walk to the bathroom lol. You know when going down like two short hallways every now and then is the worst part of your day, there is something going right!!!

Between driving the area so much and being able to stop and map stuff out with this new cell phone, I'm even starting to learn shortcuts. Yesterday I made such good time, I was almost afraid I would be too early xD. WHere I live, if I don't know where I'm going, I know enough that between my instincts and a compas, I can figure it out. Geeze, some of the roads around Newnan I've been on so much in my life, I could drive them blind.

When I get up in the morning, I head for the nearest Interstate access, get on to the I-85 N and head down to the I-285 N / W. Main strip around where work is located is more or less in between the level of newnans one, and the one over in Peachtree city. Nice spot, but confounding as all hell to find anthing until you've got it figured out. A few more years of commuting and I'll probably know Duluth well. Personally, I like the Interstate system better than Georgia's road ways; on the former the only way to get lost is to close your eyes and stop reading lol. It's actually comforting when I make it to the I-85 S and then to the local high way. I know the area, and on the local, well, it may be terribly dark but after 10 years riding it, I not only can find my way home trivially, I also can figure out how to get to every neighboring city! The path up to Duluth, time will tell, hehehehe.

Monday, November 29, 2010

J-Day cometh....
Tonight while playing Left 4 Dead 2, I noticed something a bit odd. The games textures for its "Desert Rifle"  has markings for a MK 17 Mod 3 written on it along with an indicator of it being the 5.56x45mm variant.

That obvious error aside, what makes this odd to me. Just going on instinct from using the weapon in game rather than close look at the models, I would usually call it out as a SCAR or SCAR-H in game. The MK17 is the "Heavy" version firing 7.62x51mm. Someone later pointed out to me, that the magazines are obviously closer to the SCAR-L; the "Light" version of course, being the MK16 using the same 5.56x45mm you'll find on an M16 ;). The games stuff for the SCAR mags to me, look like a curved version of the SCAR-H mag.

Most of Left 4 Deads weapons have double their realistic ammunition capacity or close to it, adjusted for stopping power. Personally, I think that's a flaw but hey, bullets go even faster against zombies! The games SCAR hits more like a MK17 might be expected to, yet the games model appears to have an extended  30-round magazine; L4D does however exagerate the ballistics quite a lot for all the weapons. In game, you get 60 rounds in a SCAR firing on 3-round burst; the old school AR being a 50-round based M16 and the lovely AKM, offering 40 rounds.

3 times the real weapons ammo, can't beat that for shooting through waves of infected! The real odd thing I guess, is how I know just by looking at it, that the gun isn't accurate to real life :-/.

Sunday, November 28, 2010

As pleasant as being able to install driver updates through the Windows update crap has been, I must admit that being dropped into a 640x480x4 desktop shows me just how horrible the old PCs used to look.

At least on my *nix systems, I've only got to worry about keeping kernel + X.Org + drivers in sync >_>.

Saturday, November 27, 2010

First time for everything, right?

O.K. Now this was one of those has to be a first time for everything kind of moments. Sitting here, playing Left 4 Dead, we're having a brutal finale, so many freaking zombies I look like a mad dancer shoving and shooting while we fend off the horde.

All of a sudden I hear enough barking, flapping feathers, and pounding that it sounds like a war is going on down the hall in the living room. Shouted a quick BRB over VoIP while peeling off my headset and going to see what's exploding.

Found the ceiling fan going berzerk, parakeet going bananas, and the dogs trying to get to the bird lol. After shutting down the fan, ma noticed one of the fan blades were missing. Now absolutely nothing was disturbed anywhere. My mothers gots Thanksgiving decorations and religius stuff on the table, right next to the fan. Practically wall to wall there's breakable crap near there, birds cage is even in pissing distance of the fan (much to my annoyance). Close enough to opennings that it could even send the blade bouncing into the hallway or kitchen, if it came off at the right angle. To top it off, in the line of fire is a shelf full of my mothers dolls next to the couch.

It took at least 20+ minutes to find where the blade landed. Couldn't find it anywhere, no sign that it ever happened, except for the broken ceiling fan! While putting all that tactical study to good use and scannign the room, I had an AH HA! Moment.

Sure enough, the blade landed on a pillow on the couch. It was right in this trianglular sweet spot that's like a foot +/- a couple inches, from either point: My mothers head, Coco, and a small statue of the Virgin Mary by her computer. Statistically you would think that it's going to cream the stuff on the table, or maybe hit the bird or her dolls, but no.... smack dab right in between biologicals. A little bit more off that course, and either my mother would need a ice pack, or one of the dogs would need a vet lol.

Guardian angels or guardian angles, I think my mother finally has something to be thankful for... I know I am.

Friday, November 26, 2010

Lately my dreams have been getting worse, really not sure if I should  look forward to sleep or evade it at this point. On the upside, it beats boredom, on the down side it feels hours longer than the actual passage of time. That kind of adds up after a while, tiring.

I'm really not fond of holidays, haven't been for a very long time, doubt that's going to change anytime soon. As far as I'm concrened, just getting it done and over with is a good thing to me.

Really looking forward to getting started on the 30th.  In the mean time, I've been experimenting with something. In setting up the Windows build for Cassius, I set things up to be able to use the systems lua build (i.e. on linux) or build it as a dependency of Cassius. That's gotten my brain cooking on making some reusable stuff out of it. Keyed in several libs so far, still need to iron a few things out, like moving header installation from premake time to prebuild time. While doing that and unrolling some loops, I also noticed a bug in some of the path.*() functions that premake uses. Seems that certain paths containing a $ need to be escaped (%$) IAW Lua's pattern matching syntax, or you get an invalid return value :-/.

Premake was actually my main reason for learning Lua, but never had much chance to use Premake until this month. Kind of been focused on C# the last kind of months, and largely using GNU Makefiles for that stuff. My principal gripes with using C/C++, is setting up Windows builds is a bitch and for most of my own stuff, I require software that works on both. On vaguely POSIX respecting systems, it's not that bad. One of these days I really need to work on setting up a linux or *bsd to windows cross compile.

One positive thing to come out of tinkering with a library (Cassius) for embedding programming languages. I've learned that Lua not only combines most of the features I like about JavaScript with a non CBF syntax, it also is a hell of a lot easier to build/embed then existing JavaScript engines \o/. For how much I like the Curly Brace Family versus the irk of embedding stuff, Lua is arguably the better choice in the trade off.

Two ways that I've collected so many languages, one is trying to use the tool most appropriate for what I need done, the other is I'm used to juggling between languages rapidly. Whatever the problem calls for and limits implementation headaches, rather than whatever is the 'mentally' convienant language of the moment. That's also some what a necessity of helping people here or there, can't quite say, "Sorry, brains in C mode, shove your PHP up your arse", now can I? lol.

Now if only the study of spoken languages were as trivial :-/.

Tuesday, November 23, 2010

Hmm, can't sleep. Don't really feel like coding or gaming. Hmm, maybe a deck of cards...

Sunday, November 21, 2010

How I spent my early teens

While shuffling crap around yesterday, I found a folder full of undated papers. On one side are designs for a light strike cruiser and dreadnought done by hand in pencil, on the other side some edition of my Tallgeese manual done in MS Word and printed by the old Lexmark. I know from memory that the latter must've been done around the time frame of 2001-2003, so I must've been in the 13-15 range at the time. Majorly geeky years!

Basically, I had created my own "What if" story line, a place where my creativity could explore the possibilities without being tied down to anything existing, or having to start Totally From Scratch. I based it on a simple concept: what could happen if you fused parts of the Macross era of Robotech with the Universal Century and After Colony segments of Mobile Suit Gundam. It focused on adopting the character of Rick Hunter from an ace in the first robotect war, into a Lt. Col. leading a combined arms regiment from Earth Sphere United Nations during a massive conflict set in an "Alternate" version of life after Gundam Wing: Endless Waltz, one where the weapons of war had not been totally destroyed and world peace, still a hell of a lot further to go! That sentence is my definition of a run on, or at least a mouth full.

Part of that backdrop was focused on the details of one of my all time favourite mecha designs:  Hajime Katokis Tallgeese. Some 15 years later it might look more like a Charger in a land of concept Camaros but I love this 'mech. In much the same vain that Treize Khushrenadas Tallgeese II was modelled after the original Tallgeese I, my theorical "Tallgeese IV" was modelled after the Tallgeese III seen in Endless Waltz.

Intro text on these papers state the Tallgeese IV was a custom made unit done in December of AC 196 (just before the Tallgeese III went into battle) and first deployed the following year. Gundam Wings original Tallgeese design is cannonically recorded as being done in the year AC 175, either on the show or in associated media. So obviously big changes were in order lol.

My design for the "OZ-00MS-IV Tallgeese IV" was drafted as weighing in at 8,200kg empty and reaching up to a gross weight of 27 metric tons fully loaded for a space battle, including a very variable arsenal of weapons. I've been known to make things exceptionally weapon laden, so is it any wonder that the original earh-side version of Heavyarms is of my favourite Gundam? (Heavyarms mounted about 7 (later 8) machine guns, four missile racks, and a heat knife.)

My Tallgeese IV was to have a hull made out of an enhanced (neo) titanium alloy, encasing a layer of ceramic polymer composites, then covered over with a layer of insulating materials on the inner side: a Beryllium based materal for shielding against radiation and a silicon covered network of titanium rods for some extra structural reinforcement. Even have a drawing in the printout (done in paint lol) showing the sandwiching of it all; cermaic between titanium and some insul' on the guts side. To do it all over again, I would probably research how useful a silicon or boron carbide in a titanium matrix (in laymen's terms that means it would costs mega bucks but could  be fucking hard) might work out for that usage scenario, and likely rethink the whole Beryllium thing. All in all, it was basically made to be a 'mech with a very tough hide and library books didn't make the study of tank armour and advanced metal stuffs a trivial thing in the early A.D. 2000s.

Basically, super strong armour for protection, wrapped around a ceramic plate for stopping kinetic energy rounds, an armour backdrop and insulation between the armour and the guts.

For the cockpit, the design was to have a "Pod" like module mounted in the chest cavity behind the hatch.  The idea being you would have an adaptive chair in the centre, yokes/joysticks on the flanks and a swivelled keyboard in front for details; I would add foot pedals to that, retrospectively. Encircling the pilot would be, basically an industrial strength LCD screen: displaying a 360' panorama of the 'mechs environment, using sensors built into the 'mechs body. Thus allowing the pilot to see anything he could hope to see (except straight up or down), and swivel the chair as needed to focus their peepers at any given point. How is that for eyes in the back of your head!? Note that 'mechs in Gundam Wing proper, only had a single front view screen. In case of critical failure, the pod was meant to be both ejectable and replacable: punching out with a few hours life support and enough thrusters to move to safety. Not to mention a hardware level to fry all the installed computer systems, in order to prevent an enemy from harvesting any data, or learning about the systems design in the event of capture.

The sections on computer systems is mostly useless from a technical specification but conceptually works well. Big picture wise, the idea was to use a subspace field to push the processing bottlenecks out of theoretical hardware and into the arena pure science fiction, ala converting the warp drive concept into a big ass CPU. Simple as that. At the time it seemed plausible enough that a Faster Than Light (FTL) processing speed might be necessary to keep pace with a combat mechs movements; this coming from someone who had just upgraded from a 233Mhz Pentium II to a 2,000Mhz Pentium 4 a a year or two before hand lololololol. To do things over again, I would use a mega load more of memory and see just how seriously parallel things could get between the hardware and software.

What is pertinent about computer systems described in it: is the concept of how it would be used as part of the overall machine. Conceptually things were meant to use a 'mech wide network of fibre optical cables to pass data from module to module, running this big distributed/multiplry redundant sort of internal computer network for keeping the 'mech working like a well oiled German sports car cruising down the Autobahn.  These FO cables would be routed through several trunk locations at logical intervals, jacking the bandwidth as it were. These trunks would be placed at various points, like the legs, arms, etc, where important sensors could all link to conveniently and pass on their data. So many data trunks would be primaries and so many would be backups in order to cope with phsyical damage and the possibility of hardware failures, plus an extra set of three trunks for the cockpit: one emergency and two mains containing the heart of the 'mechs software environment, i.e. the master authority on all things computer related inside the mech.

Swap out the cockpit pod, and bingo: you would be able to overhaul the entire 'mechs computer systems. Anything that would have to be transferred (cached) at another trunk node, could be transferred from the mains in the cockpit pilot, much like a BIOS flash or an FTP install of Linux. Combining the FO cables with the link aggregation stuff, that should be pretty damn fast enough for anybodies conceivable needs, let along a battle field mechanic of the future >_>. At least that was the idea.

When I was writing this thing, the typical PC would likely still be using a 56K modem with a telephone line. Fiber Optic Internet, wasn't even talked about in these parts.

I also envisioned that for "Oh crap, everything has broken!" kind of situation, the a single data trunk would be *just* good enough to keep the Tallgeese IVs critical systems functioning, enough to walk/drift back to base for repairs, assuming the necessary cables were intact but the other computer modules offline. In order to make servicing internal components easier, a network of maintenance hatches, and corresponding "Jefferies tubes", so dubbed for lack of a better name, would run throughout the 'mechs body. What good is an extremely expensive, ultra advanced piece of war machine, if you can't fix the thing after it gets banged up, seriously, what's the point? On top of that would be fire suppression systems to suffocate an internal fires and a way to vent stuff over external fires for an emergency skin cooling.

Like wise, mirroring the networks for data transfer cables, would be systems for cooling and power distribution: including air ducting on the torso with filters, effectively allowing the pilot to breath regular air when earth side and not worry about tear gas, etc. For safety of course, being several sets (redundant) of ducting and putting a computer in place that could switch things around in case a duct got smashed up or severed, by dropping it and inserting a fresh segment, in order to avoid having to place the pilot on internal (space/underwater mode) life support.

As a safe guard against falling into enemy hands, a self destruct system was obviously called for. Both a near instant blow the sucker to kingdom come method, for use in case of being captured, that would be triggered via a hidden kill switch under the pilots seat, or by way of using keyboard and/or a voice activation mechanism to start a count down, for use in kamikaze style suicide. I'm crazy, right? A.) Don't let the enemy get your most advanced kit; B.) If all else fails, take them with you. Yep.

Since information is power, the Tallgeese IV would have a ton of sensor modules installed. Several arrays planted in the shoulder amour , feet, and head would provide targeting, radar, sensors for magnetic fields, seismic anomalies, infrared, sonar, and conventional radar. The idea being that if its a big hunk of hot metal stomping around, you ought to be able to figure out where it is ^_^.

Since it was set it was set in a story based on the Gundamverse, Minovsky particle based jamming technologies would make radar useless. Thus making most sensor applications limited to visual line of sight, and extras like being able to for example, using thermals and acoustics. I actually got the idea for using an infra system based on the FLIR pods used by the military; and the idea, "Well gee, if it can be forward looking, why not swivel it around!" Looking at that link, seems that kind of technology has existed since the 1960s. Good.

The 'mechs sensors would gather all that sensory input, route it through the trunks, processing as you go and create something fitting for the pilots view screens to display automagically.  For extra benefit, an Initial Navigation System like mapping computer would "Remember" where you've walked/flown, and generate a form of spacial awareness. Today I would throw in a GPS too. It gives me a mental hard on just thinking about what programming something like all that might take... lol.

As a gimic, an experimental "Pilot to Mobile Suit Interface (P-MSI)" system was also planned for. Basically, scan the pilots brain in order to increase the response time. This could be thought of as an analogue to Gundams psycommu systems, adapted for regular humans, or a SLDF era Battle Mech helmet.

In terms of communications, several conventional and subspace radio systems would be mounted in the head module, along side a laser based LOS communication system for squad level use. The idea being, radio = fine until the Minovsky particles thicken up and jam it. One of the nifty but occasionally irksome parts of the UC segment of the gundamverse. So in essence, communication is limited to line of sight crap.

For getting around, obviously the Tallgeese design calls for a set of big ass engines. Basically the papers envision a type of nuclear thermal rocket, powered by taps into the 'mechs reactor: plus the ability to jettison them (and go ground pounding), frying the data trunks in the process. Leaving the secondary thrusters on the hips and rear skirt armour, just enough to perform manoeuvring in space or short rocket leaps in a terrestrial environment. Augmenting that, a set of computer controlled vernier thrusters for precision movements when operating in space. I always had trouble trying to calculate things like the theoretical acceleration rate and such, but I never had that big a grounding in math.

In terms of weapons, the Tallgeese IV was simply an augmented Tallgeese III, modified to suit my tastes. The Big Freaking Mega Cannon mounted on the right shoulder armour was replaced with something more practical yet still highly , that essentially combines a Variable Speed Beam Rifle with a Vayeate style Mega Particle Cannon. Conceptually, it would allow the pilot to dynamically adjust the beam width, pulse length (constant or pulse fired), and power rating. More powerful shots draining energy faster but being able to seriously maintain the DooM title of BFG! A way to self destruct the gun by over charging it, of course being in the concept, hehe.

Backing that up being external weapons. Power linkages inthe hands would allow the use of any Standard beam rifle or conventional autocannon (105mm/40rnd box magazine fed being the standard issue), including a heavy beam cannon designed to serve as a bazooka type shock weapon. It could also mount a 140mm cannon in place of the Mega Cannon.

The real emphasis was on melee weapons: a retractable 25 metre long "Heat" rod was built into a shield mounted on the left shoulder armour, containing a pair of beam sabers and 2-tube missile launchers. Increasing the thick plates defensive ability, the shield was to have a 20mm ablative coating for protection against directed energy weapons, and a low power I-field generator to reflect shots from low powered beam rifles. Tallgeese IV was also designed to have three beam sabers: two stored in recharge racks in the shield, and another hidden within the forearm for use as a backup. Since the Gundamverses beam sabers are essentially a power cell that spews plasma into an I-field, it would obviously be able to melt many conventional bullets on impact, the main sabers would be upgraded to use a denser I-field, in order to reflect shots from low powered beam rifles. Actually making that a useful weapon (Jedi style) however, is rather beyond the capability of a human pilot, without seriously jacking up the computing power.

A pair of head mounted 60mm Vulcan cannons with about 5 seconds of ammo rounded out a rather, comprehensive armament package.

Saturday, November 20, 2010

Crankin' up the radio

I've got to admit, friends are right in that actually sleeping from time to time is a good idea.  The last few weeks has been spent on minimal sleep levels, as usual for me. Thursday night/Friday morning, I just skipped sleeping, wasn't tired until like 1100 Friday, and that only lasted like fifteen-twnety minutes, then caught up with me half a day later. I took a friends advice and got some rest, rather than waiting until the 29th, now I'm super charged again. Guess I'll try and take it easy for a while, rather than focusing on how much stuff I can get done in spare time.

Of course though, my idea of taking it easy is nothing like sitting on my ass, hahaha! Going to get things shifted about, go through my back log of cleaning. I would like to transition to a more normal sleep routine, but that remains to be seen. I also need to get a few things sorted on Cassius, been refining things on the one branch for a while but haven't had time to step back and prepare it for commit; once things are sorted and I've selected a branch to merge into the mainline, I'll schedule time to sit back and do a review of things. After that I'll probably find a safe place for storing it, as safe guard against all my computers popping a cork \o/. I'm one of those backup freaks lol.

Over the years, I've spent enough of my life running on reserves that a little quality R&R gets me pumped up. I'm also not the kind of person who likes to be idle that much, programming at least exercises my thinking muscles a little bit. Right now I feel like I could jog twenty miles, but my feet would keep me if I did that! Actually, it's kind of funny. When I was a little kid, inside my own head I always used to refer to my energy levels as "Normal", "Auxiliary", "Reserve", and "Emergency" power. As an adult, my batteries don't recharge so fast any more, sure as hell don't last as long either: but consistently, the endurance level is still there lol. The real question is whether or not that'll hold through to when I'm old, grey, and lucky if I can still piss under my own steam >_>.

The things that get me tired tend to differ from "Norms", maybe it's because I'm insane or that I hate having nothing to work on, dunno. Either way, time to crank up the radio, get off the PC for a bit, and get stuff done.

Crazy way of relaxing, eh?

Wednesday, November 17, 2010

Early yesterday morning, I got an e-mail from someone interested in a rounder with some ability at rails, and asking about my availability. Decided to sleep on it after doing a quick review of the company. I wonder what's changed, that I haven't been getting so many doors slammed in my face :-/. Spent most of the day focused on a branch of Cassius.

Sometime after setting my laptop on the table and firing up the desktop for a quick game break between interruptions, when checking the laptop, I noticed a pop up message saying something about an incoming call. Loading the stuff on my desktop crashed the game, but well, it was worth it lol. Seems the business that had me in for an interview wants me to show up again, and it sounds like things are going to another level :-). One condition is that I get a GED, which perfectly plays to my favour: that means I can get it sooner rather than later. Since then, I've mostly been trying to get stuff in order via an action plan. I figure, may as well have everything sorted and ready to roll, straighten up the car, etc and maybe hit the library a bit, hehe. I like things being organised.

The real twist of my brains interest circuits, the companies name is very similar to someone I've known for years. Similar enough that I'm getting finger twisted, and have to re-read the names as I type them lol.

Tuesday, November 16, 2010

Well ma has managed to interrupt me for over a solid hour, so I'm taking a break. So much for trying to get anything done, \o/.

I've been experimenting with exporting functions to scripts through Cassius::Engine, one branch oriented towards heavier templating, one branch towards a C++0X only solution, and one towards a more flat method for runtime (ab)use. Now if only I had 36-hour days and some time to myself, that doesn't involve being buggered off the computer

Monday, November 15, 2010

OK, now I an officially surprised with life. Years ago I had applied to some tech jobs and was turned down via automated emails sometime later. Fast forward to the present, and I actually hear something from one of those companies lol.

Being more than a wee bit suspicious of things coming in out of the blue. Like seriously, what's the probability? What personal info that I have revealed, can be found trivially about me by any one doing their home work decently, so I'm not worried. The thing that bought that much level of trust out of me, was being told facts about the app' I had dropped in (when, to where, to what), that no one but me could know: assuming that such a reputable company didn't bungle their security, and no one was sniffing packets off our wires at the time.  It's kind of like having a message from someone with a pre shared key that you trust, enough not to redirect to /dev/null but not enough to drop the deflector screen.

The real question is whether or not it leads to a viable job offer; I've no idea whether or not that one job interview will bear fruit. The insane thing, lacking a B.S. I've largely given up applying to tech jobs a long time ago, so recently I have focused on finding "Conventional" jobs in my area rather than things worth the effort.

Every thing that has come up in the past few weeks, all of them have been tech related!!! Sometimes I really wonder if someone up there has a sense of humour, one like mine anyway. But interviews, calls, and emails, still isn't being hired, even if it is an improvement. Computers are one of the things that know the most about out of everything I know, computers are what I've spent most of the decade glued to and what I've been using most of my life. Wouldn't it be bloody nice, if someone hired me to do something "Interesting" with them for a change?
  • Having an occasional link on SpiderMonkey's docs that actually throws you to MDN, is rather tiresome.
  • GDB doesn't always like dlopen()'ing a library that depends on (p)threads, using LD_PRELOAD fixes.
  • Reading a functions documentation over again is more useful than a debugger, especially when you're tired.
  • Lua's C API is really spoiling me.
  • I know better than to git commit without sleep.
  • Hmm, I wonder how long it would take this old laptop to compile V8... heh, can't be that bad.

For now my plan is grab a quick snack, check the server list, and pass out sometime around dawn, then review the files in the morning. Sometime when I'm fresh, I need to focus on an interface between C++ and the engines loaded by Cassius. The partial SpiderMonkey and unfinished V8 support can largely wait until later.

Of course, the reason why I named the base class for embedding a language 'Engine' rather than sometime more conventional, is in order to have a 'Cassius::V8Engine' in there, haha!

Sunday, November 14, 2010

*groan* today is time for the drop test—dropping things on MSVCs foot and hoping I don't feel like drop kicking it ^_^.

My life would probably be a lot easier if I just rigged a cross compiler and gave up on using a platforms more 'native' compilers, i.e. Visual C++ on Windows. It's about as much a native compiler as the platform has, and I still consider it insulting that a C compiler isn't provided as part of a Windows install lol.
Grrr, almost 0400R. I actually had planned to get to bed early but dinner kind of threw the nights schedule for a loop :-/.

Hmm, food and SpiderMonky or food and Z's. Problem is I'm more hungry than sleeply lol. I really wish I could get work done in my sleep, or that days were at least 36 hours long.

Post dinner notes

One value that this comment has served along with my compiler, is to teach me that default parameters on a template *function* are actually a C++0x feature, and apparently not part of C++03 as I have assumed for ages.

template <typename Num=int> Num square(Num n) { return n * n; }

int main() { return square(5); }

// g++ 4.5.1 reports:
//      error: default template arguments may not be used in function
//             templates without -std=c++0x or -std=gnu++0x

Somehow, I always figured if you could do it on template classes it would be legal on template functions as well. Guess that's what I get for never reading the ISO C++ 2003 standard, and it having been a number of years since I last RTFM so to speak \o/. About 95% of the times I use templates, it's at the class level anyway, and most queries I have on C++ are easily solved by reading a header file. To be honest, while the drafts for C99 make for a very nice read, I've always worried that digging into the C++ standards might melt my brain or put me soundly to sleep. Frankly, C standards are helpful along side SUS, but the standards for C++, well all I can say is that I'll be happy when 0x becomes as omnipresent as C89 capable C compilers. I'm just not sure I will live that long though :-(.

What I've done is implemented Engine::Call() as a sequence of template functions that use the vaguely normal method overloading semantics to cope with the arguments through Push(). Nothing else has been able to maintain the desired level of type safety. Basically if Call gets 0 arguments = use the current class state, and successive versions of Call(funcname, ...) doing the obvious manipulations to generate the correct state and than run it. I would rather a recursive variadic template but life sucks and C++0x isn't every where just yet. Having to supporting late model GCC 3.x is a real possibility for Cassius to bear fruit without thinning a few hedges.

Push() is just done as a set of virtual member functions for logistical reasons. Since each Engine instance is tagged with it's language and implementation details (as an insurance policy), the same effect could be done through a set of template  specializations and a little static_cast magic to forward it to the correct subclass without any inheritance tricks. At the price of a more stringent contract with subclasses, that would also allow for getting rid of other virtual members in the base class. I'm not what instructions a C++ compiler is likely to generate for a static_cast from parent to child class compared to what C++ virtual methods and casting things in C land will produce, but I could really care less about the cost of using virtual Push()'s versus templated Push()'s here: Call() is the one that matters at the template level. Why virtuals are used for Push() in point of fact, is to avoid a build time dependency against the backends (to be loaded at runtime), which obviously would be a circular dependency. So templated Call(), virtual Push() works more convineantly than a purely templated driven solution.

Being sublimely lazy, rather than write out a set of similar template functions for each version of Call() that's needed to handle these successive amounts of arguments, I just wrote a Lua script to do it for me: then shoved that into the projects build scripts and adjusted the headers to include that auto generated file as needed. One of my favourite Boost libraries actually does something similar for handling a variable number arguments for a functor type class, but I'll be damned if I'm writing them by hand!

Lately I've been relying on a mixture of rake (Ruby) and premake (Lua) based build systems, so it is rather nice to be able to do such things: and not kick myself later (make, vcbuild).

Saturday, November 13, 2010

I love it when someone nudges my brain back into programmer mode :-)
Spent yesterday trying to get back into the swing of things, first time I've actually logged on comms in a few days lol.

Last night I was watching The Others and Surrogates. The others might make some people feel creeped out but I only found its plot a bit overly clichéd. If the ending isn't obvious by first leg of the  movie, it is by the half way point \o/. It does pose an interessting thought though. What if "Disturbances" that people feel are ghosts and hauntings and all that sort of stuff, is really just a conflict of matter? Where the living and the dead have crossed paths but nether know one is dead, or perhaps it's not death but something whacko in the space time continuum. Who knows, I still maintain that if ghosts exist, you're more likely to die in the bath tub than experience something like Poltergeist. I don't rule out the possibilities of ghosts, I just don't expect to ever see one ^_^.

The surrogates on the other hand, is an interesting sci fi flick. Basically people no longer "Go out" but instead control an avatar via remote. It follows a detectives hunt for a weapon that is able to kill the human operators behind their "Surrogates".  While not exactly a spectacular movie, it explores an interesting concept, well interesting in light of the modern Internet. Being able to do anything without risk of life and limb, is an interesting idea, but I would argue that's part of what makes life worth living. After all, if you're going to go sky diving , what good is it, if you can't *really* experience it? It's only a facsimile of the real thing. For something like a fire fighter, IMHO it would be perfect but the ideal of living every day life through a surrogate, just, doesn't feel right to me.

Friday, November 12, 2010

Currently Lua and Python are in the works, because Lua's API is different from what I'm used to, and Python is well, not fun to embed but simple enough. Conceptually there is no major difference between a parameter list and a stack, it's just a sequence of data at heart, and Python functions basically use sequence objects.

What would be awesome, is if the calls are defined in terms of stack manipulation, is to create a template method called Push, that users template specialisation in order to wrangle plain old data types and callables to the right scripting language types, so we would have something like this:

e->Run(SourceString("function f(a, b) print(a); return b * b end")
e->Push(/* instance of some type representing f() */);
e->Push("header message");

and rely on the compiler to Get It Right in figuring out the relevant overloads, e.g. Push. Somewhat probmatic is the issuance that Push needs to be part of the abstract base class but can only be defined by a concrete implementation of the interface; normally it would just be defined as a virtual method. That means it works like you would expect a class method to work by default \o/. Only thing with that is templates cannot be virtual, so we would have to sidestep the whole vtable thing.

That's a piece of cake thanks to C++ allowing the abuse of inheritance and casting:

/* An example */

#include <iostream>

template<class Impl> class Base {
    template <typename T> void Push(T arg)
        static_cast<Impl *>(this)->Push(arg); 

// implementation
class Impl : Base<Impl>
    template <typename T> void Push(T arg);


template <> void Impl::Push (int arg)
    std::cout << arg << std::endl;
template <> void Impl::Push (const char *arg)
    std::cout << arg << std::endl;

// subclass that just overrides one method
class X : Impl  {
    template <typename T> void Push(T arg);

template <> void X::Push (int arg)
    std::cout << arg * arg << std::endl;
template <> void X::Push (const char *arg)
        static_cast<Impl *>(this)->Push(arg); 

int main()
        Impl test;
        test.Push(2);   // 2
        X test;
        test.Push(2);   // 4
    return 0;

Because the parent class is templated against the derived class, it's possible to get jiggy with it at compile time. Namely enough is known by the parent about the child to invoke the correct method. Where it becomes somewhat annoying is when you want to continue with subclasses, like X in the above example.

A year or two ago I learned that people call this the "Continually Reoccurring Template Pattern (CRTP)". Being lazy, I just think of it as the poor mans way of doing something similar to what "virtual template <...> ..." would logically imply, if only the effing compiler was that smart. For what I need, just mating instance method overloading with virtual method calls is good enough.

Now all that is trivial, the real gripe however is how do you properly make a "Convenience" method, let's say one we can do like e->Call(/* variable number of parameters */); and have it do the appropriate magic for us based on the type.

Well, sadly we can't so easily. To use a va_list, there has to be a way to access the type of the argument. Normally this is done the same way that printf() and scanf() work in C, taking a format string saying what type to cast each parameter to. Pythons embedding API actually does this to convert from C data types to Python objects. Someday I need to open up a C library and look at how va_arg() actually works, I've always assumed it's some sort of hack around a block of memory and type casting. It's trivial to implement that kind of thing, already have done it for testing purposes (rather than templated Push()'s) but using a format string to describe the specifiers breaks down on type safety, where as at least with the template thing, the compiler can help some.

We can't rely on Push() overloads to do the right thing because va_arg() is needed to access the arguments if Call() takes a variable number of arguments in the C++ 2003 compliant way. Obviously the easist solution is to find a smarter way of doing va_arg(a_va_list, a_type). Life would be a piece of cake with templates that can take a variable number of parameters, right? Well there's few  vendors out there who seem to know how to do that <_>.

So how the fuck do you do a smart va_arg() like behaviour? The only thing I can think of at the moment is to make them all the same templated type, so it's known how to cast them; then try and work some sort of char_traits<> like magic to figure out which Push() is appropriate but binding the necessary info creates more of the same. That and looking up in the C++ standard how many template parameters (if any) compilers are required to allow, and generating every possible permutation of arguments using a script to make the necessary template code before calling the compiler.

Either way, I'm just taking a break for a few minutes to enjoy how peaceful the quiet has been for the last twenty minutes lol.