11:39:17 <HugoDaniel> hi
11:52:47 <Entroacceptor> hi
11:52:52 <Entroacceptor> oh
14:23:06 <Entroacceptor> mhm
14:23:14 <Entroacceptor> #snapframework is way more active than this
16:57:58 <balor> As FormData processing is handled in the RqData monad.  How is it possible to move an uploaded file to a permanent location?  As this requires the IO monad?
16:58:57 <stepkut> balor: are you using happstack from hackage, or from darcs ?
16:59:57 <balor> from darcs
17:00:05 <stepkut> http://happstack.com/docs/crashcourse/RqData.html#rqdataupload
17:01:07 <balor> thanks
17:01:12 <stepkut> I guess that example does not actually move the file, but there it is using lookFile in the ServerPart monad. You can do IO in the ServerPart monad using liftIO
17:02:25 <balor> hmm...It also doesn't seem to use FormData and AddFoo
17:02:34 <stepkut> I have some other code which is not commited use which allows you to use arrows instead of monads for parsing the request data. In that code you can specify the location to save the file to directly
17:02:57 <stepkut> yeah -- I personally do not use the FormData class
17:03:35 <balor> ah
17:03:50 <balor> maybe I should skip it then too
17:03:58 <balor> ACTION is n00b
17:04:30 <stepkut> but, i think you should still be able to.. the FromData instance would return a value that contained the name of the temporary file, and then you would look at that value and move the temporary file
17:05:02 <stepkut> the guestbook example is starting to be a bit dated in terms of current thinking on best practices -- I plan to updated it soon. Sorry about that.
17:05:08 <balor> np
17:07:41 <balor> Am I right to think that AddGuestbookEntry returns a GuestBookEntry which is added ti macid with the update call?
17:10:15 <stepkut> AddGuestBookEntry does not return a GuestBookEntry, it takes one as an argument
17:10:28 <stepkut> update (AddGuestBookEntry someGuestbookEntry)
17:11:06 <stepkut> but, yes, that is how you add a guestbook entry to the macid state
17:11:31 <balor> ah
17:11:38 <stepkut> the underlying function is defined in, src/GuestBook/State.hs
17:29:38 <balor> yes, I remember now.  That's where template metaprogramming magic happens
17:30:27 <stepkut> yeah, I actually just posted a message on happs showing exactly what mkMethods generates
17:32:26 <stepkut> it actually does not generate all that much
17:32:43 <stepkut> It is probably far simpler than what people imagine
18:13:53 <stepcut> Entroacceptor: I assume that is because happstack works so well there is nothing to talk about ;)
20:08:27 <balor> Gah...I've been trying to save this file for 2 days, and I just don't *get* it
20:12:21 <balor> I've got the post handler here http://hpaste.org/42733/post_handler
20:13:00 <balor> I want to get the md5sum of the tmp_file and then move the tmp_file to the file named with the string from the md5sum
20:34:27 <stepkut> one moment
20:36:26 <stepkut> does entry have other fields besides file and md5sum ?
20:37:52 <balor> It hase a file_s field
20:38:15 <balor> and some others that are handled later by the FormData
20:38:37 <balor> So I'm doing the File IO in the post handler, and then handing off to th eFormData to sort the rest
20:39:10 <balor> Basically, I'm just trying to save the file to a unique permanent file
20:44:14 <stepkut> http://hpaste.org/42734/post_handler_annotation
20:48:55 <stepkut> you could also get rid of getData / FromData altogether
20:49:09 <stepkut> though there are advantages to using RqData
20:49:22 <balor> stepkut: thanks a lot...
20:49:24 <stepkut> but RqData does not require FromData
20:49:49 <balor> That really helps me
20:49:58 <balor> ACTION runs after a screaming child
20:50:53 <stepkut> as long as you aren't running away like a screaming child..
21:01:56 <balor> no no, they're just both acting up tonight.  And, of course, I have a deadline tomorrow.
21:02:11 <stepkut> :)
22:23:50 <Entroacceptor> stepcut: or the other way around :-P