Just what the world needs: another IRC bot
Racket Scheme Other
Latest commit 89caad2 Nov 20, 2016 @offby1 Sleep longer when retrying to connect
Can't remember why I made this change :-|
Permalink
Failed to load latest commit information.
bugs Can't repro Feb 23, 2014
.gitignore Ignore writeahead-log stuff Aug 23, 2015
.mailmap Add a few entries to .mailmap Feb 24, 2014
AUTHORS Add some entries to AUTHORS Apr 17, 2013
GNUmakefile
README.censor-nasty-words
README.irc-servers *** empty log message *** Jan 13, 2010
README.md Tweak "how to test it" notes Sep 8, 2016
README.xlate.language-codes Cheat sheet Feb 6, 2014
TODO.md Rewrite TODO as markdown Jun 22, 2016
analyze-quotes.rkt Move most tests into test submodules Mar 4, 2013
clearenv.rkt Comment about (get-ffi-obj 'environ #f _pointer) Sep 28, 2013
cutover.txt Deployment notes Aug 23, 2015
el-buggo Note another bug Jan 23, 2012
elis-log-parsing-ideas.rkt Nix run-tests.rkt; instead, we'll use "raco test ." Mar 4, 2013
eval-trouble Transcript demonstrating annoying new behavior Mar 2, 2011
freenode-main.rkt Use "module+ main" ... Aug 23, 2015
get-big-log.sh compress! Geez, it's a lot faster this way. Mar 16, 2012
git-version.rkt "#lang scheme" => "#lang racket", since racket 5.1.1 on my EC2 was Jun 3, 2011
http.rkt Revert "Revert "Switch to my eensy.teensy.info url-shortener"" Feb 28, 2016
info.rkt Add appropriate pkg deps. Oct 21, 2015
irc-process-line.rkt Increase the long-URL threshold Nov 19, 2016
iserver.rkt find-witticism: avoid returning last row Jun 25, 2016
lexer.rkt Move most tests into test submodules Mar 4, 2013
line-structure Log sexps instead of strings. Jun 1, 2011
lobster-skeleton.sql Handy example query Dec 21, 2013
loop.rkt Sleep longer when retrying to connect Nov 19, 2016
memory-notes.org Why we pagin' so much?! Jul 30, 2010
quotes A new quote Oct 17, 2016
quotes.rkt Use "module+ main" ... Aug 23, 2015
re.rkt Move most tests into test submodules Mar 4, 2013
reloadable.rkt reload-module: spew stack trace when the exception is handled Apr 1, 2012
rudybot.conf Mosty copy what's actually running ... Aug 24, 2015
sandboxes.rkt Move most tests into test submodules Mar 4, 2013
search.rkt Add a "main" submodule ... Aug 14, 2016
servers.rkt Gack even less. Jul 13, 2016
sighting-test.rkt Move most tests into test submodules Mar 4, 2013
sketch.rkt "#lang scheme" => "#lang racket", since racket 5.1.1 on my EC2 was Jun 3, 2011
sounds Goofy cartoon sound-effects. Feb 6, 2014
spelled-out-time.rkt Whitespace tweaks Feb 22, 2015
tinyurl.rkt Revert "Revert "Switch to my eensy.teensy.info url-shortener"" Feb 28, 2016
update-sightings.rkt
userinfo.rkt
utils.rkt Only catch exn:fail? Mar 17, 2012
utterance.rkt Trying to add a new table that maps words to log entries, but it's Mar 16, 2012
vars.rkt Add ##cinema to *initial-channels* Sep 10, 2016
xlate.rkt xlate: specify source language as well as target language. Dec 23, 2013
zdate.rkt Delete broken test revealed by previous commit May 11, 2015

README.md

If you're just trying the bot out, start it via racket freenode-main.rkt. If you want it to run continuously, and happen to have upstart available (which in practice means you're running Ubuntu), you can copy rudybot.conf to /etc/init and then # start rudybot.

Getting an error about rackunit not being available? That can be caused by using the racket-textual package instead of racket.

Run the unit tests like this:

$ raco test -x .

Run the integration tests by somehow creating corpus.db (alas I can't think of the steps at the moment), then

$ racket servers.rkt

Some specs:

Backups

I just started backing up the "big-log", which holds a more-or-less raw transcript of all communication between the bot and the IRC server. (The file "corpus.db" is a sqlite db holding essentially the same data; it can probably be recreated from the log via some simple hacking.)

I do the backups with an hourly cron job that runs this command:

aws s3 cp --quiet /mnt2/rudybot/big-log s3://rudybot-data-backups --region us-west-1

That's insanely inefficient, since it copies the same file over and over (the file doesn't grow all that much in an hour), but perhaps it's cheap enough. We'll see.