--- Log opened Thu Jul 09 00:00:09 2009
02:00 < jeffwheeler> How can I provide an index page for the root of a directory? I've tried things like: dir "" handler, dir "/" handler, dir "." handler, and I can't see how to use nullPath.
04:08 < mae> jeffwheeler: methodM GET
10:05 < sm> good morning all
10:08 < sm> why would simpleHTTP be listening with IPv6, as at http://code.google.com/p/hledger/issues/detail?id=6 ?
11:26 < sm> ah, it's this: http://thread.gmane.org/gmane.comp.lang.haskell.happs/1881
11:26 < sm> seems we need more control over config
13:02 < mightybyte> Hmmmm, strange error from my happstack application
13:03 < mightybyte> internal error: schedule: invalid what_next field
13:03 < mightybyte> (GHC version 6.10.3 for x86_64_unknown_linux)
13:03 < mightybyte> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
13:44 < mightybyte> Anyone had trouble building happstack-util lately?
13:44 < mightybyte> src/Happstack/Util/Mail.hs:84:52:
13:44 < mightybyte>     Couldn't match expected type `network-2.2.1:Network.Socket.Internal.SockAddr'
13:44 < mightybyte>            against inferred type `SockAddr'
13:50 < mightybyte> Fixed that problem--I had multiple versions of network still installed.
13:50 < mightybyte> But now I'm getting:
13:50 < mightybyte> Failed to load interface for `Network.Socket':
13:50 < mightybyte>   no package matching `network-2.2.1' was found
13:51 < mightybyte> But ghc-pkg shows that I have network-2.2.1.3 installed.
14:14 < gcollins> mightybyte: when that stuff starts happening, I usually "rm -Rf ~/.cabal ~/.ghc" and start over
14:15 < sm> I usually cabal install --reinstall some things first
14:15 < gcollins> I had zillions of problems with ghc-6.10.2 because of the wonky network library they shipped with that version
16:29 < mightybyte> gcollins: That seems to be working.
16:31 < mightybyte> So I just started getting stack overflows when my happstack site serves a certain page.
16:31 < mightybyte> Debugging that should be interesting.
16:47 < gcollins> probably a space leak
16:48 < gcollins> easiest diagnostic is to build a profiler, run with "+RTS -h", and run "hp2ps" on the output
16:48 < mightybyte> Yeah, that's what I've been trying to do. :)
16:48 < mightybyte> Just got it built.
16:49 < mightybyte> The new binary is 115 megs!
16:49 < gcollins> :)
16:49 < gcollins> hp2ps is pretty useful
16:49 < gcollins> It's close to the only way of debugging a lot of those issues
16:50 < mightybyte> Hmm, haven't used it before.
16:51 < mightybyte> What's the difference between +RTS -p and +RTS -h?
16:55 < gcollins> Code profile vs. heap profile
16:56 < mightybyte> Oh, so time vs space?
16:56 < gcollins> that's the gist of it, I think
16:56 < gcollins> the heap profile tool will give you a nice graph of how memory is being allocated over time
16:57 < gcollins> another thing you could try is an hlint run -- hlint will tell you when you should be using mapM_ vs. mapM, etc
16:57 < mightybyte> Ahh.  I've run hlint, but didn't check for that specifically.
16:59 < mightybyte> My hunch is that this code snippet may be my problem "groupBy (ixset @= d)"
16:59 < gcollins> I don't suppose there's an NFData instance for IxSet?
16:59 < mightybyte> Because it's been working fine for over a month now, but the data stored in ixset has been increasing the whole time.
16:59 < mightybyte> Don't know.
17:00 < gcollins> nope.
17:00 < gcollins> It wouldn't be too hard to write one
17:01 < gcollins> underneath everything you have "Map"
17:01 < mightybyte> What's NFData do?
17:01 < gcollins> reduces a value to head normal form (i.e. strictifies it)
17:02 < gcollins> your stack overflow is probably a buildup of thunks
17:02 < mightybyte> Yeah
17:03 < gcollins> so if you have some data item that's being mutated a bunch of times before it's read again, you might get a stack overflow when the value is finally forced
17:04 < mightybyte> I'd hope that IxSet would have the necessary strictness annotations to avoid that.
17:04 < mightybyte> But then I don't know that it's a problem with IxSet yet.
17:05 < gcollins> it doesn't seem to.
17:06 < mightybyte> Well, if that's the problem then I'll be fixing it very soon.
17:11 < mightybyte> So what's the difference between NFData instances and strictness annotations with '!'?
17:11 < gcollins> "!" and "seq" only force the value as far as the first data constructor
17:12 < gcollins> ("weak head-normal form")
17:12 < gcollins> NFData forces everything
17:12 < mightybyte> Ahhh
17:12 < gcollins> at least, that's my understanding
17:13 < gcollins> http://www.haskell.org/ghc/docs/latest/html/libraries/parallel/Control-Parallel-Strategies.html
17:14 < gcollins> The underlying datatypes for IxSet and Ix all have NFData instances, so writing an NFData instance for IxSet itself shouldn't be too hard
17:14 < gcollins> mechanical, mostly
17:15 < mightybyte> Yeah
17:15 < gcollins> then you can say "someIxSet `using` rnf" and guarantee that it's fully-evaluated
17:16 < gcollins> I'm pretty sure there's overhead associated with that though -- TANSTAAFL
17:17 < mightybyte> Of course
17:18 < gcollins> i tend to err on the side of paranoia re: strictness
17:38 < sm> is there any workaround for the issue discussed in http://thread.gmane.org/gmane.comp.lang.haskell.happs/1881 (server choosing the first address, which might be IPv6 ?)
17:39 < sm> ie any reliable way to ensure it will be listening for IPv4 requests ?
--- Log closed Fri Jul 10 00:00:11 2009