Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Aug 12th, 2007, 11:49 PM   #1
Mad_guy
Hobbyist Programmer
 
Mad_guy's Avatar
 
Join Date: Oct 2004
Location: Sandstorm, Techno Club
Posts: 239
Rep Power: 4 Mad_guy is on a distinguished road
Send a message via AIM to Mad_guy Send a message via MSN to Mad_guy
Haskell: IRC bot

Over the past couple of days I've been working on an IRC bot in haskell. I believe it to be ready for an 0.1 release, and so here it is:

http://austin.youareinferior.net/infinity-0.1.tar.gz

The interesting thing about this bot is the plugin system. I wanted it to be extendable, and so I decided that I would go the route of plugins. I opt'd for a library that allowed this called hs-plugins, and it's worked out really well. Essentially you can write a plugin in the Plugins/ directory, start the bot, and on startup the bot will compile and load it. Everything such as what arguments and whatnot is sent to the bot is done by the core, and in the core there're several built in commands (quit, list, etc. etc..)

This is still very much a work in progress and I'm hacking away on the 0.2 release which has about 4 goals (2 of which I've already finished):

- Implement the configuration dynamically so it doesn't have to be compiled into core like it is now (finished)
- Move the core commands into their own system plugin (finished; the only exception to this is the quit command which kind of needs to be in the core...)
- Implement a more robust IRC parsing solution as the current one is ad-hoc and I very much dislike the code (Parsec)
- Implement the ability to reload plugins in-situ. This will require some form of inter-thread synchronization such as Software Transactional Memory so the global list of plugins is not tampered with incorrectly; this will also require updating the API for the plugins since they too have access to things like the list of plugins (this will most likely require reworking of the ReaderT monad I use for an environment inside the IRC thread; I will probably move to using StateT.)

Once 0.2 is out I will consider it *much* more usable and stable than 0.1; aside from the above there're also several things I've rectified already. So like I said, this is a work in progress although I do consider 0.1 'usable.'

Note: you will need linux if you wish to compile and run the bot as hs-plugins does not like windows. I've also only tested this on i386 linux so if anybody would like to try it on other platforms and get it to work that'd be awesome.

Happy hacking.
__________________
os: mac os 10.5.4
revision control: git
editor: emacs

site
Mad_guy is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Haskell Arevos Other Programming Languages 25 Jun 3rd, 2007 4:34 PM
Haskell tutorial: writing a blacklist engine using the Writer Monad Mad_guy Show Off Your Open Source Projects 6 Apr 14th, 2007 3:14 PM
Haskell fun: hsh -- a busybox spinoff in haskell Mad_guy Existing Project Development 2 Mar 16th, 2007 4:10 PM
Haskell ideas? Mad_guy Other Programming Languages 3 Feb 5th, 2007 9:16 PM
Anyone with knowledge of Haskell? BungalowBill Other Programming Languages 16 Oct 30th, 2006 12:27 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC