Saturday, 7 July 2012

Wargames for the masses

Yesterday for Retrochallenge 2012 I wrote a little shell script to simulate the interaction with the WOPR computer in wargames. (Connect link)

It was quite incomplete, and bodged into the telnet port on the VAXstation, so tonight I polished it a little, and then a little more, adjusted the output timings, made it very generous when accepting input (so you could type "fine", rather than "I'm fine. How are you"), and finally made it go back and rewrite what the user typed in such cases to match the film.

Finally I got over-enthusiastic and put it up on github and added an entry to pkgsrc.

Notice, at no point in this process did I ask myself "why?".

Along the way I found out how easy it was to setup telnetd to automatically run a program instead of asking for login, and found a java telnet app to add to wopr's home page to make it easier for random web users to connect to the script. I also tweaked the font colour and style to better match that in the film.

Its this attention to pointless detail that is probably quite worrying.

Its like building a perfect matchstick model of a chair with a broken leg, who's only purpose is to be put on a bonfire.

Learning how to setup telnetd to autorun a program instead of login would be potentially useful... if it was 1992 and anyone still had any use for telnet.
(for reference just set the telnetd arguments in inetd.conf to "-g foo -a off -h" and in gettytab copy default to foo and replace the im= with lo=/path/to/app).

Still, after dropping into an email thread on the simh list I've submitted a request to pullup a commit from Matt Thomas' so simh will be able to detect when a NetBSD-6 vax guest is idle and save CPU cycles.

So... looked at it from the right perspective, that will reduce energy use and carbon emissions, so in a tiny way I just may have done something today which will help save the planet! ... or mabye not.

No comments:

Post a Comment