05:36:45 <bizman> word out
05:36:53 <bizman> any live journal kinda site on happs yet?
05:36:58 <bizman> I wana psot using power of the haskell
07:12:19 <rlpowell> Anyone know a haskell http *client* library that uses Text?  Or at least not String or bytstring.Char8 ?
07:12:35 <rlpowell> Because it's not 1992; I want my UTF-8.  -___-
07:26:12 <rlpowell> Humm, NM; looks like Data.Text.Encoding's decodeUtf8 will convert.
12:57:24 <KBme> hi
12:57:47 <KBme> I'm trying to use heist with happstack, and have a problem with splices inside splices
12:58:06 <KBme> ie. <mysplice1><mysplice2/></mysplice1>
12:58:24 <KBme> when mysplice1 is called, mysplice2 is not yet processed
12:58:34 <KBme> so heist has a function for this, it's runChildren
12:59:06 <KBme> the problem is that running runChildren from a splice doesn't seem to work as expected. I was wondering if anyone had this problem before
12:59:25 <KBme> here is the current state of my project, but I tried a lot of different things
12:59:49 <KBme> http://hpaste.org/75115 http://hpaste.org/75117
13:00:00 <KBme> first is the module, second is the template I'm tryinh
13:00:03 <KBme> trying*
13:08:38 <donri> KBme: what is dir supposed to be
13:10:26 <donri> you have an unbalanced <p> although that's supposed to not matter with .tpl heist
13:10:35 <donri> duno if it does the right thing though
13:13:04 <donri> also isn't your IncTpl the same as <apply/>?
13:26:45 <KBme> donri, dir is just a test, all it has is two siblings. not with the current state of the module, but I removed the </p> while I was playing because heist reported malformed error on it.
13:33:00 <donri> KBme: i assume you've read this? http://softwaresimply.blogspot.se/2011/04/looping-and-control-flow-in-heist.html
13:34:48 <KBme> no, wow, thanks
13:34:51 <KBme> i'll read up
13:40:23 <KBme> yeah, this looks very interesting
15:27:35 <daknok> hi
17:12:03 <stepcut> We need to figure out how to make this code more awesome
17:12:04 <stepcut> http://hub.darcs.net/stepcut/happstack/browse/happstack-foundation/examples/ControlV/Main.hs
17:12:11 <stepcut> like.. figure out what parts about it still suck, and fix that
17:12:34 <stepcut> for example, insertPaste is too messy
17:12:43 <stepcut> managing those indexes manually and stuff.. not fun
17:13:06 <stepcut> lens would help.. except we need a valid lens
17:13:19 <stepcut> Palmik: another IxSet complaint: you can't make a valid lens for IxSet
17:13:43 <donri> yea i
17:13:49 <donri> i've discussed that with palmik
17:14:02 <stepcut> nice
17:14:05 <donri> i think you can make a valid lens but it's not a useful one
17:14:19 <stepcut> right
17:14:32 <donri> you can use lens without making everything a full lens though
17:14:43 <stepcut> someone should implement ControlV in yesod, so we can see if it makes anything easier
17:15:11 <donri> i was planning on porting my happaste to snap and yesod for comparison, never got to it
17:16:07 <stepcut> I also need to make a version of ControlV that does not use ixset, just Data.Map
17:16:20 <stepcut> that should be the first version people see, and then they can see the version that adds IxSet
17:16:45 <stepcut> trying to reduce the amount of new information they need to digest at once
17:17:15 <donri> ah yea, then you don't want lens ;)
17:18:19 <stepcut> i do for the IxSet-ish version
17:18:38 <donri> sure
17:38:08 <stepcut> also, someone should make a blog post about using happstack+fay :)
18:04:52 <adnam> :] yeah i would like to read about that
19:35:36 <rlpowell> What's fay?
19:36:07 <alpounet> a subset of haskell that gets compiled to javascript
19:36:13 <alpounet> see the fay-lang site
19:36:50 <rlpowell> stepcut: Add in my auth stuff!  :D
19:39:12 <adnam> rlpowell: what's your auth stuff?
19:39:39 <rlpowell> adnam: I got happstack-auth working with ControlV.
19:39:48 <rlpowell> It requires a slight mod to happstack-foundation, though.
19:41:12 <adnam> aha
19:46:12 <adnam> i have an example with fay and snap using their auth module
21:20:49 <shaagerup> I'm having trouble with starting Happstack on OSX. I have earlier used Ubuntu, where things worked. It gives "ghc: could not execute: trhsx". I have added /Users/soren/Library/Haskell/bin to my path (I forgot to do that before installing happstack, though - maybe this is the problem?). When trying to run "cabal install trhsx" it gives "    Could not find module `Prelude'" so something is certainly wrong...
21:22:09 <donri> shaagerup: the package is hsx
21:22:55 <donri> do you have ~/.cabal/bin in $PATH?
21:49:45 <rlpowell> donri: If shaagerup comes back, I reccomend virthualenv; it handles some of the path issues.
21:50:39 <donri> can't they release hsenv soon so we can get rid of that name :p
22:02:48 <hpaste> “Søren Haagerup” pasted “Happstack static file serving” at http://hpaste.org/75150
22:03:58 <shaagerup> At the CUFP conference, Jeremy Shaw was nice to help me getting started with Happstack, and helped changing the "simpleApp" function to make it possible to serve static files
22:05:13 <shaagerup> Has this change been "official" in some development version, or is there an "official" workaround, such that I do not have to change the happstack sources to solve this on every installation..
22:08:32 <shaagerup> See the "servefiles" parameter in the simpleApp-call in the paste above, to get an idea of what I want..
22:10:25 <donri> jeremy is here as stepcut btw
22:10:36 <donri> did you get my response on your other issue earlier?
22:10:54 <shaagerup> I think my IRC-client was broken so I did not get any response
22:11:10 <shaagerup> But I ended up doing a lot of cabal reinstalls
22:11:15 <shaagerup> An reinstalling Haskell platform etc
22:11:20 <shaagerup> And it works now :-)
22:11:43 <shaagerup> I used cabal install happstack-foundation in my second try
22:11:49 <donri> <donri> do you have ~/.cabal/bin in $PATH?
22:12:22 <shaagerup> On OS X it apparently has to be /Users/soren/Library/Haskell/bin
22:12:45 <donri> foundation devel is here http://hub.darcs.net/stepcut/happstack/browse/happstack-foundation/Happstack/Foundation.hs
22:13:54 <donri> as an option you could use web routes for the static routes as well, although it's a bit tricky with subdirectories at the moment
22:14:46 <shaagerup> As far as I can see, the current dev version doesn't implement what I want directly, right?
22:15:01 <donri> doesn't look like it no
22:15:51 <donri> I think it would be better to make web-routes work nicer with static files
22:16:21 <donri> that way you can change the approot and static links will update properly
22:17:11 <donri> that is you'd have a route like, Static "css/style.css", or something
22:17:57 <hpaste> “Søren Haagerup” pasted “Alternative simpleApp” at http://hpaste.org/75151
22:18:01 <donri> even back-compat with hard-coded paths if you write an IsString instance for your route type ;)
22:18:30 <shaagerup> Ok yes
22:18:58 <shaagerup> But the problem is serving whole directories, or what is the problem with the current routing?
22:19:12 <shaagerup> Is it easy to serve single static files?
22:19:43 <donri> sure, serveFile
22:21:26 <shaagerup> Hm.. It is not completely clear to me how to apply serveFile/serveDirectory in conjunction with the simpleApp-function..
22:21:31 <donri> the problem is web-routes is sort of oriented towards treating the path segments separately, so to render `Static "css/style.css"` to a URL we need to split that string on /, and to parse a URL we need to swallow a list of segments and join them on /
22:22:11 <donri> so, certainly doable but currently you need to write some of it manually
22:23:15 <shaagerup> So.. If I want to serve css/style.css in my example here: http://hpaste.org/75150 .. I need to use the generic simpleApp-function, so I need to somehow specify a route in the route-function, right?
22:23:38 <donri> shaagerup: you'd add a route value to your route type, something like, | Static String, then in your route function you pattern match on that, lift out the string and pass it to serveFile
22:23:49 <donri> or better, use the function i added, hm let's find it
22:24:26 <donri> http://www.happstack.com/docs/happstack-server-7.0.2/doc/html/happstack-server/Happstack-Server-FileServe.html#v:serveFileFrom
22:24:31 <donri> that's safer than serveFile
22:26:03 <shaagerup> Ok - I'll give it a try :)
22:26:18 <donri> case url of Static path -> serveFileFrom "/var/www" guessContentTypeM path
22:27:13 <shaagerup> Yep.. Ugh, right now I have simple trouble as how to write | in AquaMacs :) I haven't developed on a Mac before.. So it will take a while
22:27:21 <donri> are you using boomerang or derivePathInfo?
22:29:31 <shaagerup> derivePathInfo
22:29:47 <donri> you're probably using the latter. the problem then is that it will only work for static paths without a slash in them
22:30:07 <donri> e.g. Static "style.css"
22:30:51 <shaagerup> So is boomerang better?
22:31:08 <donri> another option could be to use a query parameter, but those kinda suck too at the moment
22:31:14 <shaagerup> Hehe
22:32:08 <donri> although you could write some simple utility functions to make them not suck
22:32:48 <donri> duno if boomerang gives you more power than writing a custom PathInfo instance, but certainly more than derivePathInfo
22:32:59 <donri> although it's still a bit tricky, as i noted earlier, have to manually deal with the slashes
22:33:37 <shaagerup> Ok.. I need the "simplest" way to get started doing some basic development... I don't know much about practical haskell programming, I have only used it for simple algorithms and calculations, not anything big yet