Experimental IRC log happs-2007-10-26

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.

15:38:55<nbarterd>I'm trying to find a SIMPLE example for using state with happs 9.1. Like, state is an integer value. You can increment it, decrement it. That's it.
15:39:43<nbarterd>I had a working example for this for 8.8 which I sent to the happs list. Then in seems with 9.1 everything changed.
15:40:58<nbarterd>An example of working state would appear to be the faceblog function. But I can't understand it, there's too much indirection. Where is get, put, and modify?
15:46:03<Saizan_>nbarterd: seen MyEntries?
15:47:58<nbarterd>yes
15:51:12<nbarterd>what functions use state?
15:51:12<nbarterd>just faceblog?
15:51:12<nbarterd>or blog... login... ?
15:53:31<earthy>good docs on 0.9.1 would be great...
15:53:31<Saizan_>to access the state you've to define functions using MonadState or MonadReader, then generate correponding events with mkCommands or expose macros, finally you can call those events from IO using query or update
15:54:16<Saizan_>query for readonly events
15:54:47<Saizan_>you can also look at Examples/httpState.hs in HAppS-Server
16:00:15<nbarterd>looking...
16:00:30<nbarterd>Examples/httpState.hs, 71\;37, not in scope: stateFuns
16:05:00<Saizan_>s/stateFuns/interface/
16:06:53<nbarterd>I think having compiling examples is very important, given the dearth of documentation
16:06:53<nbarterd>How about having a compilesSanityCheck.sh that just does cd dir; ghc -e '' file.hs
16:06:53<nbarterd>and verifies there's no error output?
16:09:02<nbarterd>for all the important examples?
16:23:43<nbarterd>OK I have httpState running. How do I set the state? I tried http://localhost:8000/action/set/1 but got "no suitable handler found"
16:25:20<Saizan_> http://localhost:8000/action/set/?newstate=1
16:26:03<Saizan_>that's because of the FromData instance
16:27:45<nbarterd>be good to include that url as a comment for the newbie in httpState.hs
16:45:10<nbarterd>what does "look" do? in liftM2 suerInfo (look "name") ... ?
16:53:38<nbarterd>what url do i give to activate the user / password stuff?
16:58:20<nbarterd>asdfi see it uses the reader onad...
17:48:22<nbarterd>getting the hang of the reader monad :)
19:37:17<nbarterd>I'm trying to understand how state works, looking in Happs Server/Examples/httpState.hs
19:37:39<nbarterd>I don't get the instance FromData UserInfo part
19:38:49<nbarterd>Actually I don't get what the login function is supposed to be doing.
19:39:31<nbarterd>And if there is a url that you can pass it that will do something meaningful, like eg, showing a user and password
19:40:15<nbarterd>I was able to get the http://localhost:8000/action/set/?newstate=1 type stuff to work\
19:42:22<nbarterd>but I can't figure out what upper and lower are supposed to be doing
19:49:36<nbarterd>I would like to have something similar to the [dir "action" clause in impl
19:49:48<nbarterd>but for the user/login state stuff
20:42:09<Saizan_>nbarterd: upper and lower are not significant on numbers, try setting the state to a word
20:43:09<Saizan_>and, what don't you get about FromData UserInfo?
21:24:29<nbarterd>I don't understand what expose is doing.
21:25:01<nbarterd>it seems like you have lower cased spelled functions like upper, and when they're exposed they go upper case, Upper.
21:25:11<nbarterd>is that a happs thing... or a template haskell thing... ?
21:29:42<nbarterd>-ddump-splices seems to be my friend here...
21:33:04<nbarterd>so... start with functions lower case, end with constructors upper case...
21:45:31<elliottt>anyone interested in helping me out with a compile error on HAppS-Data? :D
21:47:16<elliottt>it's failing as there's no Data instance for ByteString
22:08:52<Saizan_>elliottt: you need darcs version of syb-with-class
22:09:14<elliottt>ah, thanks :)

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