00:06:35 <tazjin> Is it possible to add compression for files as well? (Specifically my css file :] I'm trying to reach 100/100 on Yahoo's YSlow page speed test, and this is the last thing it's complaining about)
00:07:35 <stepcut> yes..but you may not want to..
00:07:49 <stepcut> one moment
00:08:24 <tazjin> Well, I'd only want to add it for that one file
00:09:09 <stepcut> ah
00:09:16 <donri> for static content you should precompress rather than filter the response for every request
00:09:41 <stepcut> you can use, serveFileUsing with filePathLazy (or filePathStrict if the file is small)
00:09:43 <stepcut> http://happstack.com/docs/6.0.0/happstack-server/Happstack-Server-FileServe-BuildingBlocks.html
00:10:08 <stepcut> that will force it to read the file in as a ByteString allowing the compressor to work instead of using sendfile to serve the original
00:10:22 <donri> also you could use file-embed or something and serve from RAM, that's a shit load faster anyway
00:10:33 <stepcut> as donri suggests, an optimization would be to compress the file ahead of time, and then you could still use sendfile
00:10:51 <stepcut> happstack does not have that built in, but you could make something to do that using the pieces in BuildingBlocks
00:10:57 <stepcut> would be a cool addition
00:11:11 <donri> +1
00:11:20 <tazjin> Yeah, sounds like it would be useful
00:11:24 <tazjin> I'll look into it
00:12:00 <stepcut> I wonder if serving the file from RAM is faster than using sendfile..
00:12:06 <stepcut> i would not be surprised either way
00:12:34 <tazjin> Well it would be less disk IO or am I missing something?
00:12:39 <donri> faster for me than sendfile, at least over localhost
00:12:46 <donri> uh than serveFile, which uses sendfile?
00:13:07 <stepcut> donri: right. But is a network connection faster than disk IO ?
00:13:34 <donri> can be
00:14:13 <donri> with serveFile on localhost it loaded in about 50 ms, 1ms with file-embed. i have remote resources from CDNs that load in about 4ms ...
00:14:18 <stepcut> donri: yeah
00:14:24 <stepcut> cool
00:14:39 <stepcut> I am not surprised than RAM is faster.. :) That is why I like acid-state after all (among other reasons)
00:14:47 <donri> or perhaps it was more like 11ms, but still faster than local file serving
00:14:50 <donri> :)
00:15:24 <stepcut> donri: could you pregenerate the entire Request ahead of time so that you just have to dump a pregenerated ByteString  back to the client ?
00:15:39 <donri> probably?
00:15:55 <donri> i think i do that in one app, hm
00:15:59 <stepcut> I can't remember offhand if there are timestamps in the headers or not
00:16:11 <stepcut> well
00:16:20 <stepcut> you can definitely pregenerate a simple Respons
00:16:29 <stepcut> because that is what I do in some test code
00:16:32 <donri> https://github.com/dag/kibr/blob/master/src/Data/FileEmbed/Happstack.hs
00:16:42 <donri> but i don't fully know how that code will work
00:17:26 <stepcut> donri: I think it would depend if you made it CAF or not
00:17:29 <stepcut> like if you do:
00:17:34 <donri> CAF?
00:17:54 <stepcut> myAwesomeFile = $(embedFileAsResponse "myawesomefile")
00:18:24 <stepcut> at the top-level of your program.. then it would only have to evaluate the myAwesomeFile thunk once, and the remaining times it would be fully evaluated
00:18:53 <donri> https://github.com/dag/kibr/blob/master/src/Network/Kibr/Http.hs#L92 -- so this will re-eval?
00:18:55 <stepcut> i guess the tricky part is that Happstack does not offer a way to serve a Response that has already been converted to a ByteString
00:19:33 <donri> nice things to keep in mind for the pipes rewrite eh
00:19:35 <stepcut> donri: I think so ?
00:19:53 <stepcut> UnsafeResponse ByteString
00:20:02 <donri> :)
00:20:11 <donri> unsafeRespondAndLaunchMissiles
00:20:35 <stepcut> Acme.Missles.unlaunch
00:22:04 <donri> future website haddocks will have stuff like acid-state and web-routes too right?
00:22:53 <donri> perhaps even packages that have support packages for happstack, like digestive-functors, hsp?
00:23:21 <stepcut> donri: yes, once scoutess is really working
00:23:52 <donri> cool
00:23:57 <stepcut> donri: write now, though I have to focus on writing the content for the new site, or it will never get done.. and that is pretty much the last blocker for 7.. though I hear rumors that sendfile still does not compile for some people with GHC 7.4.1
00:24:42 <donri> weird stuff
00:27:18 <donri> bedtime
08:30:36 <alpounet> stepcut, will we need to query the Local Hackage package db? like what versions do we have installed for that package, etc
08:33:22 <alpounet> if we don't, i may as well just start bugging you with discussions about the sandoxed builds, so that I can start working on it soon (after an exam i have later this week)
16:44:00 <stepkut> donri: i take back what I said yesterday about that embedfile re-evaluting every time
16:46:36 <stepkut> donri: you would need to test to figure out what GHC actually does :)
16:47:36 <donri> yea :P
16:48:08 <donri> though i'm not sure how to test such things. i think i tested something similar once with Debug.Trace, but then I don't know if unsafePerformIO causes it to be re-evaluated ...
16:48:31 <stepkut> in my experience.. it doesn't
16:48:47 <donri> i guess that in turn is easy to test
16:48:48 <stepkut> because I just used it to test some code where I thought it would be evaluated multiple times, and it wasn't :)
16:48:54 <donri> ok:)
16:49:36 <donri> so basically all top-level values are "memoized"?
16:52:04 <stepkut> http://www.haskell.org/haskellwiki/Constant_applicative_form
16:52:11 <stepkut> that is actually not that helpful.. but it is a start :)
16:52:55 <stepkut> http://stackoverflow.com/questions/8330756/what-are-super-combinators-and-constant-applicative-forms
16:53:49 <Lemmih> I want spread implemented with zeromq.
16:54:05 <stepkut> :)
17:24:28 <alpounet> http://stackoverflow.com/questions/9785318/catching-exceptions-in-happstack-lite-handler
17:34:09 <stepkut> that's a good question :p
17:34:22 <stepkut> I believe it somehow involves monad-control..but I have never done it
17:37:48 <alpounet> stepkut, saw my question from 9 hours ago?
17:38:07 <stepkut> alpounet: yeah.. I dunno :)
17:38:21 <alpounet> ok
17:38:38 <alpounet> i guess i'll just add features there as we need them
17:41:41 <stepkut> yeah
20:17:34 <donri> stepcut: oh btw, new pipes released: http://hdiff.luite.com/cgit/pipes/commit?id=1.0.2
20:22:49 <donri> seems to just be about getting rid of Zero though
20:23:35 <alpounet> okay donri, we'll just hire you to do dependency tracking in scoutess
20:23:41 <alpounet> thanks man :P
20:24:50 <donri> thank hackagebot :P
20:25:07 <donri> and luite for creating hdiff
20:29:45 <alpounet> heh
22:06:08 <alpounet> stepkut, wouldn't it be nice to have someone working on scoutess for the GSoC? :p
22:06:33 <stepkut> :)
22:06:56 <stepkut> we could add it to the list, http://code.google.com/p/happstack/wiki/GoogleSummerOfCode
22:07:15 <stepkut> I need to flush out the details on those ideas really soon and start soliciting candidates
22:07:25 <stepkut> but I want to get the new website up ASAP
22:14:02 <alpounet> stepkut, i can add us on the GSoC trac and write something to -cafe if you want
22:15:17 <stepkut> for scoutess
22:15:22 <stepkut> or for everything on that link?
22:17:55 <alpounet> stepkut, i was specifically talking about scoutess, as that's the only project on which i can mentor someone
22:18:02 <stepkut> :)
22:18:03 <alpounet> but i can also write smth for happstack in general
22:18:18 <stepkut> well, let's start with scoutess
22:18:34 <stepkut> if you do a writeup, I can proof read it
22:19:09 <alpounet> yup
22:20:14 <alpounet> stepkut, but that also means introducing scoutess to the whole haskell community
22:20:25 <alpounet> :p
22:20:26 <stepkut> is that a problem ?
22:20:38 <alpounet> well, i guess it isn't
22:20:41 <stepkut> we want everyone to use it :)
22:20:47 <alpounet> yeah, once usable :p
22:20:49 <alpounet> anyway, i guess it isn't
22:27:26 <alpounet> stepkut, i may actually also blog about this to make this more visible
22:27:37 <stepkut> nice!
22:27:47 <stepkut> I am going to mention it a bit as well on the new site
22:27:52 <alpounet> great
22:27:59 <stepkut> under the section on what is coming in Happstack 8
22:28:14 <alpounet> hah, neat, can't wait to see the rest of that section too
22:28:19 <stepkut> :)
22:28:30 <stepkut> hopefully very soon
22:28:36 <stepkut> I am working on the big blocker rigth now
22:28:53 <stepkut> which is writing down the Happstack Philosophy
22:29:01 <alpounet> oh
22:29:18 <alpounet> with catchy and fancy sentences in it, and all these stuffs?
22:29:29 <stepkut> I hope not
22:29:51 <stepkut> I prefer simple and persuasive
22:38:35 <donri> needs moar buzz words
22:42:27 <stepkut> meh
22:42:33 <stepkut> needs more human connection :)
22:43:04 <stepkut> and emotional fantasy
22:44:01 <donri> ;)
23:41:00 <alpounet> stepkut, alright, i think i'm done with the blog post
23:41:04 <alpounet> wanna proof read it?
23:41:07 <stepkut> sure!
23:50:18 <alpounet> stepkut, http://circle.servebeer.com/scoutess_gsoc.txt
23:52:15 <stepkut> looks good
23:53:09 <stepkut> could maybe expand a tiny bit more on why it is better than Travis CI
23:53:53 <stepkut> I believe travis CI is fine if you just want to build one package.. but it does not support the cases where you have a  bunch of packages and interdependencies
23:54:04 <stepkut> plus I believe Travis CI is limited to github
23:54:24 <stepkut> but maybe that is too much information
23:55:46 <alpounet> it is not, AFAIK
23:55:53 <alpounet> and even for one package
23:56:02 <alpounet> travis CI doesn't do dependency tracking
23:56:05 <stepkut> right
23:56:29 <alpounet> neither handles multiple dependency versions (and multiple GHC versions, AFAIK)
23:56:41 <donri> technically, travis supports "anything" (password-less sudo)
23:56:49 <donri> but yea it works best for simpler cases
23:57:04 <alpounet> donri, well, you'd have to write all the tracking and all yourself i guess
23:58:15 <donri> so will this announcement set the name in stone?
23:58:28 <alpounet> nah
23:58:31 <donri> :)
23:58:32 <alpounet> we can rename this later
23:58:42 <stepkut> nothing is every set in stone.. that is a sure recipe for failure
23:58:52 <donri> how about some play on CI = confidential informant, with scoutess being a sort of informant
23:58:53 <stepkut> happstack is already on its second name :)