Experimental IRC log happs-2007-06-11

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

13:30:58<kaol>hmm... I feel quite lost with happs. :-/
13:39:33<Saizan>any particular issue?
13:42:11<kaol>I'm trying to write a small example that would fetch and display a value from a postgresql DB... That would seem like a good starting point.
13:42:34<kaol>I guess I'll just have to stare at the wiki page for a bit longer
13:43:52<Saizan>interfacing with an external DB is not the easiest thing to do in happs..
13:44:57<Saizan>because you can't retrieve values from IO in the Env monad (modulo unsafe*)
13:45:32<Saizan>but you can respond with an IO Result ..
14:53:45<kaol>hmm... is withBlockingIO what I want?
14:55:19<kaol>too bad nobody's written the wiki example on that (I would if I understood it)
15:15:15<Saizan>that's useul if you want to modify the internal state with the result of an IO action
15:49:42<kaol>sounds to me that it'd be quite hard to get anything done if you can't get input via IO to the server... Of course, I may have misunderstood a number of things.
15:57:46<Saizan>well if you keep your data in memory you don't need IO
15:58:34<Saizan>however you can get input via IO
16:04:04<kaol>I'd rather do SQL queries.
16:11:26<kaol>hmm... this is on the web page: "... event and state as input and that evaluate to a new state, a response, and a (possibly null) set of
16:11:44<kaol>sideeffects."
16:12:32<kaol>can the response be something of the sort "perform the side effects and feed the state and response back to HAppS"?
16:12:54<kaol>I may not be understanding what happs is about at all, please bear with me.
16:13:29<alexj>yes
16:13:46<alexj>the core of happs is a state transformer monad.
16:13:58<alexj>the state transformer is pure (no side effects)
16:14:20<alexj>handler functions produce a new state and an IO response.
16:14:46<alexj>the IO response can do IO and emit events back to HAppS.
16:15:13<alexj>your handler for this incoming emitted event is then pure and can produce a new state and IO, etc.
16:16:44<kaol>ok, sounds good. I'll try to get my hello database example set up, then... wish me luck. (sigh)
16:16:54<alexj>ok.
16:16:59<alexj>good luck.
16:17:05<kaol>:-)
16:17:09<alexj>trying to refactor happs right now to make it a lot easier to use.
16:17:19<alexj>hopefully in the next rev less luck will be needed :-)
16:18:06<Saizan>alexj: what "emit events back to HAppS" refers to?
16:18:23<alexj>sorry, new nicer API for handling events.
16:18:31<alexj>will propagate to main branch soon.
16:18:40<alexj>right now, you have to do it manually.
16:18:42<Saizan>oh, ok :)
16:18:50<alexj>example of manual version is in the mailsender code.
16:19:02<Saizan>EventHandler and withBlockingIO?
16:20:01<alexj>blockingIO is something more than that, but yes, it is in that code as well.

Back to channel and daily index: content-negotiated html turtle