Today was a refreshing change, I spent most of it glued to my desktop: three command prompts open, with pidgin tabs, chrome tabs, and mplayer occasionally filling in the rest of the space :-D.

I basically rewrote the recipe parser for tmk, bringing it up to the specification. Generally I’ll avoid such leg work, except when it’s a simple grammar or no suitable tools are available; and tmk is very simple. Command directives and much of the expansion system were also implemented today, making tmk almost complete enough to compile a project. What needs doing, is proper macro expansions (tmk vars don’t work yet, but the rest of the expression syntax does), so that `magic` variables acline to makes automatics can be created. Once that is done, creating the desired directives is a fairly trivial process; hooking them up to language/tool independent and developer serviceable backends being a piece of cake.

While testing the directives code, I needed to come up with a temporary error message, one that had to be a bit absurd: being as it was intended for testing the domain in which the error applies, rather than an already iron clad reason to use any given message To that end, I came up with one that would really stick out among the other diagnostics: “{file name}:{line number}: the bad year blimp has landed”. This, as some might instantly see (;), is a slight homage to Mel Brooks’ Spaceballs, more specifically to the scene, “Uh oh, here comes the bad year blimp!”, in which Lone Starr calls for the switch to “Secret hyper jets”. And of course, I had to load that film into MPlayer and my DVD drive while I wrote code xD.

When developing something, I typically do a large amount of in flight testing to verify the codes behaviour. My efforts today have been no different, testing time perhpas, making up more than 60% of the time I spent working on tmk. It’s not unheard of, to find XXX marked comments denoting details about some edge case that hasn’t been covered, and a note to kick me in the head if that theoretical hotspot ever occurs; such things usually happen when I’m extremely pressed for think-time, due to (ofc) being interrupted every upteen times. At which point, priority is usually on implementation speed over perfection. Today, I was lucky enough to be able to work largely uninterrupted: a rare pleasure.

For me, programming is a very relaxing effort. It’s one that I can absorb myself into the art and craft, designing programs bit by bit, constantly improving them with each iteration, until my aims have been achieved, or I’ve passed out. Despite being a very exhausting task to keep working at, I rarely find it to be an intellectually arduous one, so much as a test of endurance: to stay in the zone for long stretches and deal with the effort required for the, eh, shall we say more paltry and menial aspects of coding a decent program. There are some parts of programming that really do tax the brain, the fun stuff to work on solving ;). On the other side of the coin of course, is a lot of things are more straight forward to sort out. Many aspects of programming overlap both the engineering and the every day groan of getting ti done. Both are needed, in any non-trivial application, that you’ll be seeing more than a couple hours of use with.

That being said, being able to look at things from several vastly different directives, does help a lot. Because of the amount work needed, it seriously helps if you can stay in the zone for a good 6-8 hours or more per sitting; but becoming tunnel visioned on the creative and problem solving parts, is generally a bad thing. One must slip gently through the mind of no mind, and know how to leave your box behind. There can be an insane amount of stuff to deal with in some programs, and I find that the level of such, increases both with the complexity of the problem and the pitfalls of the language utilised. For example, C, lisp, perl, and python can each express many problems quite well; yet each excels at expressing certain ideas more naturally, or with less effort, than the others. I actually was missing lisp for a good hour today lol.

Days where I can just sit and focus on getting stuff done (in peace) are terribly rare here. When I get into work mode, just get out of my way, or I’ll be quickly annoyed. I don’t like it when people waste my stack space.

In one of the rare moments that I actually stop to read my RSS feeds techy side, I noticed that WebKit2 has been announced. The only thing I can’t help but wonder, is what the flub does a layout engine have to do with processes? Not a damn thing! Personally, I would appreciate a separate API/library for such separate of interest: in particular, one not tied directly to WebKit lol. Ok, so maybe I’m crazy.

Whether you are a user or a developer o/, nether Xembed or the various (oft’ fugly) incarnations of Microsoft COM really make anyones lives just easier. Under X based systems however, it is possible to mate separate processes running WebKit into a central controller without to much heartache; there are already some bare bones browsers out there worth looking into, and patching when they don’t measure up. Non however have become common place, and even among PCs, there are really only a handful of common web browsers out of dozens of products to choose from.

Somethings are always going to be closely bound; first takes of an idea, even more so an idea geared for getting the current project done, tend to do that even more so. Personally, I will just be happy when there are less web browsers out there that suck… and keep on sucking.

Like clockwork it seems, I’m awake, and it was just a few minutes before 0700 local time. I had tried, and failed, to make it a habit last year, or waking up early; but recent stuff has cemented it into my internal ordering. It’s like I just start waking up until my eyes flutter open wide awake.

I was dreaming that I was at church, and the helping the pastor look, until we finally found some important clicker that got lost lol.

RvS -= 1; SWAT4 += 1

I spent part of the playing around with Raven Shield and SWAT 4: TSS. Although to the best of my knowledge, Unreal Engine 2 did have support for joysticks, both these games shipped with that support half-assedly disabled 8=). In short, the games basically ignore all joystick input.

Never being one easily daunted, the three obvious solutions occurred: A/ configure the games for keyboard only operation and the joystick to emulate keyboard input; B/ use AHK; and C/ write a small toy to emulate a mouse by way of joystick input. I have already done A, and plan to test out B tomorrow (eh, today), if need be, perhaps play with C at some later date just for fun.

Under the Unreal Engine, or at least UE2: movement is a fairly simple thing. Basically you apply a positive or negative “Speed” factor to a given axis, resulting in some kind of movement: such as translating the players pawn(?) or moving the cursor. It’s kind of simple, +/- base X and Y axises are more or less your walk. Where as the aBaseX and aBaseY axises correspond to the mouse. For SWAT, the task is basically as simple as binding a group of keys to apply +/- Speed to those axises. The bigger the speed, the more reaction you get per key press. In Raven Shield however, despite several methods tried, only positive and negative X (left/right) movement was fully working. Irregardless of change, only upward Y movement was possible in RvS o/. After 6 years of it, I am often the first to call Raven Shield a pile of crap. Tuning my retired joystick to trigger those keys, is fairly simple: although the profiler lacks mapping JS to mouse aixses, sadly.

While it is possible to configure SWAT 4 for keyboard only operation, and thus JS based aiming; it creates somewhat of a problem. It’s virtually impossible to both be able to turn/maneuver around obstacles and to aim and fire at targets. The reason for this is somewhat Unreals fault, that and the fact that “Keyboard acceleration” is not quite, eh, the same as mouse acceleration. In testing with my stick, I found values of +/- 3.75 to 4 tended to work good for aiming, where as +/- 5 to 8 work better for turning. Since a joystick should garner a form of movement more acline to that of mouse acceleration, rather than a keyboards uniformity, it causes a conflict of interest. Mouse acceleration works on the indea, of increasing the speed of mouse movement in proportion to the distance you move it, e.g. it gets faster as the further you move it; where as accelerated it always moves at a steady rate. Perhaps a good if incomplete explanation, for anyone whose played a Playstation with an analog controller: mouse = stick, keyboard = d-pad; thus mapping js to keyboard = d-pad != analog stick. Obviously to play an FPS with a joystick, you don’t want it to behave like a sluggish ‘d-pad’. One way to solve this, would be to dynamically modify the Speed= value used by the key, incrementing/decrementing it by some stepping per use; while not as elegant as it might sound to some, is also impossible. UE2s console and command system could only handle the ++ and — operations by writing out the increment steppings using the pipe(|) operator, and following it up with an OnRelease operator to reset it back.

A better solution, obviously is just playing a ficken game with joystick support ^/.

As for the aforementioned method B, wouldn’t you happen to know that it’s already there. It would be the best solution, and AutoHotKey is a fine bit of software; one I’ve always wanted to find a good use for in games. Depending on how well it can be made to work at converting a JS into a mouse compatible HID, in particular with games in general, I might actually give up using the mouse for regular desktop usage. Thanks to my laptop and having encountered a fair bit of hardware in life’s travels, I have no special attachment to PC mice: only hatred for ones without tails. Than again, I don’t like wireless hardware for much, period.

The third method (C), well, is one that I would only consider worth the effort, because of the learning about Windows specifics that it would involve. I wouldn’t be surprised if Microsoft had it as a sample app somewhere either. The libraries I rely on for input backends (e.g. in Stargella) have their own portable handling of joysticks as is, so I’ve no real reason to care lol.

Tweaking my noise at the old API

In fooling around with the Windows API, I’ve just had an enjoyable moment of guffawing. As a quick test of the JS stuff in winmm, I hooked up MM_JOY1MOVE to MessageBox() and ran the program under the debugger. It resulted in an endless stream of MessageBox(), resulting in the Windows task bar hanging, and taking at least 25-30 seconds to recover, after the program had finally overflowed the stack, been examined, and finally terminated manually.

I almost died laughing lol.

A little fun with RSS

In a bit of experimentation, I’ve been thinking about ways to improve the way a certain popular web platform plays with the services I utilise. So, today I began playing with two new toys: FeedBurner and Yahoo! Pipes.

Feed burner offers a bit better control over ones RSS feeds, than most web services that I’ve encountered do; in particular, much better than both Live Journal and Blogger. For what it’s worth, I’ve converted my blogger feed over to the burner, allowing me to trivially add a few things to the feeds without disturbing any existing subscribers. The main difference, is now I can tweak things for stuff that I feed my journals RSS into, hehehe.

One downside of FeedBurner, is that its ability to merge feeds with the “Link Spicer” feature is quite limited. In particular, it’s little value beyond a limited set of common services. Enter Yahoo! Pipes: using it, I was able to (trivially) munge together several of my service feeds into a singular one, e.g. combing several photo album steams into one pipe. I’ve created several feeds, that I doubt anyone will be interested in; but allow me to route selected information sources into RSS aware entities.

Although Really Simple Syndication has been around for more or less, a solid decade: few people understand it’s true value. Properly managed, web feeds whether built on RSS or not, can achieve part of that interoperability that certain keyword jugglers puddle about with XML, and it’s been here for years. If you want to cram steams of data somewhere, odds are you should be looking to see if some type of web feed will fit the bill, rather then throwing together yet another obscure XML format to juggle. Bonus points include that decent libraries are already available, which can save some time and make easier to read web app code later ^_^.

Recharging time

As today marks the first in six days off work, my plan is to spend it on rest and relaxation, assuming no one has any more nukes to juggle 8=). If anything explodes, people can push a fix it task out to my RTM, but I’m taking it easy for a while lol.

The most stressful thing I’m doing this week, is moving over more old entries from Live Journal!

Interesting…

I’ve noticed that if I place my screen window into copy mode while the compiler runs, Firefox doesn’t become so massively unresponsive, slower, but no where near as slow. This makes me wonder a bit.

Either way, I can run less bloated web browsers on this meager laptop without any hiccups from a running compiler 8=).

My heart aches, and a drowsy numbness pains
My sense, as though of hemlock I had drunk,
Or emptied some dull opiate to the drains
One minute past, and Lethe-wards had sunk:
‘Tis not through envy of thy happy lot,
But being too happy in thy happiness,—-
That thou, light-winged Dryad of the trees,
In some melodious plot
Of beechen green, and shadows numberless,
Singest of summer in full-throated ease.

O for a draught of vintage, that hath been
Cooled a long age in the deep-delved earth,
Tasting of Flora and the country green,
Dance, and Provencal song, and sun-burnt mirth!
O for a beaker full of the warm South,
Full of the true, the blushful Hippocrene,
With beaded bubbles winking at the brim,
And purple-stained mouth;
That I might drink, and leave the world unseen,
And with thee fade away into the forest dim:

Fade far away, dissolve, and quite forget
What thou among the leaves hast never known,
The weariness, the fever, and the fret
Here, where men sit and hear each other groan;
Where palsy shakes a few, sad, last gray hairs,
Where youth grows pale, and spectre-thin, and dies;
Where but to think is to be full of sorrow
And leaden-eyed despairs;
Where beauty cannot keep her lustrous eyes,
Or new love pine at them beyond tomorrow.

Away! away! for I will fly to thee,
Not charioted by Bacchus and his pards,
But on the viewless wings of Poesy,
Though the dull brain perplexes and retards:
Already with thee! tender is the night,
And haply the Queen-Moon is on her throne,
Clustered around by all her starry fays;
But here there is no light,
Save what from heaven is with the breezes blown
Through verdurous glooms and winding mossy ways.

I cannot see what flowers are at my feet,
Nor what soft incense hangs upon the boughs,
But, in embalmed darkness, guess each sweet
Wherewith the seasonable month endows
The grass, the thicket, and the fruit-tree wild;
White hawthorn, and the pastoral eglantine;
Fast-fading violets covered up in leaves;
And mid-May’s eldest child,
The coming musk-rose, full of dewy wine,
The murmurous haunt of flies on summer eves.

Darkling I listen; and for many a time
I have been half in love with easeful Death,
Called him soft names in many a mused rhyme,
To take into the air my quiet breath;
Now more than ever seems it rich to die,
To cease upon the midnight with no pain,
While thou art pouring forth thy soul abroad
In such an ecstasy!
Still wouldst thou sing, and I have ears in vain—-
To thy high requiem become a sod

Thou wast not born for death, immortal Bird!
No hungry generations tread thee down;
The voice I hear this passing night was heard
In ancient days by emperor and clown:
Perhaps the self-same song that found a path
Through the sad heart of Ruth, when, sick for home,
She stood in tears amid the alien corn;
The same that oft-times hath
Charmed magic casements, opening on the foam
Of perilous seas, in faery lands forlorn.

Forlorn! the very word is like a bell
To toll me back from thee to my sole self!
Adieu! the fancy cannot cheat so well
As she is famed to do, deceiving elf.
Adieu! adieu! thy plaintive anthem fades
Past the near meadows, over the still stream,
Up the hill-side; and now ’tis buried deep
In the next valley-glades:
Was it a vision, or a waking dream?
Fled is that music:—-do I wake or sleep?

Ode To A Nightingale—John Keats, 1819

So much for sleepin’ in

Well, it seems that I am awake before the sun rises, yet again! Yesterday I woke up at just a bit past 0300, feeling like I had slept all morning long, actually had to triple check the alarm clock and look out the window, to make sure ma wasn’t playing a joke. This morning, it’s like having the brain switch on to far, in order to go back to sleep: been that way for a while, save nights where I’ve hardly slept at all.

From all the years I’ve spent working into the night, sometimes until after dawn: and usually having to be up for work. Last year, I reached the point where I rarely can sleep more then three or four hours at a time, like automatically waking up without any alarms chiming. Attempting to actually get into the habit of waking up ‘early’ having generally failed, as I like falling back asleep to much lol, that was never much of a problem. With a friends recent trip (which I’ll just say, involved dangerous ground), and the impact it had on my dreams, I think has helped to cement it into my mind: to wake up, and to stay up. Something I’ve been unable to hammer into it for years lol.

Traditionally, I’d sleep straight through like a log, if ever waking up: just long enough to stagger off to relive myself of a pint or so lol. Working habits becoming more eratic, caused me to drift more in the habit of waking up at least 2 or 3 times every night, at fairly regular intervals o/. For the past two and a half months or so, I’ve been waking up and generally, been reaching wide awake quite quickly.

While I reckon, not the way intended, I would say that’s still an objective complete: getting into the habit of waking up early. Last time I was successfully in this habit, was when I was working shifts of 0400-2000 on a regular basis; where there was no real choice in the matter. Honestly I prefer getting up early, over sleeping in until which ever comes first: work or lunch time.

Maybe I might even learn to eat breakfast like the rest of the world lol.