--- Log opened Mon Apr 20 00:00:33 2009
08:03 < DanielC> Hi. Does Happstack require running its own web server or can it run on top of Apache?
08:04 < DanielC> e.g. some people have shared hosting accounts and can't install server software.
08:14 < mightybyte> DanielC: Happstack has it's own web server, but you are not required to use it.  You could use Happstack's state management without it's web server, or vice versa.
08:15 < mightybyte> DanielC: Yesterday a Happstack-FastCGI package was also announced.
08:15 < mightybyte> http://groups.google.com/group/HAppS/browse_thread/thread/79dcee6a3aeee52b
08:31 < DanielC> Hi. I got disconnected :-(   Can happstack run on top of Apache? Some people have shared hosting accounts and can't install new server software.
08:34 < vegai> there was some very recent developments on fastcgi
08:34 < vegai> 15:15 <mightybyte> http://groups.google.com/group/HAppS/browse_thread/thread/79dcee6a3aeee52b
08:35 < DanielC> *click*
08:35 < DanielC> Thanks.
09:08 < kristofer> yo
11:06 < mornfall> Hi.
11:06 < mornfall> The hackage version of happstack is giving me this ""HTTP request failed with: Unsupported socket" trying to run gitit.
11:07 < mornfall> (It seems to come from an "error" call in happstack somewhere... grabbing code now.)
11:18 < mornfall> Okey, so Happstack.Server.HTTP.SocketTH(supportsIPv6) is False and HTTP request failed with: Unsupported socket: [::ffff:62.40.79.66]:48050
11:18 < mornfall> (I have added ++ show addr to that error "Unsupported socket" in Happstack.Server.HTTP.Socket...)
11:26 < mornfall> Hm, the TH voodoo is ... irksome.
21:02 < mae> hi there
21:02 < mae> anyon around ? :)
21:04 < stepcut> happstack 0.3 attack!
21:05  * stepcut is very carefully not submitting any patches so he doesn't break 0.3 ;0
21:06 < mae> haha
21:06 < mae> does it build on your plat?
21:07 < mae> i mean
21:07 < mae> i haven't actually tested 6.10.2 yet
21:07 < mae> and my damn fridge is broken right now
21:08 < thetallgu1> Convenient in a heat wave.
21:10 < mae> ok first order of business, version bump 0.3 => 0.3.1
21:11 < stepcut> mae: I don't think we have tried building head yet, only 0.2
21:11 < mae> testing to make sure this builds..
21:12 < mae> did anyone get a chance to test creightons lock patch?
21:13 < mae> i remember you said that it should have a useful error message if the lock prevents the state system from starting, remember stepcut?
21:13 < stepcut> mae: I remember, I didn't test though
21:13 < mae> latest details: http://code.google.com/p/happstack/issues/detail?id=61
21:13 < stepcut> but, on a related note, in addition to the lock, perhaps the apps should abort if the port is already in use?
21:14 < mae> what happens currently?
21:14 < stepcut> mae: currently, the app keeeps running, though it just occured to me that I usually have
21:15 < stepcut> tid <- forkIO $ simpleHTTP ....
21:15 < stepcut> so maybe the simpleHTTP thread dies, but I don't notice?
21:15 < mae> version bump pushed,
21:15 < mae> oh i see
21:15 < mae> have you tried it?
21:16 < stepcut> mae: in other news, did you see that alexj has been checking out happstack and hanging around the channel?
21:16 < stepcut> it == ??
21:16 < mae> it == have you tried running happstack on a port is in use, to see what happens?
21:16 < mae> stepcut: i saw him on the ML, he has been around chat?
21:17 < stepcut> mae: yep. in fact he is in the channel right now! ;)
21:17 < stepcut> mae: he had some problems getting it up and running, but it was mostly due to a bogus install of syb I think
21:19 < stepcut> mae: he got it working with searchpath again. I wonder if that has any impact on your autorecompile stuff?
21:21 < mae> stepcut: nope, i didn't build against sp
21:21 < mae> i was just borrowing an idea from it
21:21 < mae> my tool is actually very simplistic
21:21 < stepcut> mae: right, I just didn't know if there was any duplication of effort
21:21 < mae> well yes and no
21:21 < mae> yes searchpath does the same thing, but searchpath also assumes you want to use searchpath
21:22 < stepcut> someday I hope to get the plugin stuff going, but, as much fun as that would be, I have business stuff that has to be done first :-/
21:22 < mae> my tool simply lets you pass in parameters for 1. a build command and 2. the target of the executable and 3. the args you want to give to the "target" each time it is restarted
21:22 < mae> so for instance, you can use it with your own custom build script
21:22 < stepcut> also, we need to rewrite happstack in agda
21:22 < mae> or with cabal install --inplace for instance
21:23 < mae> agda?
21:23 < stepcut> agda == a haskell-like dependently typed programming language
21:23 < mae> oh boy, i hope your joking :)
21:24 < stepcut> there is a paper about implementing a dependently typed lambda calculus, and in the intro it talks about how the Haskell developers will go to no ends to avoid implementing real dependent typing in Haskell
21:24 < stepcut> (e.g., GADTs, associated types, etc)
21:25 < mae> heh
21:25 < stepcut> but, sadly, I often find that the code I want to write is too ugly with out real dependent types
21:25 < stepcut> like, in the facebook library, some API calls require that you have a user id or session available. But encoding that in the Haskell type system is so ugly that it is not worth doing
21:26 < stepcut> where ugly == the pain of using it is worse than the pain from not getting that compile time guarantee
21:28 < mae> i think perhaps you are looking for the holy grail when you just need to find a compromise :)
21:28 < stepcut> mae: agda is the holy grail ;)
21:28 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
21:28 < mae> haskell has a growing platform / community and it is very functional compared to other buzzworthy languages
21:28 < stepcut> mae: agda has a very good Haskel FFI
21:28 < mae> agda i am sure is great, but as you said, so much to code, so little time :)
21:29 < stepcut> mae: in fact, you have to import Haskell if you want to do I/O :)
21:29 < mae> ah
21:29 < mae> is agda running on top of ghc?
21:29  * stepcut has no idea
21:29 < mae> interesting
21:29 < stepcut> agda is implemented in haskell, and the emacs mode uses GHCi
21:30 < mae> right
21:30 < stepcut> I have not actually *run* an agda program yet. Getting them to compile is usually enough ;)
21:31 < stepcut> since getting it to compile is proof that is works ;)
21:31 < gwern> stepcut: what's so hard about making sure a userid/session is available? just make it an arg
21:33 < stepcut> gwern: I thought about doing that, but the userid and session are passed in as part of the Request. So, if they are available, there is only one valid value for them. Hence, allow the programmer to pass in an arbitrary value just introduces another place to screw things up, or extra 'boilerplate' work for the programmer
21:33 < stepcut> in the currently implementation, if an API call needs a userid or session, it just queries the environment (via the ReaderT monad)
21:34 < mae> its not great, but it works :)
21:34 < stepcut> the primary issue with that is that when you call a function, like publishUserAction, that fact that it requires a valid session is not apparent. So if you don't have one, you won't notice until run time.
21:34 < mae> which is why we need to have smart people like yourself work to make it better
21:35 < stepcut> I actually hacked up an implementation where the type systems ensures everything is happy here, http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3993#a3993
21:36 < stepcut> you use withSession or withUID to 'assert' that you actually have a session or uid.
21:36 < stepcut> In a real version, instead of calling 'error' it would call a user supplied function when no session or uid is available
21:37 < h_buildbot> Build for ghc-6.10.2 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
21:37 < mae> this is an interesting conversation, but can we focus on getting 0.3 released? :)
21:37 < stepcut> if you want to extend that code to support n-assertions  though, you need indexed/paramaterized monads. Which are not well supported in Haskell (ie. no do-syntax among other things)
21:37 < mae> i need some help
21:37 < stepcut> halp!
21:37 < sfultong> hello, I am a new happstack user, and I wonder if I could help
21:38 < sfultong> probably new to be of much use
21:38 < stepcut> help! I need somebody! Help! not just anybody!
21:38 < stepcut> sfultong: how skilled are you at Haskell?
21:39 < stepcut> sfultong: there is an issue tracker here, http://code.google.com/p/happstack/issues/list
21:39 < sfultong> I'm not really sure... I think I can deal with monad transformers alright
21:39 < stepcut> sfultong: but if you give us an idea of your experience level we can help figure out what bugs you might be able to work on
21:40 < sfultong> I consider it improper to rate my own skill level ;-P
21:42 < stepcut> sfultong: I disagree -- your own impression of your level is a direct reflection of your self image. It is very difficult for you to go against your self image. So, if you feel that you are at a certain level, you will work very hard to 'prove' to yourself that you really are at that level. Hence, if take on a task at that level, you will be likely to give it your best shot ;)
21:44 < sfultong> self image was never my strongpoint
21:45 < stepcut> sfultong: it does not really work like that... everything you do is based on your self image -- whether it is high, low, etc. It is extremely difficult to do *anything* that is in conflict with your self image
21:45 < sfultong> however, I do sincerely want to help
21:46 < stepcut> sfultong: I would start by looking at the issue list and seeing if anything is particularily interesting to you
21:47 < stepcut> sfultong: it's not a very big list, so it's a good place to start
21:47 < mae> stepcut: fixing my fridge still, but if you can test the lock mechanism that would be helpful, lets put off the port issue since it is so new
21:49 < stepcut> mae: new to you! the bug was filed March 27, http://bugzilla.seereason.com/cgi-bin/bugzilla/show_bug.cgi?id=241
21:49 < stepcut> ;)
21:53 < stepcut> mae: I have to go now actually :(
22:00 < mae> stepcut: ok ttyl
22:00 < mae> stepcut: if its old then wheres the patch ??! :)
22:01 < gwern> stepcut: it seems strange that you can't enforce a session being avaulable as part of the reader monad part
22:01 < mae> i think you can
22:01 < mae> its probably just not as elegant
22:01 < mae> : )
22:01  * gwern had the vague idea that guaranteeing certain data was accessible was the whole point of Reader
22:01 < mae> but alas, elegance does not birth anything useful, necessarily
22:01 < stepcut> gwern: it's only required for *some* API calls. And a user id is only required for *other* API calls
22:01 < mae> thats the hard part
22:02 < gwern> oh. hm. maybe newtype 2 different reader monads?
22:02 < mae> session does seem to be a common paradigm, that we need... although i would love to see something a little more slick like the continuations in seaside
22:03 < stepcut> gwern: what if you are try to do something that requires a call that only requires UID and another call that only requires a Session. Then you have to 'merge' those two newtype somehow?
22:05 < gwern> well, it sounds as if if you have a session, then you can get a uid, but a uid doesn't necessarily imply a session
22:05 < gwern> so start off with a UID monad and layer on a session monad when needed
22:05 < stepcut> gwern: right
22:06  * stepcut ponders
22:07 < mae> right
22:07 < mae> session is more of a high level concept anyways
22:07 < mae> stateless protocol..
22:08 < mae> i think it would be neat to implement continuations like seaside does
22:08 < stepcut> mae: well, with the facebook API it is more of a simple matter -- in order to call certain functions, you must pass in a session id
22:08 < mae> but this woujld obviously require some plumbing, mvars, black magic etc
22:08 < mae> but the end result would be pretty awesome for quick and dirty interface building
22:08 < mae> not everything has to be restful
22:08 < stepcut> mae: not everything -- but this is specific the facebook API
22:09 < mae> right
22:10 < mae> i guess i would have to look at the specific implementation to see the problem
22:12 < stepcut> in the current implementation, the problem is mostly that when you call a API method, there is no real indication that a particular method requires a session or uid, so you might not noticed that you don't have one until runtime after the call fails and you don't have any code in place to deal with ti
22:20 < mae> stepcut: yeah thats not cool
22:20 < stepcut> mae: but, using type indexed monads is not so cool either ;)
22:20 < mae> stepcut: can you create a patch that solves this simply (save the grandiose solution for later) ? not for this release of course
22:20 < mae> stepcut: indeed :)
22:21  * gwern thinks type-indexed monads are cool
22:21 < stepcut> gwern: indeed
22:21 < stepcut> mae: well, this is restricted to the happstack-facebook library, so it does not affect the happstack 0.3 release
22:23 < mae> stepcut: right but i'm suggesting making the core api more robust next time around based on what you've learned
22:36 < stepcut> mae: that's where agda comes in ;)
23:23 < mae> sm: hello! :)
23:28 < sm> hey mae
23:40 < mightybyte> Anyone know a quick way to start some state in ghci for doing some manual exploring and debugging of state manipulation functions?
23:53 < mae> ooh..
23:53 < mae> not sure
23:53 < mae> have you tried the ghci debugger?
23:58 < mightybyte> No.  How does that work?
23:59 < mae> http://www.haskell.org/ghc/dist/current/docs/users_guide/ghci-debugger.html
--- Log closed Tue Apr 21 00:00:34 2009