Experimental IRC log happs-2007-08-04

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

11:26:26<tuukkah>how would you guys go around the limitation that ModResp/hOut don't get the original request?
11:29:35<Saizan>patch SimpleHTTP2 adding another constructor for ServerPart?
11:32:43<tuukkah>hmm, what about having a temporary part in the state that stores the request while it's being handled
11:39:33<tuukkah>[Handle (\req -> modify (\s -> s { currentReq = Just req}) >> request req), ModResp (get >>= \s -> put (s {currentReq = Nothing}) >> return (\res -> print (currentReq s, res))]
11:41:19<Saizan>well you don't even need to put Nothing, it will be overwritten by the next request
11:41:33<Saizan>and it can be read from multiple ModResp
11:42:00<tuukkah>well i'm afraid of the request getting written on disk
11:42:49<tuukkah>oh, but we're already providing the request in this implicit variable ?req, might as well use that %-)
11:43:15<Saizan>:D
11:44:36<tuukkah>but perhaps that's not clean enough to be considered a general solution
11:46:15<tuukkah>it would be nice if i made a standalone accessLogFilter, like debugFilter is atm
11:46:37<Saizan>uhm, but which request the ModResp should see? every Handle can possibily alter it
11:50:49<tuukkah>yeah, i don't remember how exactly this works
11:51:51<tuukkah>does (request req) mean we start from the beginning of the list of handlers again, or does it continue from the current point on?
11:52:02<Saizan>current point on
11:52:51<Saizan>it would loop in the first case
11:53:13<Saizan>runServerParts :: (Monad m, Monad m') => [ServerPart m request m' response] -> request -> m (Either request (m' response))
11:53:16<Saizan>runServerParts (Handle h : ss) req = either (runServerParts ss) respond =<< h req
11:53:19<Saizan>runServerParts (ModResp h : ss) req = either request (\r -> h >>= \h' -> respond (h' =<< r)) =<< runServerParts ss req
11:53:22<Saizan>runServerParts (Multi pp : ss) req = runServerParts (pp ++ ss) req
11:53:25<Saizan>runServerParts [] req = request req
11:53:28<Saizan>request is just return . Left
11:55:15<tuukkah>so what a filter like debugFilter does is it shows the request at that point in the list when going down the list, and the response when going back up the list
11:58:36<tuukkah>if you put the filter on top, you probably get what an Apache access.log does
12:01:48<tuukkah>i have "RewriteRule ^(.*)\.ttl$ $1.turtle" and it shows the .ttl in access.log
13:18:18<Saizan>debugFilter doesn't print the request
13:18:37<Saizan>only the response
13:20:07<Saizan>it's a logM call in one of the internal modules that prints the request
13:21:00<Saizan>or you could use an Handle with addSideEffect
13:39:15<tuukkah>oh the version of debugFilter that did print the request is commented out now
16:32:01<Saizan>yeah, because it doesn't typecheck :)
16:41:26<tuukkah>small details, it's still in the tutorial

Back to channel and daily index: content-negotiated html turtle