Experimental IRC log happs-2008-02-29

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.

00:38:58<dbpatterson>is there any built in system for autoincrementing numbers (to be used in state data, to guarantee uniqueness)?
00:40:14<Lemmih>No.
00:40:42<Lemmih>It can be done as a component.
00:42:18<dbpatterson>you mean just keep an Int in the component, and increment it every time a new piece of data is added?
00:42:44<Lemmih>It can be done as a separate component.
00:44:05<dbpatterson>that would just expose (getIdAndIncremenet)?
00:44:34<Lemmih>Yeah, perhaps named 'newUnique'.
00:44:36<Lemmih>id <- update $ NewUnique key
00:45:04<dbpatterson>ok, thanks
09:11:53<krassik>has anyony ran happs on Windows?
14:45:28<Lycurgus>I pity the fool who would try.
14:48:36<Saizan>it's not much different.. but i don't know if the .cabal files are approriate
16:44:51<dbpatterson>what is the preferred way of storing time in state? I am trying to use UTCTime but it doesnt implement the Data class...
16:45:12<dbpatterson>should I just convert to seconds? (so store as Integer)
16:50:07<Saizan>tried with $(deriveSerialize UTCTime) ?
16:53:06<dbpatterson>using $(deriveSerialize ''UTCTime) it seems to be the same error
17:07:01<dbpatterson>any other ideas?
17:08:14<Saizan>you also need instance Version UTCTime
17:08:37<dbpatterson>yes, I have that
17:11:15<dbpatterson>the relevant snippit: http://hpaste.org/6015
17:12:03<Saizan>well you can avoid deriving data for BlogPost and BlogPosts
17:13:57<dbpatterson>hmm... and Typeable? can I avoid that as well?
17:15:57<Saizan>no, that's a requirement for Serialize
17:17:04<dbpatterson>so would it be easier to just do conversions to normal UTC seconds and store it as an Integer?
17:20:22<dbpatterson>oh hmm, this might do it http://hackage.haskell.org/trac/ghc/ticket/1007
17:21:00<dbpatterson>oh nevermind
17:21:06<dbpatterson>its under the unimplemented sections
17:21:25<Saizan>yup
17:21:36<Saizan>it's kind of an oversight to not have those instances
17:21:57<Saizan>store as an integer is probably the best option now
17:22:14<dbpatterson>okay, thanks
21:24:16<dbpatterson>what is this error (command line output) likely indicating: "HTTP request failed with: too few bytes. Failed reading at byte position 43"?
21:25:09<dbpatterson>this is when the server is running, some requests work, some give this error and I get a white screen (nothing sent back to browser)
21:28:32<dbpatterson>oh hmm it seems to have to do with old state data
21:28:39<dbpatterson>clearing _local seems to fix it...
21:39:36<dbpatterson>what exactly are the limitations of what you can use in a method that is mkMethodized? I can getRandom, but I cant getCurrent time - see here: http://hpaste.org/6017
21:46:27<Lemmih>You can't use IO.
21:48:31<Lemmih>HAppS-State provides getRandomR and getEventClockTime but both may go away in a future version.
21:50:05<Lemmih>dbpatterson: Writing explicit type signatures gives you earlier and better error messages.
21:53:05<Lemmih>dbpatterson: I'd make 'addBlogPost' an IO action and have it emit SetBlogPost.
21:53:23<dbpatterson>Lemmih: hmm... so no IO at all is allowed... this isnt limiting? are timestamps never used?
21:53:35<dbpatterson>oh
21:53:49<dbpatterson>so only things in mkMethods arent allowed to do IO
21:53:52<Lemmih>dbpatterson: IO in transactions is unsafe. They may be executed an arbitrary number of times.
21:53:58<Lemmih>Correct.
21:54:03<dbpatterson>okay, thans
21:54:08<dbpatterson>thanks*
23:24:54<dbpatterson>can withDataFn be used multiple times? ie, if the first call checks for a cookie (to verify a valid session), and then that returns a new [ServerPartT] that contains within it calls to WithDataFn (to process form data, etc)?
23:25:33<Lemmih>Sure.
23:25:38<dbpatterson>cool :)
23:53:42<dbpatterson>I'm getting an error. posted here: http://hpaste.org/6022 . basically, I have a function that takes a list of ServerPartTs and tests a condition, if its true, it returns them, if not, it returns a different list.
23:54:05<dbpatterson>ghc is saying that the return statement is just a single ServerPartT, not a list...
23:54:25<dbpatterson>I feel like this must be something really stupid, but I cant figure out what
23:55:04<dbpatterson>errm, sorry, my explanation is backwards
23:55:13<dbpatterson>inferring is correct, expected is not
23:57:00<Lemmih>Surround by '[' and ']' or don't return a list.
23:58:19<Lemmih>do loggedin <- ...; if ... then return $ multi sPTs
23:58:46<dbpatterson>why do you need multi?
23:59:22<Lemmih>Oops, do loggedin <- ...; if ... then multi sPTs
23:59:55<Lemmih>dbpatterson: You can't use 'query' from the list monad.

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