07:21:34 <donri> should we get our main packages into https://github.com/fpco/stackage ?
08:36:54 <luite> donri: you have to pay fpcomplete the monthly fee for stable package cerification ;)
08:37:10 <donri> :)
08:38:21 <luite> +t
14:55:51 <Palmik> Hi guys, I thought someone here might be interested in this simple forum I've implemented with Happstack few months ago. It's just a toy project, but someone might find it useful or interesting. Anyway, here it is https://github.com/Palmik/happstack-forum
15:10:05 <donri> but that's yesod ...
15:10:57 <chrisdone> i call shenanigans
15:11:37 <parcs`> yesod, happstack, what's the difference
15:12:48 <chrisdone> one is hebrew for ‘foundation’, the other is hebrew for ‘piles’
15:14:22 <donri> at first i was like oh! you're using yaml for configuration. oh! you're using postgres not acid-state... and then i was like, oh, your happstack application sure has a lot of yesod dependencies...
15:14:51 <donri> and then finally i was like, hey your happstack application doesn't have a single happstack dependency! :D
15:17:04 <adnam> :((
15:17:06 <chrisdone> elegant investigation, process of elimination, it's a classic in detective circles
15:17:50 <chrisdone> ಠ_ರೃ myes
15:18:09 <donri> Quite.
15:20:53 <chrisdone> verily, good sahh
16:16:45 <Palmik> donri: hehe. Yes, it was originally written in Yesod... the Happstack code should be on the Happstack branch (I also forgot to commit some thing before I abandoned it, so they should be there as well).
16:17:15 <donri> oh, a branch
16:19:01 <Palmik> Yes, I forgot about it as well... I first though that I did not commit the happstack code at all, only when I could not even force the push I realized something is wrong. :D
16:22:12 <donri> did you learn anything interesting writing the same app with both yesod and happstack?]
16:23:26 <donri> i was planning of writing my happaste toy app in yesod and snap for comparison; never happened :p
16:25:00 <Palmik> Yes, that I do not fancy persistent much... at least when I tried I was force to have pretty much all the schema definitions in one place even though I intended to have some things as separate pluggable components.
16:25:24 <Palmik> Generally, Happstack seemed much more flexible.
16:26:14 <Palmik> Hmm, I just realized that my forced push overwrote the Yesod version. Note to self: do not force pushes. :)
16:27:54 <donri> hehe
16:31:14 <Palmik> I also did not really like any of the templating solutions. Hamlet was not really composable in the way I would like it to be and HSP requires preprocessor.
16:31:42 <sm> Palmik: hamlet not composable ? widgets ? really ?
16:31:57 <sm> can you say more ?
16:33:18 <donri> sm: well it's not composable the way blaze is for example. container = div . div
16:33:42 <Palmik> Well, I want to have a default template that has "sections" like content-body, content-head, etc. that I can latery fill with other templates or directly haskell values.
16:34:33 <donri> hm, can't you do that with hamlet?
16:34:52 <donri> i thought #{} could splice html
16:34:55 <Palmik> I can do something like that with Hamlet, but the content-body variable is not passed as a function argument, but just has to be in scope of the hamlet expr.
16:35:28 <donri> i don't follow
16:37:26 <Palmik> The interpolation here http://www.yesodweb.com/book/shakespearean-templates
16:39:18 <Palmik> So instead of (myDefaultTemplate DefaultTemplate { contentBody = myOtherTemplate, ... }) I have renderTemplate myDefaultTemplate and have to have contentBody somewhere in scope.
16:40:22 <Palmik> I personally find the first approach much more cleaner.
16:40:37 <donri> sounds like dynamic scope?
16:41:20 <Palmik> I forgot to mention that Hamlet uses the scond approach.
16:41:31 <Palmik> What do you mean by dynamic scope?
16:41:54 <donri> i mean your local scope affects the "remote call site"
16:42:09 <Palmik> Yes, indeed, and I do not like that.
16:42:12 <donri> i don't really speak computer science though ;)
16:42:43 <Palmik> I would rather pass function argument to the template.
16:42:55 <Palmik> And that's why I've created HSML.
16:43:10 <donri> i guess it makes sense if you have an inlined quasi-quotation, but don't you usually call file templates in yesod? is that scoped like that as well?
16:45:21 <sm> interesting, I'm not up to speed enough with hamlet to know if there's a way
16:45:44 <sm> ACTION uses inline hamlet, rarely files
16:46:05 <donri> as for hsp using a preproc, upcoming version includes a QQ
16:47:42 <sm> yay!
16:48:26 <Palmik> Yes, it's also the case with using hamletFile and having the template in file.
16:48:43 <Palmik> donri: that's good. :)
17:33:38 <chersanya> hi
17:34:13 <chersanya> is it possible to make one instance of running happstack application to listen on multiple ports (and serve different sites on them)?
17:42:48 <stepcut> chersanya: yes
17:42:53 <stepcut> one moment
17:44:08 <stepcut> just do something like: do forkIO $  simpleHTTP site1Conf site1Handler ; forkIO $ simpleHTTP site2Config site2Handler ; waitForTermination
17:45:49 <chersanya> thanks
17:47:09 <dcoutts> mm, perhaps I should do that for an internal server admin interface
17:49:18 <chersanya> and another small question - how to set mimetype "right" way? now i do 'ok (toResponse $ RSS.showXML $ RSS.rssToXML rss) { rsHeaders=(mkHeaders [("Content-Type","application/rss+xml")])} '
18:00:13 <donri> chersanya: if you make your RSS type an instance of ToMessage you can just toResponse it directly
18:01:16 <donri> otherwise there's setHeaderM to set a header in the monad
19:37:17 <stepcut> donri: or toResponseBS
19:54:22 <stepcut> http://elabs.se.s3.amazonaws.com/uploads/picture/file/81/normal_php_-_the_good_parts.jpeg
20:22:44 <adnam> :))
20:26:23 <luite> hm how bad was asp?
20:26:49 <adnam> i never used it
20:29:33 <adnam> let's learn! http://www.w3schools.com/asp/default.asp
20:34:34 <luite> hehe ugh w3school
20:34:36 <luite> s
20:38:03 <stepkut> looks like HSP, http://www.w3schools.com/asp/showasp.asp?filename=demo_formatting
20:38:04 <stepkut> :p
20:38:19 <stepkut> except in HSP we would never add a new tag like that
20:38:26 <stepkut> hello types!