+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.

A bit of fun with tmk

Yesterday I setup tmk to understand how to include files, by using a simple pre processing directive, making the syntax for tmk fairly simple:

variable = value

rule lhs -> rule rhs:
        command directive! word arguments

Where variable expansions and file name globbing is widely used as part of the design, while keeping the recipe parsing code fairly trivial. I designed it this way, both to be familiar with Make (although lhs/rhs are reversed), fairly obvious at a glance, and to be easy to implement. Now tmk also understands the concept of a (pre) processing directive. Since directive! is used within rules, the processing directives use the inverse, i.e. !directive. I believe that makes a better distinction then using a different symbol, especially since you can not use a command directive everywhere a processing directive is permitted. Right now there is only one directive, !include which slurps up it’s argument list as the name of a recipe file to include within the current, before continuing of course. Some form of conditional will probably be added later on; even though the rule syntax gives a way to define certain looping behaviour.

Today’s goal is to basically implement the concept of if the outputs (lhs) are more up to date then the inputs (rhs), the rule can be skipped. I don’t expect that to take to long, since most of it is just screwing with the rule expansions in order to properly stat the files. If I can get it done expeditiously, I’ll also have time to setup a few late binding `special` variables that will be useful, in proper Make fashion lol.

At which point, tmk will be effectively as good as a generic make implementation; and I can work on the parts that need to follow on. Namely the parallel support and portability aspects. The latter of course, being the main reason why CMake, SCons, and most every other such tool I’ve tried, has been rejected as more trouble then it’s worth.

An idiosyncrasy no one else gets

Whenever someone asks me how I am, I often phrase ‘and how are you?’ as ‘&you ?’, which is something usually lost on everyone. In the C programming language, the ampersand is used as an address-of operator used to create a reference of sorts, and is integer to utilising pointers. So litterally ‘address-of you ?’ makes a very explicitly reference while remaining a syntactically correct substitution of ‘&’ for ‘and’, in English anyway.

If anyone finds that odd, just try not to think about how Lisp and Perl have impacted my brain over the years lol.

One of those songs that just grows on you

This has been racking up the airwaves lately on 94.9:

You’ve been singing, that same old song
Far too long, far too long
Say you’ll buy me a shiny ring
But your words don’t mean a thing
No more calling me baby
No more loving like crazy

Til’ you take me down (take me down)
You better take me down (take me down)
Take me down to the little white church
Take me down (take me down) Take me down (take me down)
Take me down to the little white church
Take me down…

You can’t ride this gravy train,
Anymore, anyway
There’s a price for keeping me
I might be cheap, but I ain’t free
Now more calling me baby
No more loving like crazy

Til’ you take me down (take me down)
You better take me down (take me down)
Take me down to the little white church
Take me down (take me down) Take me down (take me down)
Take me down to the little white church
Take me down…

Come on!

Charming devil, silver tongue
Had your fun, now you’re done
Mama warned me ’bout your games
She don’t like you anyways

No more calling me baby
No more loving like crazy
No more chicken and gravy
I ain’t gonna have your baby!

Til’ you take me down (take me down)
You better take me down (take me down)
Take me down to the little white church
Take me down (take me down) Take me down (take me down)
Take me down to the little white church
Take me down…

Take me down to the little white church, take me down,
Take me down, take me down to the little white church, take me down, take me down, take me down, take me down to the little white church, take me down to the little white church, take me down to the little white church

Little White Church—Little Big Town

So far in the past week’ish, I’ve had two days work, two days deep-coding dawn to dusk, and two days spent with a nose like a cherry bomb :-(.

At least on the positive side, 3-4 days worth of work split between December 2009 and April 2010, my on-the-back-burner build tool has almost reached the level of utility of an early make tool. If conditionals were supported, it would be able to handle building Stargella as easily as Microsoft NMake and GNU Make can. The next steps for tmk will likely be implementing local variable bindings (think $< and friends), and a mechanism for including other files.

With this habit of getting up so insanely early, I also find it more difficult to stay up all night, unless my brain *is* focused intently on something. In which case I barely sleep at all lol. I also seem to be able to throw more hours of labour behind projects on my days off, when I get up earlier rather than later.

Now if I could do something about being pushed a few months behind schedule o/.

Visual C++ 2010 Express, new levels of weirdness…

As usual there is a redist.txt file in the Visual Studio root, that explains about what Microsoft supplied files you’re allowed to redistribute with your applications. In MSVC9.0, the express edition only came with release and (non re-distributable) debug assemblies of the C, C++, and  managed code runtime libraries.

In looking at the files installed by the latest and strangest version yet, I see that there is no vcredist folder… instead there is a vccrt folder, that contains a mungle of C and C++ that appears to be source code for some type of MS C/C++ runtime libraries :-/.