--- Log opened Fri Apr 03 00:00:06 2009
00:26 < mae> hello :)
00:52 < sm> hey mae
00:55 < mae> hi sm
00:55 < mae> still remember you from the lafp talk :) tall guy!
00:55 < sm> that's me!
00:55 < sm> how's life
00:56 < sm> I ported my haskell project from happs to happstack.. it's working great
00:57 < sm> also I liked what you did with the project generator! it's a great way to get started
00:59 < sm> hey I bet you know - what's the way to match the top-level path, ie / or "" ?
07:10 < mightybyte> sm: methodSP GET
07:14 < sm> mightybyte: that does it! thank you
08:19 < mightybyte> sm: Sure
09:00 < oshyshko> Is there any tutorial or small example about storing custom data per http session?
10:09 < oshyshko> I have found this: http://softwaresimply.blogspot.com/2008/02/finished-happs-application.html
10:12 < oshyshko> Another silly question: how to convert "SercerPartT m Response" to "Response" in "methodSP POST $ withData loginPage" ?
10:23 < oshyshko> Found another example http://gregorycollins.net/posts/2009/03/30/building-a-website-part-2 fresh stuff.
11:19 < mightybyte> oshyshko: I wrote the softwaresimply blog.  It's somewhat out of date since Happstack 0.2 was released.
11:25 < mightybyte> Happstack's current data migration philosophy requires functions that convert from older versions of the state.
11:26 < mightybyte> Is there a way to make Happstack run a conversion on the entire state so code for the old versions doesn't need to be kept around?
11:38 < oshyshko> A small migration howto would make me happy.
11:38 < mightybyte> Have you seen http://happstutorial.com?
11:39 < mightybyte> There's some written about it there.
11:39 < oshyshko> Yeah, but it doesn't cover my case: sessions.
11:39 < oshyshko> It exlains cookies but not sessions.
11:39 < mightybyte> Ideally migration won't be an issue with sessions.
11:40 < oshyshko> Also, why I don't like this tutorial because it is huge and monolith.
11:41 < oshyshko> A set of 10 articles or cookbook recipes that solve actual problems whould be much better for newcomers.
11:42 < mightybyte> That's kind of what I was going for in softwaresimply
11:42 < oshyshko> Every tutorial could covet its own own aspect, keeping source code small and sepearated from other tutorials.
11:45 < oshyshko> Yeah.
12:05 < wchogg> Well, what I've been doing with the Happstack Tutorial is that each chapter is including more & more stand alone examples rather than just one long running one.
12:08 < wchogg> So if the monolithic-ness bothers you, I'd recommend checking back every so often because you might find it growing more to your taste.
12:26 < mightybyte> So anyway, I'd love to see support for both one-time migration of all state (without keeping the conversion code around) as well as the current incremental approach.
12:27 < mightybyte> I'd love to have a discussion on this if anyone is interested.
12:48 < oshyshko> wchogg: it happens quite often that you're looking for a prticular solution, e.g. adding HDBC support or tweaking HTTP headers. And you don't have much time for reading a book. You just need one-shot answer, fix your problem and contine working on functionality.
12:49 < oshyshko> wchogg: e.g. I don't need HTML/form parsing stuff, I don't use MACID, but I need to work with sessions in my Haskell code.
12:50 < oshyshko> wchogg: wchogg: okay, let's pick the session quesions: I go to http://tutorial.happstack.com/tutorial/cookies then click on Misc.hs link
12:51 < mightybyte> oshyshko: Do you want to store your sessions in MACID state?
12:53 < oshyshko> mightybyte: no, in-memory sessions will be just enough. I don't use MACID.
12:53 < mightybyte> MACID is in-memory.
12:54 < oshyshko> well, yes MACID is in-memory buts its heavy in terms of source code
12:55 < oshyshko> I am looking for a way to associate some algebraic type with a website visitor. E.g. user credentials (if he logged in) + some other stuff.
12:56 < mightybyte> I don't see why you wouldn't want to use MACID to store that information.
12:57 < oshyshko> with MACID I have to dance with mkMethods and derive etc. So adding just one simple algebraic type becomes bloated into many lines of code.
12:57 < oshyshko> Why not just to have state monad + map key=sesion_id, value=some my type
12:57 < mightybyte> Not necessarily.  I have been working on an auth library that will allow you to do this with very little effort.
12:58 < oshyshko> This is what I'm looking for.
12:58 < mightybyte> Ok, I'll make the current code available.
12:58 < mightybyte> One moment.
12:59 < oshyshko> This one? http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3120
13:00 < mightybyte> It's based on that one, but it has improved since then.
13:00 < mightybyte> Although it still needs a lot more work to make it generally useful.
13:00 < oshyshko> mightybyte: cool. show me please
13:07 < mightybyte> http://github.com/mightybyte/happstack-auth/tree/master
13:11 < oshyshko> mightybyte: please, could you commit the corresponding Main.hs like this one http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3119
13:13 < mightybyte> Ok, just a minute.
13:41 < mightybyte> oshyshko: Ok, I added a Main.hs that compiles.
13:41 < mightybyte> There are some problems with it.  It doesn't generate pages properly and I don't have any html pages for it to use.
13:42 < mightybyte> I don't have time to fix it right now, so that will have to do.
13:44 < oshyshko> mightybyte: its ok. thank you!
13:45 < mightybyte> No problem
14:43 < burp_> hi
14:54 < mightybyte> burp_: Hi
21:42 < mae> ahoy mateys
22:09 < TomMD> ahoy mae-teys.
22:24 < mightybyte> Ahoy
--- Log closed Sat Apr 04 00:00:07 2009