07:12:58 <donri> stepcut: need to update some String references to Text in web routes crash course
07:13:34 <donri> [the kind of thing i'd do in a heartbeat for you if you used github *cough*]
07:15:03 <donri> or the renaming of of ShowURL to MonadRoute and its method
14:42:42 <tazjin> Hey, I have a very basic authentication system using sessionIDs and cookies. It works pretty well except for the logout process:
14:43:20 <tazjin> I remove the cookie using expireCookie and delete the sessionID from my DB, then I redirect the user to a blank page (because the cookie is deleted in the same response) that redirects to / after 2 seconds
14:43:44 <tazjin> for some reason however the page is still displayed in "logged-in" mode until it's reloaded manually
14:43:57 <tazjin> Any ideas why that happens?
14:52:24 <donri> caching perhaps?
14:52:30 <donri> difficult to tell without seeing code
14:54:23 <tazjin> I played around a bit and I'm now forcing the user to reload the page by appending ?logout={oldSessionID} to the URL - that works. Meh, I never liked web development :3
16:01:30 <stepcut> donri: yeah, it's on my todo list
16:01:39 <stepcut> donri: sometime this week
16:16:03 <donri> stepcut: you mean github is on your todo right O:)
16:24:38 <stepcut> no, just fixing the crashcourse
16:24:50 <stepcut> why use git and php when I could use darcs and happstack!
16:53:53 <donri> i think github is mostly ruby
16:54:00 <donri> which isn't much better
16:54:10 <donri> but i don't have to maintain it ^_^ just use it
16:54:33 <donri> i have a workflow with git and github
16:54:40 <donri> i think i might look into mirroring darcs in git
16:55:43 <donri> i feel like someone cut my arms off with darcs -.-
16:55:56 <stepcut> :-|
16:56:53 <donri> :D
16:56:59 <donri> and i bet you feel like that with git
16:57:17 <stepcut> i have no idea what you are doing with your source repos, but darcs is simple and has done everything I needed since I started using it
16:58:40 <donri> duno, all SCMs other than git to me feel too high-level abstracted, trying to hide what's going on behind the scenes which just makes me less confident that something does what i want it to do
16:58:44 <stepcut> there are some features I would to see patch-tag add.. but I never sit around wondering how to get something done in darcs
17:00:27 <stepcut> in fact, I spend hardly anytime thinking about darcs at all
17:01:42 <stepcut> mostly I just do, darcs whatsnew, darcs record, darcs push
17:02:16 <stepcut> can't imagine things being any easier than that
17:02:28 <donri> i like to get mad and throw around branches and stash away uncomitted work temporarily etc etc
17:03:47 <donri> but if that's the only thing you use darcs for git should be dead easy to learn :P
17:03:51 <donri> just sayin'
17:04:20 <stepcut> one would think so.. but that has not been my experience
17:05:14 <donri> git status, git commit, git push :P
17:05:28 <stepcut> also, I would have to then extend the autobuilder to understand git
17:05:34 <stepcut> which I don't feel like doing :)
17:05:37 <donri> aye
17:06:50 <stepcut> donri: I thought you had to do 'git add' or something to tell git which files you actually changed..
17:07:11 <donri> for new files yes, for existing files it's enough to do commit -a
17:07:31 <donri> i have aliases set up both in git and bash so i do stuff like, g ci -am "ohai"
17:08:02 <donri> you can also list files to commit command
17:08:09 <stepcut> was that always the case.. I remember having to explicitly tell git what files to actually commit everytime
17:08:29 <donri> duno, -a has always been there that i can remember
17:08:31 <stepcut> also found it extremely difficult to email patches
17:08:44 <donri> duno, don't use that workflow
17:08:58 <stepcut> probably because it is extremely difficult :p
17:09:05 <donri> with darcs just as well
17:09:21 <donri> that shit just blows up in my face when i try it
17:09:36 <donri> it runs vim in some weird setup that doesn't read my vimrc properly so vim yells loudly
17:10:04 <donri> and then it fails to send the mail anyway
17:11:17 <stepcut> well, that's your problem.. using vim instead of emacs :p
17:11:22 <donri> haha
17:11:53 <donri> surely emacs has some awesome modes for git anyway?
17:15:14 <stepcut> maybe. I have  never been a fan of emacs modes for revision control though
17:15:57 <stepcut> the darcs send is a more annoying issue. gmail basically spelled the end of people configuring sendmail. so even though darcs send does the right thing, the patch gets lost by sendmail
17:16:17 <stepcut> the best solution is probably to add github-like forking and patch notification to patch-tag
17:16:28 <donri> i'd like that
17:16:32 <stepcut> yeah
17:16:34 <donri> darcs still doesn't have branching though ;)
17:16:38 <donri> and no a repo is not a branch
17:16:51 <stepcut> meh
17:18:57 <stepcut> focus on one thing at a time :)
17:19:07 <donri> exactly, that's what branching lets me do
17:19:28 <donri> now you have to set up a repo for every little thing and you just end up doing it all in one repo instead
17:19:40 <donri> messy
17:20:12 <stepcut> I start something, and keep working on it until I am done, and then I push it. What's messy about that ?
17:20:28 <donri> it's messy when you're not the main developer
17:20:35 <stepcut> ?
17:21:06 <donri> if you want to propose a change and contribute patches, it's neat to separate your different proposals into branches
17:21:27 <stepcut> I just darcs send the patches :)
17:21:39 <donri> which patches?
17:21:57 <donri> you have one repo with ten different unrelated changes in 35 commits
17:22:13 <donri> and then you need to fix something in one of them
17:22:43 <donri> with github i have a branch for each pull request, upstream can see a diff of all changes and i can continue committing to that branch until it's merged and the pull request closed
17:24:15 <stepcut> and so the primary reason you don't send more patches to happstack is that you have too many to send and can't keep track of them ?
17:25:17 <donri> it's that darcs gets in the way of my focus so i don't create the patches in the first place ;)
17:25:59 <donri> on github i can even submit a patch right from the web interface, i do that all the time for documentation fixes to random projects
17:28:43 <stepcut> someone should add that to patch-tag :)
17:28:49 <donri> +1
17:29:06 <donri> don't get me wrong i'd love to see patch-tag shape up nicely
17:34:16 <stepcut> I think the upcoming darcs 2.8 does a better job of checking that sendmail is going to actually work, http://bugs.darcs.net/issue1344
17:36:43 <stepcut> if you want to work on several bugs at once in a single repo, you can always try, http://wiki.darcs.net/SpontaneousBranches
17:47:58 <tazjin> Is there a function to concat a list of Blaze Htmls?
17:48:08 <donri> tazjin: sequence_
17:48:45 <tazjin> Okay, thanks
17:49:04 <donri> it's in prelude
18:18:05 <stepcut> I think blaze htmls are a monoid as well?
18:18:12 <stepcut> mconcat ?
18:18:28 <stepcut> not sure.. I only use blaze when writing tutorials
18:22:47 <donri> you're right
18:22:54 <donri> and [Html] is an instance of ToHtml
18:23:49 <donri> where toHtml = mconcat :P
19:13:47 <alpounet> dingo looks fun
19:16:23 <donri> stepcut: point in case, re method GET: patch-tag.com responds with 404 for any HEAD :P
19:32:58 <alpounet> okay donri, the Text of the code has 44 lines (according to length . T.lines)
19:33:09 <alpounet> but when displayed, it has 50
19:34:13 <donri> empty lines perhaps?
19:38:13 <alpounet> well, there are much more than 6 of them
19:39:41 <alpounet> donri, http://circle.servebeer.com:8000/show?id=7
19:40:01 <alpounet> the 44 at the top is the result of length . T.lines on the Text stored in my acid-state
19:40:28 <donri> Firefox can't establish a connection to the server at circle.servebeer.com:8000.
19:40:39 <alpounet> oh yeah sorry
19:40:42 <alpounet> it's ok now
19:41:51 <donri> alpounet: are you using an old buggy Text or something
19:41:55 <donri> or bytestring
19:42:13 <alpounet> 0.11.1.5
19:42:26 <alpounet> (for text)
19:42:32 <donri> .13 is newest
19:42:43 <donri> 0.9.2.1 is newest bytestring
19:43:20 <alpounet> i have bytestring 0.9.1.10
19:43:30 <donri> try upgrading those two
19:44:07 <alpounet> but seriously, bugs for counting lines? :p
19:44:41 <donri> well it's acting on bytestrings which don't really have "lines" :P
19:44:54 <donri> countLines (Token _ s:ts) = length (BS.elemIndices (toEnum . fromEnum $ '\n') s) + countLines ts
19:44:59 <donri> that's what highlighter is doing
19:46:13 <alpounet> yeah
19:46:28 <alpounet> it just gives the same result as my length . T.lines
19:48:27 <alpounet> that's so odd man
19:52:07 <donri> well isn't text and bytestring doing some heavy magic behind the scenes to be fast
19:52:25 <donri> / memory efficient
19:53:06 <donri> though i'd expect them to have test cases for that sort of thing then ...
19:56:55 <alpounet> yeah
20:00:05 <donri> well length . T.lines works for me for something i T.readFile'd
20:00:08 <donri> same count as wc -l
20:00:45 <donri> alpounet: could it be something weird like you have lines ending in \r and no \n?
20:01:11 <alpounet> maybe the way Windows fills the form ?
20:45:57 <alpounet> donri, actually, i just figured out something weird
20:46:16 <alpounet> it adds newlines that aren't in the Text i get from the acid-state store
20:46:37 <donri> "it"?
20:47:05 <alpounet> highlight i guess
20:47:13 <donri> where
20:48:04 <donri> after -- comments perhaps?
20:48:15 <donri> those look awkwardly spaced
20:48:31 <alpounet> yeah
20:48:33 <donri> and are exactly 6 :D
20:49:19 <alpounet> donri, http://circle.servebeer.com:8000/data/code.txt
20:49:22 <alpounet> this is the original code
20:50:39 <donri> seems to work correctly on darcsden
20:50:47 <alpounet> so this is the code that i *retrieve* from the acid-store
20:50:55 <alpounet> so yeah highlighter is messing something up here
20:51:06 <alpounet> acid-state*
20:54:56 <alpounet> ACTION is gonna dig into highlighter's code
20:54:58 <alpounet> (again)
20:59:07 <alpounet> ok i can't figure out where these newlines come from
20:59:16 <donri> me either
20:59:23 <donri> the relevant token is tok "--(?![!#$%&*+./<=>?@\\^|_\126]).*?$" (Arbitrary "Comment" :. Arbitrary "Single")
21:01:34 <alpounet> yeah but it just tells how an "incoming" comment should look like
21:01:46 <alpounet> not the way it will look like
21:01:55 <alpounet> it'll just be a span with a "Comment" class
21:02:17 <donri> well i suspect that something is expected to swallow the newline but doesn't, and then one is added because it was expected to not be there
21:02:29 <donri> or something like that
21:02:38 <alpounet> yeah but why would these newlines be special ?
21:02:58 <donri> -- style comments are one of few constructs in haskell that are truly line-oriented
21:03:17 <donri> not sure there even is another?
21:05:29 <alpounet> donri, ok i just found another example that shows that bug
21:05:47 <alpounet> it's with the # character, in C++ code
21:05:54 <alpounet> #ifndef, #include, etc
21:06:14 <alpounet> (but not // haha)
21:06:29 <donri> so compare those tokens and see if they do newlines differently
21:06:40 <donri> e.g. do both end in $
21:06:50 <donri> anyway alexsuraci is the author on irc
21:07:25 <alpounet> OR
21:07:30 <alpounet> i just hack something
21:07:37 <alpounet> wait no
21:07:43 <alpounet> that would still add newlines that i don't want
21:07:52 <alpounet> even if i make the line numbering match
21:09:29 <alpounet> doh, i'm driving crazy
21:10:28 <donri> talk to alex, he's a nice guy :)
21:10:48 <donri> weirdly enough the problem doesn't seem to exist on darcsden
21:10:53 <donri> which use highlighter
21:10:59 <donri> with linenos
21:11:38 <alpounet> wait donri
21:11:46 <alpounet> i'm gonna build his highlighting program
21:11:50 <alpounet> and see if it reproduces the error
21:12:37 <donri> what program
21:13:00 <alpounet> his package provides a "highlighter" program apparently
21:13:48 <donri> oh, -fexecutable
21:14:48 <alpounet> yeah
21:15:07 <alpounet> donri, same problem with his program
21:25:17 <donri> alpounet: yea it's a CRLF problem
21:25:38 <alpounet> that's what we're discussing with alex yeah
21:26:00 <donri> i suspect it swallows the CR then not the LF or something like that
21:26:26 <alpounet> wasn't there some function around to unixify line endings?
21:26:35 <donri> i tried to confirm with the highlighter program but couldn't until i wgot your .txt
21:26:58 <donri> T.replace "\r\n" "\n" with OverloadedStrings? :P
21:27:27 <alpounet> ok so the problem comes from me writing in \r\n's through my windows system
21:27:45 <alpounet> so, let's fix this
21:27:48 <donri> is the server running linux?
21:28:32 <alpounet> yeah
21:28:46 <donri> i think some haskell stuff try to be smart based on what OS is running, which obviously fails for network services like web apps
21:29:16 <alpounet> yeah
21:29:50 <alpounet> but why the hell does it just fail on some particular kinds of lines
21:29:52 <donri> stupid windows
21:30:05 <donri> because of how it's regexp matching probably
21:30:10 <donri> and consuming the input
21:30:25 <donri> as i said, few things in haskell care about line endings
21:30:38 <donri> single-line comments being one of them (the only?)
21:31:00 <donri> so normally the CRLF just gets consumed as "normal text"
21:33:58 <donri> getting it to work yet?
21:34:18 <alpounet> yup!
21:34:37 <alpounet> Alex pointed out it might come from http://darcsden.com/alex/highlighter/browse/src/Text/Highlighter/Lexers/Haskell.hs#L-29
21:34:42 <alpounet> $ not matching "\r\n"
21:50:49 <alpounet> what's the recommended way to do a proper redirection ?
21:51:54 <donri> depends on why you're redirecting :)
21:52:30 <donri> http://en.wikipedia.org/wiki/HTTP_status_code#3xx_Redirection
21:54:17 <alpounet> well, after having added a paste, i wanna to redirect to the page that shows it
21:54:22 <alpounet> -to
21:55:07 <stepcut> alpounet: seeOther probably
21:55:08 <donri> seeOther most likely
21:55:20 <alpounet> it doesn't seem to redirect automatically
21:55:30 <alpounet> (i saw its usage in the blog example in the crashcourse)
21:56:26 <stepcut> these gits branchs are not making my happy so far
21:56:41 <donri> been toying with git have we?
21:56:44 <stepcut>  git clone -b monodial https://github.com/pcapriotti/Haskell-Pipes-Library.git pipes
21:56:51 <alpounet> ok my bad, i was doing something wrong
21:56:55 <stepcut> donri: no I just want to get the latest pipes library, but the version I need is on a branch
21:57:08 <stepcut> and so far I have not be able to get there using the clone or branch command
21:57:20 <donri> usually switch branches with checkout
21:57:38 <stepcut> so I have to clone it and checkout it out?
21:57:59 <donri> are you sure it's called monodial though
21:58:02 <donri> not monoidal
21:58:12 <stepcut> ah
21:58:37 <stepcut> got it now :)
21:58:40 <donri> :)
22:00:17 <KorriX> hello everybody
22:00:21 <donri> hi
22:00:23 <stepcut> KorriX: hello!
22:01:09 <KorriX> i am new in happstack, and have a little problem. What i should import to get access to logging functions ?
22:01:46 <donri> System.Log.Logger
22:02:03 <donri> see http://hackage.haskell.org/package/hslogger
22:02:36 <KorriX> i mean something what can save to mylog.log happstack log in apache format
22:03:07 <KorriX> if my config is http://hpaste.org/57553 i want logFunc doing that
22:03:47 <donri> if you use nullConf as a base, it'll be set up for hslogger
22:03:52 <donri> using apache format
22:04:13 <donri> then you can configure a fileHandler
22:04:19 <stepcut> http://patch-tag.com/r/mae/happstack/snapshot/current/content/pretty/happstack/templates/project/src/Logger.hs
22:04:27 <stepcut> http://patch-tag.com/r/mae/happstack/snapshot/current/content/pretty/happstack/templates/project/src/Main.hs
22:05:03 <stepcut> the 'access.log' in Logger.hs is an apache style log
22:06:50 <KorriX> thanks
22:16:02 <KorriX> Also, is there aviable to use happstack-auth with some database ?
22:17:03 <donri> http://src.seereason.com/happstack-authenticate/ uses acid-state
22:17:36 <KorriX> i prefer postgreSQL via HDBC
22:18:06 <donri> then perhaps use http://hackage.haskell.org/package/authenticate with your own code for users
22:19:21 <KorriX> Happstack.Server.Cookie create cookies on server ?
22:19:32 <donri> you mean in client?
22:20:09 <KorriX> no
22:20:20 <KorriX> i want to create cookie on server
22:20:33 <donri> what is that?
22:21:29 <stepcut> KorriX: http://happstack.com/docs/crashcourse/RqData.html#cookies
22:21:58 <alpounet> oh god i hate css
22:22:02 <stepcut> KorriX: not sure what you mean by 'on server'. That link shows how the server creates a cookie that it sends to the client
22:22:04 <donri> cookies don't exist on the server
22:22:07 <stepcut> alpounet: agreed
22:23:39 <donri> oh come on guys css is awsumsauce
22:24:23 <stepcut> donri: the people that wrote it sure believe that..
22:24:28 <donri> :)
22:26:51 <donri> stepcut: how are new website mockups coming along
22:27:22 <stepcut> donri: working on it
22:27:29 <donri> well duh :D
22:27:31 <stepcut> donri: too corporate at the moment
22:27:35 <donri> aye
22:27:57 <stepcut> categories does not seem to compile with GHC 7.4 :-/
22:28:34 <stepcut> donri: right now I am really trying to get the documentation done and some patches applied so that all I have left to do is update the site
22:29:15 <donri> do you plan on updating the site before happstack 7?
22:29:43 <stepcut> no, at the same time
22:29:53 <donri> aha
22:30:00 <donri> good marketing :)
22:30:15 <stepcut> I will get the 7 rc done, and then do the site while people test the rc
22:32:51 <donri> how do you release RCs btw, hackage or not?
22:33:11 <stepcut> probably just dacrs and an email to the list
22:33:32 <donri> could run a hackage2 instance ;)
22:34:58 <donri> at least if it involves multiple packages, it could be an idea...
22:39:27 <stepcut> then people have to know how to install from an alt hackage repo?
22:42:37 <donri> http://www.yesodweb.com/blog/2012/01/persisent-0-7-yesod-0-10-beta
22:43:49 <donri> (there is yackage too, but that runs yesod! can't have that can we!)
22:44:17 <stepcut> donri: especially not when hackage2 uses happstack :)
22:44:24 <donri> exactly!
22:44:48 <stepcut> I did upgrade hackage2 to use acid-state a while back :)
22:45:10 <donri> i noticed it uses acid-state and thought that seemed quite up to date for such a staled project
22:46:58 <stepcut> I make sure it builds
22:47:20 <stepcut> but I don't have time to make hackage2 release worthy and do everything else
22:47:42 <donri> seems release-worthy already to me, but what do i know
22:48:04 <stepcut> :)