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 :-/.

You know RvS is brain damaged ….

when you’ve got three tangos shoulder to shoulder and shotgun aimed shells do nothing at point blank, except hit the snow directly behind them!

when you’re running like a bat out of hell and can still snipe a tango 30m away with a snapped buckshot

when tangos can dance around a load of buck like Michael Jackson on stage

when hand guns are better short range weapons then a shotgun

when tangos are better dancers then shooters, are worse shooters then noobs, and more accurate then Hathcock, while sliding down a staircase backwards!

I could go on and on, but I’ll just say Raven Shield demonstrates much brain damage.

+1 simple relationals

On my way to the head, I was thinking about ways to improve the robustness of a program  that I’ve been tinkering with on the side. Simply put it defines an ordered set of roughly hierarchical data, that is integral to processing later based on certain groupings of it. The set is such a collection of information, that recalling it later would best be done through an associative container, where in the keys may be any unique attribute of the data set being processed, rather then having to be any given accessor.

The obvious solution to bundling the data, is to create an abstract record representing the keys that need querying, e.g. each objects attributes are expected to correspond to an unique instance formed by the data set. In thinking about how such a thing might be implemented without losing the speed of a hashed table look up; the first thought to come to mind, of course was the most simple and straight forward idea. If the implementation language was C, it would be trivial to throw together a set of structures for representing items in the data set, and wrap them in an opaque record that binds together a group of hash tables or balancing BSTs for each key type we want, which would then look up a pointer to the individual records, through a structure tuned for minimal memory usage. Second to come to mind, was a rather interesting tree structure to minimise cost for retrieving any given node. In which of course I remembered that this particular implementation case dealt with a certain language that traded such memory conciousness for a garbage collector.

On my way back to my work station, I thunk to myself, “Well hell, I just defined a relational data structure!”, and with the idea of running an SQLite database in process memory now floating through my mind, sure enough the API that I had envisioned, was little more then a relational algebra tuned to the problem domain being worked in.

The implementation language might lack an equivalent to Cs memory management, and gives no guarantee that the amount of copying and GC work involved wouldn’t grow exponentially with the data set size… but it does have a binding to the SQLite database, which is fairly handy, hehehe. So the obvious question is which way handles things more efficiently: relying on the language implementation to avoid unnecessary copying of memory, or going through the overhead of a lite weight SQL database.

Sometimes I love how these kind of things are so simple to work out in the course of short trip down the hall, lol.

QOTD 2010-04-12

There is a reason soldering iron handles are bright yellow. It will still not stop you from picking it up by the hot bit at least once…

source: /. 

The two things I rely on the most, are a command shell and a web browser… yeah. Over the years, these have almost become like meta-user-interfaces for me. The CLI allows me a very effective way to manipulate the file system, and while cmd sucks at everything it does, modern unix shells throw in enough to create a very powerful environment. The main cost in learning how to use the command prompt, is learning how to say what you want, rather then point at it like a child. In all my years, I’ve still not seen a file manager application that can match a proper unix userland and scriptable Bourne style shell. Web browsers have been a huge part of my life, since the WebTV era lol. E-mail. calendaring, task management, keeping up with the news, bookmarking, even my journal, is all web centric for me. 


Both a terminal emulator and a browser, dominate my screen real estate. After that, basically comes instant messengering, which is arguably the only GUI+Desktop apps I really use all day. Other software like geeqie and mplayer fall into special use cases. 




When you use software a heck of a lot, you learn to leverage it for every ounce it is worth. For example, vim is an extremely powerful editor, but if you only use the delete and arrow keys, you are wasting everyone’s time. I spend enormous amounts of time with text, so efficient editing of it matters to me: why spend an hour doing what software can do in seconds? Uh huh. My love for Bourne style shells, comes from the ease of scripting: whatever I can do in a script, I can do at the prompt; making arbitrarily complex tasks accessible. I’m sorry to say that Microsoft’s cmd is a pile of junk. PowerShell is improved, but still lacking compared to most unix shells o/. Web browsers are still very unevolved creatures, I enjoy chrome because it’s unobtrusive and actually tries to get out of my way; it’s also proven to be an order of magnitude more stable than Netscapes bastard has been over the years. 


I hope someday, before I’m blind and arthritis rittled, that web browsers eventually catch up. Short of (ab)using extensions, the only real way to improve upon the average web browser, is to abuse JavaScript extensively. Most web browsers still ship lacking basic amenities; and I don’t believe in using extensions to solve “Oops, to lazy to do it right” problems.