06:57:52 <siracusa> Oh, stepkut was faster than me in releasing an IRC bot library ... 14:29:41 <stepkut> siracusa: I wasn't even that fast.. took years! 14:42:34 <siracusa> stepkut: Nice. Does it keep track of users in all channels the bot is in? 14:47:36 <stepkut> siracusa: no. but it could! 14:47:47 <stepkut> currently it does three things 14:47:52 <stepkut> 1. replies to server pings 14:47:56 <stepkut> 2. logs the channel 14:48:00 <stepkut> 3. rolls dice 14:48:11 <stepkut> dice: 2d18+3 14:48:17 <stepkut> synthea: dice 2d18+3 14:49:06 <stepkut> maybe that should end with, [9,4] + 3 => 16 14:50:07 <siracusa> To be honest the most interesting thing for me is the auto-reconnection. It gave me headaches to get this work and it still seems to be buggy in my version :-S 14:50:55 <stepkut> yeah. Mine might be as well. Though it is pretty good 14:51:29 <stepkut> The first step was to actually finish forking out the irc code 14:51:34 <stepkut> the next step will be to migrate to fastirc 14:51:40 <stepkut> and then i will see if the problem still exists 14:51:45 <stepkut> if it does I might switch to STM 14:52:54 <stepkut> It is possible that my reconnect code is fine, but that sometimes when it reconnects, the nick has not been released by the server yet, and that is why it gets stuck 14:55:29 <siracusa> What I do is to temporarily use another nick and then ghost the old nick. What is still to be implemented is to switch back to the old nick when the nickserv message that ghosting was successful arrives. 14:55:40 <stepkut> right 14:55:49 <stepkut> I just have not added that yet 14:56:01 <stepkut> or even nick registration :) 14:56:39 <siracusa> You mean identify to nickserv? 14:56:46 <stepkut> yeah 14:56:56 <stepkut> it's not hard, I just haven'd done it 14:57:27 <stepkut> at one point in time, it was tricky. But it should be easy now. 14:57:39 <stepkut> could just be a normal bot part 15:02:39 <Entroacceptor> you don't have to query nickserv, you can do it on connection 15:02:43 <Entroacceptor> which is the better way 15:02:49 <Entroacceptor> aaand SSL support! 15:03:05 <stepkut> :) 15:03:26 <stepkut> Entroacceptor: what do you mean by, "do it on connection"? 15:08:09 <Entroacceptor> the "identify to nickserv" 15:08:14 <Entroacceptor> doesn't have to happen in a query 15:08:29 <Entroacceptor> but there's a PASS option in IRC that you can use 15:09:08 <stepkut> I thought I tried that, but it didn't work 15:09:21 <siracusa> Isn't that just a password for the server? 15:17:37 <Entroacceptor> our rivertam uses it 15:20:27 <Entroacceptor> !source 15:20:27 <river-tam> git clone git://git.mercenariesguild.net/rivertam.git 15:20:51 <Entroacceptor> !love stepkut 15:20:52 <river-tam> ACTION ignores the restraining order and huggles stepkut regardless 15:22:31 <stepkut> :) 15:22:39 <siracusa> !help 15:22:40 <river-tam> Use !commands or !aliases for a list of available functions. 15:22:49 <Entroacceptor> a friend wrote it 15:22:51 <siracusa> !commands 15:22:52 <river-tam> core: commands, help, modulerestart, updateconfig utils: about, echo, pingall, source, uptime tremulous: cvarfilter, find, listplayers, onlineclans, poll, tremstats quotes: flame, flameadd, love, loveadd clan: clanadd, clandel, claninfo, clanlist, clanupdate clanwar: cw-addgame, cw-addround, cw-comment, cw-delgame, cw-detailed, cw-game, cw-lastgame, cw-listgames, cw-opponents, cw-summary memos: memo alias: alias, aliases, unalias tremrelay: trem 15:22:59 <Entroacceptor> http://git.mercenariesguild.net/?p=rivertam.git <- web 15:23:23 <Entroacceptor> it's probably horrible haskell, but it works well 15:23:38 <Entroacceptor> and sends the password to the server, not to nickserv 15:32:54 <siracusa> Entroacceptor: But it doesn't seem to be identified right now 15:33:07 <Entroacceptor> it is 15:33:13 <Entroacceptor> see the ~ with the name 15:33:26 <Entroacceptor> that's freenode-speak for "identified" 15:33:39 <Entroacceptor> and I get messages like "17:06 [freenode] -NickServ(NickServ@services.)- email@example.com has just authenticated as you (Mad_Marty) 15:52:45 <kowey> hello happstackers! could I get a quick translation of this program into happstack? https://gist.github.com/1278458 15:53:17 <kowey> I started with Warp, and by the time I got to happstack, got to degraded RTFM skills 15:55:12 <kowey> (also, happstack-wai seems to need a little refreshing) 16:26:14 <stepcut> happstack-wai is really just proof of concept 16:26:19 <stepcut> the real port will start fresh 16:28:02 <siracusa> Oh nooooes, ircbot needs the unix package 16:33:01 <stepcut> what does EB.consume do? Get the request body? 16:34:46 <stepcut> siracusa: it only needs it for the PosixLogger module.. that is the other thing to fix 16:34:58 <stepcut> siracusa: you can comment out PosixLogger if you don't need channel logging 16:35:34 <stepcut> well. if you need windows support, then you have to comment it out even if you do need channel logging.. you just have to supply your own logging function 16:37:18 <siracusa> Hhm, not the only problem "Could not find module `Text.Parsec.Error'" 16:37:27 <siracusa> Does it need Parsec 3? 16:37:31 <stepcut> probably 16:37:52 <stepcut> though maybe changing the imports to be Parsec 2 compatible would be enough 16:37:57 <stepcut> I don't remember 16:38:07 <kowey> stepcut: I'm using it to get the request body 16:38:59 <kowey> stepcut: it's one of these enumerator/iteratee library helper functions (unfortunately I haven't yet learned much more about iteratee beyond what I needed to do that "consume") 16:39:07 <stepcut> :) 16:42:44 <stepcut> kowey: here is one version, http://hpaste.org/52466 16:43:22 <kowey> thanks! this will be helpful for my attempts to debug my wai/warp application that works fine on Mac but not on Windows 16:47:23 <stepcut> I added another version that is more ByteStringy, http://hpaste.org/52466 16:48:56 <kowey> hmm, getting the request body in Happstack doesn't seem so hard after all 16:49:03 <stepcut> nope 16:49:15 <kowey> I was discouraged by the talk about body policies and what not in the crash course 16:50:12 <stepcut> ah 16:50:35 <stepcut> that only applies to decoding multiple/form-data 16:52:09 <stepcut> you just want the raw request body 16:52:33 <stepcut> the only tricky thing there is making sure that you only try to get the request body once 16:53:18 <stepcut> for example, you don't really want to get the RAW request body, and try to decode it as multipart/form-data.. because that would force the entire request body into RAM.. which could be huge 16:54:45 <stepcut> that is why takeRequestBody returns a 'Maybe RqBody', and why getting it requires IO. When you take the request body, you have the only reference to it. So if you process the request body in a lazy manner, then it can be garbage collected as you go 16:57:40 <stepcut> basically, takeRequestBody is like hGetContents. Except instead of getting a lazy String from a Handle, it gets it from a Request 17:05:22 <stepcut> by switching to Arrows instead of Monads for decoding multipart data, it might be possible to do away with that body policy stuff and actually end up with something that is simpler and more powerful 20:59:16 <kowey> I don't suppose anybody would have an idea why the happstack version of this "hello world" seems to work on Windows, but not the Warp one? https://gist.github.com/1278337 20:59:50 <kowey> don't happstack and warp both just wrap the network library? 21:06:48 <stepcut> dunno.. I do test happstack on windows to make sure it works though :) 21:07:31 <kowey> I'll probably have to rewrite my wai app in happstack (now that I know fetching the body is easy!) 21:07:59 <kowey> would be interesting to see if everybody does converge on wai and we really can just easily swap out one framework for another 21:08:21 <kowey> (or if that's actually a bit of a pipe dream) 21:26:33 <stepcut> I think converging on WAI would be more about swapping out backends 21:27:03 <stepcut> or, having one really good backend that everyone contributes too, instead of doing everything 3 or more times 21:27:59 <kowey> I guess the user-visible part (for me right now) is just the bit about not learning multiple frameworks :-) 21:28:24 <stepcut> not sure how that would work 21:29:09 <stepcut> wai is basically, two types and a function. Request, Response, and, run :: (Request -> IO Response) -> IO () 21:29:35 <stepcut> frameworks are all about make it easy for the user to write the thing that ultimately because the the argument to run 21:30:27 <stepcut> having the same Request / Response types (and functions that work directly on those types) would be common among the frameworks 21:30:43 <stepcut> but generally, you are working indirectly with those types.. 21:31:00 <stepcut> you don't directly set the response code in the Response type. Instead you call some function that does it for you 21:31:11 <stepcut> like in happstack you do: ok $ toResponse "foo" 21:31:43 <stepcut> 'ok' sets the respone code, and toResponse adds a content-type header, creates the response body, sets flags regarding chunking, etc 21:32:08 <stepcut> but as a user you don't see that 21:35:50 <kowey> time for bed, thanks again for the help!