Old MechWarriors never die, we just go back to the scrapheap

Spent some time playing MW4 again, and finding myself slipping into old grooves like they never left.

Still was able to dance around, targeting a Cauldron-Born while keeping it between me and a heavier Templer. No problems zipping my Centurion into position to hammer away at the enemy ‘Mech, while scooting out of their firing envelope by the time their guns reload, maximum turn and burn.

I even found myself tactically directing the lance, more soundly than in times past actually, because of how much experience I’ve got as an Element Leader in [SAS]. That, and I still remember almost every tactical trick in the ‘Meching game lol.

My dumbest python moment ever….

In cleaning up tmk’s cache related code for a fresh commit, I wrote an expand2str() method that encapsulates the issue of dealing with expand() returning a list of expansions, and a properly converted string being desired anyway.

Suddenly I noticed this backtrace:


Traceback (most recent call last):
  File "tmk.py", line 929, in
    process_recipe(recipe)
  File "tmk.py", line 742, in process_recipe
    recipe.parse()
  File "tmk.py", line 276, in parse
    if not self.eval_pproc_directive(p):
AttributeError: Recipe instance has no attribute 'eval_pproc_directive'

Which is totally ridiculous, because eval_pproc_directive and parse are both methods of the same class. While the former is defined after the latter, by the time the instance (self) exists, the class is fully defined. Making a short test case, proved that the act of one in a billion hadn’t changed Pythons rules about this stuff.

In poking around to see what changed introduced during this commit, may have popped the magic cork, I noticed removing the reference caused the same type of error, successively on methods defined after they were invoked.

Then I saw it!

I had accidentally indented the expand2str() method one short, there by making it a function rather then a class method, and there by doing like wise and making them nested methods inside expand2str().

Sometimes Python really irks the typoist in me!

Life proves my calculations right…. yet again dear mother!

While perusing the developer documentation for Chromes extensions system, ma gave me a summery of a phone call she just had: namely that she is now looking at an $80/month loss in revenue. As their own business is going under, one of the clients that we’ve worked for, must be at least three or four years now, won’t be able to maintain regular cleaning. Thus things are tight all round.

I pointed out to my mother on Tuesday, and again on Wednesday, and numerous times before this, that if it wasn’t for her shafting me over driving, that I would likely have been gainfully employed outside her business by now… which would have been darn handy in light of today’s news! My families been allotted inklings of my plans since at least ’09, and they’ve done nothing but screw me over every which way: looks like I was right, doing so wasn’t in anyone best interests ^_^.

The massive time delays ma has already forced on my short term plans, has caused me to miss the ideal hiring point for my original business plan, and I’ve already shoved (and reaffirmed!), that I ain’t doing jack until I’ve got my Class C and it’s been proven that I’ll have sufficient use of the car, to be able to hold down a steady job. Should we say, over the last ~twenty years, my family has given me enough cause, that I don’t trust them as far as I can throw an Atlas.

My war policy is unconditional victory.

Today at work, I was thinking over my next agenda with tmk, namely implementing the checksum based method of checking whether or not targets are up to date, and recipe caching.

Implementing the checksums are actually pretty easy, the hardest part is just adding a command line option and a method for changing the checksum algorithm to be used.

Doing the cache on the other hand, is a bit more ‘thought’ required in the solving. Because tmk currently does variable expansions on rules, it’s impossible to correctly cache for any rule or variable assignment involving an environment variable. The principal reason for the variable expansions, was so to help ensure the uniqueness of a rule. So obviously, the proper thing to do is to delay the variable expansions until they are needed, there by making the data store completely cacheable.

The obstacle of course, is that rule definitions can no longer have the chance to be a way in which the rules become unique, which rules out the possibility that variable assignments can occur after the top level: which encourages me to push the spec in the direction I had originally planned. Another option, would be to just leave it as is, and note the issue around environment variables in the manual. Of course, a third possible solution is making the processing step more aware of line numbers.

Since I’d rather have it that way, I’m opting for the first: delaying the variable expansions so that the entire result of the parsing phase can be cached.

I also feel like a chicken with it’s head cut off atm :-S

Got up for less than two minutes, and Coco starts to jet off to steal my spot on the couch… so I sit down before she can snatch it. When I suggested that she try “Sharing” the couch, you would think from the look on that dogs face, that I said a dirty word!

Back on the road…. finally

After enough effort at coercion and airing close at a drop to DEFCON 1, I got to do the driving to work today.

The trip was about 35-minutes each way, making it about three times longer then any other time I’ve been able to drive. There was only about 3 foul ups and an error, not bad for an inexperienced noob whose also been denied road time for at least a week and a half, if not longer o/.

First issue was about 30m down from where we live, mostly because of a certain someone opening her wide mouth and trying to tell me what to do ^_^. Once I reminded her, she finally took the order and let me be at peace.

Second was about half way there, when I cut one of the turns at to high a speed for my taste, but things were always under complete control. It still was faster then I had wanted to take the angle, so I personally consider it an error on my part. I have seen a heck of a lot of other drivers, taking that turn about twice as fast as that, but I prefer a wider margin just in case I’ve got to stop in a hurry (it’s usually a busy spot).

Third was running a red light in the middle of no where. I couldn’t see what colour the traffic light was coming around the bend, so I brought the speed down, and by the time I could see it was red, there wasn’t enough time to bring the car to a proper halt, so I just went on through as it was clear; it was just a speed control, not a junction point. Well, technically I could have stopped the car in time if it was absolutely needed, but my mother would’ve yelled at me more for the hammering on the breaks than for going through the light ^_^. I need to watch that corner: I take effort not to repeat my mistakes.

Forth was a minor synchronization issue going into the sub division. Kind of like being caught in the middle of ants-in-the pants drivers and me being doubly cautious of the traffic involved. I always count on every other driver to have no clue what so freaking ever what they are doing, so there was never any danger. Still, it was a bit of a hairy spot, more than I’m comfortable with, but the only way to get that area more smooth, is going to be more laps on through it.

The return trip on the other hand, was smooth as a babies bottom. I thanked ma for letting me drive, rather than telling me how to drive. Carrying on a conversation or something doesn’t even bother me, not in the least; but I prefer to exercise my right of being in the driver seat.  Simply put, it’s driving a car, not disarming a bomb… I might no what I’m doing ;).

I also noticed last time I was allowed to drive, that I have a tendency to not bleed off enough speed before the last drop on the way home. Today I was almost able to calculate it perfectly, but intend to kick myself into taking it slower in that area. I’d rather consciously decide to take it easy, rather than computate where the inverse will lead to.

My favourite part of the drive though, was being passed about four or five times: most of which occurred while I was going the speed limit, and right next to a big yellow sign that says, “NO PASSING”, some how, when I was just telling a German friend the other day, that Georgia drivers will pass you on a dime, it brought a titbit of a smile to my face :-D.

Generally I air on the side of caution, because while I know what I’m doing, I am not an experienced driver. I go aim to keep the car within speed limit, and bleed off enough speed that I’ll be able to bring the car to a safe halt in any tight spot that’s coming; and I can see about as far as the road permits. I don’t care if I could take things faster and sharper without compromising safety, because I know (from having done it) that I can do it if needed, but I’m not interesting in joining the rest of my family: in being lead footed.

+1 for design

I’ve just fixed the bug about tmk reporting the wrong filename when an included file contains an error. The thing that makes me smile, is because I designed the recipe parsing and processing code reasonably well, making that work correctly was trivial. At worst, I expected that I would have to modify the Recipe class to incorporate a separate data stack into the parser, but not even that was necessary. Most changes were (as hoped) just refining the data structures used for storage.

tmk is pretty simple, it does two passes at a recipe:

  • First it parses the recipe into an internal data store, most serious (e.g. syntax) errors are reported here. A minimal level of evaluation is done, namely we need to do some expansions or you can’t use variable substitutions when defining a rule.
  • Secondly, it walks through the data store at processing time (e.g. doing the magic), conducts final expansions when needed, and carries out its mission in life.
One reason I chose the syntactic style that I did for tmk, it is both visually straight forward, and easy to code around. I like simple but effective, when it works.
My next (and real) task, will likely be making the rules relational to one another, exempli gratia to topologically enqueue rules in dependency order. Right still tmk is limited to sequentially executing the rules. That’s actually good *enough*, but I’d rather have that tidbit taken care of by tmk, then having to address it in the recipe construction.

I must admit however, that adapting isnewer() by way of it’s cmpfunc parameter, to cope with using file checksums instead of modification times, will be fun to implement :-D.

Family affairs now at Defcon 2

Today’s agenda was spent, shoving Her Royal Pain on the driving issue: I reminded her vehemently that come June 1st, I’m charging her $15 for every hour missing from the required 40 hours (pg 22/12) that I’ll be missing towards a full drivers license. I also reminded her that once June passes, if it’s still not sorted, that I’ll be sticking her with her choice of a huge bill representing about 1/3 (minimal) wages due for years of service,  or charging her fees for all time-wasted in her business after July 1st, at a level appropriate for someone with my coding experience.

I’m officially operating at DEFCON 2, and standing by for an elevation to DEFCON 1: all out family war.

In my experience, my family only understands two things: physical and financial violence. That obviously means my only avenue is to hit her, is where it hurts: in the money department. Simply put, if she wants to be a stick in the mud, it will cost her until it breaks her. There is no other way to deal with it, short of cutting my family entirely out of my life, for the rest of however long I live. I’m tired of the bullshit, from her throwing the cost of my glasses and medical issues in my face, both of which she had to pay for, for having pissed away every dollar I had saved up!

I got my permit during W2, it’s now W16, and I have had less than 10 hours car time, and less than 5 hours road time, in some 14 weeks! If this is someones idea of a joke, I am not laughing. My mother has successfully wasted almost three months of my life, placing me massively behind schedule. At the rate things are going, probability factors suggest that completing my lowest objectives of a license and job, won’t be achievable before the 2013-2015 range—and thus I arm for war. I see no reason why something that should take less than 2 weeks maximum (40 hours driving) should require calculating a span of 9-36 months: the margin being whether or not H.R.P. moves her ass at a constant rate, or the usual rate, which tends to approximate exponentiation by a small irrational constant. All I need is 40 hours, plus enough experience that I am competent enough. Considering present maths, I’ll be dead before then.

My dead line goal of having at least my license sorted by June 2010, was set LAST YEAR, and I have spent the last FOUR years planning how to move forward without being bound deeper in chains… I’m not going to tolerate it. I’ve been denied peace for most of my life, I’ve been made miserable most of the last sixteen years, I’ve been unwillingly used as bitches bait in countless family wars, I’ve spent almost the last seven being used as slave labour, I’ve had almost every positive part of life removed, and I will not surrender. I spent most of my youth counting my families petty squabbles in terms of WWs, stopped around WWIX when I realised it would likely surpass the super bowl numbers before I hit thirty. I’ll start one myself if that’s what it takes.

The ultimatum of guaranteed financial destruction has been reissued, and the dead line is just that, a dead-line. Quite simply put, the only single excuse I’ll except for failure, is if the United States enters World War III before 2010-06-01, anything else is strictly fuck you, get out of my way!

I’ve given almost seven years of my life to suffering to my mothers business, and almost all of my life showing my family patience with how I’m ground into the dirt: well guess what, being canonized a saint isn’t on my bucket list. If DEFCON 1 is reached, then that is the end of everything, and I do mean, everything.

For almost as long as I can remember, I’ve had to put up with my mother and brothers relationship sucking the life out of me. Taking every possible effort to block my goals, of all but denying my right to life, will not be met with a nodding smile of cooperation!!! Push a person hard enough and eventually they will break, well guess what, I’ve been being pushed since at least ’94, and I don’t break, I take action.

In the words of Patrick Henry: “Give me liberty, or give me death!”

More arachnid weirdness

After spending a spell of working dawn to dusk on one program, how do I spend my afternoon to relax? By learning programming language I haven’t inhaled yet!

The other night, I installed Mono on my laptop and desktop; the windows box already has express editions of Visual C# 2008 and 2010 setup. While it obviously tool a while to compile the full stack, it was still faster than most C++ applications I’ve grunted over build times about. The thing that really impressed me however, was how fast MonoDevelop compiled; while not a ‘huge’ program, it’s large enough that the compile time was impressive.

Compared to my experiences with javac over the years, mcs was blazingly fast. Four reasons that I tend to avoid Java development: the tools tend to be make me tap my foot in impatience at the wait times, most Java apps I’ve crossed paths with are not fun, OOP is pushed down the coders throat, and doing Swing layouts by hand is a royal pain.

I’m not a fan of C#, but I do consider the whole CLI/.NET stuff to be a very attractive platform. Perhaps sometime when I’ve got a couple hours to burn, I might pick up Gtk# and write a systray’let to check my mail box or something.

I’m going to be dead tired before noon even approaches,  but I’m smiling now! The focus of my day, has been on getting tmk up to snuff enough that I can use it as a general purpose solution to my problem: cursing at the present ‘generation’ of such tools.

I worked on getting a base set of magic bound variables and teaching tmk that certain rules may be skipped, if a set of pre-conditions hold about the files involved. Getting that done was easy enough. The checking code is now more robust, properly handling an arbitrary set of input/output names, in as much is humanly possible ;). I’m smiling, because I spent most of the night being annoyed every which ways up, on top of an already splitting head. Ended up having to quit coding for a bit, and just hit RvS for a couple hours.

About two hours sleep, and still plenty of hours until sunrise, I woke up and got back to the codin’ and now it’s done!

So far, tmk is put together in a rather short amount of time, even if it’s been on my dancing list for a few months; finally it’s almost beta quality. Only show stopper that’s come up in testing, is it fails to handle unexisting tmk variables correctly, but that’s a one LOC fix. An outsanding issue, is that tmk variables with whitespace in them are improperly expanded, e.g. $(foo bar) expands to bar) even when a variable named ‘foo bar’ exists. That however is because of how the tokenization feeds the parsed data into the variable expansion system. Although for the sake of simplicity, I planned long ago to make the specs dictate such variable names as invalid whether or not tmk actually accepts them, so it’s a lesser issue. The include processor directive, also reports the wrong (e.g. parent) filename but correct line number (e.g. from the included file), yet that bug can be fixed in a few minutes; so I haven’t bothered yet.

Two features that remain to be done, is making rules relational (by dependency) rather then executing them in sequence, and to giving tmk the option of using checksums rather then modification times for minimising rebuilds.Which also comes into part of the leg work, for implementing a cache, hehe

Most of what needs doing, is some light polish and adding more builtin directives. Been thinking about making tmk understand a simple plugin system, that would allow it to load reasonably trusted bits of python code into part of the program, thus allowing new directives to be added at will, as well as replaced. I’ll worry about that later though.