00:24:42 <stepcut> Lemmih: i am rather far behind
01:43:28 <donri> stepcut: hm have i asked this before? why isn't fail = mzero in serverpart
01:57:51 <stepcut> not sure that mzero and failure are really the same thing
01:57:55 <stepcut> WebT has,     fail s = outputTraceMessage s (mkFailMessage s)
01:58:46 <stepcut> I think that calling fail in ServerPartT will ultimately call that ?
02:01:22 <donri> well i'd like to do: Just x <- query SomeEvent, and have the whole thing yield mzero if the pattern match fails, i.e. the query returns Nothing
02:01:42 <donri> now instead i need this wordy bit: flip (maybe mzero) paste $ \p -> ...
02:02:11 <donri> "fail" might be a hack but i think mzero is more useful than an internal server error
02:03:21 <donri> it'd also be more general than that "maybe" use
02:04:41 <stepcut> hmm
02:05:21 <donri> :)
02:05:45 <stepcut> I don't like how that hides real failures
02:06:07 <stepcut> personally I just  have a queryMaybe function
02:20:48 <stepcut> fail is evil and you should never use it in purpose :p
02:22:55 <donri> but it would look so pretty! :D
02:23:03 <donri> yea yea
02:23:55 <donri> bedtime
02:24:03 <stepcut> I am also not that thrilled about ServerPartT and MonadPlus anyway
02:24:13 <stepcut> but I do not have a better idea at the moment
14:56:17 <donri> stepcut: i get ambiguous infix expression errors when writing a boomerang router like in the crash course. easily worked around by added parenthesis, but why aren't you getting the same? ghc/base version differences?
14:59:09 <donri> hm perhaps it's trhsx doing that
14:59:17 <donri> and you don't use that in the same file in the crash course
15:50:20 <donri> someone proposed a persistent backend for acid-state. heh.
15:50:59 <donri> i guess it could make sense if you're going to use a different backend later, because it'd be easier to setup for development
16:40:27 <donri> so file-embed is something like 10-50 times faster than serveFile. arguably easier to deploy too, and doesn't need cabal's broken data-files stuff.
16:41:17 <donri> (not serveFile's fault; it's likely the difference between RAM and FS)
16:45:41 <stepkut> the infixity settings for boomerang operators could probably use some  fine tuning
16:46:10 <stepkut> I am not surprised that serving files from RAM is  faster than serving them from disk.. even though we use sendfile
16:46:25 <stepkut> that is why I like to keep the whole database in RAM :)
16:47:08 <dsfox1> except the bytes of the jpg files?  We have discussed this in the past...
16:47:11 <stepkut> I deploy everything using a debianized package plus command-line arguments to set the path
16:48:06 <donri> yea, so it seems happstack-idiomatic or whatever to also serve static files from ram :)
16:48:14 <donri> even though file-embed is a snoyman package ;)
16:48:21 <stepkut> dsfox1: i still wouldn't put the jpg contents directly in the database
16:48:36 <donri> perhaps happstack could include some helpers for it, handling content type and caching?
16:48:52 <stepkut> donri: if you have the time :)
16:49:02 <donri> sure
16:49:07 <donri> if you don't mind the extra dependency
16:49:19 <donri> though it's a small one
16:49:23 <stepkut> donri: I would just make it an extra package.. no need to through it in core
16:49:37 <donri> i suppose
16:49:40 <stepkut> donri: alternatively, you could implement a fileServe like function that automatically cached files in RAM
16:50:04 <donri> but that doesn't give you the other advantages
16:50:18 <stepkut> donri: it gives you different advantages
16:50:40 <stepkut> so far the only two you have mentioned are speed and not have to use data-files
16:50:56 <stepkut> what is wrong with data-files anyway.. it has worked for me so far
16:51:30 <donri> Paths_bla breaks with NoImplicitPrelude configured package-wide
16:51:41 <stepkut> ah
16:51:45 <donri> which i've reported upstream but no one is responding :(
16:53:36 <donri> with the files embedded you could also easily deploy a precompiled binary alone, without worrying about asset locations or having to compile on each deployment
16:54:13 <stepkut> yes
16:54:44 <stepkut> it is clearly a useful idea
16:54:55 <donri> but yea a caching FileServe could probably have its place too
16:55:00 <stepkut> right
16:55:17 <donri> like, if you have a lot of data and perhaps you could have a quota on that caching
16:55:46 <stepkut> exactly
16:56:25 <stepkut> i was thinking you could specify the maximum cache size, a limit for the maximum individual file size to cache, and a list of files to initialize the cache with
16:56:31 <donri> could be useful for uploads that you can't embed up front
16:56:37 <stepkut> right
16:56:51 <stepkut> or if you want to change the files on the disk with out restarting the server
16:57:12 <stepkut> though that raises a separate issue
16:57:13 <donri> then it'd have to detect that somehow, or be told to clear the cache
16:57:18 <stepkut> right
16:57:26 <donri> autodetection would still hit the FS then
16:57:32 <stepkut> exactly
16:57:52 <donri> though stat'ing a file is probably not too slow
16:58:27 <donri> and i suppose it could be configurable...
16:59:09 <stepkut> looks like file-embed does not have many dependencies, and only depends on this we already depend on
16:59:23 <stepkut> and it was last updated Jun 7 2011
16:59:30 <stepkut> meaning.. it is pretty stable
16:59:57 <stepkut> though, depending on what you want to do, depending on it might be overkill
17:01:06 <stepkut> if you just want embedFile then you basically just need, $(runIO B.readFile fp)
17:06:57 <donri> i'm using embedDir too
17:08:31 <stepkut> k
17:09:26 <donri> i suppose if you want to add cache management you need more than file-embed though
17:09:51 <donri> because you want the mtime too
17:10:11 <donri> or you could etag a checksum of the bytestring...
17:11:01 <donri> i don't really like date-based caching :)
17:11:20 <donri> mtime isn't reliable when you move files etc and then there's time-zone issues
17:11:38 <stepkut> :)
17:11:55 <donri> OTOH checksumming might be more computation intensive, but it only needs to be done once
17:13:47 <stepkut> once per time you think the file might have changed?
17:18:06 <donri> well with embedding, it only needs to be done either at compile-time or program boot
17:18:15 <donri> cached file-serving is a different matter, of course
17:18:30 <donri> but then you also easily have access to the mtime
17:19:21 <donri> not that it would be hard to do that with TH either... but still, i think checksum makes more *sense* in that case?
17:27:30 <stepkut> you want to checksum the file on every request ? Or only when the mtime has changed?
17:38:19 <donri> no that's my point, with embedded files you only need to checksum once
17:38:33 <donri> if the data changes, you need to re-embed/compile anyway
17:38:39 <stepkut> why do you need to checksum them at all? For e-tag ?
17:38:43 <donri> yes
17:38:49 <donri> so you can send a 304 not modified
17:38:53 <stepkut> yeah
19:03:14 <donri> how does far-future expires work, does it avoid even the 304?
19:03:43 <stepcut> no idea
19:03:48 <donri> though then you have to make updated assets have new names
19:04:01 <donri> and ?query strings are ignored for caching puposes
19:04:42 <donri> i suppose you could include the checksum in the filepath, but then you probably need to integrate it with web-routes too, directly
19:15:48 <Lemmih> stepcut: I think we have different views on newbies.
19:36:17 <stepcut> Lemmih: :)
19:42:46 <dcoutts> donri: ooi, what's broken with cabal data-files?
19:48:39 <donri> dcoutts: Paths_foo file isn't compiled in isolation from Extensions listed in .cabal
19:49:07 <donri> so if you list NoImplicitPrelude, the Paths file gets no Prelude
19:49:23 <dcoutts> ahh yes
19:50:34 <dcoutts> I guess the simply workaround will be for us to use {-# LANGUAGE Haskell98/2010, ImplicitPrelude #-} in the generated file
19:50:49 <donri> http://hackage.haskell.org/trac/hackage/ticket/917
19:51:18 <donri> yea that'd help, though i suspect it might be possible to break it again with another extension?
19:51:36 <dcoutts> donri: probably
19:51:37 <donri> or does Haskell98 disable all others?
19:51:41 <dcoutts> no
19:51:46 <dcoutts> it's cumulative
19:52:01 <dcoutts> probably just using {-# LANGUAGE ImplicitPrelude #-} would fix it
19:52:14 <donri> or an explicit Prelude import, even
19:52:15 <dcoutts> but yes, it's a workaround, not a 100% solution
19:52:19 <dcoutts> or that
19:52:27 <dcoutts> probably better
19:52:38 <donri> duno :)
19:53:45 <donri> Lemmih: speaking of newbies, this is the kind of thing we need to throw at them: http://hackage.haskell.org/packages/archive/plumbers/0.0.2/doc/html/Control-Plumbers.html
20:11:38 <Lemmih> donri: Yes. Frankly I'm quite disappointed that stepcut didn't enter into a long description of the unification rules for those types.
20:20:28 <donri> <Lemmih> Stepson ^W stepcut I am disappoint.
20:22:08 <Lemmih> heh
20:31:25 <dcoutts> donri: pushed a fix for #917
20:33:02 <Lemmih> dcoutts: I haven't seen you in ages. Coming to Denmark for ICFP this year?
20:33:18 <donri> dcoutts: awesome!
20:33:25 <dcoutts> Lemmih: certainly
20:33:37 <dcoutts> Lemmih: you going to the Utrecht hackathon btw?
20:33:51 <dcoutts> Lemmih: and are you still freelancing?
20:34:15 <Lemmih> I'm doing Haskell work in Zurich now.
20:34:47 <Lemmih> Didn't even know there were going to be another Utrecht hackathon so the answer is probably no.
20:34:48 <dcoutts> oh nice
20:34:53 <dcoutts> ah, pitty
20:35:38 <dcoutts> Lemmih: so what haskell work are you doing there?
20:37:05 <Lemmih> Writing educational software at a new company together with Bas van Dijk.
20:37:33 <Lemmih> Best job I've had so far.
20:37:41 <dcoutts> cool
20:37:53 <dcoutts> that's great
20:38:42 <dcoutts> btw, we may organise other hackathon in the summer in London
20:38:57 <Lemmih> I'm also working on my degree. Couldn't be happier with the progress of things.
20:39:12 <dcoutts> oh nice, what uni is that with?
20:39:33 <dcoutts> Lemmih: I'm glad things are going well, that's good to hear
20:40:18 <Lemmih> Copenhagen University. Classes were boring and most of the exams are online so I thought "why not go work in Switzerland?"
20:40:24 <dcoutts> :-)
20:40:38 <dcoutts> why not indeed
20:42:12 <dcoutts> Lemmih: so is it all easy, given you've been a professional for ages now, or do you find you're learning new stuff?
20:42:16 <Lemmih> I'm reasonably sure that I will attend ICFP this year. It being in Denmark is too good an opportunity to give up.
20:43:02 <dcoutts> right
20:43:10 <dcoutts> mind you, it's not cheap
20:43:20 <Lemmih> dcoutts: It's easy but there's still a lot to write. Did an 8 page report on SQL and relational algebra just last week. Entry level stuff but still a time sink.
20:43:34 <Lemmih> ICFP isn't cheap?
20:43:39 <dcoutts> yeah
20:43:50 <dcoutts> but certainly come for some of them, e.g. Haskell Symposium, Haskell Implementers Workshop etc
20:43:58 <dcoutts> CUFP can be interesting
20:44:09 <Lemmih> I'm a student with a full-time job. I get the benefits of a paycheck AND a reduced rate. (:
20:44:25 <dcoutts> Lemmih: good point
20:44:53 <dcoutts> I have ACM SIGPLAN membership only to get the money off ICFP etc
20:46:29 <Lemmih> Isn't CUFP always composed of the usual suspects? The companies I'm surprised to learn use Haskell never seems to be involved enough with the Haskell community to attend CUFP.
20:46:59 <dcoutts> Lemmih: there's always a few surprises
20:47:03 <dcoutts> but yes, mainly usual suspects
20:50:41 <Lemmih> Oh, and to brag a little more: Instead of pining over useless homework back in Denmark, I'm now relaxing after skiing in the Swiss alps. (:
20:51:50 <dcoutts> ACTION is indeed jealous 
20:52:04 <dcoutts> ACTION would love to get more opportunities to go skiing
22:54:55 <donri> stepcut: is it ok if i add a source file from the crash course to the set of test files for pygments? i'm fixing the bug with template haskell quoted names/types
22:55:18 <donri> (pygments = python syntax highlighter used by github among others)
22:55:54 <stepcut> donri: go for it!
23:02:01 <donri> and of course they're using mercurial/bitbucket and i have to configure mercurial and "fork" is taking forever on bitbucket
23:02:07 <donri> whycanteveryonejustusegithublikeme
23:05:44 <donri> this is going to be awkward. i'm actually on the team that makes pygments among other things, but i sort of dropped of their earth to do haskell instead.
23:20:02 <stepcut> :)
23:20:08 <stepcut> yay for Haskell!