Experimental IRC log happs-2007-10-14

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.

04:22:41<shapr>Bah humbug!
04:49:51<shapr>foo
05:24:43<stepcut>yay!
05:26:07<stepcut>are there any examples of creating forms with multiple check boxes ?
05:38:31<stepcut>nm, figured it out ;)
06:35:41<stepcut>hrm, my app is taking up 44% of the CPU while idle...
06:42:57<stepcut>I think it is daemonize...
06:45:41<stepcut>yeah, removing daemonize and just calling main directly, dropped the CPU usage for a constant 44.7 when idle to 0% went idle
06:45:57<stepcut>now I just need to figure out why it needs 114 MB of RAM
11:53:36<Dazhbog>I'm at the beginning of building a website.. should I take happs into consideration when choosing the language/framework?
12:00:25<Saizan>are you familiar with haskell or not?
12:00:40<Dazhbog>I'd like support for RSS feeds (in/out) and ajax
12:01:23<Dazhbog>Well.. I have done some trivial apps
12:02:59<Dazhbog>so I know most of the basic stuff.. but haven't dabbled with the black haskell magic
12:03:13<Saizan>(there's nothing specific for ajax at the moment)
12:04:22<Saizan>mmh well, you can learn some of it while using happs :)
12:04:47<Dazhbog>well I wouldn't mind learning the languge better =)
12:05:23<bakert>Dazhbog: documentation for HAppS is very very thin on the ground.
12:05:23<Dazhbog>it's actually one of the reasons I'm looking for not-so-mainstream web frameworks / languages
12:05:29<bakert>depends how brave you are feeling
12:05:43<bakert>as a relative newcomer to haskell i have struggled with hello world in HAppS!
12:05:59<bakert>but you could always give it a whirl
12:06:05<Dazhbog>I do rails stuff for living.. and I'd like to do something different on my free time ;)
12:06:07<bakert>there is a sample app in the new 0.9.1 version
12:06:10<Saizan>bakert: what's the result?
12:06:30<bakert>Saizan: not sure i understand what you mean?
12:06:32<bakert>:)
12:07:06<bakert>i am working on my 0.9.1 tutorial again today after i have done some work
12:16:12<Saizan>err, what hello world in 0.9.1 looks like?:)
12:35:38<bakert>Saizan: so far it looks like the Main.hs in the example blog applications but with lots of the lines deleted. 29 lines still left though. once i remove state that should come right down.
12:35:43<bakert>and get rid of the imports too
12:49:48<Saizan>gah, HAppS-Begin lacks a module
13:08:02<bakert>lacks a module?
13:09:15<Saizan>build fails looking for MyEntries module
13:09:22<Saizan>is it just me?
13:10:00<bakert>i think that's just you.
13:10:02<bakert>:)
13:10:15<bakert>i had failure finding the Facebook module
13:10:23<bakert>but then i worked out i needed to use that "sp" script
13:10:25<bakert>to start things up?
13:11:10<Saizan>mmh, so we lack a repo? or sp knows better than darcs?
13:15:12<bakert>Um. Not sure. I had the Facebook.hs file when I was getting my error. But it didn't work trying to compile it to an executable. No idea what sp does that made this all ok :)
13:15:22<bakert>perhaps just a paths thing
13:19:01<Saizan>where do you have MyEntries now?
13:42:56<bakert>Saizan: actually i don't have anything called MyEntries. but i can run the blog example. there's no MyEntries in the source code either.
13:43:08<bakert>perhaps you are more bleeding edge than me ???
13:44:36<Saizan>perhaps, i've darcs pulled today
15:34:01<bakert>What IS that crazy downloading the sp script does before startup. Why does it need to do it more than once?
15:35:17<Saizan>it downloads the module your application depends on
15:35:22<Saizan>*modules
15:35:34<Saizan>and puts them in .haskell_cache
15:35:55<Saizan>it doesn't use the packaging system
16:12:27<bakert>seems to do it every time though.
16:12:35<bakert>odd
16:12:42<bakert>and not very pleasant
16:14:08<Saizan>you can install the packages from the repos normally and not use sp, you only have to rebuild and install them in the right order when you pull
16:14:19<bakert>i see. i think.
16:15:01<Saizan>you'll sometime need to Setup clean due to cross package inlining or such
16:15:25<Saizan>but right now HAppS-Begin lacks this MyEntries module..
16:15:29<bakert>i'm concentrating on trying to remove stateFuns at the moment
16:15:49<bakert>it is brought into existence by the expose macro
16:16:03<bakert>but if i try and bring $(expose []) into Main.hs
16:16:11<bakert>it refuses to find a function called stateFuns
16:18:42<Saizan>well, why you need stateFuns if you want to elimate it?
16:20:16<bakert>well i don't know what to replace it with. the result of expose is Q [dec] or something that i don't understand
16:20:47<bakert>so i was trying to produce a stubby kind of version :)
16:20:56<Saizan>main = stdMain $ simpleHTTP impl :*: (End :: StdPart ()) should work
16:22:03<Saizan>Q [Dec] is the type of haskell declarations in TH, expose baing a macro returns an AST that's inserted in place of the $(expose ..) call by GHC
16:22:28<bakert> No instance for (Control.Monad.Reader.Class.MonadReader State m)
16:22:29<bakert> arising from use of `ask' at haskell/State.hs:61:16-18
16:22:44<bakert>hmm perhaps i should have replaced main and not main'
16:23:20<bakert>no, that ain't it.
16:23:39<bakert>Saizan: right. got it on the Q [Dec] front.
16:24:09<Saizan>mmh, that error could be the monomorphism restriction, does it come from a CAF?
16:24:13<bakert>probably need to remove "import Control" now
16:24:27<Saizan>i.e. a term like foo = .. with no parameters
16:24:31<bakert>oh golly ... "*** Exception: user error (mzero)"
16:24:45<bakert>Saizan: I have binarylocation = "haskell/Main"
16:24:53<bakert>but i'm going to remove that now too
16:25:19<bakert>oh dear. still user error. i guess i have removed too much :)
16:26:10<bakert>right, it's not your changes. it's something i must have done before. back to the drawing board.
16:26:42<Saizan>how is your impl defined?
16:26:51<bakert>impl = [ xslt xsltproc "xslt/style.xsl"
16:26:52<bakert> [fileServe ["beforeIndex.html"] "public"] ]
16:29:23<bakert>Saizan: any idea what "*** Exception: user error (mzero)" means?
16:31:49<Saizan>i think it means that no component of impl has returned a Result
16:34:03<bakert>ah that might make sense
16:34:05<bakert>perhaps
16:35:11<bakert>i really have no idea what any of this code is doing :(
16:36:58<bakert>let's start at the top
16:37:06<bakert>stdMain is the entry point for a HAppS application
16:38:26<Saizan>i'm a bit lost too.. remember that type ServerPart = Control.Monad.Reader.Reader Request (IO (Maybe Result))
16:38:52<bakert>eek.
16:39:06<bakert>What is a Control.Monad.Reader.Reader?
16:39:42<bakert>stdMain runs a web application with FileSaver. I have no idea what a FileSaver is.
16:40:20<bakert>FileSaver is something to do with the MACID properties of HAppS.
16:40:26<Saizan>exactly
16:40:30<bakert>ok let's gloss over that and assume that stdMain is what we want.
16:40:40<Saizan>yes
16:41:02<bakert>stdMain takes s StdPart and returns m ()
16:41:16<bakert>a StdPart is a complicated thing to do with HAppS
16:41:21<bakert>m is MonadIO
16:41:23<bakert>in this case
16:41:46<Saizan>yes
16:41:55<bakert>StdPart is a serializable, StartStateEx thing.
16:42:08<bakert>serializable just means it can be written/read from disk in some format
16:42:12<bakert>so we'll gloss over that
16:42:16<Saizan>(Reader r) is a monad where you have access to a constant of type r
16:42:36<bakert>and why do i want to be in a monad to access a constant?
16:43:08<Saizan>because it can be handy to not have to thread that value deep in your functions
16:43:19<Saizan>do you know the State monad?
16:44:34<Saizan>however, it's a constant only wrt the action, you can run it with different values, it's often called environment
16:44:59<Saizan>Reader is a State monad where you can only get, if that helps
20:23:12<nburlett>'afternoon
20:23:24<nburlett>I just tried the 0.9.1 example and got: Could not find module `MyEntries'
20:24:06<nburlett>what am I doing wrong?
20:24:15<bakert>nburlett: Saizan had the same thing earlier
20:24:25<bakert>try getting a bit-less-recent version?
20:24:35<bakert>it works for me with what i pulled last weekend
20:24:37<nburlett>uh.. how do I do that? :->
20:24:41<bakert>no mention of MyEntries
20:24:54<bakert>in my source
20:25:06<bakert>darcs get --some-kind-of-date-related-option???
20:26:25<nburlett>hm.. I was waiting on using happs until it was in some sort of stable state.. I guess I should just wait longer
20:27:37<bakert>nburlett: they completely changed everything for 0.9.1
20:28:00<bakert>so i guess the apis would hopefully be stable now :)
20:28:04<nburlett>bakert: yeah.. i was told to wait for 0.9 when I tried to use 0.8 a while back
20:31:40<nburlett># Following line added by [added inferixset alex@happs.org**20070821071427]
20:32:00<nburlett>that's the commit that changed the MyEntries
20:33:46<nburlett>is there documentation and/or a walkthrough coming?
20:34:56<bakert>nburlett: i don't know.
20:35:08<bakert>two weekends ago i wrote a tutorial for 0.8.8 at the cost of much pain
20:35:14<bakert>and then discovered it was obsolete
20:35:19<nburlett>ahh, I think I read that on reddit
20:35:25<nburlett>I enjoyed it
20:35:29<bakert>i've spent about 3-4 hours this weekend trying to make sense of 0.9.1
20:35:35<nburlett>heh
20:35:38<bakert>but it's not going that well
20:35:46<bakert>i got hello world down to 29 lines yesterday
20:35:50<nburlett>:-<
20:35:52<bakert>but it really needs to be two
20:35:56<nburlett>agreed
20:35:56<bakert>:)
20:36:17<bakert>i think most of the dev work has gone into the clever stuff and not the basics
20:36:32<bakert>well, i HOPE that's the case :)
20:36:33<nburlett>seems likely
20:37:56<nburlett>well, I don't have any major hurry for getting started with HAppS, so I'll just wait until the basics have been fixed
20:38:51<bakert>i can't go any further with haskell without web apps. not enough motivation to work on totally impractical things. got to work out HAppS to avoid CGI. hence my presence here!
20:39:45<nburlett>I write embedded software, so any Haskell I do is just for fun ;->
20:40:37<bakert>i wrote some haskell and got paid for it once :)
20:40:46<bakert>when i was first learning it.
20:40:49<bakert>very simple programs
20:40:49<nburlett>excellent
20:40:53<bakert>nothing clever
20:40:59<nburlett>I have a few haskell scripts at work
20:41:12<bakert>just wrote it in haskell to learn it. and because my boss was a mathematician so he approved :)
20:41:28<nburlett>but we don't exactly ship embedded systems using it
20:48:48<nburlett>oh well, I've got house-work to do
20:48:54<nburlett>maybe I'll try again later
20:48:59<nburlett>gave a good afternoon
20:49:05<bakert>you too
20:49:08<nburlett>or whatever for your time-zone
21:32:46<Saizan>import HAppS
21:32:46<Saizan>main = stdMain $ simpleHTTP app :*: (End :: StdPart ())
21:32:47<Saizan>app = [method GET $ ok "hello world"]
21:32:58<Saizan>does that count as hello world?
21:33:28<bakert>looks good Saizan
21:33:49<bakert>thanks!
21:34:27<stepcut>you could also do, method (), instead of method GET, if you want to allow GET or POST. Though on second thought, that might do the wrong thing for HEAD, etc...
21:35:06<stepcut>plus, showing the GET is more informative for new users
21:35:20<Saizan>http://zzodici.yi.org:8000/asdsa <-- uh, explicit error message when no handler matches

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