--- Log opened Tue Dec 08 00:00:48 2009
12:56 < camio> Anyone know what happened to the happstack.com website?
12:57 < stepcut`> yes
12:57 < stepcut`> it was hosted on the same machine as patch-tag.com, but there were some issues and he had to temporarily running only patch-tag.com
12:58 < camio> Thanks.
12:58 < stepcut`> those issus have been resolved but we are now looking at possibly moving happstack.com to a different server anyway, and switching over to the version of happstack.com that is actually written using happstack :p
12:59 < camio> Are there any mirrors out there? I'm evaluating it for use in an upcoming project.
12:59 < stepcut`> I am actually making the debian package work right now
12:59 < stepcut`> hrm
12:59 < stepcut`> I might have a mirror up in a minute
13:00 < camio> That'd be awesome. Thanks
13:10 < stepcut`> http://src.seereason.com:9021/index.html
13:10 < stepcut`> the Documentation link is not up.. it was just a link to the old happstack 0.2 haddock documentation
13:10 < stepcut`> and the irc logs are not online either
13:12 < camio> stepcut`: Thanks, it linked to a tutorial that's online and FAQ works.
13:16 < camio> It's pretty amazing that "cabal install happstack" worked first time on my windows machine. A good first impression.
13:16 < stepcut`> :p
13:16 < stepcut`> that is one of the reasons why happstack 0.4 is not out... want to make sure cabal install happstack works on all the platforms and continues to work with ghc 6.12 comes out
13:17 < stepcut`> I actually have all the patches now, but I need the sendfile maintainer to apply a patch..
13:19 < camio> Hehe, the HAppS tutorial2 sais to use the first tutorial to get a background while the Happs tutorial1 says don't bother since the API has changed.
13:20 < sm> camio: agreed, great isn't it
13:21 < camio> sm: If only other haskell package maintainers would take such care.
13:21 < sm> well, it's not always easy
13:21 < camio> Yeah, I don't doubt that.
13:21 < sm> eg cabal install vty probably won't work
13:22 < camio> There's a lot of hard tiring work to make something with that kind of quality. I think most would rather move on to their next project than do a 1.0 quality release.
13:24 < sm> sometimes you just can't make it work until other infrastructure catches up
13:25 < sm> how do you install curses libs or sound or wx/gtk/sdl libs reliably on windows ? I don't know
13:26 < camio> sm: The possibility is there. The GLFW library is a good example.
13:26 < camio> It includes the C sources and compiles them as part of the build.
13:31 < camio> Wow. This is really nice. Why would anyone want to use django? (I meant that question seriously.)
13:39 < sm> django has a lot of support for talking to rdbms, building ui's etc. And documentation.
13:39 < burp> django has an awesome admin interface
13:39 < sm> happstack can learn an awful lot from django
13:42 < camio> hrm... I've written a large django application before. I hope happstack turns out suitible because I'm terrible with dynamic typing. I'm simply too dumb to code without bugs in that environment.
14:50 < dsfox> you mean too wise
14:50 < mightybyte> dsfox: heh, I was thinking the same thing
14:51 < dsfox> camio, help us learn from django
15:48 < McManiaC> did anyone here work with the Control.Monad.Error inside the ServerPart monad?
15:48 < McManiaC>     Type synonym `ServerPart' should have 1 argument, but has been given 0
15:48 < McManiaC> lookOrError :: (Error e) => String -> e -> ErrorT e ServerPart String
15:49 < McManiaC> or if I remove the type definition:
15:49 < McManiaC>     No instance for (ServerMonad (ErrorT PostError (ServerPartT IO)))
15:49 < McManiaC>       arising from a use of `lookOrError' at Paste/Post.hs:73:12-42
16:11 < stepcut`> McManiaC: you probably want ServerPartT not ServerPart ?
16:12 < stepcut`> oh, the one inside ServerPartT is specialized
16:13 < stepcut`> you call finishWith or escape or escape' to use it
16:14 < McManiaC> ?
16:15 < stepcut`> It is ambiguous what you are talking about ...
16:15 < stepcut`> The ServerPartT wraps around WebT which is defined as:
16:15 < stepcut`> newtype WebT m a = WebT { unWebT :: ErrorT Response (FilterT (Response) (MaybeT m)) a }
16:15 < stepcut`> so, if you wanted to know how to use that ErrorT, that is one question
16:15 < stepcut`> if you simply want to combine ServerPartT and a different ErrorT, that is a different question
16:16 < McManiaC> hmmm
16:16 < McManiaC> I want to use the ServerPartT inside my ErrorT
16:16 < McManiaC> i think
16:16 < McManiaC> ^^
16:16 < stepcut`> ah ok
16:16 < stepcut`> there are two ways you can approach this
16:17 < stepcut`> one is to do, ServerPartT (ErrorT m), and the other is to do, ErrorT (ServerPartT m)
16:17 < stepcut`> off-hand I can not tell you the implications of choosing one over the other
16:17 < stepcut`> with ErrorT it may matter..
16:18 < McManiaC> the later one wont work
16:18 < stepcut`> oos, there should be an 'e' in there as well
16:18 < McManiaC> I guess
16:18 < McManiaC> hmm
16:18 < stepcut`> ErrorT e (ServerPartT m) won't work?
16:19 < McManiaC> hmmmmmmm
16:19 < McManiaC> ^^
16:20 < McManiaC> this whole monad thing confuses me
16:20 < stepcut`> :)
16:22 < stepcut`> but monads are easy. You got some type like, m :: * -> *, and a function, a -> m a, and a function, m (m a) -> m a. :p
16:22 < McManiaC> i know
16:22 < stepcut`> ;)
16:22 < McManiaC> but all those different monads, and all those extra type definitions that hide their actual type... :S
16:23 < sm> happstack is suitable for people comfortable with layered monads, but really not for other folks
16:23 < sm> imho
16:23 < stepcut`> McManiaC: anyway, I think, ServerPartT (ErrorT e m), is best assuming it works
16:24 < McManiaC>     Expected kind `* -> *', but `ErrorT e m a' has kind `*'
16:24 < McManiaC>     `ServerPartT (ErrorT e m)' is not applied to enough type arguments
16:24 < McManiaC>     Expected kind `?', but `ServerPartT (ErrorT e m)' has kind `* -> *'
16:25 < McManiaC> :S
16:25 < stepcut`> in what context?
16:25 < McManiaC> http://npaste.de/6b/
16:25 < McManiaC> ^^
16:26 < McManiaC> http://npaste.de/6b/hs
16:26 < stepcut`> ServerPartT (ErrorT e m) a
16:26 < stepcut`> or whatever type it is supposed to return
16:28 < McManiaC> hmmmmmm
16:30 < stepcut`> perfect, yes?
16:31 < McManiaC> hmmmmmmmmmmm
16:31 < McManiaC> how would i run this errorT inside a ServerPartT IO monad?
16:31 < stepcut`> 'h' : repeat 'm'
16:32 < stepcut`> one moment
16:32 < McManiaC> :P
16:33 < stepcut`> I mostly know the answer, I just want to make sure it type check ;)
16:34 < McManiaC> ok
16:46 < stepcut`> this is actually documented in the haddock docs, only it is completely broken :-/
16:48 < stepcut`> in generally you would use mapServerPartT
16:48 < stepcut`> with ErrorT it is a bit tricky, because you have to decide what should happen if an uncaught error gets all the way to the top
16:57 < McManiaC> hmm
16:58 < stepcut`> sorry, too many conversations, brb
17:00 < stepcut`> http://npaste.de/6c/hs/
17:18 < McManiaC> hmmmm
17:19 < stepcut`> there are other options.. depends on what you want the behavior to be
17:24 < stepcut`> instead of, flatten :: (Monad m, Show e) => ServerPartT (ErrorT e m) a -> ServerPartT m a
17:25 < stepcut`> you could probably do
17:25 < stepcut`> flatten :: (Monad m, Show e) => ServerPartT (ErrorT e m) a -> ServerPartT m (Either e a)
17:25 < stepcut`> if you modified unpackErrorT correctly
--- Log closed Wed Dec 09 00:00:45 2009