01:16:13 <HugoDaniel> late night coding here...
01:22:02 <stepcut> yay!
01:22:16 <stepcut> I'm still hacking on sendfile :-/
01:22:20 <stepcut> almost done I hope
01:36:01 <HugoDaniel> :)
01:36:03 <HugoDaniel> sweet
01:36:09 <HugoDaniel> im doing a html form generator
01:36:14 <HugoDaniel> this is the only time i have to work on it
01:36:22 <HugoDaniel> i hope to have it half-finished by the morning
01:36:33 <HugoDaniel> happstack + yui
01:36:50 <stepkut> fun
01:37:06 <stepkut> definitely not a solved problem
01:37:42 <HugoDaniel> ill show you how im tackling it once its half-done
01:37:53 <stepcut> sweet
01:52:46 <Gracenotes> stepcut: hm... trying to work on serving errors in multiple formats
01:53:09 <stepkut> Gracenotes: oh ?
01:53:59 <Gracenotes> any error can come from nearly anywhere.. suppose you need to get an A, a B, and a C to continue; then a function like Args -> (A -> B -> C -> ServerPart Response) -> ServerPart (Either Error Response) seems to be working
01:54:18 <Gracenotes> like 'require'
01:54:37 <stepkut> ok
01:54:53 <Gracenotes> er, hm. except the 'Response' might be in a specific format too.. eh. anyway, the combinator approach seems to be working great
01:55:02 <stepcut> :)
01:55:15 <Gracenotes> more flexible than guards, at least.
01:55:41 <stepcut> oh ?
01:57:02 <Gracenotes> well, they give you conditional arguments
01:57:47 <Gracenotes> and when there aren't any arguments, they're nicer for inline use: combFunc args $ blah, as opposed to guardFunc args >> blah, since $ has low precedence :)
01:58:03 <Gracenotes> but that's syntactic..
01:58:51 <stepcut> some guards are like that, like path ?
02:00:05 <Gracenotes> path uses a guard internally, but it threads through, not just returning m ()
02:00:30 <stepcut> yeah
02:01:02 <stepcut> in the old days, everything used to be like, dir :: String -> [ServerPart a] -> ServerPart a
02:01:08 <stepcut> but now it's all monady and stuff :)
02:01:40 <Gracenotes> monadplus is nice. although just have to be careful ordering them.
02:02:02 <stepcut> yes.. also, I am not sure how often you want the fall-through behavior in practice..
02:04:55 <Gracenotes> well, you can insert an explicit 404 as a sort of cut
02:05:58 <Gracenotes> the way I have it, I suppose, is that failure to parse path components gives you mzero. failure to find data in an index gives you explicit 404s.
02:08:02 <stepcut> Gracenotes: right. But if you want to cut everytime, that gets tedious
07:45:23 <Entroacceptor> HugoDaniel: so, finished with the form generator?
07:45:35 <Entroacceptor> and, how did you solve the mimetype issues?
11:37:43 <bonobo> hi
11:37:52 <bonobo> stepcut: can I have a question?
11:38:13 <bonobo> stepkut: what direction are your changes to Input and friends going?
11:39:25 <HugoDaniel> no
11:39:32 <HugoDaniel> form generator postponed for 2 more days :(
11:39:48 <HugoDaniel> got some stresses with error handling :/
11:39:58 <HugoDaniel> i really dislike haskell exceptions
11:40:14 <HugoDaniel> they go against what haskell stands for
11:40:42 <fxr> could you give some examples?
11:41:32 <HugoDaniel> for a start, you cannot immediately tell when a given function will throw an exception :(
11:41:38 <HugoDaniel> maybe there is a ghc flag somewhere that im missing
11:42:44 <fxr> I think we should know the result type of every expression
11:43:34 <HugoDaniel> yes, indeed
11:43:42 <HugoDaniel> exception show pop up, and there goes your program :(
11:43:48 <HugoDaniel> s/exception/exceptions
11:44:39 <fxr> do you have any code examples for your problem?
11:58:42 <HugoDaniel> isn't it obvious ?
11:58:48 <HugoDaniel> just use a fromJust :P
11:58:50 <HugoDaniel> or read
11:59:11 <HugoDaniel> (read "test") :: String -> String
11:59:13 <HugoDaniel> and there you go
11:59:14 <HugoDaniel> :P
11:59:44 <HugoDaniel> (read "test") :: String
12:06:19 <HugoDaniel> exceptions should pop inside the IO monad
14:24:37 <stepcut> bonobo: I am modifying Input so that the inputValue is Either FilePath String instead of String
14:25:01 <stepcut> or rather, Either FilePath ByteString instead of ByteString
14:37:00 <bonobo> stepcut: ok, I see
14:41:19 <stepcut> why ?
14:42:16 <bonobo> just curious
14:42:59 <stepcut> there are a bunch of other related changes. You can now impose quotas, and there will be an optional arrow based interface for finer grained controlled
14:43:06 <stepcut> s/controlled/control/
14:53:16 <bonobo> cool!
14:57:09 <stepkut> but, now back to finishing the sendfile updates
15:21:28 <bonobo> how do you typically send mail from Happstack app?
15:23:34 <stepcut> I do something using the MIME library and sendfile.. but I think there is another way..
15:23:55 <stepcut> mae added something to util that depends on some smtp library..
15:41:02 <bonobo> yes
15:41:22 <bonobo> which MIME lib are you using?
15:43:19 <stepcut> http://src.seereason.com/haskell-mime/