brainwagon "There is much pleasure in useless knowledge." — Bertrand Russell


A Neighborhood of Infinity: Quine Central

Dan Piponi has a very cool article on nth degree quines on his blog. It's much more understandable than his fascinating but mostly over-my-head postings which I read often, only to be struck by serious feelings of inadequacy.

A Neighborhood of Infinity: Quine Central.


My speech bot, using

Okay, revamped the basic idea, now using the irclib, which in spite of a lack of documentation, actually proved to be pretty easy to use. You should be able to figure out what it does, and modify it to use your own nicks and channel.

#!/usr/bin/env python

import sys
import os
import optparse
import irclib

network = ""
port = 6667
channel = "#somechannel"
nick = "SomeNick"
name = "SomeNick is a bot."

irc = irclib.IRC()
server = irc.server()
server.connect(network, port, nick, ircname = name)

lastspeaker = None

def handlePubMessage(connection, event):
        global lastspeaker
        target =
        speaker = event.source().split('!')[0]
        msg = event.arguments()[0]
        print target, ">", speaker, ":", msg
        p = os.popen("festival --tts", "w")
        if speaker != lastspeaker:
                p.write(speaker + " says ")
        lastspeaker = speaker

irc.add_global_handler('pubmsg', handlePubMessage)

Filed under: My Projects No Comments