00:52:01 <abstrakt> what's the difference between happs.org and happstack.com ?
00:52:06 <abstrakt> is it the same project?
01:07:38 <Entroacceptor> abstrakt: happs was the old project
01:08:01 <abstrakt> Entroacceptor, um, but this channel name is #happs and it says to use happstack.com
01:08:15 <abstrakt> Entroacceptor, I'm talking about the domains, specifically...
01:08:40 <Entroacceptor> well, when happs died, the happstack team took over
01:09:00 <Entroacceptor> it's just that the old domain is still around, nobody can un-laze long enough to kill that site, AFAIK#
01:09:05 <abstrakt> ok, so the channel name is just legacy, but the project is happstack
01:09:18 <Entroacceptor> yep
01:09:23 <abstrakt> great thx :)
02:41:33 <stepkut> abstrakt: basically, happs was renamed to happstack to represent a change in the development model
02:44:12 <abstrakt> stepcut, k thx
02:45:23 <stepkut> I should see about getting happs.org redirected to happstack.com
15:41:00 <stepkut> I need to figure out how to turn all the examples in the crash course into automated tests..
15:41:30 <stepkut> maybe I can use Network.Browser
15:51:45 <stepkut> in part to make sure the docs are update-to-date, but also because they serve as a test suite as well
16:25:57 <stepkut> I need a function that searches a text file, finds a bunch of specially marked identifiers, (e.g., $readCookieValue$), and then replaces those strings with hyperlinks to haddock..
16:26:35 <stepkut> or maybe I can get haddock to do it somehow..
16:44:37 <McManiaC> hm?
16:48:03 <stepkut> in the crash course, it would be nice if I could have links to haddock
16:48:24 <stepkut> but adding and maintaining those links by hand is not feasible
16:48:58 <stepkut> I need some way to autogenerate the links
16:49:09 <stepkut> I think that a simple sed script could do the trick
16:49:14 <stepkut> mostly
16:49:27 <Entroacceptor> don't you use a templating engine anyway?
16:49:41 <Entroacceptor> or do you write html directlz?
16:49:42 <Entroacceptor> y?
16:50:05 <stepkut> Entroacceptor: I write the html directly at the moment in literate haskell files
16:50:38 <stepkut> Entroacceptor: then I run it though HsColour to generate hightligted haskell code and through sed to extract the example code into a .hs file
16:51:17 <stepkut> Entroacceptor: ideally I would like to then also run the .hs files as part of a test suite that ensures they compile, and generate the expected output
16:51:52 <stepkut> Entroacceptor: In theory, I could use markdown or something in the .lhs instead of straight html
16:52:40 <stepkut> Entroacceptor: but I know html, and I don't know other things
16:53:49 <stepkut> Entroacceptor: I do something similar for writing blogposts. But blogspot does not handle pure html input that well. It adds a bunch of extra <p> or <br> tags that are not needed, and then you get lots of funky whitespace
16:56:25 <stepkut> Entroacceptor: if you have suggestions on how to do any of this better, I would be interested :)
16:58:07 <stepkut> oh hey, I found some option, and now I *can* write posts as html
16:58:29 <stepkut> my edit mode was stuck in some stupid mode
16:59:05 <stepkut> nice.. this is much awesomer
16:59:11 <stepkut> my posts won't look all stupid now
16:59:19 <Entroacceptor> ok, if you like writing html
16:59:58 <Entroacceptor> then making a fake tag like <haddock>foo</haddock> would be good, I guess
17:00:05 <Entroacceptor> and it's an easy regexpt to replace that
17:00:10 <stepkut> I might switch to markdown, since I still have the option of putting html inline
17:01:05 <stepkut> but I can still run it through multiple filters: cat post.lhs | haddocklinks | markdown | hscolour
17:02:23 <stepkut> one issue though, is hyperlinks to anchor tags on headers
17:03:06 <stepkut> though I guess I can still do <h1><a name="foo">A section about</a></h1>, instead of using the markdown header shortcut
17:03:42 <stepkut> it's a work in progress
17:04:05 <Entroacceptor> why convert to markdown?
17:04:33 <Entroacceptor> if html fits you perfectly, just stay with it
17:04:38 <stepkut> I wouldn't convert to markdown. I would write the content with the literate portions being markdown not html
17:04:55 <Entroacceptor> yes, but why?
17:05:13 <stepkut> so I don't have to put <p>around every paragraph?</p> ?
17:05:19 <stepkut> not sure if it is a big win or not
17:06:13 <Entroacceptor> write it in Haskell :)
17:06:23 <stepkut> :-/
17:07:10 <stepkut> not sure how that would work :)
17:07:17 <Entroacceptor> hsp or so_
17:07:18 <Entroacceptor> ?
17:07:27 <stepkut> ah
17:08:09 <stepkut> would be a bit tricky..
17:08:30 <stepkut> the source documents are not html, but literate haskell with html in the comments
17:08:44 <stepkut> it does not become html until after HsColour does its business
17:09:17 <stepkut> I would need to use template-haskell or something to deal with the embedded haskell .. not sure if that would work though
17:10:32 <Entroacceptor> my suggestion was a bit silly
17:10:37 <stepkut> this is an input file, http://src.seereason.com/happstack-crashcourse/HelloRqData.lhs
17:12:20 <Entroacceptor> mhm
17:13:12 <stepkut> which gets turned into, http://happstack.com/docs/crashcourse/RqData.html#helloRqData
17:19:41 <Entroacceptor> mhm
17:19:43 <Entroacceptor> yes
17:19:53 <Entroacceptor> you take several files and put them together, too?
17:20:08 <stepkut> yes
17:20:35 <stepkut> the RqData.lhs page #includes the sub-sections that go on that page
17:20:56 <stepkut> and then there is a gen-toc script that looks at all the pages and generates the table of contents on the main page
17:21:27 <stepkut> it finds all the <h?> tags, extracts their anchors, and links to them
17:22:01 <stepkut> that script was suprising annoying to write
17:22:23 <stepkut> specifically this function:
17:22:42 <stepkut> toTree :: [(Int, a)] -> [(Int, Tree a)]
17:23:00 <stepkut> the Int represents the header level, (aka, h1, h2, h3).
17:23:23 <stepkut> you get them as a flat list, but you want to turn them into a tree so you can sub-sections indented
17:24:46 <stepkut> it sounds easy, but then it turns out to be trickier than expected
17:27:15 <Entroacceptor> yeah, sound quite easy
17:27:48 <Entroacceptor> but, anyway, why not write a simple filter which just replaces the marked identifier and solve the original problem
17:28:00 <stepkut> ?
17:28:16 <stepkut> a filter that turns, $Foo.Bar.baz$ into a hyperlink ?
17:29:09 <Entroacceptor> yes
17:30:16 <stepkut> a non-validating version should be trivial.. and possibly sufficient
17:30:54 <stepkut> it is a bit trickier, perhaps, to make sure that all the identifiers are actually valid -- though a simple link checker might be all that is needed
17:31:40 <stepkut> the other issue is that the trivial version would need to give the fully qualified name to the identifier, which gets annoying fast
17:32:29 <stepkut> if I want to be able to specify a list of imports (like, import Happstack.Server) and then do $toResponse$, and have it resolve the correct link for the identifier, that is trickier
17:32:51 <stepkut> but it means that the tutorial will not get out of date if identifiers move around
17:33:00 <Entroacceptor> oh, and more fun
17:33:45 <stepkut> in a similar vein, I often show the type signature for a function in the tutorial, like:
17:33:47 <stepkut> > look :: (Functor m, Monad m, HasRqData m) => String -> m String
17:33:48 <lambdabot>   Not in scope: type constructor or class `HasRqData'Not in scope: `look'
17:34:01 <Entroacceptor> and those change?
17:34:03 <stepkut> but, if the signature changes, they tutorial is silently out of date
17:34:20 <stepkut> yeah
17:34:31 <stepkut> hopefully less often once 0.6 is out
17:34:56 <stepkut> but, it would be nice if I could check that somehow
17:35:45 <stepkut> I can think of a way to do it
17:35:57 <Entroacceptor> but that's one where crowdsourcing can work
17:36:53 <stepkut> if those signatures had a special markup, I could extract them and put them into a file with an altered name
17:37:15 <stepkut> and have a function: sameType :: a -> a -> b ; sameType _ _ = undefined
17:37:26 <stepkut> lookTUTORIAL
17:37:39 <stepkut> check = sameType look lookTUTORIAL
17:38:03 <stepkut> oops, lookTUTORIAL :: (Functor m, Monad m, HasRqData m) => String -> m String ; lookTUTORIAL = undefined
17:38:16 <stepkut> and then see if it compiles
17:38:58 <stepkut> it's a bit fuzzy, which can be good and bad
17:39:27 <stepkut> it means that, foo :: a -> ServerPart Response, would match against, foo :: a -> ServerPartT IO Response, which is good
17:40:18 <stepkut> but it also means that when I switched from, look :: String -> RqData String, to look :: (HasRqData m) => String -> m String, that would pass, even though I really wanted to update the types in the tutorial
17:40:28 <stepkut> I could possibly use Typeable instead, if I wanted to be exact
17:40:52 <stepkut> but, I would rather work on happstack-state than make the tutorial self-checking
17:41:21 <stepkut> at the very least, I should at least check that all the DEMOS compile
17:41:41 <stepkut> that should be 2 lines in the Makefile
17:41:51 <stepkut> and would catch any substantial changes
17:42:27 <stepkut> if a type signature does change, then a demo is likely to fail, and I can update the demo, and any nearby type sigs
17:42:39 <Entroacceptor> that could work
17:43:11 <stepkut> ugh, now I gotta remember how make works
17:43:15 <stepkut> if I have:
17:43:20 <stepkut> target: source1 source2 source3
17:43:32 <stepkut> how to I apply a command to each source1 individually
17:44:04 <stepkut> hmm
17:44:51 <Entroacceptor> $^ or so?
17:45:05 <Entroacceptor> I've never done anything with makefiles
17:45:40 <stepkut> no, that passes all the depends to a single command
17:46:44 <stepkut> I think maybe I am supposed to do, %.o : %.hs ; <apply to one file>, and then do: check-demos : $(subst .hs,.o,$(DEMOS))
17:47:05 <stepkut> so, I tell it how to check one file, and then I depend on the results of check every file
17:53:17 <stepkut> nice, it works!
17:53:21 <stepkut> and it even caught a bug!
17:53:38 <stepkut> the blaze section was out of date with respect to the latest vesrion of blaze
17:54:11 <stepkut> I did:
17:54:12 <stepkut> %.demo : $(DESTDIR)%.hs
17:54:12 <stepkut> 	ghc --make -c -o$@ $<
17:54:12 <stepkut>  
17:54:16 <stepkut> check-demos: $(subst .lhs,.demo,$(DEMOS))
17:54:19 <stepkut>  
17:54:23 <Entroacceptor> nice
17:54:37 <stepkut> and the nice part is make knows that the .demo files are intermediate, so it automatically removes them after check-demos runs
18:12:19 <stepkut> the next step is to use Network.Browser and HUnit to test that the demos all produce the expected results
18:39:49 <stepkut> i need a better color theme for the haskell code on a black background
18:40:19 <stepkut> the color theme for haskell on a white background matches the default emacs haskell-mode color scheme :)
18:58:38 <Entroacceptor> I always like wombat for vim
20:01:33 <stepkut> ok, updated the cookies API a little, fixed a cookie 'bug', and wrote a bunch of documentation about cookies,  http://happstack.com/docs/crashcourse/RqData.html#cookies
20:06:39 <stepcut> I wonder what else needs to be documented in the crash course for 0.6. FileServe for sure..
20:12:49 <stepkut> i need to add crashcoure sections for Happstack.Server.FileServe and Happstack.Server.Error, and finish the templates section
20:13:03 <stepkut> would be nice to add a section on web-routes too