Sunday, February 26, 2017

This is a short story I've been quietly working on since Christmas, Now ATU is out the way I can reveal it!

The Callosum Conjunction

An entry into the Convergence64 (ie The Across the Universe 2017 LARP) short story Competition by Roger Gammans

(C) CC-BY-SA 4.0 2017

Global Feudal Court. Somewhere
The court room was quiet, already quiet but the Judge brought the gavel down with sharp and penetrating crash.
"This court is now in session, and before I pass sentence I wish to allow one last opportunity for the defendant to accept parole from a Lord of this jurisdiction. Are there any offers?"
The already sombre mood of the court room deepened as the Judge waited for a response, but the court space was silent, not a single indication was offered, nor was any communication with the gallery attempted.
"No? ... In which case I can move on to the sentencing. I must comment that in all the time in which I have stood in this position, I have never seen a such a blatant contravention of our closely held taboos and standards. However I can only levy a sentence against the actual charges brought against the defendant. With this in mind..."
Enforcement branch. Department 9323.
"Duzi, a moment in my office please," asked Nsuku poking his head around his private office door into the common area.
"Yes, Boss - coming." Duzi got out of his chair slowly, the tired old joints of his body audibly creaking and eliciting a grunt of pain from Duzi.
Once Duzi had made his way into Nsuku's private office, Nusku closed the door behind them and bade Duzi to sit in the spare chair.
"I take it you've seen the news?" asked Nsuku.
"Any part in particular? The Lords are always making some pronouncement or other designed to make our lives more difficult."
"Hrmph. I'd keep that opinion to yourself if I were you. But that isn't what I meant. They are reducing the portal Guard."
"I did see that, but I didn't see the relevance. I suppose it possible that someone might want to cross, but that is not our duty."
"True, but this came across my desk yesterday." Nsuku passed Duzi a rather archaic bundle of folded paper. A title was clearly readable on the upper most side, although it was clearly not written in the local language.
"I can't read this - where did come from? Shuma?"
"Exactly, your hand terminal should be able to translate." Duzi took his hand terminal and passed it over the outer surface of the papers, methodically capturing the whole leaf. Duzi paused while he took in what is terminal was telling him.
"Do you think someone might want to affect this process?"
"Yup, without a doubt. The only question is whether is they can win the protection of one of the Lords."
"So what do you want me to do? Hang around the portal just in case?"
"Pretty much. But on the other side. Since you obviously can't go looking like that - pop down to medical before you go, I've got a surprise for you waiting. Oh and take this.. " Nsuku prodded his hand terminal sending an address to Duzi. "Aralu will meet you there."

Democratic Party Hospatility Suite, Captial City, Shuma
The room was filled with the low buzz of many quiet meetings between people; people with different interests, but they all wanted to have their point of view heard in any emerging consensus.

John Routh’s attention was beginning to wander. He had been here for three hours listening to pretty much the same set of arguments from different vested interests, or 'stakeholders' as the Whip's office encouraged them to be called these days. If there had been a truly new argument it would have at least been refreshing, but some things never change. The powerful wanted to exercise their power in this case by being able to turn off anybody else’s gadgets with as little oversight as possible and those who represented the masses wanted almost the opposite. They did have one thing in common everybody wanted control over other people’s gadgets. It was strange how how a simple bureaucratic process to tidy up the wording of the Fundamental Rights had turned into a battleground around surveillance and technology.

"Excuse me." A petite female edged her way in to the discussion." But has anybody thought about what the gadgets think?" John was shocked by the way her sentence followed on so smoothly from his own thoughts, losing the initiative slightly as a larger man followed the lady's lead into the discussion. John now recognised them as Brian Eldred and his aide Sara Crowe. They were known for using this trick effectively in technology circles, but judging by the reactions here in the depths of the law making cliques it was still relatively unknown.

"That's a very good question, and one that shouldn't be overlooked. Modern gadgets pretty much already do have feelings, and it won’t be long before they may be practically sapient." There were howls of derision from the assembled lawmakers, but Brian continued, "Look, we already have vehicles which can navigate and control themselves without assistance from us. We just sit back and check our correspondence while we get delivered like a parcel to our destination. What do you think would happen if they did decide to turn against us? We have a moral responsibility to extend the rights we are so proud to grant to ourselves, to all sapients."

"Even if such devices were possible, what possible legal test could there be to determine if a device was suitable to be granted such rights?"
"Why distinguish? If you are capable of claiming such a right, shouldn't you be able to be granted them?" John countered.
"That's easy, because others may claim those rights on their behalf. And there is the linked issue of criminal responsibility. If a device has rights, it also has responsibilities, and more importantly, if it doesn't an owner must be responsible for the actions of their own gadgets,” John responded.

Any reply Brian may have made was pre-empted, for at that moment the discussion was interrupted by a loud gong sounding at end of the room. "Dinner will be served shortly if you could all please make your way to the tables", intoned the master ceremonies from beside the gong.

"Ah, look Brian you do make a good point," continued John, "Contact my office and make and appointment, I’d like to see if there is something here. I will take the point that any decisions we make here most be forward looking given the current pace of technological development".

Dire's bar, Captial City, Shuma.
Duzi jumped up on the high bar stool next to Aralu with a ease that would have surprised those who saw him a few days ago. But then they probably wouldn't recognise him anyway.
"So I guess that's the new model they got you then, Duzi?" Aralu asked.
"It is indeed. Quite a bit different to the old model, but at least it won't draw too much attention here. I see you have a matching one," Duzi replied.
"Indeed. Mine seems reasonably capable, but I understand these are a new partly mechanical design, so I expect some gremlins".
"Not looking forward to those, but I'd be surprised if we didn't find any. But I'd prefer this to the alternatives," Duzi looked round the bar at the other patrons with a slightly pointed expression.
"Ugh. No. Not that.. Look can we talk about something respectable. Like now we are here - what are we actually going to do."
"Nsuku left it up to us. But I can't see there is much we can do except hang around and wait for something suspicious."
"We could be here for years. How long are these ", Aralu gestured with her hands waving them around her body, "supposed to last?"
"I don't know - not as long as the usual arrangement, I'm told. But we don't need to be here for that long. The legislative process here is relatively quick, by comparison to back home."
"I'd still prefer something a little bit more proactive."
"Well, you always were a little impatient, but we have some discretionary funding. We can easily afford to subscribe to all the local media feeds. Just checking through those should keep you busy."
"Well in the meantime, I suggest I stay here listening to the unguarded gossip. Beside whatever this is," she indicated the glass in front of her, "it is quite pleasant. I think I’ll like to try some more."

Sara Crowe's Apartment, Habition Quarter, Capital City, Shuma
The alarm started, and was ignored. But the alarm was used to being ignored and redoubled it's efforts.
Finally Sara woke up, cancelled the alarm properly and checked her hand-terminal. She felt odd, something felt wrong. Something she couldn't understand.
Wearily putting that aside she checked the TODO list on her hand terminal. There wasn't much new from her boss today, but there was quite a lot still undone from the past few days. It had seemed so much less important a few days ago compared to how urgent those same tasks felt this morning.

After breaking her nightfast, she sat at her office terminal, and decided to see if one of the network medical diagnostic system could help here figure out what was wrong.

She input some search terms; and looked through the results. Was is really possibly someone had spiked her drinks? She supposed it wasn't that difficult, given the recent spate of soirées she had been attending with Brian, and the results really made her current condition appear to be a withdrawal reaction. She resolved that she should ensure the public were aware of her experience, as the implications were astounding.

Switching the functional mode of her terminal she started to compose a public diary entry.

When I woke this morning I woke up to the oddest sensation. This isn't the normal sort of thing I talk about in this diary, but I think this is evidence of our political process sliding slowly further into territory I am not conformable with. And I believe that there many other who will feel as strongly about this as I do.
I'm going to give you the facts; the facts as I found them before I draw any conclusions or make any accusations. In fact I'm not going to make any accusations. My schedule for the last few days has been public enough that anyone reading this may draw there own conclusions.

In hindsight, those last few days have been some of the happiest days of my life. They were filled with a sense of wonder and a sense of being part of something bigger than just myself. It is strange looking back how those sensations changed my priorities, and while I don't regret anything I did during those days, I wonder what I would have done differently....
Dire's bar, Captial City, Shuma.
"Aralu, good to see you are on time as always," Duzi said in greeting as Aralu sat at the bar next to him.
"It’s easy to be on time when there's is nothing to do, or suspect to tail. This is a shit detail, Duzi. What did you do say to Nusku to get us lumbered with this?"
"Nothing comes to mind. At first I thought it was just his way of finagling me an upgrade, but now I'm not so sure. It is quiet here, and to be fair, it was always a bit of a long shot. Shuma is a big place: the chance of catching anyone being silly is quite small. The problem is that anyone who wants to ‘be silly’ would have to be pretty well resourced just to get an appropriate model to operate in the open out here without drawing unnecessary attention."
"And that means support from the Lords."
"Exactly, which means that if there is anybody of interest to us here, they are funded better than us. Even if we can bring them home to justice,they will likely get the parole of a Lord."
"And it was the Lords that reduced the Portal Guard?".
"So I hear, which means this could be some kind of power play back home we are about to get caught up in."
"Why doesn't that surprise me? No don't answer that. And of course we don't know that WE aren't being watched."
"Aralu, despite what we've just discussed, that sort of cynicism is bordering on sedition." challenged Duzi.
"Look, ..." Aralu started to reply before a local voice from behind her shouted at the barkeep, "Hey - I want to hear this. Turn the sound on."
The Barkeep looked around and registered the new stories that was playing on the media feed above his head at the bar, he adjusted the settings, filling the bar with the sound from the feed’s commentary track as the patrons, including Duzi and Aralu momentarily switched their attention to the feed.

"In breaking news many people here in the Captial are treating Sara Crowe's recent public statement as an accusation that the Democratic Party have been trying to manipulate the political elite through secretly doping drinks at their policy receptions. The Democratic Party have responded by condemning her statements as an attack on our political institutions by big business, although a few members have stood up to defend her statement, pointing out it is mostly a statement of facts.
Sara claims to have realised she is suffering what appear to be withdrawal symptoms from an unnamed drug, which produces feelings of elation, and a of a great sense of self... "

"Duzi," Aralu interrupted the report, "You don't think this could be anything do you?"
"Not really. But I do think it is exactly the sort of thing we should investigate. You said you were bored. And the last thing we need is to lay ourselves open to a charge of dereliction by ignoring this."

Lychor Technologies, Corporate Headquarters, Capital, Shuma.
"Thank you for meeting with us Ms Crowe."
"Ugh, Sara please. Now you said you are with the security services, but I didn't catch your names?" Sara asked the two investigators who had entered her office. She had had a phone call early from one of them suggesting quite strongly they were some sort of federal investigator, so she had agreed to meet with them. The office receptionist had even mentioned how drab their business suits were when he asked if they should be sent up to her office.
"We didn't give them," replied Duzi. "Our agency's security cannot be compromised."
"Oh. Really. You claim to be with Them?"
"Indeed." Duzi stood still, and gave Sara an impassive stare. Sara just looked at him for a couple of moments before continuing.
"And you can offer no proof, I assume?” Duzi signalled the affirmative, and Sara continued, “In which case, since I'm here I might as well complete the interview, but don't expect any corporate secrets."
"That shouldn't pose a problem. Let get started. Can you explain what memories you have during the days during which you claim you were drugged?"
"I can pretty much remember everything, but the thing I remember most about that time is a a feeling of being part of something bigger, and now that feeling is gone I have a very real sense of loss. A loss of something I can't quite put my figure on from that time."
"Interesting, is there any word, or sound associated with that loss?"
"Strange, you should ask but yes. Just one thing, 'Haban' - Does that mean anything to you?"
"I couldn't possibly say. So do you remember anything unusual immediately before you started to feel these sensations>?"

"It's really difficult to pin down exactly when they started. So how can I identify who slipped me whatever new drug this is? And that doesn't take into account any onset time." Sara complained.

"Look, we don't even know this is a drug," injected Aralu. "Why don't you tell us what you can remember? There must be a first time you remember having the feeling, if you cast your mind back."

"Well, ok. But I think it was when I having lunch. I remember having sudden cravings for Akarso Soup, and don't like Akarsi." The mention of Akarsi seem to startle Aralu, who got out and started some furious fiddling with her hand terminal. "But surely that would implicate anyone with access to the top floor klah machine, and Brian should have been affected too." Sara continued.

"The klah machine may not be the correct vector, or the drug could have a significant onset time. Are you sure that was the very first time anything odd happened? Did you have a morning meeting that day perhaps?" queried Duzi.

"As it happens, yes I did. With the appointments office of the Legislative Second Chamber. I had a meeting to arrange between Brian and John Routh." She paused for a moment as what she seemed to be saying came home to her. "You don't think the appointments office is in on it do you? Seriously - that is the stuff of conspiracy fiction."
"Yes, it is and No we don't. Did you go straight to lunch after the meeting?"

"No, I had to get some reports for Brian completed, so I could send them to him. He was away in Landing on that day, and as a result I came straight back here. Oh! No, not straight back, I stopped for some Klah. - Oh, Yes! That’s definitely when it started. I've just remembered. So I stopped to drink my Klah in the shop, and must have fallen asleep, because I remember I had this really weird dream. And the sensations started when I woke.”
"Can you tell us about the dream ?"

"Well, it was odd. It started just with a melody. Then a second melody seemed to join in harmony, and somewhere the two melody turned into a conversation. I can't explain it suddenly I know the first tune was my thoughts and the others tune the thoughts of something else, and we where negotiating whether we wanted to stay together, Ow wow - now I said it out loud it really seems strange, really strange. Do you think my Klah was drugged?"

"Hmm. Did you agree the other melody could stay?"

"Yes, it wanted to be a share it's life with my I shared with it. I think there was definitely some sharing of goals and of even control."
"Would you say you consented to this control?"
"Yes, err. Hey what? The dream was just a dream wasn't it? - You think it was something else don’t you?"
"We can't say Ma'am. One last question - When did the sensation leave you?"
"When I met Brian; on his return from landing. Although I didn't realise until the next day." Answered Sara, "Hang on, that means we have got to warn Brian. Do you think he ..."
Aralu stopped Sara's frantic and rapidly paranoid raving in their tracks by the simple expedient of knocking her out with a single well timed and solid punch.

"She will remember that," Duzi chided Aralu.

"Yes, but she was going to warn them. That might not help us."

"True. I gather you believe there is something to this?" queried Duzi.

"Of course. The Akarso was the giveaway, it contains significant quantities of the metabolic precursors for Glumatic acid."
"Sorry, you'll have to explain that one.."
"It's a neurotransmitter, one of it's functions in most species is in the memory pathways."

Aralu knelt down and took Sara’s hand terminal from her as she said that, and started looking through it.

"Ahh, I think I see where your going with that. Personally I thought the dream was the clincher."
"Well maybe, but it was sort of like hitting us over the head with the the clue at that point. Ah here it is", Ar,alu indicated the hand terminal. "Brain's meeting with John Routh is today, in about an hour - we better get a move on."

"Yeah, and before someone finds us."
”And her.”

John Rough's Office, Legalistive Branch, Captial City , Shuma
"No, I am expecting him. Please send Mr Eldred up to my office." John replaced the voice comms receiver in it's cradle and had a quick look around his office.

"Rupert," he called his PA. "Can you bring in Dijsktra and Minsky's On Sapience? Let's make it look like I've been reading it - that should help create the right impression."

A few moments later Rupert came through with a heavy book which John placed open on his desk. "Rupert you better get back there so you’re waiting when Brian gets here to show him through."
"Yes, sir."

After Rupert had left, John closed his eyes and took a number of long deep breaths, before starting to read the book. Two minutes later John had scarcely understood the basics of the chapter he was reading. Rupert opened the door and introduced Brian. "Mr Routh, Mr Eldred to see you."

John stood up and with an expansive gesture bade Brian to enter -his office, "Ahh, Brian, please come in and take a seat."
"Thank you for allowing us to continue our conversation.", Brian gestured to the book on the desk. "Ah, I see you've been brushing up on your classics. I didn't think you were up to the higher maths in later chapters."
"Just because I studied the real classics at college doesn't mean I can't handle the odd piece of calculus you know."
"Touché," John replied taking the indicated chair.

"You made some strong points about changes in the upcoming redrafting of the Bill of Fundamental Shumai Rights, at the Democratic Party dinner a few nights ago."
"The point I was trying to make is that with our current technological base we are on the cusp of a future more wonderful than many of the Genré writers have dared to imagine... "
"Come on - spare me the speech, I'm an old enough political hack to see through them," John interrupted.
"Ok, ok. I'll do my best but we are on the verge of not just machines that can think for themselves but also our bio tech is not far from being able to uplift other species. "
"What! You’re now are claiming Aliens? That really is too far."
"No, the speed of light is inviolate, and despite the fact we have good evidence to support that 70% of the Sun like stars in this galaxy have habitable or near habitable planets, I think it is unlikely that anyone can or will travel between them. Unless someone finally cracks the wormhole problem that, is."
"I thought that required matter which had negative mass, and the recent sub-nuclear collider experiments have proved impossible."
"Well, quite. But there are other possibilities. Mostly unlikely possibilities, though. I'm an engineer, I use science everyday. Every technological invention proves different parts of the strange and wonderful world of physics, just by the fact that it works and carries on working. I keep an open mind about the stuff which is not yet useful to engineers. Just over a hundred years ago it was well known that heavier than air aircraft were impossible."
"That's the classic reminder. I've lost count of the number times when a science bill is being discussed in the chamber someone brings that one up."

"Right, but it also means we don't know what changes we will bring to the world in the next 50 years, let alone 100. Getting back to the point. Do you have a pet? Maybe a good Retriever - bred originally for hunting but is now a treasured family pet.”
"I do as a matter of fact, but I don't see what relevance it has."
"Ahh, right. So is your retriever obedient, does it obey your commands?"
"Mostly, I guess. It’s a pretty good pet".
"So you treat it as a slave".
"Well,. Umm, no, I mean it's only a retriever".
"Indeed, but what happens when we start to uplift, a Retriever is it only a few points away from full sapience on the usual scale. You own the retriever, but our slave laws and Fundamental Rights laws prevent us from owning each other. Some estimates put the first uplift less than 10 years away..., What the..." Brian broke off as a commotion began to be heard from the outside the office.
John slid his hand under the desk taking something from a hidden drawer as the the door burst open and Duzi and Aralu came in slightly breathless.
"Haban, I presume." Duzi challenged Brian, "I'm from department 9323, we were warned someone might try something like this."
John pulled the gun out of his desk drawer, and as Rupert followed the intruders into John's office, John leveled the gun at Duzi and calmly challenged him, "Now I'm pretty sure there is no such Department as 9323."
"Oh, there is, but it is also quite reasonable you've never heard of it. You see Brian over there has been influenced by an alien agent."
"Alien, as in foreign?"
"No. Alien as not from this planet. I'm here to bring that agent to justice. We can't have our subjects influencing foreign nations, willy-nilly. That sort of thing is pretty serious. If people do that we can hardly be friends can we. Can we be friends?"
"I'm offering you and Brian, the lead role in a first contact situation. But first we need to take Brian back with us so we can remove the influence from him."
"No. You don't. This is a consensual union. Leave us - me be.", Brian retorted sharply losing some of his previous elan.
"Hrmph", John grunted, "Really I’m not the sort who believes anybody who just barges in. This story is quite fantastical."
"Well come with us, and we can show you."
“And now you see, you want me just go with you. Without any security? Give me some credit for common sense.”
“Why would they?” asked Brian, “Your profession isn’t noted for it.”
“And whose side are you on, then?” John retorted.
“Can we get this back on track, Mr Routh – You can’t take anybody with you but I’m happy for you to leave a recording and use the locator functions of you hand-terminal so you can nominate someone to investigate if they feel the situation warrants it.”
"OK, But Rupert stays here monitoring. Rupert, I'm going to put my hand terminal in trackable mode - so you should be able send help, and raise the alarm if anything happens to me. I’ll compose a recording on the had terminal as we go, and include a running commentary."
"Great! If that’s agreed? Let’s get this done", Duzi concluded, leading the group out of the office with Aralu keeping a good eye on Brian from the back.


Global Feudal Court. Somewhere
The Judge drew in a breath and started his sentencing speech. "We have heard how you believe that your actions were influenced by the thoughts and desires of the sapient hosts you took, an act which is abhorrent to all right-minded subjects of our Lords. This court will not allow the excuse of the consequences of such an abhorrent act as mitigation for your crimes. Taking into account the damages you may have done to future relations with the Shumai, and the nature of the act undertaking as part of your crimes, I can only recommend the harshest possible sentence for your crimes.
One for the crime Of interfering with another Sovereign Legislature without due authorisation I sentence you to 20 cycles of bodyloss, for the crime of...".

The Judge continues for sometime laying out more charges and harsher sentences. The sombre mood in the court took on a stunned and aghast tone. It wasn't clear whether Haban would be able to maintain any sanity with that sentence.  

Wednesday, November 04, 2015

About the HP IP KVM 286598-001

There seems to be bollocks all information about this on the HP site. So here is a brain dump of what I've got so far.

So first off - the serial console pinout is


So a straight forward 1-1 connection cable seems to work . The online manuals suggest 9600 8N1 , many of the setting have to be set through the serial console.

Print-screen -key  Brings the OSD up.
The Individual ps/2 adaptor don't communicate unless they have power in there keyboard plug, I'd expect similar form the USB ones but I haven't got one to try.

According to a forum post, if there is a serial console password you have to return it to HP to be reset at a charge but this is service HP no longer offer.

Oh guess, what yes - the one I bought of ebay for £30 (which admittedly is a real steal) has a password set.

Anybody a common password generator I could script a cracker from?

Tuesday, September 01, 2015

Another visualization trick - or annoucing timeline a new HTML5 app for timelines.

When writing freeform games, when tend end up with a lot of prose, mostly distinct that says things "A few weeks after that you received a letter".

And another character (eg on a different document) will have some text like ' 4 months ago you sent  a letter to.."

With all these relative dates, often relative to different event, so of those are relative as well, it can be very difficult to keep track of what you said happened in what order.

To ensure I was as consistent , I wanted to chart these out. In the first place I found the lovely vis.js visualisation library for the browser environment which has a timeline widget.

It was a simple matter to invoke the timeline widget with an array of events created from  by date arithemtic, and plot them. The vis.js gave me zooming , dragging etc so I could move about my timeline.

It showed me something I should have known was wrong and another, and something else a bit odd. So a success  - it has allowed me to view the timeline clearly. So successful that I had a request to use from someone who has never coded javascript before - and they managing to use it just about Ok .

Unfortunately this fact that version of the tool was so simple lead me to thinking - it can't be too hard to put a proper UI on this can it. It a bank holiday, I'll knock it up an Saturday have and the rest of the weekend to do the other things I have planned.

Famous last words , of course. By the end of Saturday - I had got it to remember the the links and allow the dependent to all about prettily when dragged, and by the end of Snday you could create events, rename events. And save your work. You couldn't load it back though.

It took Monday morning to get loading, and a good chunk  of the afternoon to get dependent object creation. Leaving me Monday evening to all my bank holiday chores.

Yeah - right.

So what you can see here is very much a work in progress -although I do have other things to be getting on with. My aim was something that can be a single file (+ some js downloaded from a cdn) people can run in their browser to manage these sort of dataset privately. It has moved a little way from that if with the addition of jquery and jquery-ui. But perhaps not to far.

At the moment I have the Javascript in seperate files, but perhaps I can a stage to build process to bring it together... but there are other feature it needs more...

Sunday, May 17, 2015

Visualization of ideas during brainstorming the easy (for a geek) way

At peaky, the cottages all have a modern LCD telly, while I didn't check this year, I'd be surprised if they didn't have a HDMI input .

This could be used so a laptop user could show some sort of ouT of visualization or similar to help during the early stages of game development - for myself I like to see the connections between character visually and for a number of years have been using the graphviz tools for this and similar tasks.

In fact I've been experimenting drawing these graphs for the game we wrote at peaky this year. Firstly I was surprised how easy it was, you can easily create a graphviz file - and it are relatively self explanatory.

You need a text editor, and be to happy using one, and there is a little bit of header and footer for the file.

So open notepad an type: (or use an online website such as or )

graph  {


And that all you need as a header an footer for an empty diagram (technically they are called graphs but I'm ignoring that for now ).

Then you literally just need to write in each connection like this:-

So if Alice shares plot with Bob we just write :-

Alice -- Bob

We have created a diagram with a line between Alice and Bob, it that simple so we can now add some bad guys.

Eve -- Trent
Bob -- Trent
Alice -- Trent

Put this together we would end up with a file like

graph {

Alice -- Bob
Eve -- Trent
Bob -- Trent
Alice -- Trent


The indentations not important , but it can make the file easier to read, and is second nature to most geeks to add it like this.

This produces a graph like so:

And this is where I found a few extra tools to make these super-easy on linux, but I'd be surprised if there weren't equivalent windows tools, or you can use the web tools above which do the whole lot automatically.

The first tool is graphviz itself, if you doing this directly on your computer you need to ensure it is installed. It adds a command called 'circo' which arranges the characters in a circle , and draws the links between them. There a couple of different programs included with graphviz which place the characters according to different
rules - but I've found circo works best for character links in games.

cicro and the other graphviz tools will output many different image formats, including SVG , PNG and JPG - to name the ones I find most useful.

I needed one final piece to put all his together in a manner which made the process simple for use during group plot development. I needed
way to trigger the image file to be regenerating from the dot file whenever it is updated . There a number routine which I found for this
entr for linux or when_changed and folder monitor for windows.

Since I use linux as a matter of course, entr was the utility I needed. Running the follow rather convoluted command then put into place a
few programs which would keet the image file updated.

ls | 
entr  bash -c 'circo ./ -Tpng > character_connection_new.png '

Since I had already established eog would update the screen with these pieces in place I can open the image view full screen on the tv (secondary display) and edit the text file adding and removing connections. Every time I save the file the diagram updates on the screen automatically.

My aim is that given that it is a simple line to add a connection between characters, this can be added during a brainstorming sessions for immediately visible to everybody involved.

Here is a fuller example from the game we wrote at peaky, I've made some minor changes and removed the actual character names to prevent spoilers, (the game won't be run in the form shown here ) .

From looking at this I can see that J is really no involved with much of the game, and I'd be worried about H,D,K and especially G not having enough to do. The other thing here is I've made use of some additional; features allowing me to colour the nodes. Links etc, can also be given colour.

Sunday, December 14, 2014

Another Mystery Machine update

I haven't spent much time on Mystery Machine recently, I've been working on a secret project which I'm either going to give up on, or maybe not. The secret project is going slower than I would like hence the indecision.

Anyway, I've taken a break from the secret project for all sorts of reasons - some personal - others not. At a recent event I realised I needed to use MysteryMachine but wanted to be sure I could interact with other who may not want to.

I came up with use a simple XML style export/import feature, but hit some issues due to some woolly think on the internal  (and external) APIs back in the early days.

The changes required are quite minor. But in checking what I had advertised as API I found the  documentation was not in as a good state as I would like . So I've fixed that.

I've finally three years after foreshadowing the move (!) taken down the trac site and main the bitbucket site the primary site for the wiki and the bug tracker. This was easier to do no that three year ago as Bitbucket now support Restructured text as wiki entries which is what All my original wiki pages were written in. I've also attempted to update the wiki to show the current status of the project better. In particular the developer information page has been updated, alongside which I've run pdoc to automatically generate some API documentation linked to from the developer page.

Now below when I make the announcement of the coming API those of you who are interested at least have the context to understand without to much digging.

The API Change

Which is an anti-climax given how much introduction it has . From future versions, objects EnumCategories and EnumAttributes methods *should* return system attributes.

Thursday, October 16, 2014

Why watching a movie is complicated..

TL;DR  : My videos sometimes looked like the first figure below until I found a setting to change, but there are still outstanding questions if you skip to the end.

Of course many of the geeks amongst you , having seen the title will realise immediately how little they know about MPEG , H.264 and and other alphabet soup which seems to fill the specification sheets of the equipment we use to just to entertain us.

I'm not going to talk too much here about about the specifics of Codecs because , I haven't read the appropriate standards , but am acutely aware I'd have to devote some serious time to actually understanding them. Instead this is a story about some very visible decoding artefacts I have been had the misfortune to find during mine and my partners watching of "Strictly Come dancing" from BBC HD. My partner being an avid fan means we watch it every week .

The artefact was a movement artefact only seen on left-right movement. Most noticeable if the was strong vertical line moving left-right across the screen , it became 'serrated'.

Let us start of with a little description about my setup, I am currently recording the Off-air stream from FreeSat (since when we moved in we had a dish and not an aerial) with MythTv. I then play the video with a separate settop box rather than using the mythfrontend.  All I use for that settop-box is XMBC on a RaspberryPi . The Raspberry PI is running RaspMc and set to track the release version. I've bought a license for the Broadcom codecs in the GPU so those should be in use doing the hard work of decoding the video stream. The final part of the chain is a Blaupunkt 42/131J-GB 42 LCD/LED TV.

I've been putting up with this artefact for some time, but finally decided a couple of weeks ago to do something about it. I'd  checked it the past and had seen the issue on my PC when the same recording was played back on the desktop using the players there - which should be an independent implementation since I'm using Broadcom's proprietary codecs on the Rpi. So having been fed up I raised an issue with the BBC Complaint site, since I haven't and still don't see issues on other BBC HD content (such as 'Doctor Who').

Unfortunately having raised the complaint it stuck me how long it had been since I actually did those test - and was unsure I could repeat them. So at the first opportunity I had I attempted to reproduce the fault using movie players on by desktop PC. This is where I hit a snag I found I couldn't be sure that I was seeing the same artefacts on the PC as on the TV in the living room. I went back to the living room to watch a clip of video which I new demonstrated the artefact to remind myself what it looked like.

Still showing the artefact.
 (See below for how it was generated)

This isn't actually a direct capture of the artefact but is a good almost perfect reproduction of what I saw if I paused the playback, - this is a still taken during a camera pan so is particularly full of of left-right movement.. But having seen it again I was sure that the artefact wasn't present on the decoder (ffmpeg) used on my desktop Pc to if at all and certainly to anything like the same extent as what I saw when watching the stream in the living room.

Unfortunately with modern TVs have their own image processing inside (they most do  - if only to scale image from differing resolutions to full the panel), and while watching it on a PC meant that the decoder could guess the best way to scale the image - TV are reknown about lying what the telling the image source about their actual resolution is (see Matthew Garrett's discussion on this ) .

As a result I needed to reproduce the fault on my living room display before I could really be sure what was going on. But I only had the Rpi under the TV to..., but looking into the telly cabinet from my admittedly recumbent position on the Sofa, I could see a new piece of equipment purchased which would play Streams out from MythTv (via DLNA)  - named my PS3 . (Yes newish, they are nice and cheap on Ebay on the PS4 is out. I don't play computer games , but its good for exactly this kind of verification.)

Watching this part of 'Take Two', clearly showed the fault was related to the Raspberry Pi. Good news, I could contact the BBC claim it was decoder problem at my end. And more importantly let may partner watch 'Strictly' at the coming weekend without those annoying serrated or jagged edges . I dropped an additional note to the BBC to this effect. By the way I'd like to comment here that having to provide updates through the same web form which collects an immense amount of ancillary data each time you update an issue sis a real pain. And also you can't add attachments so is practically impossible to so what faults you have.

By the time the weekend arrived , I had some more time to investigate ans it was nagging me again - I should at least try to raise a fault issue with Broadcom/Rpi Foundation about their codecs. Or possibly with the raspmc team if the issue was there. First off I wanted to capture a still like the one shown above which I could refer to in my bug reports. A bit of a google later, I came across this tool in github which promised to do the trick. I used it to capture this:-

Which looks alright. Well it's a bit blurry but. So something special is going on. Intrigued since I had it in the image viewer , I twiddled the zoom control a little, and suddenly there again was the artefact (this is how I actually captured the picture above it's a screenshot form the image viewer scaled to look as close the the original problem as possible), in fact I as zoomed in a and out the jagIn House Hospitality: Food for thought! Froged serrated edges moved across the image as well. Knowing a thing (but maybe not two) about images - "Aliasing" said I.

I also note that using GIMP as the image viewer didn't show this artefact - probably because with the correct algorithm is is possible to compensate for it . I 'll come back to this later.

You do however need some sort of high frequency pattern / oscillation to create possibility for this sort of aliasing , zooming into the picture thought it was easy to find. Every other line seemed was shifted the the left by approximately the same amount as the Jagged edge shown above. Given this was a still capture during a pan shot this is clearly characteristic of an interlaced video source.

So to recap, what we now know.

  1. Strictly on FreeSat is transmitted in an interlaced frame format.
  2. Something done in my RPi setup causes output aliasing.
  3. The artefact was caused in the chain somewhere after where raspi2png captures it's image from .
I was a bit surprised to find that Strictly, which is after all one of BBC headline shows is transmitted with interlacing - acommunitity technique which I though was being slowly constrained to the dustbin of history. Indeed this article from 2004 shows the EBU (which the BBC are a member) clearly in favour of progressive (ie. non-interlaced video). According to wikipedia modern codecs like H.264 which the BBC use for Strictly show minimal (bandwidth) benefit for interlaced video . Certainly I can believe that given the minor peak I had into the encoding when trying to compare a 'Strictly' stream with a 'Doctor Who' stream. Of course a careful reading of that wikipedia page points to the existence of varying levels of decoder support for encoded streams.

But I also couldn't find anyway in the listing or the BBC website where they promise the HD content is 1080p (eg, FullHd, with no-interlacing) . But either way it's hardly a fault condition - regrettable but not a fault.

So that leaves the RPi, and RaspMC software I'm using on it, which is causing an aliasing artefact. Now for those paying attention , will have realised that to get that sort of aliasing some sort of (flawed) scaling operation must be involved somewhere  - like perhaps the scaling operation to add overscan to a video signal which a television might apply, but If that was the case why did I not see the same effect on the PS3?

While musing on that topic I had little memory of setting the 'overscan compensation' up on the RaspMc when I first installed the thing. I went back to that setting and found that if I tweaked it I could adjust the the jaggies in exactly the same was as zooming in an out So it was immediately clear to me that the effect was produced by the overscan compensation .

You see when you first turn on RaspMc it ask you to move a set of red markers around to define the edges of your screen. In other words there is you tell the system software how much of the 1080 frame is outside the display area of the TV. With this information the RaspMc system scales the image down so the whole 1080 frame is inside the viewable area. [And then presumably the TV scales it back up internally so it fits the Panel - but lets not worry about this. ]

It seems odd that raspi2png grab the screenshot before this ' setting' is applied, but that maybe a bug with the capture technique used. Further investigation showed that displaying the captured PNG with RaspMc faithfully reproduced the issues, so there are arguments both ways for this behaviour in raspi2png.

While investigating this I finally found an entirely new set of playback settings - which are only accessible during playback - which makes sense except during playback all the icons are invisible so you can watch the programme content (there is a way to make them appear , though).  And right in the middle of those settings was an option "Deinterlace" "On/Off/Auto".  It was set to 'Off' - and yes setting it to 'On' made the problem go away, and using Auto still seem to work.

Comparing other content on 'Off' and 'Auto' seemed no different, or indeed 'On' and 'Auto', which may suggest to me I haven't found the video which shows artefacts when de interlace is (erroneously?) attempted.

Where this leaves us

Despite having now found a perfectly reasonable solution to the problem at hand , I'm a number of questions were still nagging at me,

  1. What was  the difference between the other BBC programmes I had watched and "Strictly".
  2. Why did raspi2png capture the whole frame.
  3. Why does the overscan compensation introduce scaling rather than use a proper filter?

Tackling these questions in reverse order -I'm pretty certain that the overscan compensation trick is done inside the GPU, the GPU also scales the image to produce standard definition output and all sorts, so I think it's all in this part of the set up - and it's more than likely that the just GPU doesn't have enough power to a proper filter for this function.
As to raspi2png behaviour it's pretty much a simple wrapper around one of the GPUs functions, it would be nice to see an option if possible to switch between the different frame buffers which are involved here.

Both of these two need to be taken to the Rpi community , so I'm going to head over there soon and ask around.

This leaves the first question , which part of which I should be able to investigate myself, after all there must be a program somewhere which analyses mpeg / avc files an describe the whay there are encoded - mustn't there. And indeed there was there is something called mpeginfo. Unfortunately all the BBC streams where describes as 'Interlaced: MBAFF' . MBAFF, as far as I can tell really doesn't mean a lot other than - "the content may be interlaced, but might not - but MBAFF is a really good setting let's use it".

I actually tried writing (ok, patching and compiling) my own version of mediainfo which would give more information but unfortunately it just made be aware of how complex Mpeg4 is... What I would be really interested if someone , perhaps at the BBC could explain why the interlacing issue  , and  esp. givin interlacing isn't exactly consider the highest quality option, is so much more evident on "Strictly Come dancing" compared to other BBC shows. Particularly since a Dancing show is going to be show lots of movement, you think it would be last option wanted.

UPDATE : I've just had a chance to go through some materials the BBC sent in response to my original query which I hadn't noticed, but states 1080i is there standard format for UK HDTV.

Sunday, June 22, 2014

python_autoprofile - A simple way to profile all python scripts on you run.

I've just created this package over at github.

It really only useful for debian users, but other may be able to do something similar , but I don't know
what features rpm has which replicate dpkg-divert.

What this package does is allow you to add extra command line switches as 'default' to the invocation of an python script on your system. It takes these extra parameters from the environment, so unless you set any
of the it special Envvars it does nothing.

It has two special environment variables the first XPYADD_ARGS is literally just prepend to the the python command line every time python is run. I use this to add the '-3' switch in my development environment so I can worry about python3 compatibly during development . By  placing it in an environment variable is one of the simplest places to make production and development different without added processes etc, which might get forgotten. But not having '-3' in production it also means unnecessary warnings are in our production logs.

But I also use this package in production for the it's other feature the one it is named for. If the PROFILING environment variable is set, it may add "-m cProfile -o $UNIQUE_FILE" to the python command line. The will cause the python execution to be profiled and a stats file saved to UNIQUE_FILE.

I say may, because I don't want to slow production down to much by running this on every python invocation, so it uses a configuration file' /etc/python-autoprofile/PROFILING_FREQ' to decide randomly on each run whether to do so or not. The idea is that you can configure what proportion of scripts run slightly slower -as they have profiling enabled - so as not to disturb you users perceived performance but still get a broad brushstroke view of your python performance.