16:21:13 <rdtsc> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24525#a24525
16:21:25 <rdtsc> can anybody help me to improve the code?
16:22:24 <stepcut> ACTION peeks
16:22:36 <rdtsc> i want in-memory bigfile generator working through http
16:23:17 <stepcut> hmm
16:23:29 <rdtsc> this example takes all memory while working
16:24:08 <stepcut> this is where enumerators would be nice :)
16:24:58 <stepcut> i wonder if happstack-server is trying to calculate the length of the body even though you specified it in the header already?
16:25:56 <rdtsc> stepcut: it isn't, but data remains in memory for end
16:26:12 <stepcut> hmm
16:26:18 <stepcut> yeah, that is why I like enumerators
16:26:33 <stepcut> is that all this project needs to do?
16:26:38 <stepcut> or is there more to it?
16:27:01 <rdtsc> yes, it is all
16:27:34 <stepcut> you might consider using happstack-wai in the darcs repo, which does support enumarators.. it's very rough, but should be suitable for this project
16:27:56 <rdtsc> so
16:28:21 <rdtsc> as far as i understand hapstack himself cannot do lazy output of such things?
16:29:06 <stepcut> rdtsc: it should be able to, but I don't know offhand why it is not.. if you can figure that out, it would be a great contribution :)
16:31:24 <rdtsc> i'm afraid i can not, i do not understand internals of lazy evaluation =[
16:32:07 <stepcut> heh
16:37:15 <stepcut> rdtsc: well, at least file a bug, http://code.google.com/p/happstack/
16:37:47 <rdtsc> stepcut: I'm not sure it is a bug
16:38:36 <stepcut> that's ok..
16:39:03 <stepcut> we can close it as 'invalid' later if needed
16:40:05 <stepcut> in Happstack/Server/HTTP/Handler.hs
16:40:10 <rdtsc> actually it works lazily, but memory consumption permanenly raises
16:40:34 <rdtsc> not so fast as data transmitting, but permanently
16:40:36 <stepcut> in putAugmentedResult it does call, L.length -- but I don't think that will actually forced the lazy bytestring
16:40:57 <stepcut> well, GHCs garbage collector never frees memory back to the OS
16:41:19 <stepcut> if you really want to know what is going on you need to run with memory profiling
16:44:32 <rdtsc> i'll try, thanks
16:47:50 <rdtsc> I would help you if my english abilities was better
16:48:12 <rdtsc> i mean contributing happstack
16:48:21 <stepcut> you don't need english, just haskell!
16:48:29 <stepcut> it's not like we comment the code :(
16:50:21 <rdtsc> oh, i need
16:50:31 <stepcut> :)