16:20:32 <donri> stepcut: hm i wonder if resourcet could be used for the applicative acid-state config
16:23:14 <donri> i wonder if it DTRT WRT not opening more states if one fails, or if it would just open them all always
23:04:36 <donri> @tell stepcut in my testing, ResourceT + allocate does exactly what we need for opening multiple acid-state, and permits the applicative style
23:04:37 <lambdabot> Consider it noted.
23:13:17 <rlpowell> donri: THis is to solve the "passing aroudn a bunch of acid states" problem?
23:14:29 <donri> rlpowell: it's about opening them in the first place, and properly closing them when the app shuts down, and correctly handle errors if some open fails
23:14:46 <rlpowell> donri: And also being able to access them?
23:15:27 <donri> rlpowell: well somewhat related i guess, that comes after and builds on this
23:16:14 <rlpowell> *nod*
23:16:16 <rlpowell> Cool.
23:16:30 <donri>  if you have multiple states properly opened, and stored in some data structure, you can set things up so they can be queried and the right state selected by type
23:17:31 <rlpowell> *nod*
23:17:35 <rlpowell> I've already got that.
23:17:37 <donri> i.e. making it implicit via type classes, as i know you love ;)
23:17:46 <rlpowell> I stole that code out of one of the happstack-auth demos.
23:17:46 <donri> ah yea foundation does it for a single state
23:17:50 <donri> but can in theory be done for multiple at once
23:17:53 <rlpowell> No, this is for multiple states.
23:17:55 <donri> aha
23:17:59 <rlpowell> It's magic, it's really cool.
23:18:05 <donri> :)
23:18:17 <rlpowell> THroughout my code, in anything with the CtrlV typeclass, acid shit just *works*.
23:18:26 <donri> yep
23:30:13 <donri> rlpowell: and the real nice thing is that it's not really magic at all, no global state or thread-locals or any such.
23:30:26 <donri> monads, bitches!
23:32:21 <rlpowell> donri: Well, whether or not that's global state is pretyt arguable.
23:32:32 <donri> oh, acid itself is global state of course
23:32:38 <donri> but the handle is passed around in a reader monad
23:33:27 <donri> the code you write "feels" like the handle is a global, but it isn't, you can easily run the code with a different handle without affecting global (code) state, and it's a type error to use it in a context where no handle is set up
23:34:42 <rlpowell> If all of my code relies on that handle, though, taht's effectively a global.
23:34:58 <rlpowell> I understand that it's different in terms of low-level code provability and so on, but thats' splitting a fairly fine hair, IMO.
23:36:02 <donri> i suppose, but still, you can run those readers from multiple threads simultaneously with different handles, etc
23:36:52 <donri> which you can do with thread-locals in other languages as well, but much less predictable / a hack / error prone IME
23:37:57 <rlpowell> Does it help you to run them from multiple threads with the *same* handles?
23:38:13 <rlpowell> I don't know a lot about how Haskell's type safety helps with concurrency; for now I'm jsut treating it as magic.
23:38:28 <donri> heh, well acid-state itself is thread-safe through using stm internally
23:38:56 <donri> happstack spawns a thread for every request IIUC (cheap green threads)
23:42:14 <donri> but yea if the handle itself wasn't thread-safe, it wouldn't really help that the reference to the handle is
23:43:40 <rlpowell> *nod*
23:44:08 <donri> stepcut: don't suicide on us!
23:44:22 <stepcut> !
23:44:22 <lambdabot> stepcut: You have 2 new messages. '/msg lambdabot @messages' to read them.
23:46:10 <rlpowell> 25-16:46 <       donri> stepcut: don't suicide on us! -- ...whaaat?
23:46:31 <stepcut> had to record some vocals earlier and didn't want alert noises in the recording
23:46:33 <donri> rlpowell: * stepcut has quit (Quit: suicide is painless.)
23:46:50 <stepcut> it brings on many changes!
23:48:31 <stepcut> rlpowell: i will merge those changes someday, I swear!
23:49:07 <stepcut> rlpowell: i want to refactor ControlV into a series of steps: 1. ControlV using Data.Map 2. ControlV + ixset 3. ControlV + authenticate, etc
23:54:52 <rlpowell> stepcut: Cool.  :)