[Haskell-cafe] Infinity v0.1

Austin Seipp mad.one at gmail.com
Sun Aug 12 00:13:38 EDT 2007


Over the past couple of days I've been working on an IRC bot in the
essence of lambdabot; that is, it should be extendable through plugins
and plugins should be easy to write, modify and contribute. I also
wanted the bot to be small in terms of LOC (as of 0.1, about ~360
including the two bundled plugins,) but still be usable.

Well, now I have something to show for it, and I introduce infinity v0.1:

(there is no darcs repo yet, although I have emailed someone about a
possible account for darcs.haskell.org.)

Everything from building to writing plugins should become fairly self
evident from reading the README. You will need the hs-plugins to use
it. As it stands, the bot is incredibly primitive and there are almost
no plugins (I only wrote 'hello world' and 'goodbye world' plugins to
test the code as it moved forward) as of yet, however, I had fun with
this thing and I hope maybe someone could do something interesting
with it.

There're some parts of the code that I'm not particularly happy with.
For the 0.2 release I have a couple of goals in mind:

1. To move the basic ad-hoc IRC parsing code (lots of drop and
dropWhile and whatnot) to a more robust implementation such as parsec.
This should hopefully clean up some of the code I'm not on good terms
2. To add support for in-situ reloading and re-compilation of modules,
so you won't even have to restart the bot if you update a plugin. This
will probably require some reworking of my threading code so that the
environment stays safe and stable (STM?)
3. To move all of the built-in core commands to plugins as well; this
will probably require encapsulating plugins in a monad (StateT)

I'm not exactly the most advanced haskell programmer ever born, but I
enjoyed working on this code and while it isn't and probably won't
ever be the next lambdabot, I hope someone can learn something from it
or just have fun with it. If anybody would like to take the time to
write a plugin or something for some interesting purpose, I would be
happy to include it in the source tree (I'm sure you guys can come up
with something more interesting than I can.)

I would really appreciate any and all comments on the code. I still
feel myself to be in an 'intermediate' area with Haskell, so anything
you guys can add that would improve the code would be incredibly

PS: I've only tested this on an i386 linux box so if anybody here can
confirm it works on other systems (bsd, solaris?) where hs-plugins is
available, that would be awesome.

- Austin

More information about the Haskell-Cafe mailing list