Experimental IRC log happs-2007-10-13

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.

16:29:30<bakert_> Could not find module `HAppS.Server.Facebook':
16:29:35<bakert_>I've installed HAppS-Server
16:29:49<bakert_>but building HAppS begin gives me that error.
16:30:16<bakert_>Facebook.hs is in the repository for HAppS-Server. But is it not installed by the cabal install process for HAppS-Server?
16:30:32<bakert_>Any hints gratefully received!
16:46:23<bakert_>wel, i can load the file in ghci with :load
16:46:29<bakert_>so it's just that
16:46:34<bakert_>runhaskell Setup.hs build
16:46:37<bakert_>is not seeing it
16:48:43<bakert_>it's something to do with this "sp" stuff
16:49:02<bakert_>gee golly gosh i have no idea what that is
16:49:35<bakert_>Hello World this ain't.
16:50:06<bakert_>woohoo it runs. i think that's success.
16:50:29<bakert_>now to reverse engineer hello world out of this facebookianblogtastic stuff
16:52:35<bakert_>the trouble with doing this with the "sp" script is that it downloads something every time before uploading. can i stop it doing that?
16:53:48<bakert_>hmm. i removed the login function and (possibly unrelated) it's now super fast.
16:58:20<bakert_>so what's this stateFuns thing then eh?
16:58:37<bakert_>i've got hello world down to 29 lines. but he's got to go
17:01:53<bakert_>holy god christ can i not make any sense of this. what on earth is "import qualified State.State_003 as Old" for?
17:02:15<bakert_>ah ... migrations
17:02:19<bakert_>interesting
17:02:24<bakert_>and yet hideous :)
17:03:03<bakert_>so where the hell does stateFuns actually live then? and what is it?
17:08:32<Saizan>stateFuns is a list of events that you can use with query or update on your state
17:09:05<Saizan>it's generated with the expose macro from MonadState/Reader actions
17:24:33<bakert_>haskell has macros?!
17:24:47<bakert_>i may be on a hiding to nothing here ...
17:34:10<Saizan>bakert_: GHC has template haskell as an extension
17:35:29<bakert_>Saizan: so is MonadState/Reader part of Template Haskell or HAppS?
17:36:21<Saizan>well MonadState and MonadReader are classes of the standard monad library
17:36:57<Saizan>expose is a macro defined by HAppS
17:37:14<Saizan>the TH part is the $(..) syntax, which splices the macro
17:37:48<bakert_>cool. i will investigate further. thanks.
17:38:53<Saizan>look at the types of the functions passed to expose in State.hs
17:54:48<bakert_>Saizan: what do those apostrophes do on the front of the function names being passed to expose?
17:55:26<bakert_>like quoting in lisp?
17:55:31<Saizan>yes
17:55:54<Saizan>they convert the identifier to its Name
17:55:55<bakert_>egad. it's not simple this happs thing, is it? :)
17:56:21<bakert_>how does the result of that expose macro become stateFuns?
17:56:45<Saizan>because a toplevel splice results in toplevel declarations
17:57:11<bakert_>i see
17:57:18<Saizan>you can use -ddump-splices to see which code is generated
17:57:51<bakert_>so call expose like that at the toplevel of State.hs causes a stateFuns function to be generated that is a list of generated functions or perhaps a function containing generated functions.
17:58:24<bakert_>and i can no longer write a HAppS application without such a thing? or if i wanted to create a minimal hello world could i do away with stateFuns and expose?
17:59:17<Saizan>you can avoid it if you don't need state
17:59:45<bakert_>well, i will eventually for my examples but to start with i am going to do without
17:59:57<bakert_>i'm trying to update my tutorial to 0.9.1
18:00:26<Saizan>oh, nice, HAppS-Begin is the only documentation
18:00:35<bakert_>http://bluebones.net/2007/09/simple-haskell-web-programming-with-happs/
18:00:40<bakert_>is the 0.8.8 version
18:00:47<bakert_>trying to do the same thing in 0.9.1
18:00:53<bakert_>but there's a LOT of changes!
18:01:04<bakert_>and no hello world example this time :)
18:07:40<bakert_>hey Saizan do you know where the :*: operator is defined?
18:08:40<Saizan>HList?
18:09:10<Saizan>no, in HAppS.StdMain
18:09:31<bakert_>hmm. failure of grep-fu there i think :)
18:11:21<Saizan>first guessed, then :info-ed :)
18:11:31<bakert_>ah i don't know :info
18:11:37<bakert_>i will have to add that string to my bow
18:11:40<bakert_>that's in ghci i take it
18:12:00<bakert_>aha. cool.
18:12:15<bakert_>do me a humungous favour and talk me through this line:
18:12:16<bakert_>stdMain $ simpleHTTP impl :*: stateFuns
18:12:33<bakert_>if i could understand that i'm sure i'd be off and running
18:12:52<bakert_>stateFuns are a group of functions for manipulating state in some way
18:13:17<bakert_>and they are being joined together by the (:*:) operator with a list of sort of instructions?
18:14:22<bakert_>and that conglomeration is passed to simpleHTTP which process http requests and responses by using the routines supplied by the conglomeration
18:14:41<bakert_>and this package of stuff is used by some function stdMain that does the necessary plumbing
18:14:47<bakert_>Saizan: am i close?
18:29:01<Saizan>it's parsed as stdMain $ ((simpleHTTP impl) :*: stateFuns ) so simpleHTTP doesn't see stateFuns, so i think you're close but i know very little about this, it's the level where i just let the "magic" happen and i can't investigate right now
18:30:19<Saizan>impl is sort of similar to the argument you passed to stdHTTP in 0.8.8
18:35:27<bakert_>i see. thanks. i thought impl might be like that.

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