--- Log opened Thu Mar 05 00:00:29 2009
00:08 < rovar> grr
00:09 < rovar> get home from work at 9pm. eat, hold baby, talk to wife.
00:09 < rovar> now it's 12a and I have to be at work in 8 hours.
00:09 < rovar> where to find time to hack on teh hazkell
00:11 < Saizan> teach haskell to you baby, obvious ;)
00:13 < mae> rovar: my dilemma
00:13 < rovar> i'll work on getting him to hold his head up first
00:13 < mae> rovar: by i have 3 months until my first girl
00:13 < mae> (first kid)
00:13 < mae> but *
00:13 < mae> heh
00:20 < rovar> congrats :)
00:20 < rovar> my 1st is 1 month old
00:20 < rovar> he's great.. get ready to not sleep though
00:21 < mae> heh
00:43 < rovar> mae, have any ideas for specifying alternate outputs for controller methods?  I am implementing a /json/ base directory which manages objects via REST
00:51 < mae> rovar: you mean like content negotiation?
00:52 < koeien> morning everybody
00:52 < mae> rovar: or you just mean changing the mime type
00:52 < mae> koeien: hi
00:52 < koeien> nice work, 0.2 released
00:52 < koeien> mae: you didn't yet push the changes to the stable repo ?
00:53 < rovar> mae, I guess A.  specifically,  make a GET/PUT/POST/DEL request to a REST url and get back a json object (or a http response message)
00:53 < koeien> rovar: you should to able to do this, by some toResponse magic
00:54 < rovar> e.g.  a get to localhost:8000/json/guestbook/  gives me a json array of responses
00:54 < rovar> but currently I've hacked up AppControl and AppState to do it.. it's kind of ugly
00:54  * rovar looks up toResponse
00:55 < koeien> rovar: do you have your own datatype for JSON data, or do you use a library for it?
00:55 < mae> rovar: you need to define an instance of ToMessage for your datatype
00:55 < mae> rovar: and you can let it be any mime type you want, you probably want "text/json"
00:56 < rovar> koeien: currently I use Text.JSON, and derive the to/from encoding
00:56 < koeien> rovar: you should be able to derive an instance for ToMessage as well
00:57 < h_buildbot> Build for ghc-6.8.3_STABLE failed. Check http://buildbot.happstack.com/ for details.
00:57 < mae> rovar: here is an example of how we setup hsp in a similar fashion: http://patch-tag.com/publicrepos/happstack-stable/happstack/src/Happstack/Server/HSP/HTML.hs
00:58 < rovar> awesome
00:58 < rovar> this is much easier than my version :)
00:59 < h_buildbot> Build for ghc-6.10.1_STABLE failed. Check http://buildbot.happstack.com/ for details.
00:59 < koeien> mae: some missing libraries perhaps
01:01 < mae> Stream.hsc:79:18: error: zlib.h: No such file or directory
01:01 < mae> you need zlib-dev for your distro
01:03 < rovar> so basically I have:
01:04 < rovar> instance ToMessage GuestBook
01:04 < rovar>     toContentType _ = C8.pack "text/json"
01:04 < rovar>     toMessage x     = encodeJSON x
01:04 < rovar> instance ToMessage GuestBook
01:04 < rovar>     toContentType _ = C8.pack "text/json"
01:04 < rovar>     toMessage x     = encodeJSON x
01:04 < rovar> bleh sorry
01:04 < koeien> mae: yeah i know
01:04 < koeien> rovar: I don't know what C8 is, but seems correct
01:04 < koeien> h_buildbot: build ghc-6.8.3_STABLE
01:04 < h_buildbot> Build for ghc-6.8.3_STABLE started. If one was running, no new one is started.
01:04 < rovar> bytestring
01:04 < koeien> well if it typechecks, it works :)
01:05 < koeien> awh the 'C' in "C8" stands for "Char"
01:06 < rovar> Char8
01:06 < rovar> so how do I tell the framework to render this object as text/json ?
01:06 < koeien> you use 'toMessage'
01:07 < koeien> e.g.   ok $ toMessage json
01:07 < stepcut> koeien: I think you mean, toResponse?
01:07 < koeien> toResponse, correct!
01:08 < h_buildbot> Build for ghc-6.8.3_STABLE failed. Check http://buildbot.happstack.com/ for details.
01:10 < koeien> I need happy as well
01:11 < rovar> get happy
01:12 < koeien> h_buildbot: build ghc-6.8.3_STABLE
01:12 < h_buildbot> Build for ghc-6.8.3_STABLE started. If one was running, no new one is started.
01:16 < rovar> i need some way to parse a key out of the child dir
01:17 < rovar>     , dir "json/guestbook" listJSON
01:17 < rovar>   , dir "json/guestbook/<key>" getJSON getkey
01:17 < koeien> 'path' ?
01:18 < rovar> i'm going to have to parse the path for proper rest happiness
01:18 < h_buildbot> Build for ghc-6.8.3_STABLE failed. Check http://buildbot.happstack.com/ for details.
01:18 < rovar> hierarchical objects and whatnot
01:18 < koeien> e.g. path $ \(id::Int) -> ...
01:18 < rovar> path is an available var?
01:18 < koeien> it's in SimpleHTTP
01:20 < rovar> wow docs!
01:21 < rovar> i'm going to read these when I'm more awake.
01:21 < rovar> for now.. off to bed
01:21 < rovar> my kid has been laying in my lap for the last 45 mins
01:21 < rovar> slowly falling asleep.. he's about there..which means I can sleep too :)
01:45 < koeien> h_buildbot: build ghc-6.8.3_STABLE
01:45 < h_buildbot> Build for ghc-6.8.3_STABLE started. If one was running, no new one is started.
01:49 < h_buildbot> Build for ghc-6.8.3_STABLE failed. Check http://buildbot.happstack.com/ for details.
01:56 < koeien> h_buildbot: build ghc-6.8.3_STABLE
01:56 < h_buildbot> Build for ghc-6.8.3_STABLE started. If one was running, no new one is started.
01:56 < Saizan> STABLE is for 0.2 now?
01:56 < koeien> yes
01:56 < koeien> it's just the stable repos
01:57 < mae> i pushed up the tags about an hour ago
01:58 < koeien> apparently dchroot doesn't read .bashrc, so that explains the multiple failures
02:03 < mae> anyone interested in doing some guest blogging on blog.happstack.com?
02:03 < mae> I wanna get the ideas flowing for next release :)
02:04 < mae> I know we have this thing called  a roadmap, but personally on my own high priority list is improving the template haskell bits, and stepcuts urlt library
02:04 < mae> (urlt might not make it for a little while)
02:05 < Saizan> is there an urlt repo somewhere?
02:05 < h_buildbot> Build for ghc-6.8.3_STABLE OK. Test suite build failed. Check http://buildbot.happstack.com/ for details.
02:05 < mae> it is in the incubation stage, you saw the chats from a day or two ago right?
02:06 < Saizan> i think so
02:06 < mae> theme is basically, typesafe compile-time url checking.
02:07 < Saizan> yeah, i've seen the tree-page introduction
02:07 < mae> Saizan: the multimaster stuff is still in the back of my head, but it is not something I am dogfooding right now
02:07 < mae> no need for it right now
02:07 < mae> (at least not for me)
02:08 < mae> by the way, I am using webgen to generate the web page documentation right now, http://webgen.rubyforge.org/, if i were to make the source for the homepage public, would anyone be interested in contributing patches?
02:09 < koeien> ruby?
02:09 < mae> (i know that dogfooding via happs is the ideal thing, but I think that will come with time when it is a bit more mature)
02:09 < mae> yeah..
02:09 < koeien> well i can't say anything, the buildbot is on MySQL :P
02:09 < Saizan> "web page documentation"?
02:10 < mae> Saizan: hehe sorry, i meant simply, "web page"
02:10 < mae> everything on happstack.com minus blog, buildbot, irc logs, and of course your docs :)
02:10 < mae> I would love to see a logo too
02:10 < mae> like a stack of pancakes or something
02:10 < mae> hehe
02:10 < koeien> h_buildbot: build ghc-6.8.3
02:10 < h_buildbot> Build for ghc-6.8.3 started. If one was running, no new one is started.
02:11  * Saizan hasn't actually written a website in years, my last one was in happs-0.8.x though
02:11 < mae> : )
02:15 < Saizan> mae: are you still interested in having (dynamically loaded/statically linked) templates?
02:18 < mae> Saizan: most certainly
02:18 < mae> for hsp this means compile once, or compile-on-demand mode
02:19 < mae> for hstringtemplate this means read-once-at-beginning, or read-every request
02:19 < mae> compile-on-demand == compile-when-changed
02:20 < mae> and we control it with a flag
02:21 < h_buildbot> Build for ghc-6.8.3 OK. Test suite ran. 14/77 test cases failed. Check http://buildbot.happstack.com/ for details.
02:24 < koeien> h_buildbot: build ghc-6.8.3_STABLE
02:24 < h_buildbot> Build for ghc-6.8.3_STABLE started. If one was running, no new one is started.
02:34 < h_buildbot> Build for ghc-6.8.3_STABLE OK. Test suite build failed. Check http://buildbot.happstack.com/ for details.
02:35 < mae> stepcut: how compelling is hyena at this point? I see that it is still not cabalized...
02:35 < mae> Saizan: re location for urlt, http://src.seereason.com/urlt
02:36 < koeien> any idea regarding the source of the error on  http://buildbot.happstack.com/?32899  , last line
02:37 < mae> oh
02:37 < mae> maybe stepcut screwed the pooch
02:37 < mae> let me take a look
02:40 < mae> koeien: are you building these with -ftests?
02:41 < koeien> yes
02:41 < mae> hmm
02:43 < mae> try running it with -v
02:43 < mae> so we can see whats going on
02:46 < Saizan> it looks like you're building them twice?
02:47 < koeien> Saizan: the second time it's with -ftests
02:51 < mae> ahh
02:51 < mae> so the previously built one is without tests
02:51 < mae> makes sense.
02:51 < mae> you really only need to b uild once
02:52 < mae> with tests
02:55 < koeien> i'm taking off now, i'll take a look at it later
02:55 < mae> koeien: ok night :)
03:04 < Saizan> mae: does it matter if it doesn't work when interpreted?:)
03:16 < mae> Saizan: ermm, probably, yeah :\
03:16 < mae> what if you wanna use the debugger
03:16 < mae> man they really need to fix that hairy mess
03:18 < mae> i really hate TH right now
03:19 < mae> how the hell am I supposed to compile something with -prof when ghc(i?) complains like this:
03:19 < mae>     Dynamic linking required, but this is a non-standard build (eg. prof).
03:19 < mae>     You need to build the program twice: once the normal way, and then
03:19 < mae>     in the desired way using -osuf to set the object file suffix.
03:19 < Saizan> cabal handles that for you, iirc
03:20 < mae> so i don't put -prof in ghc-options
03:22 < mae> Saizan: how would you get dynamic reloading of hsp pages without ghci?
03:22 < mae> importing ghc?
03:25 < Saizan> yeah
03:25 < Saizan> using the ghc-api
03:26 < Saizan> which basically links ghc into your program :)
03:27 < Saizan> oh, now it works even from ghci
03:28 < mae> neat
03:28 < mae> so how are you detecting changes?
03:28 < mae> are you using the ghc compilation checker?
03:29 < Saizan> ghc
03:30 < mae> is that reusable for any file witha  modification date, or is it specific to hs files
03:32 < Saizan> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2114#a2114 <- silly demo
03:32 < Saizan> well, i'm not sure how much of the compilation checker is exposed
03:32 < Saizan> i'd have to dive in the ghc-api
03:33  * Saizan is also working on a library/program for safe incremental compilation
03:33 < Saizan> still very experimental
03:37  * Saizan wonders what' the best way to pass an argument to a TH macro, CPP?
23:37 < Saizan> from the comments: "Main.exe: too few bytes. Failed reading at byte position 91", we should make this error more understandable
--- Log closed Fri Mar 06 00:00:31 2009