2008-07-28

My entry for the Rubygame Weekend Contest #2: a roguelike in Scheme

Joining the contest was a lot of fun, and I highly recommend these weekend events to anyone who wants to learn how to write games. With the trick of a short time span to motivate yourself and lots of experienced guys on IRC focused in much the same tasks as you, this was more educative than months of reading tutorials.

The theme was “opposites”, and I’m interested in simulations, so my game idea was of an alien world with two complementary species. When pranjos die they create plants that are the source of food for bluos, and vice-versa. But these animals are not very adept at surviving, and their populations are threatened: oranjos are lazy and don’t explore much, so they starve to death without finding food; and bluos are timid and breed too seldom. As a space biologist, it’s your task to throw oranjos and bluos around to increase their numbers.

At least that was the idea.

[feed readers: continue to postmortem and screenshots…] (more…)

2008-07-16

Python irclib’s privmsg isn’t actually privmsg

I guess irclib is kinda green, but anyway. I was writing a bot and was very confused with its AddPrivMsgRoute and AddPubMsgRoute methods. I’m noob to IRC, so I had to browse the RFC to be sure: in IRC, “privmsg” is the command to send messages to users and channels. And in IRC, there’s no “pubmsg”. In irclib, a “privmsg” is a message destined to you (the bot user), and a “pubmsg” is a message destined to the channel in which you’re on. So, irc.privmsg = { irclib.privmsg, irclib.pubmsg }. The distinction irclib wants to make is useful, but the choice of terminology confused the hell out of me :D

While I’m at it: to respect the RFC, make sure your bots send messages with client.connection.notice and not client.connection.privmsg like many do. /notice is the same as /privmsg (aka /msg in most clients), only automated citizens ignore it. That prevents infinite loops, like the one I often trap myself with when talking to bitlbee’s root user:

   <leoboiko> root: yes
   <root> Did I ask you something?
   <leoboiko> root: yes
   <root> Did I ask you something?
   <leoboiko> root: yes
   <root> Did I ask you something?
   <leoboiko> root: yes
   <root> Did I ask you something?
   <leoboiko> root: yes
   <root> Did I ask you something?
   […]

2008-07-04

Open source code in Google

The notice I received today is just too awesome to not blog. A couple years ago I worked for a certain multinational company who paid lip service to free software; but when I said I wanted to release my library, they kept telling me to wait longer and longer, only to say “no” at the end (some ten months later…). Compared to that, I just couldn’t avoid smiling when I read this:

Date: Fri, 4 Jul 2008 12:48:26 -0400
From: “Daniel Berlin”
Subject: Open sourcing code owned by Google

This is just a friendly reminder that we have a process in place for releasing Google owned code as open source. This process is detailed at http://[blah].

I’ve seen people (presumably from higher overhead companies) who seem to think they need more permission than our process says they do. You don’t.

The process is very simple (i.e. usually involves sending a few emails), and the time between being us being emailed and you being able to release the code averages < 24 hours (worst case is about a week if you are doing something insane).

Attempts to make this process more complex will be met with violent resistance.
Attempts to make this process easier will be welcomed with milk and cookies.

Thanks for your cooperation,
Dan