Some friends recently dug up an old tree stump and, for reasons probably best not explored, asked if we wanted it. Of course, we said yes and said stump was duly acquired and unloaded. The plan was to leave it until the weekend and then start trying to figure out if there is anything we can do with it.

I think we’ll manage.

flattr this!

Keeping Qshell sessions alive

Not a lot of people realise this, but the IBM i has a POSIX compliant shell environment, known as Qshell. It’s relatively basic (compared to both BASH and the native i command line) but it can be quite handy when I need (for example) to grep a source file.

One thing that has always annoyed me about Qshell, however, is that it doesn’t retain any history between sessions. Given that my workflow will involve starting at the i command line, performing a task in Qshell, and then returning to the command line, the lack of a history lead either to unnecessary typing or copying and pasting commands into and out of a text editor.

Today I noticed that the F12 key can be used to disconnect a Qshell session without actually ending it. And when I next enter the QSH command, I find myself back in the same session with my history intact.

This isn’t going to help with finding commands I typed yesterday, but it will allow me to avoid unnecessary retyping within the same day.


Why use grep to search a source file rather than the more usual FNDSTRPDM command?

Incompetent contractors is the short answer. Incompetent contractors who introduced an unknown number of divide by zero errors is the slightly longer answer.

In RPG, the division operator is / and the comment symbol is //. I could use FNDSTRPDM to search for all the slashes and then manually scroll past all the comment lines. Or I could shortcut this process with the following piped grep:

grep -in '/' /qsys.lib/sourcelib.lib/qrpglesrc.file/program.mbr | grep -iv '//'

I’m lazy. I grep.

flattr this!

First steps in programming

For those that don’t know, Big Trak is a programmable tank. It was popular (with me, at least) in the 1980s and reissued in all its retro glory a few years ago.

Big Trak, if you don’t remember, was an amazingly cool-looking 6-wheeled tank that you could program yourself to move around whilst firing its photon beam. Happily, not much has changed with this new version, which means you can not only relive the fun you had as a kid but, if you’ve got children of your own, pass it on through the family.

A few simple instructions can make your Big Trak go forward a certain number of lengths, fire, and then come back to you. The onboard memory will store up to 16 commands in one go, which means you can easily have your faithful tank-servant completing some complex manoeuvres in no time.

I have one and Alexandre is fascinated by it. So much so that he can now code up the basic manoeuvres himself…

Turning is still a challenge, but we’ll get there.

flattr this!

That Linux feeling… on Windows

I have been trying to get along with Windows Powershell at work for the past couple of months and, while it is a huge improvement on the more traditional Windows console, it is nowhere near as functional as the Bash terminal I spend most of my time in when at home. So I started poking around online and ended up on the Cygwin.

Cygwin is:

  • a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.

This does sound good, but it also sounds like potentially much more than I need. I am, after all, only looking for a terminal that I can use to edit and shunt text files without being driven to curse my keyboard.

Luckily, I do have a small Windows partition on my own laptop, so I thought it would be worth giving it a spin at home before screwing up my work laptop enough to attract the attention of the helpdesk.

Before I go on, I shall reiterate that much of the Cygwin functionality os of no interest to me. I really am just looking for a functional terminal environment that I can use while at work.

The install was easy enough. This being a Windows application, it’s just a case of downloading the setup.exe file and clicking on it. You do need to hang on to this file once the install is completed, though, as it also provides the package management functionality for Cygwin. As someone who frequently bins everything, this felt a tad odd to me – but it’s not a problem.

The install creates its own file structure under C:\cygwin64 which took me a moment to find. That said, it makes sense that the *nix environment isn’t mixed up with the rest of the Windows stuff. It’s easy to find and, once you are aware of this, the Cygwin terminal starts in the expected folder.

And onto Vim. This is installed by default, or appears to be. Even though the initial screen says Vi Improved, it does look like Cygwin is actually installing Vi by default.

So I added an alias (alias vim=vi) to my .bashrc and renamed my .vimrc to .virc and then things went a bit wrong as Vi is unable to support any of the functions in my default .vimrc. So, back to the setup.exe file I went where I found and installed vim-minimal.

This does not seem to have helped as I am still seeing a whole bunch of comman not available errors.

I was also rather unnerved when I tried the ftp command and saw my password being echoed back at me as I typed it.

At this point, one of the twins came in and wanted to play Cat and Mouse and I’d had enough of being in Windows, so tinkering was abandoned. But, based on first impressions, the Cygwin Terminal is going to struggle to meet my needs.

The search continues.

flattr this!

Of cupcakes, children’s parties and cranial catastrophes

Saturday was the day that the twins celebrated their birthday. It’s a couple of weeks early, but this date had some pragmatic advantages and it was off to Kinderweelde that we went. You have to have cake, of course, and for convenience Eve spent Thursday and Friday baking cupcakes. These had the added advantage of not needing to be cut while we were at the speeltuin and they turned out rather well.

There is no after photo as the cakes were demolished.

The party itself went pretty well. The nice thing about Kinderweelde is that you can let the kids their own thing and only need to be available top deal with bruised hands, black eyes, trapped fingers and… my head.

Don’t worry, it looks a lot worse than it is. Eve insisted that I see a doctor but he basically put a plaster on it and commended Eve on her first aid skills.

So, a broadly successful day was enjoyed by all.

flattr this!


The Akismet spam filter in WordPress really is very good indeed. It does an excellent – and endlessly improving – job of identifying and deleting comment spam that I can simply leave it running and forget about it.

Nothing is perfect, however, and the occasional comment does make it through to my moderation queue. Like this one:

I am John, how are you everybody? This paragraph posted at this network site is really fastidious.

And the post containing this comment worthily fastidious paragraph… Is here.

flattr this!

Quote of the Day: Teenager (almost) passes for human

The Turing test was first proposed by Alan Turing in 1950, and luckily our understanding of computing, artificial intelligence, psychology and human communication has remained unaltered since then, so it’s just as valid as ever.

Dean Burnett

In other news, George Dvorsky explains why Why The Turing Test Is Bullshit and The Register has a handy overview of Kevin Warwick’s life in publicity stunts.

flattr this!

Creeping Sectarianism

While responding to the recent Birmingham School Trojan Horse Kerfuffle, Catherine Bennett makes the following point:

It is difficult, for example, to conceive of a school more openly rejecting of Britain’s predominantly secular culture than the Cardinal Vaughan comprehensive in Kensington, London, where 99.7% of the pupils are Catholic, the principal activity is “the apostolic mission of the Church” and “the teachings of Christ permeate all areas” – unless it is the Yesodey Hatorah Senior girls’ school, a state-funded institution serving the Orthodox Jewish Charedi community in Stamford Hill in London. An Ofsted inspection in 2006 noted: “The Charedi community do not have access to television, the internet or other media. All members of the community aim to lead modest lives governed by the codes of Torah observance.” It was marked grade one, “an outstandingly effective school”.

It’s certainly true that faith schools promote intolerance and division, yet successive governments have happily stored up problems for themselves, and the rest of us, by not only allowing but actually encouraging these divisive institutions.

It’s not just in schools, though. Society as a whole seems to have lost sight of (or maybe never understood) the value of keeping church and state apart. AC Grayling puts it better than I could in The Secular and the Sacred. The article dates itself slightly by referring to political leaders no longer in power, but the conclusion is worth quoting in full:

This is the chief reason why allowing the major religions to jostle against one another in the public domain is extremely undesirable. The solution is to make the public domain wholly secular, leaving religion to the personal sphere, as a matter of private conviction and practice only. Society should be blind to religion both in the sense that it lets people believe and behave as they wish provided they do no harm to others, and in the sense that it acts as if religions do not exist, with public affairs being straightforwardly secular in character. The constitution of the USA provides exactly this, though the religious lobby is always trying to breach it, for example with prayers in schools. George W. Bush’s granting of public funds for ‘faith-based initiatives’ actually does so.

To secularise society in Britain would would mean that government funding for church schools and ‘faith-based’ organisations and activities would cease, as would religious programming in public broadcasting. And it would mean the disestablisment of the Church of England. All laws relating to blasphemy and sacrilege would be repealed, and protection of private belief and practice would be left to the legal safeguards and remedies which already exist in common law and statute, and are already very adequate.

If society does not secularise the result will be serious trouble; for as science and technology take us even further away from the ancient superstitions on which religions are based (a separation tellingly emphasised by the current cloning controversy), the tensions can only become greater. The science-religion debate of the nineteenth century is a skirmish in comparison to what we are inviting by allowing not just religion but mutually competing religions so much presence in public space. Now therefore is the time to place religion where it belongs – wholly in the private sphere along with other superstitions and foibles, leaving the public domain as neutral territory where all can meet without prejudice as humans and equals.

At it’s core, secularism can be summed up in two very simple statements: No-one should be discriminated against on the basis of their belief or lack of it, and no-one should should gain any special privileges on the basis of their belief or lack of it.

Secularism is an essential prerequisite for an equal and fair society. This is more true now than it ever was.

flattr this!

Cat and Mouse

CAt and Mouse This is a game we aquired at Christmas and one that has been pulled out a surprising number of times over the past few months. The game is for two to four players and is pretty simple. Each player controls a mouse which they move around the board according to a roll of the dice. Depending on the square you land on, you either gain one or two pieces of cheese, or you drop a piece of cheese, or you go up a ladder and drop down on a random location, or you get to send the cat after someone.

The aim is to accumulate five pieces of cheese, which is easy enough but if the cat lands on you a piece of cheese must be returned.

The gameplay is simple enough and relies largely on luck. As such, it is easy for the kids to comprehend and to follow what is going on. Judicous use of the cat, however, allows for the bare minimum of strategy needed to keep the game close enough to be exciting. Not that you need too much strategy, however, as sending the mice up the ladders and through the big cheese is a whole bundle of fun all on its own.

Cat and mouse is a short, simple game and one that my three to seven year olds can set up and play quickly and easily. The only problem is that the cheese randomiser can be a little too appealing for the younger ones.

flattr this!