hachat (haskell chat server)
============================
hachat is a robust, highly concurrent implementation of a chat server with a simple protocol (see http://www.itasoftware.com/careers/work-at-ita/hiring-puzzles.html or below for details), implemented in Haskell. it uses a combination of software transactional memory and lightweight threads to achieve high performance.
the easiest way to run it is to compile Main.hs (ghc Main.hs), run the binary, and pass in an optional port. ./Main -p 9000
protocol description
====================
all messages should be terminated by <CR><LF> (carriage return + line feed).
client messages
===============
LOGIN <name>
logs you in with the specified name
JOIN #<room name>
joins the room specified
MSG #<room name> <msg>
sends a room message to the room specified
MSG <user name> <msg>
sends a private message to the user specified
PART #<room name>
leaves the room specified
LOGOUT
terminates your session
server responses
================
OK
indicates that what you wanted, happened.
GOTROOMMSG <from user> #<room name> <msg>
got a message from user to the room
GOTUSERMSG <from user> <msg>
got a private message
ERROR <reason>
there was an error
disclaimer
==========
the software is prone to constant change, as it's only been in development for 3 days at this point, and i really like refactoring.
version
=======
i declare this version 0.5. this means it should be relatively stable.