--- Log opened Sat Mar 07 00:00:32 2009
00:25 < stepcut> ugh, I think the behavior of methodSP has changed
00:26 < stepcut> i don't it guarded against remaining path segments in the past
00:46 < mae> hmm
00:46 < mae> file a bug report
00:46 < mae> well
00:46 < mae>  i mean
00:46 < mae> is this desirable?
00:46 < mae> can you not use methodM?
00:57 < stepcut> mae: methodSP calls methodM, I can use methodOnly though
00:58 < stepcut> it's just that I spent 30+ mins being baffled until I looked up the definition of methodSP and saw that the semantics had changed
00:59 < stepcut> well, I didn't get my app out today, but Sunday looks promising
01:02 < mae> heh
01:02 < mae> neat :)
01:02 < mae> what does it do ?
01:05 < stepcut> mae: let's you make more stupid facebook quizes
01:29 < mae> haha
01:29 < mae> awesome
01:30 < mae> stepcut: how does urlt avoid overlapping urls?
01:34 < mae> this is the puzzling part to me
01:34 < mae> the type to url and url to type safety is straightforward enough
01:35 < mae> wait a min, i think i just answered my own question
01:35 < mae> yay for rubber ducking
01:35 < mae> http://c2.com/cgi/wiki?RubberDucking
03:22 < vegai> what on earth is trhsx
03:29 < vegai> hsp tries to execute it
03:43 < vegai> while building
03:45 < vegai> oh, now I get it. trhsx-0.2.2 is deprecated
03:45 < vegai> its package was a bit odd :)
03:47 < vegai> but hsx fails to build. Argh
05:34 < koeien> vegai: ghc version?
05:35 < vegai> 6.10.1
05:35 < koeien> on 6.8.3 I successfully have hsx-0.4.5
05:35 < koeien> also on 6.10.1
05:35 < koeien> what is the error message you get?
05:37 < vegai> I already have hsx actually, but I tried to reinstall it
05:37 < vegai> Building hsx-0.4.8...
05:37 < vegai> src/HSX/Transform.hs:21:7: Could not find module `Language.Haskell.Exts.Build':
05:38 < vegai> and the problem with hsp is
05:38 < vegai> Building hsp-0.4.5...
05:38 < vegai> ghc: could not execute: trhsx
05:40 < vegai> probably my package dbs are out-of-sync
05:41 < koeien> do you have haskell-src-exts ?
05:41 < koeien> make sure that ~/.cabal/bin is in your PATH
05:41 < vegai> ah, now I see what I did wrong. I tried to start from scratch by deleting ~/.cabal
05:42 < koeien> ahw, yes
05:42 < vegai> but forgot to throw away ~/.ghc
05:42 < koeien> you have to unregister everything from ghc as well
05:42 < vegai> aye
05:42 < koeien> yep
05:42 < koeien> that has bitten me once as well :)
05:42 < vegai> me too, in fact. Not hard enough it seems
05:51 < vegai> yep, I gots me a happstack now
05:51 < koeien> cool!
09:08 < paulvisschers_> Does anyone know how to get a visitor's time locale?
09:09 < paulvisschers_> or rather, their timezone
09:10 < koeien> should be in the headers? (rqHeaders on a Request) ?
09:10 < koeien> don't know if it exists :/
09:12 < koeien> a quick google query indicates that it doesn't exist in HTTP, but javascript knows
09:24 < paulvisschers_> :(
09:45 < mightybyte> paulvisschers_: You can have them store that as part of their user profile on your site.
09:45 < paulvisschers_> mightybyte: Except I don't have one :)
09:45 < mightybyte> paulvisschers_: Ahhh, you may be out of luck then.
09:46 < paulvisschers_> mightybyte: Did you try to contact me yesterday btw, or was that accidental?
09:46 < mightybyte> paulvisschers_: You may be able to do a lookup on the location of their IP address and infer from that.
09:47 < paulvisschers_> mightybyte: I might look into that
09:47 < mightybyte> paulvisschers_: I was looking at formbinator again yesterday, but I was able to take care of my questions.
09:48 < paulvisschers_> ok
13:18 < vegai> what would be the current tutorial I should look at, then?
13:22 < vegai> tutorial.happstack.com is a bit heavy, though comprehensive
13:49 < koeien> vegai: i know wchogg has done some work for happstutorial
13:51 < vegai> hmm, looks like the happs-tutorial on cabal has a bit weird deps
13:51 < vegai> or then I screwed up my .ghc or .cabal yet again :P
13:52 < koeien> no seems to be incorrect
13:53 < vegai> ok
13:53 < koeien> tbh i don't know where that code is located
14:32 < wchogg_> Yeah, I know about the screw up in the cabal file.  The new happstack-0.2 version of the tutorial should go up tonight or tomorrow.  I got delayed by the death of my laptop
14:33 < stepcut> the default 404 error message in happstack (and probably others) does not validate btw
14:38 < mae> heh
14:38 < mae> wchogg_: may it rest in pieces
14:39 < mae> does everyone like the combined logging stuff?
14:39 < stepcut> mae: I'm not sure yet
14:39 < mae> stepcut: heh
14:40 < stepcut> mae: i'm still trying to figure out how to use it
14:40 < wchogg_> mae : It served me for 4 years.  Now it doesn't even load the bios properly.
14:42 < mae> stepcut: possible replacement for serializable? : http://hackage.haskell.org/cgi-bin/hackage-scripts/package/storable
14:43 < mae> stepcut: the guestbook app comes with it working by default, just look at AppLogger.hs
14:43 < mae> http://patch-tag.com/publicrepos/happstack/happstack/templates/project/src/AppLogger.hs
14:43 < mae> particularly the last 3 lines
14:43 < stepcut> mea: doesn't support versioning/migration
14:44 < mae> stepcut: gotcha
14:44 < stepcut> mae: yeah, I have those lines, I just don't understand what the different log levels mean, and stuff like that
14:44 < stepcut> mae: is there someway to get just the apache style logs saved in a separate file?
14:45 < mae> stepcut: yes
14:45 < mae> you want log level NOTICE
14:45 < mae> (basically DEBUG is the highest and includes all levels, and it travels down to the highest priority "ERROR")
14:45 < mae> so DEBUG will show you all priorities
14:46 < mae> stepcut: look at this:
14:46 < mae> http://hackage.haskell.org/packages/archive/hslogger/1.0.2/doc/html/System-Log-Logger.html#t%3APriority
14:47 < mae> so EMERGENCY is the highest priority, if you apply that filter to your log handler, you only get that log priority
14:47 < stepcut> you just said DEBUG is the highest?
14:47 < mae> DEBUG is the lowest priority messages, if you apply that filter to your log handler, you get DEBUG level + everything below it
14:47 < mae> stepcut: yeah i got mixed up
14:48 < mae> stepcut: in any case, I believe the combined logging stuff I tagged as the "Happstack.Server" module as NOTICE priority
14:48 < stepcut> DEBUG is the lowest, so applying that filter gives you DEBUG and everything lower priority?
14:48 < mae> stepcut: exactly
14:48 < mae> stepcut: and if you look at AppLogger.hs you can just point the file handler to wherever you want
14:48 < stepcut> but, if DEBUG is the lowest, what is lower? Is this like 'on beyond zebra'?
14:49 < mae> nothing is lower
14:49 < mae> DEBUG gives you everything in a particular log handler
14:49 < mae> (and all its descendants )
14:49 < mae> logFileHandler <- fileHandler ("app.log") DEBUG
14:49 < mae> see this? this is the highest filter before it is written to the log
14:50 < mae> so basically its saying, "log anything that uses this handler to this file"
14:50 < mae> logFileHandler <- fileHandler ("app.log") NOTICE says "log anything that is of NOTICE priority or higher to this file"
14:50 < stepcut> ok
14:50 < mae>   saveGlobalLogger $ setLevel INFO $ setHandlers [stdoutHandler] server
14:51 < mae> i just tell it to go to stdout and nowhere else.
14:51 < mae> but
14:51 < mae> you can change this to whatever handler you want
14:52 < stepcut> so, that will only log messages of Priority INFO and lower?
14:52 < mae> at this level, changing the priority here says "In the logger called server (defined in previously line), only enable messages of INFO priority or lower, and send them to this handler"
14:52 < mae> s/this handler/these handlers
14:53 < mae> so its very flexible (hslogger) but a bit confusing at first
14:53 < stepcut> so, you will log, INFO and DEBUG, but not NOTICE WARNING ERROR CRITICAL ALERT and EMERGENCY?
14:54 < mae> there is also a concept of a root logger (parent of all loggers), and parents inheriting the messages of their descendants (by default)
14:54 < mae> if we were to change   saveGlobalLogger $ setLevel INFO $ setHandlers [stdoutHandler] server, and instead do   saveGlobalLogger $ setLevel INFO $ setHandlers [] server (or omit setHandlers) -- this would supposedly just defer to its ancestor for log message handling
14:55 < mae> stepcut: ack in previous statement, please replace "INFO priority or lower" with "INFO priority or higher"
14:55 < mae> sorry for the confusion
14:56 < stepcut> mae: :)
14:56 < mae> that rule is always consistent
14:56 < mae> when you define a level filter
14:56 < mae> it always means "this priority or higher"
14:56 < stepcut> ok, how does apache style logs figure into this?
14:56 < mae> stepcut: well, apache comes by default with a "Combined style" log format
14:56 < mae> and i just copied that and made a logging statement in SimpleHTTP
14:57 < stepcut> mae: on my system, the apache style logs and the other log messages seem intermixed -- that does not seem useful
14:58 < mae> (but I named the logging module "Happstack.Server"): http://patch-tag.com/publicrepos/happstack/happstack-server/src/Happstack/Server/HTTP/Handler.hs
14:58 < mae> stepcut: do a find for log'
14:59 < mae> stepcut: right, thats why you have to explicitly target those logs to a separate file, I was thinking of creating a separate logging module name for this specifically, but this was kind of a first stab
14:59 < stepcut> mae: ok, so right now they do get mixed up together?
14:59 < mae> ie Happstack.Server.AccessLog
14:59 < mae> or Happstack.Server.AccessLogCombined
14:59 < mae> (this is not the same thing as a haskell module)
15:00 < mae> stepcut: well no, if you target Happstack.Server NOTICE, this should only target the combined access log, because i don't think any other logging statements are defined for that module
15:00 < mae> but I could be wrong
15:01 < stepcut> mae: but, if someone unknowningly added a Happstack.Server NOTICE that wasn't apache style, that would be a problem?
15:01 < mae> yes it would.
15:02 < mae> so i suggest in the next release we define this more specifically
15:02 < mae> heh
15:03 < mae> probably Happstack.Server.CombinedAccessLog, to leave the possibility of adding a different style of log later
15:03 < mae> (prob not)
15:03 < mae> and then probably a separate log file
15:03 < mae> access.log
15:03 < mae> (in the guestbook app)
15:04 < mae> i am not sure if we should enable any type of logging by default, or leave that to be user defined
15:04 < mae> for instance, if someone builds  basic happstack.server thing, do we want to make assumptions and drop an app.log in the CWD ?
15:04 < stepcut> mae: no
15:04 < stepcut> mae: log file for guestbook: yes, log file by default: no ?
15:05 < mae> stepcut: i agree
15:05 < stepcut> mae: also, happstack currently uses magic command-line options, which is wacky
15:05 < mae> stepcut: oh? :)
15:05 < stepcut> mae: I would like to see that removed
15:05 < stepcut> mae: yep
15:05 < mae> so somewhere in the dungeons of code, it looks up the args in the env?
15:06 < stepcut> yep
15:06 < stepcut> any thing that uses happstack-state will respond to command line options like
15:06 < stepcut> --log-level, --log-target, --cluster-mode, --cluster-port :)
15:07 < stepcut> mae: but there is no --help indicating that
15:07 < mae> http://code.google.com/p/happstack/issues/detail?id=75
15:07 < mae> retarded
15:07 < mae> hehe
15:07 < mae> well theres also +RTS weirdness :)
15:08 < mae> but i guess thats accepted as "blessed"
15:08 < stepcut> mae: I am not opposed to happstack having some default command-line options, but it should be done in an extensible way so that --help reports them all and so that you can add additional ones
15:09 < mae> http://code.google.com/p/happstack/issues/detail?id=76
15:09 < stepcut> mae: on a slightly related note, I have a help library for haskell that can automatically generate a manpage from the getOpts, and it can also reformat the --help text based on the width of your terminal ;)
15:10 < stepcut> mae: but, I need to tweak it to use pandoc for the markup instead of groff DSL
15:10 < mae> cool
15:11 < stepcut> mae: any apps you build with it response to --help and --dump-man-page (which are both listed in the --help)
15:11 < mae> very neat
15:12 < stepcut> http://src.seereason.com/ghc610/haskell-help/
15:13 < stepcut> http://src.seereason.com/ghc610/haskell-help/examples/Help.lhs
16:23 < mae> gwern: I was reading http://github.com/jgm/gitit/blob/ec2977ed3f14e11180343529ed55159783a475bf/Gitit/Server.hs
16:23 < mae> gwern: Happstack 0.2 has included the cookie fix, so the custom cookie parser should not be necessary
16:23 < mae> (if you upgrade :)
17:22 < solidsnack> mae: You around?
17:22 < solidsnack> mae: I am prepping some diagrams for the sharding thing -- it'll be a few days still.
17:24 < Ninju> Hi there, I just installed happstack, but when I try to run the guestbook application I get "Main.hs: exception :: GhcException"; anyone know what may be causing the problem?
17:37 < mae> solidsnack: ok great,
17:37 < mae> Ninju: i've gotten that once before, is ghc, runghc, ghci all in your path?
17:38 < Ninju> mae: Yes.
17:39 < mae> does run-interactive work?
17:39 < Ninju> mae: Not sure what you mean - ghci?
17:40 < Ninju> mae: Ahh, hold on, just let me try.
17:40 < Ninju> mae: Run interactive seems to work.
17:41 < Ninju> *run-interactive
17:42 < mae> in run-interactive you can do 'main'
17:42 < mae> and its the same affect
17:42 < mae> i'm not sure why sometimes runghc doesn't seem to work
17:44 < Ninju> During interactive linking, GHCi couldn't find the following symbol: base_DataziTuple_Z166T_con_info or base_DataziTuple_Z166T_static_info
17:46 < Ninju> Hmm, I'm not sure how to fix that. Any ideas?
18:27 < gwern> mae: ah, is that what the problem was?
18:27 < gwern> mae: I tried to compile gitit with happstack 0.2 and didn't get very far
20:15 < dons> yo happs fiends, i've just released a new Data.Binary that'll fix some stack overflow issues serialising lists
20:16 < dons> not sure if that affects your project, but probably worth checking
21:20 < stepcut> hopefully for 0.3 we can have a template for making facebook apps :)
21:23 < kfish> anyone looked at openid authentication?
21:32 < stepcut> kfish: just use facebook connect, far more users :) Plus, facebook is on the openid board.
21:35 < stepcut> I don't personally know anyone with an openid account, but I do know lots of people with facebook accounts...
21:44 < kfish> :-)
21:47 < kfish> well, openid covers many services (eg. all google accounts too) so it'd be useful
21:47 < kfish> it's just a bit more complex to implement than facebook connect
21:54 < stepcut> :)
21:54 < stepcut> kfish: so, if I have a google account, does that mean I have an openid account and don't know it?
21:55 < kfish> yup
21:55 < kfish> http://code.google.com/apis/accounts/docs/OpenID.html
21:57 < stepcut> kfish: well, then I guess I do know lots of people with openid accounts
21:58 < stepcut> kfish: anyway, openid support for happstack would be nice!
22:00 < kfish> yeah :-)
22:01 < kfish> heh: http://openid.net/get/
22:09 < kfish> http://www.plaxo.com/api/openid_recipe
23:45 < stepcut> it takes a lot of imports to write a real application
23:56 < mae> yeah
23:56 < mae> i actually was gonna write an openid lib in haskell awhile back, but never did
23:56 < mae> i think there already might be an openid for hasekell
23:57 < mae> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/openid-0.1.1.0
23:57 < stepcut> yep
23:58 < stepcut> i wonder if we need to do anything special to use it with happstack-katamari
23:58 < mae> hehe what the heck is katamari
23:59 < stepcut> mae: one moment
23:59 < stepcut> http://www.youtube.com/watch?v=cwhFH75OCDs
--- Log closed Sun Mar 08 00:00:24 2009