04:47:37 <donri> stepcut: other idea: new site/scoutess could also run a hoogle instance with all happstack apis indexed
04:47:50 <donri> as part of the haddock building, perhaps
04:52:46 <stepcut> yeh
04:52:47 <stepcut> yeah
04:58:42 <donri> ACTION is on chapter 36 in his re-read of MoR
19:50:40 <donri> stepkut: silly idea for a happstack logo using inverted lambda for a "h" http://i.imgur.com/yYMkw.png
19:51:03 <stepcut> heh
19:51:04 <donri> fonts with a lambda character: http://www.google.com/webfonts#ReviewPlace:refine/Collection:Nova+Mono|Cardo|Caudex|Open+Sans+Condensed:700|Jura|Didact+Gothic|Ubuntu+Condensed|Ubuntu|Play|Ubuntu+Mono|Anonymous+Pro|Open+Sans
20:53:53 <KorriX> hello
20:54:16 <KorriX> i have route in my table as following:
20:54:16 <KorriX> dir "problems"  $ trailingSlash >> path (serveDirectory EnableBrowsing [] . ("problems/"++))
20:54:32 <KorriX> why happstack match trailing-slash at the end of the path ?
21:02:50 <donri> i don't think you need trailingSlash there
21:03:44 <donri> also looks insecure
21:04:12 <donri> well, depending on $PWD i guess
21:12:41 <KorriX> i need three routes
21:12:41 <KorriX> www.mysite.com/problems/
21:12:41 <KorriX> www.mysite.com/problems/somepath
21:12:41 <KorriX> www.mysite.com/problems/somepath/
21:12:41 <KorriX> and last one should be staticaly "mounted" directory
21:14:54 <KorriX> and somepath is dynamical
21:17:14 <KorriX> do you recommend web-routes ?
21:22:59 <donri> yes
21:23:06 <donri> though it's not *necessary* for this
21:23:18 <KorriX> i will try
21:23:29 <KorriX> but - are web-routes fast ?
21:23:40 <donri> but anyway if you're using servedirectory dynamically you should take care to sanitize the input and make it into an absolute path
21:23:52 <donri> i doubt web-routes incurs much of an overhead
21:30:55 <stepcut> you don't need to use path with serveDirectory
21:31:07 <KorriX> i must to check permissions
21:31:10 <KorriX> first
21:31:12 <KorriX> so i need
21:32:24 <stepcut> dir "problems" $ trailingSlash >> serveDirectory EnableBrowsing [] "problems", is probably what you want
21:43:10 <KorriX> no
21:43:37 <KorriX> because when i have mysite.com/problems/1/test.txt
21:43:40 <KorriX> it will not match
21:44:40 <stepcut> why not ?
21:45:02 <KorriX> just because ...
21:45:06 <KorriX> i tried
21:45:35 <stepcut> actually.. the problem is the 'trailingSlash'
21:46:24 <stepcut> dir "problems" $ serveDirectory EnableBrowsing [] "problems", should match on, mysite.com/problems/1/test.txt, right ?
21:47:40 <stepcut> 'trailingSlash' checks that the very last character of the rqUri is '/'
21:48:18 <stepcut> so it would only match on, mysite.com/problems/1/test.txt/
22:05:44 <KorriX> i understand that
22:05:51 <KorriX> but how to avoid this ?
22:06:19 <KorriX> i need to check trailing slash not-at-last-char
22:07:00 <donri> then it's not trailing, is it
22:08:11 <stepcut> is 'somepath' a single path segment? or could it be multiple path segments?
22:09:37 <stepcut> noTrailingSlash :: (ServerMonad m, MonadPlus m) => m ()
22:09:37 <stepcut>  ; noTrailingSlash = guardRq $ \rq -> (last (rqUri rq)) /= '/'
22:10:01 <stepcut> bah. ignore the ' ; '
22:10:34 <alpounet> hi there
22:10:38 <alpounet> ACTION is back from London
22:10:51 <stepcut> yay!
22:10:55 <stepcut> ready to hack code?
22:22:50 <alpounet> yeah stepcut
22:22:54 <alpounet> definitely
22:22:56 <stepcut> sweet!
22:23:09 <KorriX> thanks for all
22:51:25 <stepcut> alpounet: I am looking at the Build service now
22:51:43 <stepcut> there are two obvious type signatures for the build function
22:52:03 <stepcut> buildPackages :: [SourceSpec] -> IO BuildReport
22:52:16 <stepcut> buildPackages :: [PackageIdentifier] -> IO BuildReport
22:52:51 <stepcut> the first one is the high-level interface that we start with.. it says what source we want to build
22:53:29 <stepcut> eventually after we get all the source checkout, build the sdist .tar.gz files with cabal, and put them in the proxy server.. then we want to actually build the packages
22:54:19 <stepcut> but, buildPackages :: [PackageIdentifier] -> IO BuildReport, does not seem to express the fact that some preperation works needs to have been completed before you can call that function
22:55:05 <alpounet> yeah like it would benefit from some "already done work", passed as an argument somehow
22:55:16 <stepcut> yeah
22:55:47 <stepcut> not quite sure how that is going to work out yet
22:56:07 <stepcut> maybe if we start top-down it will show up some how
22:56:20 <alpounet> well yeah
22:56:38 <alpounet> starting from buildPackages :: [SourceSpec] -> IO BuildReport
22:56:59 <alpounet> we somehow here need the Proxy / Source parts
22:57:13 <stepcut> a better name might be, buildSource :: [SourceLocation] -> IO BuildReport, ?
22:58:11 <alpounet> well, what would SourceSpec and SourceLocation be actually?
22:58:22 <alpounet> SourceSpec doesn't necessarily sound as designating a whole package
22:58:45 <stepcut> SourceSpec and SourceLocation are the same type, btw, I just forgot what it was currently called
22:58:52 <stepcut> (we can rename it again if we want as well)
22:59:58 <stepcut> there is another related issue
23:00:16 <stepcut> let's say we have: buildSources :: [SourceLocation] -> IO BuildReport
23:00:48 <stepcut> we might then imagine that we would have another function:
23:00:48 <stepcut> buildSource :: SourceLocation -> IO BuildReport
23:01:19 <stepcut> and then we could do, buildSources srcs = aggregateReports =<< mapM buildSource srcs
23:01:31 <stepcut> butÂ… that is not really the case
23:01:54 <stepcut> I don't think we really want to treat build each Source as an isolated thing
23:02:25 <stepcut> that is, we don't want to do all the setup, preperation, building, teardown, etc, over and over for each package
23:03:27 <stepcut> there is some level of aggregation that is appropriate I think
23:07:02 <stepcut> not sure how these things will be expressed in the type signatures.. but we should be sure they are
23:07:46 <stepcut> any prerequisite work that is required should be expressed in the type signature so that there is no way you can accidentally call a function with out having fulfilled a prereq
23:08:12 <alpounet> so somehow package dependencies have to appear there...
23:32:53 <alpounet> off to bed for now
23:32:58 <alpounet> will get back on the code tomorrow
23:54:23 <stepcut> sounds good
23:54:30 <stepcut> I have run out for a few horus anyway