--- Log opened Sun Feb 22 00:00:22 2009
00:01 < stepcut> dsrogers: basically, there will be an incoming like, /foo/bar.mp3, and my code will do a state query to look up where the file really is called on disk, and then serve that file
00:02 < dsrogers> yeah.
00:02 < dsrogers> I'm breaking it into two pieces.
00:02 < stepcut> right
00:02 < dsrogers> on that maps requests to filesnames.
00:02 < dsrogers> and one that takes a filename and produces a request.
00:03 < stepcut> right, that sounded like what I wanted
00:03 < dsrogers> *produces a response...
00:06 < dsrogers> probably takes a filename and a mimetype...
00:06 < dsrogers> hmm... that might not be efficient...
00:08 < stepcut> dsrogers: feature wise I need to be able to specify both the name of the file on the disk and it's mimetype
00:08 < dsrogers> yeah, that's the idea.
00:08 < stepcut> dsrogers: not always, I but I have needed to do that exact thing before
00:09 < stepcut> dsrogers: and it involved lots of butchering of fileServe
00:41 < dsrogers> Are there file path handling functions in haskell?
00:41 < dsrogers> err, wrong room
01:31 < stepcut> i think it's weird that, dir "name", takes an argument, but methodM GET, does not
01:32 < stepcut> why the inconsistency
01:32 < stepcut> ?
02:34 < mae> GET is the argument..
02:34 < mae> ?
02:34 < mae> oh i see what your saying
02:35 < mae> yeah, it would be more consistent for dir "name" to not take an arg
02:36 < mae> dir "foo" >> methodM GET
02:43 < mae> hmm
02:43 < mae> methodOnly vs methodM
02:44 < mae> hey dsrogers, what about a convenience function
02:44 < mae> index = methodM GET
02:44 < mae> for when you wanna match just /
02:55 < mae> I am not sure about removing PatternGuards and PatternSignatures
02:55 < mae> I think those are there for 6.8.3
02:56 < Axman6> mae: who filmed that talk for you guys btw?
02:56 < mae> Thomas' dad.
02:56 < mae> heh
02:56 < Axman6> ok... he needs some camera work lessons :P
02:56 < Axman6> mainly... quit touching the damn camera!
02:57 < mae> yeah, its a bit shaky, but better than nothin i suppose :)
02:57 < Axman6> yeah
02:57 < mae> I hope the video is useful
02:59 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
03:07 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
03:09  * stepcut wishes there was a pretty way to format explicit import lists
03:18 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
03:18 < mae> me2
03:22 < mae> night
11:48 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
11:56 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
12:40 < mae> morning?
12:56 < gwern> where I am, it's avening - the time of day where the first moon is about to set but the second moon has just risen above the horizon
13:01 < stepcut> mae: morning
13:04 < mae> stepcut: morning?
13:04 < mae> what tz are you in gwern
13:04 < stepcut> mae: well, it is 4 after noon now, so I guess not anymore
13:05 < gwern> mae: it has no direct correspondence to your earthly domains
13:05 < mae> lol
13:05 < mae> its 10am here
14:07 < dsrogers> mae: your patch for ipv6 worked fine here
14:07 < dsrogers> thanks
14:11 < mae> dsrogers: great
14:11 < mae> dsrogers: Saizan did most of the ugly TH stuff :)
14:11 < mae> so I can't take all the credit
14:13 < dsrogers> apparently ubuntu has ghc 6.8.2
14:13 < dsrogers> not .3
14:13 < mae> yeah
14:13 < mae> not sure if that works
14:15 < mae> dsrogers: I was thinking, if you really want to slay those warnings
14:15 < mae> you could add
14:15 < mae> LANGUAGE CPP
14:15 < mae> and then #ifdef GHC_683
14:15 < mae> for the PatternSignatures
14:15 < mae> so this way 6.10.1 wouldn't show those
14:15 < mae> but its kind of not worth the effort IMO
14:15 < dsrogers> I'll do that.  I think it's worth it.
14:15 < mae> your switching warnings for more verbosity
14:16 < mae> k
14:16 < dsrogers> anyway, 6.8.3 didn't change the language options.
14:16 < mae> i'm not sure if that ifdef is correct
14:16 < dsrogers> so it doesn't work on 6.8.3
14:16 < mae> ?
14:16 < dsrogers> (I just tried on 6.8.2)
14:16 < mae> oh ok
14:16 < mae> so wait, the build is broken?
14:17 < dsrogers> where is the build box, again?
14:17 < dsrogers> I would say, yes.
14:17 < dsrogers> since you applied the first patch
14:18 < dsrogers> warnings are just what: things you should be concerned about .  It's a lot easier to see the important ones when you can't see a bunch of noise
14:19 < dsrogers> and the verbosity is declaring: yes, we know this causes a warning, but we know it's ok here
14:20 < dsrogers> ohic.
14:20 < dsrogers> it's not broken for 6.8.3
14:20 < dsrogers> it IS broken for 6.8.2
14:20 < dsrogers> 6.8.2 is notable for being the version of ghc in APT
14:20 < dsrogers> (for ubuntu)
14:21 < dsrogers> no I'm crazy
14:21 < dsrogers> My first patch didn't have any language options changes.
14:21 < dsrogers> it's only my second patch, which you didn't apply
14:21 < dsrogers> so no, the build is not broekn.
14:22 < mae> dsrogers: so what are you saying, your patches broke it? :)
14:22 < dsrogers> yes.  the ones you didn't apply.
14:22 < mae> heh
14:23 < mae> +1 me
14:23 < mae> -1 dsrogers
14:23 < mae> mwaha!
14:23 < dsrogers> hey, I don't know what you're talking about.
14:23 < dsrogers> it works for me.
14:24 < mae> lol
14:24 < mae> ok so
14:24 < mae> i am unable to find if there are any ifdefs for ghc version
14:24 < dsrogers> I was just going to say that.
14:24 < mae> but what you can probably do
14:24 < mae> is change the cabal file
14:25 < mae> right now it detects the version difference via testing base4
14:25 < dsrogers> this will break ghci loading for 6.8.3, right?
14:25 < mae> so maybe you can also tell it to define a flag
14:25 < mae> when it is not base 4
14:25 < mae> or is base 4
14:25 < mae> like BASE_LT4
14:25 < mae> #ifdef BASE_LT4
14:26 < mae> {-# LANGUAGE PatternGuards, PatternSignatures #-}
14:26 < mae> #endif
14:26 < dsrogers> can you have two LANGUAGE pragmas?
14:26 < mae> yes
14:27 < mae> although i have never actually set a flag in a cabal file, only tested for a flag
14:27 < mae> so not sure how to set it
14:27 < dcoutts> -f name
14:27 < mae> oh wait a minute
14:27 < mae> there is already one you can use
14:27 < dcoutts> or -f -name to turn it off
14:28 < mae> there is already something you can use
14:28 < mae> which cabal generates
14:28 < dcoutts> oh yes, from Cabal-1.6 onwards
14:28 < mae> #define MIN_VERSION_base(major1,major2,minor) \
14:28 < mae>   (major1) <  4 || \
14:28 < mae>   (major1) == 4 && (major2) <  0 || \
14:28 < mae>   (major1) == 4 && (major2) == 0 && (minor) <= 0
14:29 < mae> not sure how that works
14:30 < mae> #IFNOT MIN_VERSION_base(4,0,0)
14:30 < mae> #ENDIF
14:30 < mae> something like that
14:30 < mae> i am no cpp pro though
14:31 < mae> ahh but then again
14:31 < mae> this is depending on cabal again
14:31 < koeien> ghc 6.8.2 is in debian/ubuntu yes
14:31 < mae> so that won't work
14:31 < koeien> the buildbot runs 6.8.3
14:31 < mae> we need something that ghc defines
14:31 < dcoutts> mae: ghc only tells you its own version
14:31 < dcoutts> which is independent of the version of base
14:31 < dcoutts> (as of 6.10)
14:32 < mae> what is the flag name?
14:33 < dcoutts> __GLASGOW_HASKELL__ >= 610
14:33 < dcoutts> but that's no good for base vs base 4
14:33 < dcoutts> erm, base 3 vs base 4
14:33 < mae> dcoutts: actually we are worried about ghc version and not base
14:33 < mae> so its perfect
14:34 < mae> hmm >= would probably be no good
14:34 < mae> because 683 is > 610
14:34 < mae> right? heh
14:34 < dcoutts> no
14:34 < dcoutts> 608
14:34 < dcoutts> 610 > 608
14:34 < mae> ahhh gotcha
14:34 < dcoutts> ghc does not tell you its patch versino
14:34 < mae> so dsrogers:
14:35 < mae> #if __GLASGLOW_HASKELL__ <= 608
14:35 < mae> {-# LANGUAGE PatternGuards, PatternSignatures #-}
14:35 < mae> #endif
14:35 < mae> that should work
14:36 < koeien> only for the warning suppression?
14:36 < mae> koeien: yeah :)
14:37 < koeien> ugliness
14:37 < dcoutts> as it happens that will not work
14:37 < koeien> isn't there a GHC flag to suppress these warnings ?
14:37 < dcoutts> because ghc reads pragmas before doing cpp
14:37 < koeien> dcoutts: {-# LANGUAGE gets processed first?
14:37 < koeien> right, i thought so. since CPP is also a LANGUAGE pragma
14:37 < mae> bummer
14:38 < mae> ok well, I am not sure if there is a suppression flag
14:38 < mae> I mean there is for 6.10
14:38 < mae> but I think when I tried to use it
14:38 < mae> it broke 6.8.3
14:38 < mae> because 6.8.3 didn't have -fno-deprecated-pragmas
14:38 < mae> if i remember right :)
14:38 < dcoutts> mae: you can do it in the .cabal file
14:39 < mae> for base > 4 right?
14:39 < dcoutts> no, for ghc
14:39 < mae> ahh yeah, I think the way we have been handling it is by checking base
14:39 < mae> probably not the best way
14:39 < dcoutts> if impl(ghc < 6.9)
14:39 < dcoutts>   extensions: ...
14:40 < mae> dcoutts: Yeah, I think we were trying to allow for using the files without having to build cabal
14:40 < mae> i.e. for running test suites
14:41 < dcoutts> ah
14:41 < mae> doing a cabal install before running the test suite each time is a bit cumbersome
14:41 < dcoutts> aye
14:41 < dcoutts> though you can cabal register --inplace if it help
14:41 < mae> so I think if we just matched for ghc > g10, then we could just turn on -fno-deprecated-pragmas for that
14:41 < mae> then both are happy
14:41 < mae> oh, --inplace?
14:41 < mae> interesting
16:41 < dsrogers> we can just let the warnings be...
16:42 < dsrogers> I mean, spurious warnings are hard to separate from real ones, so it's annoying to me...
16:42 < dsrogers> unless someone has figured out an easy way to solve this problem?
16:57 < mae> dsrogers: in the cabal file you can add 'if impl(ghc >= 6.10)'
16:57 < mae> and under that condition do -fno-deprecated-pragmas
16:57 < mae> actually i lied
16:58 < mae> its called
16:58 < mae> -fno-warn-warnings-deprecations
16:59 < h_buildbot> Build for ghc-6.8.3 failed. Check http://buildbot.happstack.com/ for details.
17:00 < mae> fixed it
17:00 < mae> heh
17:00 < mae> forgot to add the file
17:01 < dsrogers> I can in a bit.
17:01 < h_buildbot> Build for ghc-6.10.1 failed. Check http://buildbot.happstack.com/ for details.
17:08 < h_buildbot> Build for ghc-6.8.3 failed. Check http://buildbot.happstack.com/ for details.
17:12 < dsrogers> compiling Happstack.Server.Facebook takes a long long time on ghc 6.8.2
17:13 < dsrogers> "happstack" won't install on ghc 6.8.2
17:13 < dsrogers> it requires haskell-src-exts 0.4.8
17:14 < dsrogers> which requires base >=4
17:14 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
17:16 < dsrogers> how do I write a patch to a file?
17:22 < dsrogers> nm, I figured it out, obviously
17:33 < mae> Contrib not compiling isn't the end of the world
17:33 < mae> : )
17:40 < dsrogers> contrib compiles file.
17:40 < dsrogers> *fine.
17:40 < dsrogers> it's happstack that doesn't
17:44 < mae> hm
17:44 < mae> dsrogers: I would like to change the semantics of when a ISE gets thrown
17:44 < dsrogers> ok?
17:44 < dsrogers> to what?
17:45 < mae> well, I would like to be able to log the messages, using hslogger when an ISE occurs, so I tried adding it here
17:45 < mae> but then everything has to then have the MonadIO constraint added
17:45 < mae> so what I am thinking is
17:45 < dsrogers> ah.  because fail becomes a MonadIO
17:46 < mae> hmm
17:46 < mae> yeah
17:46 < mae> I would like ISE to be triggered by an exception
17:46 < dsrogers> that's kinda lame.  you could store it in a new field in the response.
17:46 < dsrogers> and log them when the response is sent
17:46 < dsrogers> the error message, I mean
17:46 < mae> right
17:47 < mae> but ISE semantically can mean many different things
17:47 < mae> at the basic level, some of your code got borked at runtime
17:47 < mae> so this is how I would like it to work
17:47 < mae> lets say one of your ServerPartT's throws an exception (any exception)
17:49 < mae> simpleHTTP catches the exception, and generates the ISE for the user, then rethrows it
17:49 < mae> this way, at Main.hs in my app, I can also create a generic logging function for exceptions
17:49 < mae> which catches any exception
17:49 < mae> and rethrows it
17:49 < dsrogers> to catch an exception, you must be in IO
17:50 < mae> finally, after logging, the toplevel user code in Main.hs can decide whether the exception is safe to continue or whether to let it pass th rough and have the app die
17:50 < dsrogers> you if you do it outside of simpleHTTP, you end up having to add MonadIO everywhere.
17:50 < mae> : \
17:50 < dsrogers> you could add it as a parameter to simpleHTTP though
17:50 < dsrogers> like a Conf parameters.
17:50 < dsrogers> "exceptionHandler"
17:51 < mae> ok
17:51 < dsrogers> but then you're going to want to thread Conf in ServerPartT with the request.
17:51 < dsrogers> so if someone is doing IO somewhere deep in their application, then can use that error handler.
17:52 < dsrogers> well, you don't have too.
17:52 < dsrogers> but it seems like a good idea.
17:52 < dsrogers> Saizan doesn't like the idea of Conf being threaded in ServerPartT though
17:53 < mae> me neither
17:54 < mae> I don't want it to be explicit
17:54 < dsrogers> explicit in what sense?
17:54 < dsrogers> you mean having to pass it around everywhere?
17:54 < mae> Any code that is ran in simpleHTTP, which causes an exception, should cause an ISE
17:54 < mae> is this the current behavior?
17:55 < dsrogers> yes, though it's handled below HTTP
17:55 < mae> allright
17:55 < dsrogers> you can test it by throwing an exception.
17:55 < dsrogers> simpleHTTP nullConf $ liftIO $ throw ...
17:55 < mae> are there any exceptions which it doesn't catch?
17:56 < dsrogers> you'd have to look in HTTP/Handler or HTTP/Listen
17:56 < dsrogers> that's where that stuff is.
17:57 < dsrogers> cabal haddock doesn't work for happstack-server anymore.
17:58 < dsrogers> I'm having trouble fixing it.
17:58 < mae> :\
17:58 < dsrogers> haddock wants the source for Paths_happstack_server
17:59 < dsrogers> since we use it to generate version strings...
17:59 < dsrogers> so I add build/dist/autogen to the source path, and haddock crashes.
18:00 < dsrogers> so AFAICT, the way to fix it is to hardcode our version strings again.
18:00 < mae> take a look at this
18:00 < mae> http://moonpatio.com:8080/fastcgi/hpaste.fcgi/view?id=1537#a1537
18:01 < dsrogers> that looks like it catches everything to me.
18:01 < mae> yep
18:02 < dsrogers> it's impossible to configure the look of that error page, though
18:02 < mae> so my point here is htat
18:02 < mae> we are handling this in different places
18:02 < mae> We should handle this in a more unified fashion
18:03 < dsrogers> I agree.  Hence my desire for a more complex Conf variable.  And for making it part of the environment in ServerPartT's ReaderT
18:03 < dsrogers> that way fail can use the configured errorHandler too.
18:04 < mae> have you looked at SimpleHTTP.hs line 1160
18:04 < dsrogers> the case is the same for 404s and FileServer too, btw.
18:04 < dsrogers> yes
18:05 < dsrogers> that can't be used for IO exceptions though
18:05 < mae> I am a bit confused right now lol
18:05 < stepcut> sweet! I think I understand how multimaster replication in happstack works
18:06 < mae> dsrogers: it works with "error" right?
18:06 < dsrogers> :info error
18:06 < dsrogers> I don't know what error does.
18:06 < dsrogers> it works with throwError and catchError
18:06 < dsrogers> the ErrorT monad stuff.
18:07 < dsrogers> it doesn't work with Control.Exception
18:07 < dsrogers> that requires that you are in IO
18:07 < mae> error is exceptions only
18:07 < mae> hm
18:07 < mae> ok so fail, I have read about
18:07 < mae> it lets you use Maybe, Either, or it will become an exception in IO
18:07 < mae> Prelude> fail "foo"
18:07 < mae> *** Exception: user error (foo)
18:08 < dsrogers> fail is a method in the Monad class.
18:08 < dsrogers> in IO it throws an exception.
18:08 < mae> right
18:08 < dsrogers> non-io monads don't necessarily do that.
18:09 < mae> so under what circumstances does mkFailMessage get used
18:09 < mae> when no matches are found?
18:09 < dsrogers> mkFailMessage is used in the definition of "fail" for the WebT and ServerPartT monads.
18:09 < dsrogers> so it's used when it's explicitly called or when pattern matching fails.
18:10 < mae> ok well
18:10 < dsrogers> (well when pattern matching fails inside those monads, only)
18:10 < mae> I don't want to stop that error from propagating up to IO
18:10 < mae> thats what I don't like about that
18:11 < mae> because then I can't log it :\
18:11 < dsrogers> ah
18:11 < dsrogers> well just use the default implementation then.
18:11 < dsrogers> that throws an IO exception
18:12 < mae> right, but right now you put an ISE up for the user, and your done.
18:12 < mae> don't get me wrong, I like the way you use fail
18:13 < dsrogers> you can't have it both ways.  Either you handle fail like that, or you throw an IO excpetion and create the Response for the user when you handle the IO Exception
18:13 < dsrogers> if you throw an IO exception, the normal code path of simpleHTTP will be bypassed.
18:13 < dsrogers> and it will immediately go into Handler, and ignoer the response you created.
18:14 < mae> right
18:14 < mae> I think ISE belongs in IO
18:14 < mae> it makes more sense semantically.
18:15 < mae> ISE is when the user code failed to handle the error case
18:16 < mae> so it needs to be logged, handled, etc.
18:16 < dsrogers> the use code should be allowed to handle the failure case.
18:16 < dsrogers> *user
18:16 < mae> but when it doesn't, we have no record that it did fail
18:16 < mae> it just throws up an ISE, and we never have a chance to log it, even if we wanted too
18:16 < mae> unless the user explicitly logs it in his code
18:18 < dsrogers> well you can move mkFailMessage into Handler.
18:18 < dsrogers> then you still get the HTML output
18:18 < dsrogers> and the haiku
18:19 < mae> dsrogers: so back to this haddock thing, why is haddock not seeing Happstack_paths
18:19 < mae> or whatever
18:19 < mae> Paths_happstack_server
18:19 < dsrogers> because it's autogenerated.
18:19 < dsrogers> and it's in dist/build/autogen
18:19 < dsrogers> so it's not in the source paths it's looking for, bascially
18:20 < mae> what happens when you add dist/build/autogen
18:21 < mae> -i
18:21 < dsrogers> how do I do that, exactly?
18:21 < dsrogers> http://hackage.haskell.org/trac/hackage/ticket/396
18:21 < dsrogers> http://www.nabble.com/Building-haddock-when-accessing-data-files-from-package-code-td20733238.html
18:23 < dsrogers> "haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing"
18:23 < dsrogers> that's what I get when following the recomended solution
18:24 < dsrogers> which in typical haddock fashion is completely unactionable.
18:25 < mae> ok fixed it
18:25 < mae> um
18:26 < dsrogers> it worked for you?
18:26 < mae> well
18:26 < mae> i mean
18:26 < mae> i just added it to
18:26 < mae>   hs-source-dirs:      src,dist/build/autogen
18:26 < mae> but now i get the fromJust thing
18:26 < dsrogers> yep.
18:26 < dsrogers> that's what I did.
18:26 < dsrogers> boom.
18:27 < dsrogers> um, it's supposed to work.
18:27 < mae> well
18:27 < mae> do we even know if -server built before anyways?
18:27 < dsrogers> ye
18:27 < dsrogers> yes
18:27 < mae> I think there is another problem
18:27 < mae> unrelated to Paths
18:28 < mae> we had this problem on -data before
18:28 < mae> http://trac.haskell.org/haddock/ticket/68
18:29 < mae> I think its happening in server now because we added some TH code in Happstack.Server.SocketTH.hs
18:29 < mae> something to do with template haskell
18:29 < dsrogers> oh.
18:29 < mae> saizan says it builds on ghc HEAD
18:29 < mae> for -data too
18:29 < dsrogers> TH and haddock don't play nice.
18:29 < mae> yep
18:29 < dsrogers> how unfortunate...
18:29 < mae> so my plan was basically
18:29 < mae> have saizan build all the docs at release day
18:29 < mae> and then put them on the website :)
18:30 < dsrogers> ah
18:30 < dsrogers> ok.
18:30 < mae> i imagine when 6.10.2 is out we are good again
18:30 < mae> but in the meantime..
18:30 < dsrogers> well the cabal fix is necessary anyway
18:30 < mae> yep
18:31 < dsrogers> shall you push it?
18:31 < dsrogers> and I unrecord my version?
18:31 < mae> you did the same thing right
18:31 < dsrogers> yes
18:31 < mae> oh ok
18:31 < mae> yeah i'll push it up right now
18:32 < mae> done
18:32 < mae> it will be nice when haddock plays nice with th
18:32 < mae> because then the generated code can have docs too
18:36 < mae> dsrogers: so how do I move this ISE stuff up the chain?
18:36 < mae> do we still need a definition for fail for WebT
18:38 < h_buildbot> Build for ghc-6.8.3 failed. Check http://buildbot.happstack.com/ for details.
18:41 < mae> ok pushed fix for build :)
18:44 < mae> h_buildbot: status
18:44 < h_buildbot> Building ghc-6.10.1
18:45 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
18:48 < mae> h_buildbot: build ghc-6.8.3
18:48 < h_buildbot> Build for ghc-6.8.3 started. If one was running, no new one is started.
18:57 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
19:03 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
19:58 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 16/77 test cases failed. Check http://buildbot.happstack.com/ for details.
20:02 < mae> damn you haskell-src-exts
20:02 < mae> dsrogers: what ever will we do!
20:09 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
20:27 < mae> wtf man
20:27 < mae> happy needs perl to install on windows?!
20:27 < mae> wtf?!
20:33 < mae> oh
20:33 < mae> it comes with ghc
20:52 < mae> dsrogers: did you remove the 0.1 release notes?
20:54 < dsrogers> not on purpose.
21:02 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
21:11 < mae> they are gone :\
21:11 < mae> anyways, the skeleton goodness is all up to date
21:12 < mae> you should give it a try!
21:12 < mae> happstack new project foo
21:12 < mae> cd foo
21:12 < rovar> sweet
21:12 < mae> sh bin/run.sh (or on windows bin\run.bat)
21:12 < rovar> <-- deleted his home directory tonight.
21:13 < rovar> <-- still catching up from last backup
21:13 < mae> lol
21:14 < rovar> it was kind of not my fault. I was mucking about with QobiScheme, which is a scheme compiler toolset.
21:15 < rovar> and it has some funky project creation script..  i ran the script, expecting to get a usage display..   instead, it deleted my home directory
21:15 < rovar> because it performs a  rm ~/$1     but since I passed in no arguments, it.. well yea
21:22 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
21:26 < stepcut> rovar: hah
21:26 < rovar> meh
21:27 < rovar> I lost a crapload of stuff, but luckily my current haskell project was open in gvim and I was able to copy away the data to a new file :)
21:47 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
22:02 < mightybyte> Does multimaster have any kind of load balancing with it?
22:02 < mae> mightybyte: you'd have to load balance the http with an external solution
22:02 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
22:02 < mae> two options are round robin dns
22:02 < mae> and a http load balancer
22:02 < mightybyte> Ok
22:03 < mae> such as pound or netscalers (if you have alot of $$ )
22:03 < mae> i assume you mean http load balancing
22:03 < mightybyte> Yeah
22:04 < mightybyte> So by adding a load balancer to a set of multimastered servers, you get scaling as well as reliability?
22:04 < mae> right
22:05 < mae> i mean, in the future it might be nice to support Anycast with ipv6
22:05 < mae> but that is not really practical right now
22:05 < mae> anycast provides redundancy and scaling at the ip level
22:05 < mae> some root dns nameservers use it right now
22:06 < mightybyte> Slick
22:07 < mae> yep
22:07 < mae> so basically
22:07 < mae> with anycast
22:07 < mae> you send stuff to an ip address
22:07 < mae> and it gets casted to all the servers which have that ip
22:07 < mae> but only one will respond
22:07 < mae> (but any of them can)
22:07 < mightybyte> That's pretty cool to be done at the IP layer.
22:07 < mae> yeppers
22:08 < mae> no more single points of failure
22:08 < mae> (at least at the http level )
22:08 < mae> i suppose your router could still take a dump
22:08 < mae> or your switch
22:08 < mae> or your power supply
22:08 < mae> hehe
22:08 < mightybyte> Anyone have any recommendations for how to manage checkpointing on a production site?
22:08 < mae> redundant dimensions are needed
22:08 < mae> like on Quantum Leap
22:09 < mae> : )
22:10 < mightybyte> And also logging.  Anyone have experience there?
22:11 < mae> mightybyte: yeah thats a pain in the ass
22:11 < mae> I recommend hslogger
22:12 < mae> look at the example app for an example
22:12 < mae> http://patch-tag.com/publicrepos/happstack/happstack/templates/project/src/AppLogger.hs
22:12 < mae> so basically this sets up logging for those logging components
22:13 < mae> to log something, I have to import System.Log.Logger (Priority(..), logM)
22:13 < mae> and then do
22:13 < mae> logM "MyComponent" NOTICE "log log loggggg message"
22:13 < mae> on that note i'm out of here
22:13 < mightybyte> It would be nice to have a logging front-end to simpleHTTP
22:14 < mae> well Happstack.Server uses hslogger
22:14 < mightybyte> By default?
22:14 < mae> well
22:14 < mae> the way hslogger works
22:14 < mae> it does some voodoo in the background
22:14 < mae> so no matter where you put your logging statements
22:15 < mae> you can start handling the logs by simply referring to the module name (look in the link i pasted above)
22:15 < mae> s/module name/logging component name
22:15 < mae> just look at the haddock docs for hslogger
22:15 < mightybyte> Ok
22:16 < mae> so in the file i pasted above, I am tapping into the logging statements which already existed in Happstack.Server
22:16 < mae> and Happstack.State
22:16 < mae> and applying handlers to them
22:16 < mae> but you can define your own logging component using logM
22:17 < Axman6> how easy do you guys think it'd be to write a happs documentation app in happs?
22:18 < mightybyte> Axman6: What do you mean by that.
22:18 < mightybyte> ?
22:18 < mightybyte> It may have already been done: http://happstutorial.com
22:19 < Axman6> mightybyte: well, happs needs a site with docs about how to use happs. in the style of the php docs. i've asked a few people (outside the haskell community), an they've said the one thing php gets right is docs, and that's why it's so popular
22:20 < Axman6> reference docs, for each function and task you might want to do, along with examples of use, and comments from users
22:21 < mightybyte> There is some of that on some of the links compiled at http://happstack.com/tutorials.html
22:21 < mae> Axman6: yeah, I am all for nice documentation.
22:22 < Axman6> i don't want a tutorial, we needs reference docs
22:22 < mightybyte> But I don't think anyone will tout happstack's great documentation.
22:22 < mae> you would want to tap into haddock
22:22 < mae> we need better docs :)
22:22 < mightybyte> The HAppS_tutorial2 was something of an attempt at that.
22:22 < mightybyte> Ideally the haddock docs would have all you need.
22:22 < mae> right
22:22 < mae> we could stylize haddock docks
22:22 < Axman6> mightybyte: i'm not sure using haddock is the right way to go. i think the php way of having every function documented seperately is good, and removes clutter from the docs
22:23 < mae> docs *
22:23 < mae> Axman6: I more meant, you could use haddock except generate the documentation in whatever format you like
22:23 < mae> by modifying haddock
22:23 < Axman6> a variation on haddock where clicking on functions etc would bring you to a page just for that function would be excellent
22:23 < mae> hm
22:24 < mae> what about comments?
22:24 < mightybyte> Axman6: Yeah, I see what you mean.  I think that could be a benefit.
22:24 < Axman6> mightybyte: they'd be on the per function pages, and possibly per module pages too
22:24 < mae> Axman6: go for it man, if you put the effort in, we can put it at docs.happstack.com or something
22:25 < Axman6> i would, but i'd need these docs to get started :P
22:25 < Axman6> plus i've just started back at uni
22:25 < mightybyte> You could create stub pages and do it like a wiki.
22:25 < mightybyte> I bet a lot of documentation would happen spontaneously if the infrastructure was there.
22:25 < Axman6> i dunno, i feel that wikis make bad documentation sites. they encourage less complete docs imo
22:26 < Axman6> well used things get great docs, but obscure things get terrible ones
22:26 < mightybyte> It doesn't have to stay a wiki.  But I think wikifying it would be a great way to bootstrap content.
22:27 < Axman6> check out http://www.php.net/manual/en/function.echo.php for an example of their docs. they've got type explanations, examples, related functions, and comments from users
22:27 < mightybyte> It also might be that many of the functions are not complex enough to really require a whole page.
22:28 < mightybyte> Yeah, I've been there.
22:28 < Axman6> i think comments would be great, because someone can ask a question there, and someone'll answer it, and you have better docs right there
22:28 < mightybyte> Certainly.
22:29 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
22:29 < mae> document contribution certainly could be easier
22:30 < mae> I like the idea of a wiki
22:30 < mightybyte> Who pays for the happstack.com hosting?
22:30 < mae> but it needs more structure
22:30 < mae> patch-tag
22:30 < mightybyte> Ahh
22:30 < Axman6> mae: yeah, something wiki like, but not something that makes you feel like 'ok, this is wikipedia... meh, cbf'd'
22:30 < mae> right
22:30 < mightybyte> exactly
22:30 < mae> oh my god
22:30 < mae> you know what would be badass
22:30 < mae> a stack overflow or yahoo answers format
22:31 < Axman6> so, editable docs, rather than calling it a wiki
22:31 < mae> people pick the best explanation
22:31 < Axman6> mae: that could work
22:31 < Axman6> or maybe comment voting?
22:31 < mae> http://stackoverflow.com/
22:31 < Axman6> same sort of thing i guess
22:31 < Axman6> yeah i've been there, used it a few times :)
22:31  * mightybyte has boycotted stackoverflow.
22:31 < Axman6> answered a few haskell questions
22:32 < mae> ok so, who wants to create DocuJungle (tm)
22:32 < mae> : )
22:32 < mae> using gitit perhaps
22:32 < mae> hmm nah, thats a wiki
22:33 < mae> the function signatures etc can be stolen directly from haddock api
22:33 < mae> the rest can be custom
22:33 < mae> each documentation page maps to a release version, and Module.item
22:33 < Axman6> i think not calling it a wiki is a good move psycologically ;)
22:33 < mae> where item is a constructor function whatever
22:33 < mae> so its like haddock on steroids
22:34 < Axman6> mae: so Module.Function?
22:34 < Axman6> /F/f
22:34 < Axman6> s/F/f even
22:34 < mae> or Module.DataType
22:34 < Axman6> yeah
22:34 < Axman6> well, the URLs write themselves don't they :)
22:34 < mae> yeah
22:34 < mightybyte> While we're at it, me might as well try to make it somewhat generic so it could be used to document any API.
22:35 < mae> ouch
22:35 < Axman6> http://docs.happstack.org/docs/Module.Thing.func
22:35 < mae> i hate the "g" word
22:35 < Axman6> heh
22:35 < mae> if you mean any haskell api, I agree
22:35 < mae> beyond that, disagree
22:35 < Axman6> i dunno, it mightn't be that hard to make a project for project documentation...
22:35 < Axman6> meta project!
22:35 < mae> ok ok seriously, my mind is exploding, I need someone to do the documentation, I have enough stuff to worry about already :)
22:35  * Axman6 's girlfriend stabs him for using the m word
22:36 < mae> I mean, right now we have haddock
22:36 < mae> which was bare before
22:36 < mae> and now its more filled in
22:36 < mae> i will put that on happstack.com
22:36 < mae> if someone wants to make uber-cool documentation server then great!
22:36 < Axman6> so there are niceish happstack docs now?
22:36 < Axman6> i'd love to, but i really would have no idea how to :(
22:36 < mae> heh
22:37 < mae> Axman6: so whore your idea off on another programmer who has nothing to do :)
22:37 < mae> go and be promiscuous on #haskell
22:37 < mae> hehe
22:38 < mightybyte> I'm actually interested...but I have other things to do.
22:38 < mae> : )
22:38 < mae> ok its on the back burner then
22:38 < mae> but we definitely need it!
22:38 < mightybyte> Agreed.
22:39 < mightybyte> I'll keep in in the back of my mind.
22:39 < Axman6> as a firdt step, do you want me to take down these ideas?
22:39 < mae> sure
22:39 < mae> send it to the ML
22:40 < mightybyte> A widely useful project like this could really help haskell/happs to gain notice.
22:40 < Axman6> indeed
22:40 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
22:40 < Axman6> ok, what ideas have we had
22:41 < Axman6> first one i put is that they should be like PHP's
22:41 < mightybyte> One page per function
22:41 < mightybyte> Wikiable
22:41 < mightybyte> User comments for each function
22:41 < mightybyte> A "related functions" section.
22:41 < Axman6> s/wikiable/editable
22:41 < Axman6> ;)
22:42 < mightybyte> Sure
22:42 < mightybyte> Need support for modules
22:42 < mightybyte> A simple tree module structure should be more than enough.
22:43 < Axman6> http://docs.happstack.org/docs/Module.Thing.func <- style?
22:43 < stepcut> it would be pretty cool to take the filestore and allow people to edit the haddock docs via the web page, with the commits going right into the actual code
22:44 < mightybyte> That would be cool
22:44 < Axman6> what about an easy way to submit patches for modules/functions?
22:45 < mightybyte> Seems like modifying code may be going a bit too far.
22:45 < Axman6> yeah
22:45 < Axman6> could get awkward too
22:45 < Axman6> just stick with darcs :P
22:49 < Axman6> omghpasteisdead!
22:51 < Axman6> http://www.moonpatio.com/fastcgi/hpaste.fcgi/view?id=1541#a1541
22:57  * Axman6 really doesn't like happstutorial
23:40 < Axman6> mae: you wouldn;t happen to know how to uninstall HAppS would you? i've got both haps and happstack installed via cabal install
23:48 < Axman6> s'all good now
--- Log closed Mon Feb 23 00:00:23 2009