--- Log opened Fri Mar 27 00:00:58 2009
07:35 < HugoDaniel> hello
07:36 < HugoDaniel> im not able to access happstack by ip
07:36 < HugoDaniel> if i go to localhost:5001 it works fine
07:36 < HugoDaniel> if i go to 127.0.0.1:5001 it doesn't :P
07:43 < HugoDaniel> yet its listening:
07:43 < HugoDaniel> tcp6       0      0 *.49651                *.*                    LISTEN
07:43 < HugoDaniel> also, netcat works fine and answers fine
07:43 < HugoDaniel> so its clearly not a machine configuration problem
07:43 < HugoDaniel> but happstack
07:44 < koeien> HugoDaniel: your browser doesn't pass Host: localhost in that case. that may be the problem. i have no idea what it is
07:44 < HugoDaniel> and happstack needs localhost ?
07:44 < HugoDaniel> im trying on other machines over the network
07:45 < HugoDaniel> and they also can't access by ip to the happstack running on this machine
07:48 < HugoDaniel> when i try to access through telnet a courious thing happens:
07:48 < HugoDaniel> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2944#a2944
07:48 < HugoDaniel> :/
07:48 < HugoDaniel> it clearly shows the problem
07:50 < HugoDaniel> ill try to update to happstack 0.2 (im using 0.1)
08:00 < koeien> ipv6
08:08 < HugoDaniel> what about ipv6 ?
08:08 < HugoDaniel> happstack doesn't work with ipv6 ?
08:09 < HugoDaniel> ouch, ServerPartT changed :S
08:14 < HugoDaniel> hmm monoids, sweet, its another way of saying a list of objects, but i guess its more haskelly
10:49 < Ninju> HugoDaniel: Still fighting that issue, eh?
15:08 < rovar> is there TLS support in HTTP (or anywhere else) in haskell?
15:44 < koeien> rovar: not in happstack
15:45 < koeien> rovar: http://huygens.functor.nl/blog/ here you can see how to do it with apache as proxy
15:46 < rovar> I figured i'd use Lighty in the same fashion
15:46 < koeien> sure, that should work
15:46 < rovar> thanks for the link
16:29 < xplo45> Hello
16:39 < xplo45_> h
16:40 < xplo45_> Is anyone there
16:40 < koeien> xplo45_: hi!
16:42 < koeien> xplo45_: Sure. i might not be able to answer your question, but somebody else may come along who can
16:45 < xplo45_> hello
16:46 < xplo45_> Is anyone there
16:52 < xplo45_> I am very appreciative of Happstack and I am feeling it out. I first started serving single files. Easy -- However, I tried to serve a html file by reading it and using HtmlString and it does serve the file. The problem is the html file has javascript which tries to call a .swf flex form, the form does not load when the file is served. What must I do?
16:54 < rovar> you should serve the file directly, HtmlString is for something else, i think
16:59 < xplo45_> I thought so too, however on the Happstutorial site, they appeand a file to and a string of html using htmlSting. Also, in what way would I serve the file directly? Isn't the fileServe function depricated. It is not shown on the HappsTutorial site which seems to be the only source of documentation right now.
17:18 < rovar> liftIO $ writeFile
18:12 < rovar> guys, on the subject of Comet (Long lived push oriented ajax connections)  What do you think about forkIOing a connection babysitter, which maps a session id to a socket?
18:13 < rovar> so when an event occurs that needs to be pushed, the instance pushes a message destined for a session id down a TChan to the babysitter to push the data out
18:13 < rovar> two related things, I'm not sure what it does with stale connections, but instead of closing them, it could send them to the babysitter instead.
18:14 < rovar> also, the additional out-of-band tcp connection that browsers establish could be directed straight to the babysitter
18:14 < stepcut> rovar: what happens if you have more than one server?
18:15 < rovar> well. if a distributed event occurs, it will have to notify the server that owns the connection.
18:15 < rovar> also, I'm told that State has the ability to register events.
18:17 < rovar> there is a compelling case for session-stickyness when dealing with comet. which is slightly contradictory to the happstack way :)
18:17 < stepcut> I don't know if happstack has a way -- that is part of its appeal
18:18 < rovar> sure, i guess the purported benefit of Macid is that the state is shared so that any server could handle any session, and failover is automatic
18:19 < stepcut> well, if you use sharding, the the state may not be shared
18:20 < stepcut> the benefit of MACID is that everything is in-RAM by default, and you get explicit control over archiving stuff to disk
18:20 < stepcut> instead of trying to get your memcached servers to have the right stuff in their caches
18:21 < rovar> i guess it's happstack-state that claims this, not MACID specifically
18:21 < stepcut> claims what?
18:21 < rovar> Unplug your machine and restart and have your app recover to exactly where it left off. Happstack-State spares you the need to deal with all the marshalling, consistency, and configuration headache that you would have if you used an external DBMS for this purpose.
18:21 < rovar> shared nothing, external storage, etc
18:22 < rovar> external being disk/s3, whatever
18:22 < stepcut> to a degree
18:23 < rovar> either way, I think it would be nice to be able to share events between happstack instances, so that the owner of the connection to a specific session can send that data
18:23 < rovar> though going through State seems like an obtuse way to do it.
18:26 < rovar> hrrm..
18:27 < rovar> WRT that concensus protocol that snack is talking about implementing.. i bet that would need a lightweight message passing API
18:28  * stepcut still needs to read that paper
18:28 < rovar> it's odd
18:29 < rovar> there are a lot of messages involved per voting round. I would like to compare that to something like spread.
18:29 < rovar> spread + function/event  seems sufficient, imo.
18:30 < rovar> update oriented mvcc instead of state oriented
18:30 < rovar> spread would also support my event broadcast scheme
18:43 < rovar> i guess I could jack in at the Happstack.State.Spread level.
18:44 < rovar> the upside is nice.  From an end-user perspective, all I need to do is say "send event  n to session #" and regardless of my cluster layout, the message gets sent
18:45 < rovar> the ultimate shared nothing architecture
18:45 < rovar> for that matter.. one could have a separate (non-happstack) tcp server that supports HTTP, and have it receive broadcasts.
18:46 < rovar> all inbound auxiliary connections would have to be referred to it, which might involve some config...
18:47 < rovar> not might, would, at the very least the javascript that initiates the XMLHttpRequest call would have to know to send it to the comet server
18:48 < rovar> yea, the first idea is nicer, it would allow a person to treat a cluster of distributed happstack instances as a single instance (ignoring sharding atm)
18:49 < rovar> the downside is that for every pushed event, there is a broadcast
18:49 < rovar> and it is only ever bound for one actual server
18:52 < rovar> I think I'm going to try to hack in a "stateless" State subscription message, which will send a  session:body msg to the connection nanny
18:52 < rovar> we'll see what happens.
19:01 < mightybyte> Is there a target date for 0.3?
19:56 < stepcut> mightybyte: yes
19:56 < stepcut> 4/4 i think?
20:34 < patch-tag> How do I load an HSP module into ghci, such as the simple hello
20:34 < patch-tag> 	    world module at
20:34 < patch-tag> 	    http://www.nabble.com/ANNOUNCE:-Haskell-Server-Pages-v-0.4-td16286741.html
20:35 < patch-tag> 	    ?
20:35 < patch-tag> I think it needs some flag, to parse a line such as f = <html><head>.... etc
20:38 < stepcut> one moment
20:38 < stepcut> add this to the top
20:38 < stepcut> {-# OPTIONS_GHC -F -pgmFtrhsx #-}
20:42 < patch-tag> ah, good thanks.
20:43 < patch-tag> I find it somewhat disconcerting that HSP = HSPT IO      -- Defined in hsp-0.4.5:HSP.Monad
20:43 < patch-tag> that is, that HSP is an IO type
20:43 < patch-tag> is there some way to use HSP in a "pure" way?
20:44 < patch-tag> That is, modify that hello world function such that it is pure?
20:46 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
20:49 < stepcut> patch-tag: in this library, http://src.seereason.com/happstack-extra/, I have defined HSP.Identity, which uses the Identity monad instead of the HSPT IO monad
21:00 < h_buildbot> Build for ghc-6.10.1 OK. Test suite ran. 15/77 test cases failed. Check http://buildbot.happstack.com/ for details.
21:14 < patch-tag> thanks, that's exactly what I needed.
21:31 < xplo45_> OK, It works... alright that wasn't as hard. If I was a bit more up on web programming I'd have seen my mistake. Anyway - I have a Adobe flex form being served up from happstack. This is cool because now I can make a fancy little RIA page that attracts people to happstack, which is my goal because I love haskell and happstack. Also this served as a little excercise for me with happstack.
21:32 < patch-tag> xplo45: :)
21:32 < patch-tag> got a demo link?
21:39 < xplo45_>   patch: I let you know when I have something nice
21:41 < jeffwheeler> Is it reasonable to use Happstack if I intend to use CouchDB as a database? Or, will that awkwardly conflict with the inherent state stuff in the software already?
21:44 < patch-tag> jeffwheeler: you can use happstack just for view and controller, and not use HAppS.State for anything
21:45 < jeffwheeler> patch-tag: and that would be reasonable? I very much like certain aspects of Happstack, like the simplicity of URI routing.
21:47 < patch-tag> jeffwheeler: yes.
21:47 < jeffwheeler> Great, thanks. :)
21:47 < patch-tag> eventually, happstack should have tutorials for "using happstack with a database" etc
21:47 < patch-tag> just hasn't been done.
21:47 < patch-tag> But the key insight is that you can use anything in the io monad by using liftIO to lift the io action into ServerPartT or WebT
21:48 < patch-tag> There's examples of this in tutorial.happstack.com
21:48 < jeffwheeler> Yeah; that's what I've been looking through.
21:48 < jeffwheeler> The CouchDB package on Hackage seems very clean, so I'm excited to play with that.
21:49 < patch-tag> hope you get it to work!
21:49 < jeffwheeler> Thanks!
21:51 < patch-tag> http://tutorial.happstack.com/src/ControllerBasic.hs
21:51 < patch-tag> see the area around "this is an io value" :)
21:51 < xplo45_> Although, one of main ideas about happstack is to eliminate the need for DB management and the like so you can develop a web app much like a destop app. Is this not so?
21:52 < jeffwheeler> It is, but CouchDB is fairly distinct from most db's; I'm sure it can be re-implemented with Happstack stuff, but I'd like to play with it anyways.
21:52 < xplo45_> Jeffwheeler: not to say I don't wish you luck
21:53 < jeffwheeler> So, this way I get to kill two birds with one stone.
21:53 < xplo45_> interesting
21:55 < patch-tag> xplo45: many apps are not code-from-scratch but "inherit a db with a lot of complex business logic, and use that"
21:56 < patch-tag> happstack should be usable for that as well -- it's important!
21:58 < patch-tag> my new sig says "Happstack: the elegance of haskell, the simplicity of php"
21:58 < patch-tag> I love flamebait :)
21:58 < xplo45_> I wasn't thinking about that aspect, good point.
21:59 < patch-tag> But it's almost true, especially if you code in the "HSP" style.
22:38 < xplo45_> The extreme use of monads in happstack is cause for concern. Its almost as if happstack wants to be written in an imperative language. Perhaps more of the framework can be shifted to a pure style segregating monads to where the are absolutely necessary.
23:11 < patch-tag> splo45: I agree.
23:12 < patch-tag> The difficulty is that web programming seems to lend itself to some degree of global state.
23:12 < patch-tag> I am going through this issue right now when trying to clean up gitit code for use in patch-tag.
23:13 < patch-tag> A good step in this direction, seems to me, is pure view functions.
23:13 < patch-tag> An even better step is pure view functions which utilize HSP.Identity, a pure form of HSP (which lives in the IO monad by default)
23:14 < patch-tag> And, ideally, view functions should accept explicit arguments, not a grab bag of [Params] list, like hsp currently does it, and to some lesser degree hapstutorial (which I am guilty of as author)
23:26 < patch-tag> (just posted about this to gitit-discuss)
23:27 < sm> nice nick there th!
23:28 < patch-tag> :)
23:28 < sm> good marketing :)
23:28 < patch-tag> you just wait till i wade into the php chat rooms
23:29 < patch-tag> they'll never know what hit em
--- Log closed Sat Mar 28 00:00:02 2009