This is as days pass by, by Stuart Langridge

Jokosher Cleanup Day, 10th September

OK, 10th September in #jokosher on irc.freenode.org is Jokosher Cleanup Day. We're working through the code, adding comments, sorting out variable names, all that sort of thing; spring-cleaning on the codebase. This is something that you don't necessarily need to be a l33t Jokosher haxx0r to understand, so if you've been meaning to get involved with an open source project and just haven't got around for it, this is the one for you! Come to the IRC channel on September 10th and we'll be able to help you get to grips with the codebase and tidying up jobs. Then you too will be part of the greatest program the world has ever seen. Yes!

Ubuntu release testing not good

Apparently, the latest set of Ubuntu updates may break it. That's really not good. Microsoft would get flayed alive if a service pack broke Windows in this way. Dapper is a supported release; we need to do better than this. I've got no idea whether it's a problem for everyone or just for a few people, and I don't know how it's being resolved, but I suspect some internal update-release procedures (as well as "how do we undo an update release" procedures) are being looked at. Meanwhile, don't click the upgrade button just yet.

PhpBB spam on the Jokosher forums

We've been having a few bots spamming the Jokosher forums, by registering an account and posting a spam post. To that end, I've applied the Easy BotStopper mod, which adds a (simple but apparently quite effective) wrinkle to the signup process. It's a Club solution, but, as famously said by the desert traveller in the Nike trainers, I don't have to outrun the lion, I just have to outrun you. Let's hope it puts enough of a barrier in front of phpbb spambots to keep us ahead of the game for another few months. If you have any suggestions for ways to stop spam on phpbb installations that don't involve captchas, I'd be interested in hearing them; we've already disabled anonymous posting in addition to the mod above.

Simon Tatham's Portable Puzzle Collection Launcher

Simon Tatham has written a collection of little puzzles, which are very useful little things to play with when you've got five minutes to spare. However, installing the Debian package (sgt-puzzles) doesn't add the little games to your Gnome menu. I could just add a submenu and loads of .desktop files, one for each app, but I couldn't be bothered with that. So, a tiny PyGtk program to launch them. This will only work on Debian/Ubuntu because it looks for the dpkg .list file to build the list of packages! /usr/local/bin/sgt-index:
#!/usr/bin/python
import gtk, sys, os

try:
  fp = open("/var/lib/dpkg/info/sgt-puzzles.list")
except:
  print "sgt-puzzles not installed!"
  sys.exit()

games = [
  os.path.split(x.strip())[1]
  for x in fp if x.startswith('/usr/games/')
]
games.sort()

def startgame(event, gamename):
  os.system("/usr/games/"+gamename+" &")
  gtk.main_quit()

win = gtk.Window()
hbox = gtk.HBox()
vbox1 = gtk.VBox()
vbox2 = gtk.VBox()
win.add(hbox)
hbox.add(vbox1)
hbox.add(vbox2)
count = 0
for g in games:
  count += 1
  b = gtk.Button(g)
  b.connect("clicked", startgame, g)
  if count % 2 == 1:
    vbox1.add(b)
  else:
    vbox2.add(b)

win.connect("destroy", gtk.main_quit)
win.show_all()

gtk.main()
Then just add an item to the menu (right-click the Applications and say Edit Menus).

Lock table is out of available locker entries

I managed to shaft my Subversion repository today. No idea how it happened, and fixing it was a bit problematic. The error was: svn: bdb: Lock table is out of available locker entries If I accessed the repos directly through the web (Apache), it just said "couldn't open the requested svn filesystem". WebSVN gave the above error, as did using svnlook on the repository itself. The problem is that the Berkeley DB database* underlying the repository has run out of locks. To fix this, there's the short-term fix and the long-term fix. You should do both: you have to do the short-term fix first because until you do nothing else works, but then you should really do the long term fix as well; it'll stop this ever recurring again.

The short term fix

What we have to do is increase the number of lockers in the database. There are two steps to this. First, edit /path/to/your/repos/db/DB_CONFIG. Buried in there there will be some of the following lines:
set_lk_max_locks   2000
set_lk_max_lockers 2000
set_lk_max_objects 2000
set_lg_bsize     262144
set_lg_max      1048576
I'm not sure exactly which to change, so I changed lots of them, as follows:
set_lk_max_locks   3000
set_lk_max_lockers 3000
set_lk_max_objects 3000
set_lg_bsize    2097152
set_lg_max      8388608
However, that alone won't work. Berkeley DB seems to cache the settings. To fix this, you need to remove the cached environment. In /path/to/your/repos/db/ there will be files called __db.001, __db.002, etc. You need to remove these files. I strongly recommend that you move them somewhere, not delete them. Once you've removed them, try re-accessing the repository the way you normally do and it should work. If it didn't work, move the files back before you try anything. Now do the long-term fix, below.

The long-term fix

The real problem here is that Berkeley DB isn't very good. The svn people advise you to not use it now in favour of their own format, fsfs. I'm sure that BDB is a great and powerful program, but it does seem to get lots of locking errors and so forth. So, you should convert your repository to fsfs format. Do this like so:
mv /path/to/repos /path/to/repos.old
svnadmin create -fs-type fsfs /path/to/repos
svnadmin dump /path/to/repos.old | svnadmin load /path/to/repos
That renames your existing repository to repos.old and then creates a new fsfs repository where the old one was. Finally, it transfers all your data from the old one to the new one. You can delete the old one once you've done this, but it wouldn't hurt to keep it lying around in case something goes wrong. Once you've done this, everything should continue working, and you'll never get locking errors again.

The Jokosher IRC bot

Someone said: it would be handy if we had a bot on the #jokosher irc channel which told us about commits. I thought: I bet that's not too hard, and it'll give me an excuse to learn Twisted.
<jokbot> New commit (r574) by laszlop: A better fix for ticket #150. This code is more maintainable and replaces the other fix committed in r566.
<aquarius> jokbot: help
<jokbot> For help on Jokosher, see http://jokosher.org. You can also ask questions here; please be patient for an answer! Commands I understand: ticket - shows a bug in the bugtracker ... download count - shows count of downloads of Jokosher ... help - This message ... revision - shows a revision from SVN
<aquarius> jokbot: download count
<jokbot> src:87 deb:281 rpm:74 srcrpm:7
<aquarius> jokbot: ticket 7
<jokbot> Recording quality settings - http://jokosher.python-hosting.com/ticket/7
The bot's based on the Twisted example ircLogBot, and the basic code is really, really simple. You can make a noddy bot that responds to everything directed at it on the #jokbottest channel with the following 47 lines of Python:
from twisted.protocols import irc
from twisted.internet import reactor, protocol
import time, sys, os

class JokBot(irc.IRCClient):
  '''The Jokosher IRC bot.'''
  nickname = 'jokbot'
  channel = 'jokbottest'

  def connectionMade(self): irc.IRCClient.connectionMade(self)

  def connectionLost(self, reason):
    irc.IRCClient.connectionLost(self, reason)

  def signedOn(self): self.join(self.channel)

  def privmsg(self, user, channel, msg):
    '''This will get called when the bot receives a message.'''
    user = user.split('!', 1)[0]

    # Check to see if they're sending me a private message
    if channel == self.nickname:
      msg = 'I don't take commands by message.'
      self.msg(user, msg)
      return

    # Otherwise check to see if it is a message directed at me
    if msg.startswith(self.nickname + ':'):
      self.msg(channel, '%s said %s' % (user,
                        msg[len(self.nickname + ':'):]))
      return

class JokBotFactory(protocol.ClientFactory):
  protocol = JokBot
  def __init__(self): pass

  def clientConnectionLost(self, connector, reason): connector.connect()

  def clientConnectionFailed(self, connector, reason): reactor.stop()

if __name__ == '__main__':
  f = JokBotFactory()
  reactor.connectTCP('irc.freenode.net', 6667, f)
  reactor.run()
That's all you need for a very simple IRC bot. The jokbot code does a couple of other neat-ish things; it has a plugin structure, so the bot itself stays very simple and you implement all the commands via plugins. README.plugins in the jokbot distribution has all the details, but writing a plugin is really easy. It's also reloadable: you can send it SIGHUP to make it reload plugins without quitting and restarting it, using the Python signal module. Grab the latest release of jokbot, or you can browse the Subversion repository for the very very latest code.

AMD is strongly considering open-sourcing at least a functional subset of ATI’s graphics drivers

AMD is strongly considering open-sourcing at least a functional subset of ATI’s graphics drivers. It’s time for X Window System, OpenGL, and client virtualization for which ATI binary drivers aren’t available to escape the ghetto of the 1980s-era framebuffer. And what a boon for PR. If AMD’s graphics cards were the only ones with open device drivers, it might affect a buying decision or two.
Please let this be real. This would make Linux people recommend ATI over nVidia every day and twice on Sundays, because they'd be perfectly supported, it might encourage nVidia to do the same, and it'd help ATI regain some Linux desktop share (because at the moment people actively recommend that you stay away from ATI). Plus, it might help tame Intel a bit, since Intel integrated graphics is in danger of becoming the best supported chipset under Linux, and AMD (ATI's new owners) probably don't want that. It'd let me run Xgl too, but that's got nothing to do with it.

It wouldn't be you

From the topic on the #usability channel on FreeNode IRC:
Remember there is no model user, and if there were: it wouldn't be you

Dungeon

James builds an entire Wolfenstein-esque interactive dungeon out of CSS borders. Nutter. Nice one.

LugRadio Live and Unleashed 2006

At LugRadio Live 2006, we recorded a live show for the second time (the first being at LugRadio Live 2005). That show is now available for download in both audio and video formats. Go thou and get LugRadio Live and Unleashed 2006. This is the last show of season 3 of LugRadio. We're returning in September, after the summer break (so we all get a holiday). I want to say a big thanks to everyone who turned up to LRL2006 this year and made this live show such fun to record, and an even bigger thanks to all the people out there who listen to LugRadio and keep us going with emails of thanks or criticism or participation on the forums or any one of a dozen other things. Next season will be even better, and it'll be here in a month. Get your earphones on, and enjoy the live show!

Jokosher in Aris-OS Live CD

Apparently, Jokosher 0.1 will be in the Aris-OS Live CD as of today. Nice one controlfr3ak!

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.