17:36:47 <donri> stepcut: hey hsx-qq won't work for harp-enabled pattern unpacking of xml literals right? could quotePath be used here?
17:36:50 <donri> quotePat
17:36:54 <donri> of QuasiQuoter
18:31:35 <donri> http://www.haskell.org/haskellwiki/Web/Frameworks#Happstack needs some updating
18:32:07 <stepkut> probably
18:32:23 <stepkut> well, definitely
18:35:44 <donri> "organized as a suite of libraries" is becoming less true as the libraries are being decoupled from happstack
18:36:03 <donri> or perhaps more true, depending on how you interpret it :p
18:36:16 <stepkut> I think it is more true
18:36:28 <donri> but they're not "the suite of happstack libraries"
18:36:45 <stepkut> right
18:36:46 <donri> it's more strongly related to the second point of "integration with 3rd-party libraries"
18:37:10 <donri> even when the third-parties are spawned from the happstack project / developers
18:37:12 <stepkut> happstack is a collection of libraries.. but not all of them are written/maintained by happstack
18:39:12 <stepkut> but.. something like acid-state is part of happstack in the sense that we document it, work to promote, working on bug fixes for it, where as we completely ignore persistent
18:40:14 <stepkut> but.. that is part of what makes it hard to describe what happstack is exactly
18:40:30 <stepkut> in theory we could have happstack, but not actually maintain any code..
18:40:39 <donri> maybe "happstack" should be thought of as an "umbrella project" for packages related to "application servers"
18:41:14 <donri> and to that end, perhaps the server in happstack 8 should also be renamed to something more generic?
18:41:28 <stepkut> I think you mean, something more awesome
18:41:32 <donri> :)
18:41:46 <stepkut> greased lightening
18:43:22 <luite> name it ftl
18:43:45 <donri> tachyon
18:43:56 <stepkut> ftl == faster than light?
18:43:58 <luite> yeah
18:44:12 <donri> or "for the lose"
18:44:17 <luite> ssh ;p
18:44:35 <donri> luite is trying to infiltrate us and propose confusing names!
18:44:54 <luite> tachyon is a catchy namethough
18:45:12 <luite> perhaps not for a web server
18:45:16 <donri> neutrino
18:49:28 <donri> luite: "welcome to haskell web development. do you want your server to be a warp conduit or a tachyon pipeline?"
18:50:12 <luite> sounds good to me
19:03:48 <donri> stepkut: http://www.haskell.org/haskellwiki/Web/Frameworks#Happstack hopefully better, but could still be improved
19:04:32 <stepkut> cool
19:42:05 <donri> will scoutess be usable as a library or (at least initially) just as an executable?
19:44:49 <stepkut> a library
19:45:06 <donri> nice
19:45:17 <stepkut> in fact, we don't much choice
19:45:31 <stepkut> the config file is supposed to be an ordinary haskell file
19:45:47 <donri> dyre? :)
19:45:51 <stepkut> possibly
19:46:19 <stepkut> so, the 'executable' is your config file + the library + some thin glue
19:47:37 <stepkut> if you check out the .cabal you will see we already have it split into library and executable
19:47:38 <stepkut> http://patch-tag.com/r/alpmestan/scoutess/snapshot/current/content/pretty/scoutess.cabal
19:48:11 <stepkut> and the current Main.hs is pretty much all config
19:48:13 <stepkut> http://patch-tag.com/r/alpmestan/scoutess/snapshot/current/content/pretty/Main.hs
19:48:26 <stepkut> that is not quite how it is supposed to work, but close
21:06:17 <cemycc> How can I verify if a cookie exists ? What function I need to use that will return bool ?
21:06:37 <stepcut> hmm
21:06:56 <stepcut> usually you would do, mValue <- optional $ lookCookie "foo"
21:07:12 <stepcut> and then pattern match on the Just / Nothing…
21:07:28 <stepcut> do you really only care that the cookie exists or not? The value is not important?
21:08:06 <stepcut> exists <- (lookCookie "foo" *> pure True) <|> pure False
21:08:12 <cemycc> The value is not important, I just care if cookie exists
21:08:24 <cemycc> oh I understood, thanks
21:08:48 <stepcut> my pleasure!
21:13:36 <cemycc> stepcut, sorry but I don't understand the part with *> and in happstack.lite there is no function called lookCookie only lookCookieValue
21:14:15 <stepcut> oh, sorry, lookCookieValue
21:14:23 <stepcut> *> comes from Control.Applicative
21:14:25 <stepcut> one moment
21:14:37 <stepcut> as does <|>
21:16:18 <cemycc> reading about it now
21:16:55 <stepcut> so, lookCookieValue "foo"  will try to look up the cookie, if that succeeds, the value will the thrown out (because *> ignores the left-hand side), and, pure True, will be returned
21:17:15 <stepcut> <|> is a choice operator
21:17:35 <stepcut> so if lookCookieValue fails, the thing on the right hand side will be called instead, in this case, pure False
21:18:41 <stepcut> we could abstract this pattern out as well
21:19:32 <stepcut> isSuccessful :: (Applicative f) => f a -> f Bool ; isSuccessful f = (f *> pure True) <|> pure False
21:19:45 <stepcut> and then do, exists <- isSuccessful (lookCookieValue "foo")
21:20:20 <cemycc> understood, thanks for explanation. better than a if then else
21:20:43 <stepcut> another option is to use optional and isJust
21:21:02 <stepcut> exists <- isJust <$> optional (lookCookieValue "foo")
21:21:10 <cemycc> and I haven't know about *>, <|> . learning new stuff everyday
21:21:35 <stepcut> but.. I think the *>  and <|> version is better, for some vague definition of 'better'
23:48:05 <donri> stepcut: nice consequence of the reform name: import qualified Text.Reform as Re
23:48:13 <stepkut> heh
23:48:16 <donri> type Form = Re.Form ...
23:48:19 <stepkut> haha
23:48:24 <stepkut> that is awesome
23:48:27 <donri> :)
23:48:36 <donri> so I ported happaste to reform
23:48:46 <stepkut> nice
23:48:56 <donri> https://github.com/dag/happaste/commit/e31e23419800acfd2b3a3e4420096db12e489148
23:49:00 <donri> next step: happstack-yui
23:49:06 <stepkut> in unrelated news, I hacked some code for doing long-polling -> http://patch-tag.com/r/mae/happstack/snapshot/current/content/pretty/happstack-longpoll
23:49:14 <stepkut> though. it curretly uses jquery :-/
23:49:19 <donri> :)
23:50:20 <stepkut> I would like to use plain old javascript.. but I am not sure if the XHR is consistent enough across browsers
23:51:07 <stepkut> though... perhaps it would be worthwhile to figure out how to deal with that with out using yui/jquery
23:51:28 <donri> jquery is certainly a smaller commitment as a dependency than yui... and more likely to already be used. though that is kinda like using git over darcs because git is more popular ;)
23:51:50 <stepkut> :)
23:52:24 <donri> long polling, is that like websocket?
23:52:29 <stepkut> I picked jquery for the same reason people pick git.. it's popular and I was not qualified to make an informed choice
23:52:42 <stepkut> no.. websocket won't be in until happstack 8
23:52:59 <stepkut> similar purpose though
23:53:19 <stepkut> in long polling you have a loop in the client that calls back to the server and tries to get more data
23:53:33 <luite> i got diagrams working in ghcjs \o/
23:53:38 <stepkut> everytime it gets more data, it processes it, and then makes another call back to the server
23:53:46 <donri> i wonder if we should rethink the whole request->response model, or if that still is the best (only?) way to go ...
23:53:48 <stepkut> so, the client is pretty much always waiting for the server to provide data
23:53:57 <donri> luite: yay! how big? :D
23:54:03 <stepkut> and the server side, if it does not have any data currently available, it just blocks until it does
23:54:31 <stepkut> donri: We should totally rethink it! Though, we may come to the same answer
23:56:00 <donri> heh
23:56:30 <luite> donri: well it's unminified, downloads 3MB code, and then runs for around 10 seconds to render this one: http://projects.haskell.org/diagrams/gallery/Star.html
23:56:30 <stepkut> we are constrained by the http spec itself -- but websocket adds new kinks
23:56:34 <stepkut> and the spdy stuff
23:56:58 <stepkut> luite: neat!
23:57:19 <donri> there's even websocket-over-spdy
23:58:12 <stepkut> :)
23:58:27 <stepkut> what's wrong with: Request -> IO Response ?
23:58:40 <luite> stepkut: still way too slow of course (now diagrams is even quite slow in native haskell), but i think there is still a lot of room for optimization
23:58:44 <stepkut> and, what else might we do ?
23:58:59 <donri> not sure :) just seems like something "everyone does because everyone else does it"... and it might be the Right Thing to do but who really knows!? :D
23:59:22 <stepkut> well.. we did it first! (in Haskell-land)
23:59:35 <donri> in any case, i think it is currently a bit confusing how that all works in current happstack
23:59:40 <stepkut> oh?
23:59:51 <stepkut> less confusing would be nice