00:12:20 <mekeor> i don't understand how to use 'nullDir' (<http://www.happstack.com/docs/happstack-server-7.0.2/doc/html/happstack-server/Happstack-Server-Routing.html#v:nullDir>).
00:13:49 <stepcut> one moment
00:13:50 <donri> mekeor: it's monadic for great consistency with dir and friends
00:13:51 <mekeor> i'd rather expect nullDir to be of type :: ServerMonad m => (String -> m a) -> m a.
00:14:09 <mekeor> … like path.
00:14:12 <donri> mekeor: just call it in your handler
00:14:16 <donri> or do dir bla >> nullDir
00:14:17 <mekeor> … or uriRest.
00:14:32 <mekeor> but.
00:14:45 <donri> wait no that's not it is it
00:14:49 <mekeor> but i need a ServerPart Response, not a ServerPart ().
00:14:50 <donri> dir bla $ nullDir >> handler
00:15:15 <mekeor> wait. i'll paste ma code.
00:15:58 <donri> x >> y returns y though
00:16:22 <donri> > Just () >> Just "response"
00:16:23 <lambdabot>   Just "response"
00:16:26 <stepcut> really, we want to be able to parse /foo/1 like this: do dir "foo" ; i <-path ; nullDir ; ok (toResponse i), but we have to change the ServerMonad to be based on State instead of Reader to do that
00:16:33 <stepcut> or.. change the whole thing over to a Free monad :p
00:16:47 <hpaste> mekeor pasted “like this” at http://hpaste.org/72711
00:17:00 <stepcut> so.. now we have this weird half/half thing, where some functions like nullDir are monadic, and others like dir/path are CPS
00:17:26 <donri> mekeor: just do, nullDir >> rootHandler
00:17:42 <donri> also consider web-routes
00:17:42 <mekeor> cool.
00:18:08 <mekeor> is web-routes documented in happstack-crashcourse?
00:18:14 <stepcut> mekeor: yup
00:18:22 <mekeor> expected that.
00:18:29 <mekeor> the crashcourse is awesum.
00:18:33 <stepcut> also, I plan to fix this issues in H8, and make the combinators more powerful. I have a working version already
00:18:34 <stepcut> thanks
00:18:36 <donri> stepcut: btw re monadplus and failure, parsers seem to get it right with <?> so maybe we could do what they do?
00:19:25 <mekeor> donri: briefly, what's the advantage of web-routes?
00:19:42 <stepcut> donri: they have a lot of overhead to track errors.. not sure we want to pay that overhead all the time since it is only useful during debugging?
00:19:52 <mekeor> the web-routes libraries provide a system for type-safe url routing. The basic concept behind type-safe urls is very simple. Instead of working directly with url strings, we create a type that represents all the possible urls in our web application. By using types instead of strings we benefit in several ways.
00:19:53 <mekeor> AH
00:20:03 <donri> mekeor: type safe, more DRY
00:20:10 <mekeor> <3 happstack-crashcourse.
00:20:23 <donri> stepcut: no i mean for error responses instead of just 404
00:20:27 <mekeor> donri: DRY?
00:20:40 <mekeor> donri: also, what's RAD?
00:20:42 <stepcut> donri: i don't understand the problem..
00:20:55 <donri> stepcut: you want to get a 405 if a "method" failed to match, but still have "msum" work etc
00:21:53 <donri> mekeor: Don't Repeat Yourself and Rapid Application Development
00:22:17 <mekeor> Ah. thanks.
00:23:04 <stepcut> donri: with the Free monad based implementation it should be pretty easy to handle, because it can rewrite the handlers to eliminate backtracking
00:23:14 <donri> OK sounds promising
00:28:47 <stepcut> first need to change how boomerang deal with EOF though
00:28:58 <stepcut> not because they are related.. but because it is higher priority :)
00:29:54 <mekeor> stepcut: just put yourself in my place. how'd you look for that happstack-function which gives you the client-IP-address?
00:31:37 <stepcut> mekeor: no idea
00:31:49 <mekeor> exactly!
00:32:11 <stepcut> how are you going to fix that?
00:32:20 <donri> "hm, it's probably in the Request, oh there rqPeer... hm but how do i get the request, oh there, askRq!" ok so maybe this would work better if we had hoogle :p
00:32:33 <mekeor> stepcut: no idea
00:33:12 <stepcut> there is a constant fight between improving the documentation and instruction for what we already have, and implementing new and better code :(
00:34:31 <stepcut> as a starting point, though, everything we know about the Request is stored in the Request type.. so that is a starting point as donri points out
00:34:49 <donri> mekeor: it's a good idea to learn how ServerPartT is built up; http://www.happstack.com/docs/happstack-server-7.0.2/doc/html/happstack-server/Happstack-Server-Monads.html
00:36:43 <mekeor> a dilemma.
00:38:08 <stepcut> still. things are a lot better than when I took over happstack :)
00:38:19 <stepcut> much better organization, and far better documentation
00:38:21 <mekeor> yay =)
00:38:31 <mekeor> *nod*
00:41:41 <donri> stepcut: and probably things will be cleaner in 8 what with the server basically being rewritten from scratch and all?
00:41:50 <stepcut> yup
00:42:23 <mekeor> oh? cool.
00:43:00 <stepcut> it'll be mostly the same, but better :)
00:43:07 <stepcut> kind of like happstack-state -> acid-state
00:43:38 <stepcut> upload of video is 65% done :-/
00:48:59 <mekeor> ACTION doesn't actually like TemplateHaskell.
00:49:41 <mekeor> s/doesn't actually/actually doesn't/ # [sounds better]
00:53:47 <stepcut> doesn't like which part of TemplateHaskell?
00:55:45 <mekeor> i mean, just in general. it's a bit like a dirty hack in my eyes…
00:56:16 <mekeor> ACTION . o O ( when will happstack 8 be released? )
00:56:28 <stepcut> later :)
00:56:40 <donri> currently blocked on pipes
00:56:45 <stepcut> first pipes 3.0 has to be released, and I have to be done with my CUFP presentation
00:57:32 <mekeor> ah. cool.
01:01:50 <stepkut> we have bits and pieces developed here and there, but we need pipes 3.0 to really start putting it all together
01:02:57 <mekeor> ACTION doesn't know pipes.
01:03:45 <mekeor> cool. there's a nice tutorial on pipes at <http://hackage.haskell.org/packages/archive/pipes/2.2.0/doc/html/Control-Pipe-Tutorial.html>.
01:04:07 <stepkut> :)
01:13:01 <stepkut> the switch to pipes should be mostly invisible to the end user
01:13:11 <stepkut> except in good ways :)
01:13:51 <donri> pipes need way more utilities
01:17:33 <donri> though i guess the "pipe" functions gets you a lot, maybe?
01:44:19 <stepkut> not sure what you mean by 'utilities'
01:54:07 <donri> not sure either, most of it is easy to do without special utilities, but i suspect there are many patterns that could be reused
02:13:45 <levi> What's pending to go in pipes 3.0? I've been sorta-kinda following the whole iteratee-pipes-conduit thing as it progresses.
02:21:17 <donri> levi: leftovers, for parsing
02:22:39 <levi> Ah, I missed that it didn't provide that yet. Is a strategy known to add leftovers to the code that's there?
02:24:43 <donri> levi: from what i understood, tekmo basically has it working but is holding of because he was cleaning it up or something
02:26:33 <levi> Well, I suppose that's the price you pay for having nice things.  You have to wait for the people picky enough to make them nice to finish.
02:27:42 <donri> "The ony reason I haven't released it yet is that I'm coming up with an extensible framework for composing features."
11:59:19 <Palmik> Hi guys, is there a write up un the current state of the component system? There will probably be something official in the future (http://www.happstack.com/docs/crashcourse/WebRoutes.html#web-routes-coming) but I winder if there are some examples or commentary in the mean time.
12:55:10 <stepcut> Palmik: not yet. Still working through design issues.
12:56:12 <Palmik> stepcut, OK, thanks. :)
13:30:01 <mekeor> happstack-server 7.0.4 is out!
13:30:12 <stepkut> :)
13:33:36 <stepkut> posted the changelogs to the mailing list -- nothing too thrilling, mostly a bug fix to the FromReqURI Bool instance
13:44:59 <mekeor> ACTION is in the mailing-list.
14:04:59 <Palmik> Hmm, I though I would report that current version of web-routes-th does not compile (fresh install on cabal-dev) because if line 21 in Web/Routes/TH.hs that read ""/home/stepcut/n-heptane/projects/haskell/web-routes/web-routes-th/dist/build/autogen/cabal_macros.h"".
14:05:12 <stepkut> oops
14:05:19 <stepkut> need scoutess now
14:05:26 <stepkut> it compiled for me obviously :)
14:06:52 <Palmik> :)
14:07:18 <mekeor> hehehe :D
14:07:47 <mekeor> Palmik: push a patch changing it to /home/palmik :D
14:07:58 <Palmik> :D
14:08:03 <stepkut> should be fixed in 0.22.1
14:08:57 <Palmik> Is commenting out the line enough? (I have tried it and it compiles, so it should be OK, right? :))
14:10:24 <stepkut> yes
14:10:37 <stepkut> it was only in there so that it was easy to load the file into ghci while developing some new code
14:10:38 <Palmik> Thanks for the quick responses. :)
14:10:51 <stepkut> but, it is fixed on hackage now anyway
14:33:09 <whoev> hello
14:33:18 <whoev> i'm considering building a large business application in happs
14:33:24 <whoev> i'm wondering how production-ready it is
14:33:38 <whoev> i.e., how much extensible code has already been written
14:34:45 <stepcut> whoev: I feel comfortable using it in production..
14:35:20 <stepcut> not really clear what you are looking for though..
14:51:10 <whoev> shortcuts
14:51:12 <donri> whoev: if you just want to throw together some reusable components, that's not what happstack is best at at the moment. though you might have a look at clckwrks, although it's early in development.
14:51:40 <whoev> hmm
14:53:47 <donri> but we do have authentication, sessions, form processing, powerful templates/js...
14:54:15 <stepcut> not sure that any of the Haskell web frameworks have much in the way of interesting off-the-shelf components aside from authentication support
14:55:18 <donri> yea... snap has snaplets, but looking at their list almost all of them are for integrating databases
14:55:24 <stepcut> donri: yup
14:55:58 <stepcut> clckwrks has an ircbot, a gallery, a bug tracker, and some other stuff.. but all pretty primitive still
14:56:50 <stepcut> and not useful to most people :)
15:36:54 <stepcut> doing another upload of my screencast.. the first version was at 800x600, which youtube decided to downsize to 640x480.. which was obviously horrible. So, I re-rendered it at 720p, but with the original 800x600 centered and unscaled. So, hopefully youtube won't rescale it (when viewed at 720p anyway)
15:37:13 <stepcut> next time I will try harder to just capture the original at 720p.. might have to buy a new monitor though :p
15:38:54 <Palmik> As far as composability goes, I have just today started working with Happstack and even though there is no official support for creating your own standalone components yet, you can quite comfortably create them with web-routes. I for example have "data Route = Home | Forum IF.Route" where IF.Route is route type defined in mine forum submodule. The only minor problem is with the monad parameter in the RouteT transformer (if mine forum did not use the
15:38:55 <Palmik> same underlying monad, I would have to probably "run" the monad beforehand to get to the common IO... have not tried that yet though).
15:41:03 <Palmik> The "Forum IF.Route" wrapping feels a lot like how yesod does it (modulo the quasi-quoter).
15:42:59 <stepcut> yeah
15:43:02 <Palmik> One of the immediate plus sides to Happstack's approach is that the "master site" can control the rendering of the "components" routes.
15:43:14 <stepcut> yeah
16:01:39 <donri> Palmik: take a look at nestURL
16:13:03 <Palmik> donri, thanks, that will come in handy. :)
16:38:37 <donri> with the rise of "object-oriented CSS" we should totally define some "functional CSS"
16:38:41 <donri> i have no idea what either means, though
17:34:21 <stepkut`> http://www.youtube.com/watch?v=7Wmszk4wZxQ, make sure to select 720p for the quality
17:38:43 <donri> if you had used vim2hs the screencast would have been 30 minutes ;)
17:39:53 <donri> (do you actually type in language pragmas by hand like that?)
17:40:22 <stepkut> yes
17:40:49 <stepkut> if i had used vim it would have taken all day
17:41:12 <donri> heh "module Main where" oops "import Main where" wait what?
17:41:46 <donri> stepkut: :) i think haskell-mode with chrisdone's stuff enabled can insert language pragmas automatically for you based on ghci errors
17:42:06 <donri> although i guess for sake of a screencast it might be good to go through what extensions you're enabling
17:45:11 <donri> should add foundation here http://www.happstack.com/C/ViewPage/3
17:47:15 <stepkut> yup
17:47:24 <stepkut> was planning on it
17:47:34 <stepkut> i need to generate the haddoc docs and also do some written docs
19:11:40 <donri> stepkut: so who's felix
19:24:30 <stepkut> donri: my son
19:25:43 <donri> cool! ready to learn haskell!
19:30:55 <stepkut> :)
19:33:04 <luite> how old is he?
19:37:16 <stepkut> 5 on monday
19:37:32 <luite> oh perfect age to start :)
19:39:07 <donri> read from LYAH as a bedtime story
19:46:56 <luite> donri: but the list monster might be scary! fortunately you can easily take its head (and galumph back)
19:55:30 <stepkut> he is more into drumming and analog circuit design at the moment
19:57:28 <donri> you need to indoctrinate more
21:56:07 <donri> maybe what we should do for css is store it in acid-state and have some nifty js for editing it live :p
21:58:56 <stepkut> for clckwrks, we want something like that
22:01:08 <donri> also i don't just mean a textarea where you input css but something more like these in-browser debugging tools, something sorta "wysiwyg of css"
22:01:28 <donri> not sure it would work out well in practice though, might result in too specific selectors for example
22:02:58 <donri> but in any case you definitely want more live feedback when designing... code or text content is one thing, but design something else
22:19:41 <stepkut> yup
22:20:11 <stepkut> discovering the color picker in the chrome css view was great
22:26:57 <donri> toying with doing type safe css, question is how type safe to make it
22:27:09 <donri> for example margin takes "1 to 4 values", do you just use a list?
22:27:23 <donri> then you can pass in more or less values
22:27:42 <donri> but doing a 4-tuple of Maybes would be noisy
22:28:23 <donri> and still not *quite* right, since they stack and aren't technically positional
22:34:38 <stepkut> yeah
22:34:49 <stepkut> you can use type classes, but I am not thrilled about that
22:35:40 <donri> i'll keep it simple and less type safe for now
22:38:38 <stepkut> or hlists
22:38:59 <stepkut> but.. css is type unfriendly for sure