02:40:38 <stepkut> http://happstack.blogspot.com/2010/10/recompile-your-haskell-based-templates.html
06:15:47 <McManiaC> stepkut: cool!
12:13:52 <McManiaC> my npaste.de is leaking memory badly :(
12:14:08 <McManiaC> went from 18mb ram to over 800 in a few days again
15:27:52 <stepcut> McManiaC: :(
15:28:05 <stepcut> McManiaC: are you using 0.5 or darcs head ?
16:06:54 <stepcut> McManiaC: are you using happstack-state ? or just happstack-server?
17:31:47 <McManiaC> stepcut: both
17:32:07 <stepkut> k
17:32:16 <stepkut> does the usage drop if you restart the server ?
17:32:31 <McManiaC>  8169 nils      20   0  485M  475M 10548 S  0.0  7.5 33:30.50 ./npaste +RTS -c
17:32:49 <McManiaC> in 5 hours :<
17:33:20 <stepkut> if you restart it, it goes back down, but then it keeps growing ?
17:33:33 <McManiaC> yep
17:33:37 <McManiaC> down to 18mb
17:33:42 <stepkut> hmm
17:33:53 <McManiaC> I'm not using latest darcs tho
17:34:30 <McManiaC> have a few things which only work with the stable version and I'm too lazy to port it ^^
17:34:51 <stepkut> there are some fixes for space leaks in happstack-server from darcs. But it's not clear if that is your problem or not
17:35:00 <stepkut> what sort of things only work with the stable version ?
17:35:41 <McManiaC> not exactly stable version but my own patched one which you rejected ;)
17:35:51 <stepkut> heh
17:35:59 <stepkut> which part was rejected?
17:36:10 <McManiaC> the body/query part of rqdata
17:36:28 <stepkut> ah.. I didn't reject it.. I improved it ;)
17:36:32 <McManiaC> yeh :)
17:37:16 <stepkut> getDataBodyFn = getDataFn . body
17:37:20 <stepkut> or something like that ;)
17:37:32 <McManiaC> yeh
17:37:42 <McManiaC> as I said, too lazy so far
17:37:43 <McManiaC> xD
17:38:15 <stepkut> any ideas what might be causing the leak? the choices are 1. something in happstack-server 2. something in happstack-state 3. something in your code
17:38:27 <McManiaC> and I'm currently mainly on windows, so I dont know if everything will built here
17:38:30 <McManiaC> but I'll try :)
17:38:40 <McManiaC> stepcut: no Idea
17:38:55 <stepkut> windows is an officially supported platform, so if it doesn't build, i'll fix it :)
17:39:16 <stepkut> not much has changed between 0.5 and head that would affect windows support
17:39:36 <McManiaC> stepkut: it's not only happstack which scares me ;)
17:39:53 <stepkut> is the memory leak related to actually usage, or does it leak even if no requests are being served?
17:40:20 <stepkut> do GET requests cause leaked, or only POSTs
17:44:05 <McManiaC> hm
17:44:10 <McManiaC> good question
17:44:16 <McManiaC> I guess mainly GET
17:44:58 <McManiaC> there has been only a couple of POST requests since 14 o clock
17:45:28 <stepkut> this was working fine, and now it is not ?
17:45:48 <McManiaC> it always leaked a bit, but never that much
17:46:18 <McManiaC> and not that quick
17:46:34 <Entroacceptor> well, let's stress test it :)
17:47:09 <McManiaC> :P
17:50:01 <McManiaC> http://npaste.de/nU/ stepkut, do I need anything fancy?
18:01:30 <stepkut> your coding style is out of date. You shouldn't explicitly need WebT. But you can still import it from, Happstack.Server.Internal.Monads
18:02:16 <McManiaC> I'm trying to build darcs :)
18:02:33 <stepkut> oh. hmm.
18:02:44 <McManiaC> did a rm ~/ghc ~/cabal and now it seems (lets hope hehe) to build
18:02:46 <stepkut> i see now
18:02:58 <McManiaC> nope
18:03:00 <McManiaC> same error
18:03:03 <McManiaC> hm ^^
18:03:35 <stepkut> hold on, this could be an upstream error :)
18:03:51 <McManiaC> ok
18:04:46 <stepkut> I pushed a patch recently that stopped re-exporting Happstack.Server.Internal.Monads but it seems I did not rebuild the entire tree
18:05:48 <stepkut> McManiaC: pushed a patch, try now.
18:06:08 <stepkut> I usually rebuild everything before pushing a patch, but I guess I forgot to that time
18:07:03 <McManiaC> "Done" :)
18:07:28 <stepkut> sweet
18:08:31 <stepkut> I have done some stress testing using, httperf. Not sure what your plan is .. httperf may not be so easy to install on Windows
18:17:05 <McManiaC>     build-depends:
18:17:05 <McManiaC>         base == 4.*,
18:17:06 <McManiaC>         unix == 2.*,
18:17:12 <McManiaC> guess this won't build that easily
18:17:12 <McManiaC> :)
18:17:29 <stepkut> where does those come from ?
18:17:37 <McManiaC> npaste.de cabal file
18:17:46 <stepkut> um..
18:17:54 <stepkut> what are you using unix for ?
18:17:55 <Entroacceptor> there's something missing....
18:18:02 <McManiaC> I have no idea
18:18:09 <stepkut> what happens if you remove it ?
18:18:19 <McManiaC> I'm trying
18:18:20 <McManiaC> :)
18:26:13 <McManiaC> stepkut: did you remove the BodyPolicy stuff again?
18:26:31 <stepkut> McManiaC: no it is just different now.
18:26:42 <stepkut> McManiaC: getDataFn, etc do not take an extra argument anymore
18:26:59 <stepkut> McManiaC: instead you call, decodeBody (BodyPolicy ...) explicitly
18:27:21 <stepkut> you can just do it once at the top of you app now
18:27:32 <stepkut> unless you want different policies for different server parts
18:27:59 <stepkut> http://www.happstack.com/docs/crashcourse/RqData.html#rqdatapost
18:34:56 <McManiaC> what if I dont define that?
18:35:00 <McManiaC> will it still work?
18:35:12 <stepkut> you mean, if you don't call it ?
18:35:20 <McManiaC> yeh, does it use the default policy?
18:35:30 <stepkut> no, it will not decode the body at all.
18:35:41 <stepkut> so any attempt to read values from the body will result in an error.
18:35:42 <McManiaC> oh
18:36:16 <stepkut> it's an unfortunately side effect of using monads. The RqData arrow doesn't have that problem
18:36:20 <stepkut> :)
18:37:03 <stepkut> well, it would be possible to have some default policy that was applied if nothing was specified -- but I am not sure what that policy should be..
18:37:10 <stepkut> seems better to require people to specify their own
18:37:26 <stepkut> seems less mysterious in the end..
18:38:05 <stepkut> it is a runtime error -- which is annoying. But one that is really hard to miss, and which tells you what you need to do to fix it
18:38:05 <Entroacceptor> I agree with that
18:38:58 <Entroacceptor> mh, hearing that arrows are better, should I just skip understanding monads and go straight to arrows?
18:40:03 <stepkut> Entroacceptor: no..
18:40:24 <Entroacceptor> awww
18:40:28 <McManiaC> arrows are... different
18:40:31 <McManiaC> monads are essential
18:41:36 <stepkut> arrows generalize monads :p
18:41:55 <McManiaC> syntax is kind of weird sometimes tho
18:42:02 <stepkut> http://lambda-the-ultimate.org/node/2799
18:42:20 <Entroacceptor> I can't get burritos out of my head..
18:42:39 <stepkut> in theory, maybe it would be best to learn arrows first, and then monads and applicative functors. But the current Haskell eco-system does not support that way of doing things
18:43:16 <McManiaC> theres been a long discussion on the mailing list not so long ago, why HXT needs to use arrows and whether or not arrows/monads are inferior to each other
18:43:31 <McManiaC> etc
18:43:35 <stepkut> yeah, I am going to read that in more detail when it is done
18:44:14 <stepkut> when I tried to build something using arrows, I usually find that I only use the monadic features of arrows, and so there is no real point to not just using monads
18:45:28 <stepkut> but, my arrow foo is also lacking because I seldom use them in practice
18:45:41 <stepkut> aside from, 'first', 'second' and friends :)
18:46:01 <Entroacceptor> thank you
18:46:11 <Entroacceptor> so arrows are like my basic chili recipe
18:48:47 <stepkut> heh
18:57:22 <McManiaC> well, I did a job with HXT for about 2 months
18:58:58 <McManiaC> and there have been a lot of moments where I had to work my way around the arrow structure
18:59:21 <McManiaC> its great theory, but in day to day use I'd try to avoid it
18:59:37 <McManiaC> just as you dont use quantum mechanics to build a car :)
19:00:57 <McManiaC> s/structure/notation
19:01:13 <McManiaC> I guess if you had to do everything by hand in monads they'd be a pain aswell :)
19:02:57 <stepkut> yeah.. I always felt the use of arrows in HXT was problematic considering the average haskell users famililarity with them.
19:03:36 <stepkut> if I can do what I need using monads and HaXml, then it is hard to justify thrusting arrows on other people that might have to modify my code..
19:04:01 <stepkut> fortunately, the RqData arrow is simple to use and optional :)
19:07:00 <McManiaC> meh I cant build curl
19:07:16 <McManiaC> configure: error: curl libraries not found, so curl package cannot be built
19:07:22 <McManiaC> libcurl.dll is in my path tho :(
19:09:42 <stepkut> what do you need curl for
19:09:47 <Entroacceptor> oh, I'd love to build cars using quantum mechanics
19:10:41 <McManiaC> Entroacceptor: no you dont
19:10:42 <McManiaC> :D
19:11:02 <Entroacceptor> oh yes I do
19:11:21 <Entroacceptor> mmhm
19:11:56 <McManiaC> why? :>
19:11:57 <Entroacceptor> c+ 0 = | car >
19:12:03 <Entroacceptor> even the maths is easy =)
19:12:49 <McManiaC> c+ 0 ?
19:12:52 <Entroacceptor> well
19:13:25 <Entroacceptor> the creation operator
19:13:40 <Entroacceptor> but it's not for a harmonic oscilator, therefore I can't take the normal a
19:15:35 <McManiaC> lol
19:16:27 <McManiaC> I'm studying QM right now, but I dont understand you
19:16:27 <McManiaC> xD
19:17:00 <McManiaC> stepkut: do you still have Happstack.Util.Mail ?
19:17:40 <Entroacceptor> McManiaC: we learned that stuff in the last month of our first "true" QM lecture
19:17:47 <stepkut> McManiaC: yes and no. It is now part of SMTPClient itself
19:17:54 <stepkut> McManiaC: so we do not have to depend on SMTPClient anymore
19:18:08 <stepkut> http://hackage.haskell.org/packages/archive/SMTPClient/1.0.3/doc/html/Network-SMTP-Simple.html
19:18:16 <stepkut> nice, eh ?
19:18:25 <McManiaC> stepkut: so I can just do "import Network.SMTP.Client" ?
19:18:28 <McManiaC> or simple
19:18:29 <Entroacceptor> oh, there was some happstack.util.stringtemplate stuff on my disk
19:18:42 <Entroacceptor> was that from an old install, or is that still usable, somehow?
19:19:03 <stepkut> Entroacceptor: is that related to HStringTemplate ?
19:19:42 <Entroacceptor> stepkut: you're the maintainer, you tell me :)
19:19:46 <McManiaC> Entroacceptor: "true"? :D
19:20:16 <stepkut> Entroacceptor: if you don't know what happstack.util.stringtemplate does, then I wouldn't worry about whether it is still supported :p
19:20:25 <Entroacceptor> McManiaC: well, it was the first dedicated theoretical physics lecture about only QM
19:21:12 <McManiaC> Entroacceptor: physics student?
19:21:43 <stepkut> Entroacceptor: I have never heard of that module. We do still have Happstack.Server.HStringTemplate, but I do not know if it is at all related
19:22:02 <Entroacceptor> McManiaC: yeah, kind of
19:22:07 <Entroacceptor> stepkut: then I meant that, maybe
19:22:18 <McManiaC> Entroacceptor: what is kind of supposed to mean? :D
19:22:56 <Entroacceptor> I'm not studying, as such...
19:23:11 <Entroacceptor> but basically, yes :)
19:23:27 <McManiaC> hu? being in university just for fun? :D
19:24:17 <Entroacceptor> :)
19:27:58 <McManiaC> do you already have a degree?
19:28:31 <Entroacceptor> no
19:29:17 <McManiaC> hm
19:29:18 <McManiaC> ^^
19:52:03 <McManiaC> stepkut: whats this? http://npaste.de/nW/
19:52:52 <McManiaC> http://npaste.de/nX/ <- part of the code
19:57:16 <McManiaC> lol nevermind
21:12:01 <McManiaC> ah gee
21:12:06 <McManiaC> npaste.de is fucked up
21:12:08 <McManiaC> :>
21:25:32 <McManiaC>  28 files changed, 214 insertions(+), 195 deletions(-)
21:25:36 <McManiaC> just to get it compiled again
21:25:48 <McManiaC> and now all I get is a "Happstack 0.5.1 - Your file is not found"
22:11:39 <stepcut> :-/
22:11:56 <stepcut> did you add the decodeBody stuff ?
22:12:12 <stepcut> well, you should get a different error if you didn't
22:12:44 <stepcut> hmm, I wonder where that error comes from.. do you use fileServe ?
22:19:04 <McManiaC> I'm pretty sure I forgot it somewhere
22:19:06 <McManiaC> :S
22:19:18 <McManiaC> and yes, I'm using fileServer
22:19:19 <McManiaC> *serve
22:45:05 <stepkut> McManiaC: i think that is where that error is coming from
22:45:30 <stepkut> the normal 404 is some sort of haiku or something, that 404 is from fileServe
22:45:34 <stepkut> (probably)
22:45:59 <stepkut> maybe the fileServe error message should be more explicit about that
23:35:37 <stepkut> McManiaC: actually, I take that back.. I think fileServe doesn't return explict 404 anymore.. it just calls mzero
23:51:41 <McManiaC> yay, at least this works: http://npaste.de/nZ/
23:51:42 <McManiaC> hehe