Skip to main content
6 of 16
Added some comments with meta info to make a thumbnail show. Minor edits to body text.

RebolBot - a chat bot for the chat rooms

The all-seeing eye of the RebolBot! Well, maybe it's just a Rebol block.

About

RebolBot is a chat bot written in about 700 lines of Rebol, and currently hangs out in the Rebol and RED room where it answers questions, executes Rebol code (this could be any programming language) in a sandboxed environment for teaching purposes, and does all sorts of other useful things. It has a natural English language dialected interface, and aims to be on call 24/7. It runs under its own account. Source is on GitHub and help is available in the Rebol and RED room.

@Rebolbot help
@GrahamChiu I respond to these commands:
do expression "evaluates Rebol expression in a sandboxed interpreter (/x)"
help "this help (/? and /h)"
keys "returns known keys (/k)"
remove key "removes key (authorized user) (/rm)"
save my details url! "saves your details with url"
save key [string! word!] description [string!] link [url!] "save key with description and link (/s)"
show recent links by username "shows recent links by user in the last 200 msgs"
show links [ like url ] "shows saved links"
show me your youtube videos "shows saved youtube videos"
what is the meaning of life?
what is the time?
who is user "returns user details and page"
whom do you know "returns a list of all known users"
? key [ for user | @user ] "Returns link and description"
version "version of bot (/v)"

If you'd like to use this bot to evaluate code in an arbitrary programming language, you should have access to a remote service that can accept a string to be evaluated. To see what the RebolBot does with the HTML that is returned from the remote service it is currently using, take a look at the evaluate-expression function. In fact the remote service doesn't have to be a service in a formal sense - any of the many REPLs out there could serve as an evaluation target since Rebol makes it very easy to post to and parse results from any site. Make sure you have the OK of the site owner though, before you go and send more traffic his way than s/he's expecting.

If you want to hack on this, feel free to fork the source and submit pull requests for changes you feel are generally useful, as well as for bug fixes.

Keep in mind that this bot is very young (only about a week now) so you can still expect some rough edges to show themselves here and there. Again, you are welcome to drop by the Rebol chat room and discuss the script in general, or have us try to help with customizing it for your needs.

Rebol (and Red)- keepin' it simple!