Experimental IRC log happs-2007-08-31

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.

02:27:53<shapr>@yow !
02:27:53<lambdabot>Are you still an ALCOHOLIC?
16:04:32<shapr>Yow! What did I miss?
16:07:29<Saizan>a netsplit
19:58:06<sjanssen>can I override the XML output for a type?
19:58:11<shapr>yes
19:58:22<shapr>Though I don't remember how exactly.
19:58:26<shapr>Igloo is the man to ask there.
19:58:44<Saizan>you should just have to instance Xml
20:00:09<sjanssen>how would you solve this:
20:00:11<Igloo>yup
20:00:25<shapr>Is there a Haskell web development mailing list?
20:00:31<sjanssen>I want to serialize a type in a certain way, but present it in another
20:00:42<shapr>?
20:00:51<shapr>present it how/where?
20:01:16<sjanssen>I'd like to store a document in pandoc's native format, but I want to turn it into xhtml when displaying it
20:02:36<sjanssen>(pandoc's format is just a normal Haskell data type)
20:02:46<shapr>You mean when displaying to a browser?
20:02:56<sjanssen>yes
20:03:03<shapr>If so, what about just putting that into the XSLT?
20:03:54<sjanssen>I'd rather not write the XSLT for that, that's why pandoc exists :)
20:04:16<Saizan>mmh, you can instance ToMessage then
20:05:05<Saizan>since: ok :: (ToMessage a) => a -> IO Result
20:06:54<sjanssen>btw, some documentation would be really nice
20:10:26<sjanssen>I've resorted to using vim+hasktags for documentation
20:17:02<shapr>I agree
20:17:06<shapr>HAppS really needs docs.
20:17:13<shapr>Even unit/qc tests would be an improvement.
20:19:28<sjanssen>maybe I should use a parametric version?
20:19:40<sjanssen>data Entry a = Entry Author ... a ...
20:20:01<sjanssen>store it at type Entry Pandoc, and 'fmap pandocToHtml' before presenting it
20:22:30<sjanssen>bah, even hasktags doesn't work, because so many things in HAppS don't have type signatures attached to them
20:30:41<Saizan>what's the problem with instance ToMessage where toContentType _ = pack "text/html"; toMessage = pack . pandocToHtml ?
20:31:04<sjanssen>that's probably better :)
20:31:11<shapr>submit patches?
20:31:29<sjanssen>shapr: being grumpy is easier at the moment ;)
20:31:36<shapr>ACTION understands that
20:33:20<sjanssen>where does HAppS get it's state?
20:33:43<sjanssen>I see all these IO actions that somehow access state -- is there a global mutable var somewhere?
20:39:21<Saizan>i've wondered that too
20:39:45<sjanssen>IIRC, earlier version of happs used some STM-like thing
20:40:32<sjanssen>shapr: do you know?
20:47:32<Saizan>yeah, everything used to run inside the Ev monad
20:51:59<shapr>Lemmih rewrote the state stuff to separate {update,query} from request/response stuff.
20:52:31<shapr>Have you seen httpState.hs in HAppS-Server/Examples/ *
20:52:32<shapr>?
20:55:40<sjanssen>shapr: that shows me how to use it, I want to know how it works :)
20:57:54<sjanssen>emitRef :: IORef EmitInternal
20:57:55<sjanssen>emitRef = unsafePerformIO $ newIORef (error "emit not set")
21:13:17<sjanssen>ah, but this use of unsafePerformIO isn't so bad
21:13:30<shapr>I have no clue how it works on the inside.
21:13:38<sjanssen>I think I kinda see it now
21:13:41<shapr>Tell me?
21:14:37<sjanssen>EmitInternal is essentially a function that each event is called on
21:15:17<sjanssen>during initialization, the emitRef is filled with a function that writes these events to a Chan

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