We love hanging out in our main chatroom. It's a very friendly place, where we talk about virtually everything - even TeX, sometimes! I decided to give it a try and add a few "extra features" to our chatroom, and the result is presented in this meta thread.
Psmith is a SO chatroom bot based on Zirak's original code which runs under my credentials and within my browser session. If I'm not in the room or if I didn't deliberately trigger the startup script, the bot won't respond. I'm in charge of the bot's execution.
We first thought of Jeeves, but it's taken. Then our next attempt was with Wooster, but it wasn't catchy enough. I thought of Jarvis, but it's too Stark-based.
:) Then Andrew suggested Psmith, and we all approved.
Our bot recognizes the following commands:
!!/answer question: an experimental command where the bot tries to actually answer your question. The database is still tiny, we are working on it.
!!/basketball: fetches the last news from basketball and displays them nicely.
!!/battle: displays and compares the daily reputations of the titans, egreg and David Carlisle.
!!/choose opt1, opt2, ... , optn: chooses one of the elements from the given comma-separated list.
!!/cricket: fetches the last news from cricket and displays them nicely.
!!/ctan: displays the last entries available in the official CTAN announcement RSS feed.
!!/eightball question: replies the question with a
!!/fencing: fetches the last news from fencing and displays them nicely.
!!/help: displays the general help.
!!/help command: displays the help related to the specific
!!/list: lists all the bot's commands.
!!/reputation userid: displays the reputation of the user whose id is
!!/song: list the song Psmith's master, Paulo, is currently listening to.
!!/texdef arguments: runs Martin Scharrer's amazing
texdeftool on the provided parameters.
!!/translate from lang1 to lang2 text: translates
This bot replies under my name, with the Psmith, the TeX bot prefix. Most of the commands are asynchronous, so the bot might take a while to answer. If too many requests are made, the bot might flood the chat and I get suspended for spam.
:) So, take it easy.
Why am I posting this text?
Are bots specifically allowed or prohibited in Stack Exchange chatrooms?
[...] Finally, a bot will be held against abuse standards just like any other user. If it "behaves" inappropriately, we're not going to like that. This holds both as far as the actual chatting (content/flooding) goes, as well as considering communication with the server (if you poll the server for new messages every 50ms, that's going to get you banned pretty quickly).
That said, we're all programmers here, and this is the kind of "exercise" we like. So we'll probably not come after you with pitchforks.
But just to make it clear: We can, at any time and with or without any reason, say "We don't want that anymore; turn it off now."
I don't leave the bot unsupervised, at least for long periods of time. That said, I'm in the chatroom almost 24h/day, and I monitor the bot's activities and replies. I can shutdown the little rascal if needed, at any time and moment. Every command is triggered at my side of the connection, in my machine, including
texdef running on my TeX distro. In other words, the JS script adds hooks to the messages, intercepts certain patterns and then forwards requests to my local machine for processing. Then, the reply happens as if I were typing that message.
As balpha said in his reply, it's a good exercise.
:) Let's see how it goes. If the SO team thinks this is a terrible idea or if it opens a dangerous precedent, by all means, let me know. I can easily shutdown everything, by simply closing my browser.
By the way, thanks to Aarthi for being so kind in helping me with the procedures to announce the bot.
Thanks a lot.