13:54:32 <edon> hi, i'm trying to install happstack through cabal, but cabal can't find the "happy" package, when i try to cabal install it, it seems like everything is alright, it compiles and links it, and i have it on ~/.cabal/bin , but when i cabal list it, it lists as uninstalled
13:59:40 <stepcut> :-=
14:03:19 <stepcut> I saw something like this once.. someone had things such that ~/.cabal/bin was in their $PATH when they ran things from the command-line, but the PATH was different when applications were running
14:03:45 <stepcut> how did you add ~/.cabal/bin to your PATH ?
14:04:34 <Entroacceptor> stepcut: could have been me
14:04:58 <stepcut> Entroacceptor: perhaps.. I think it was CalmNelly though
14:05:12 <Entroacceptor> I had '~/.cabal/bin' in the path,  but cabal wanted $HOME/.cabal/bin
14:05:33 <stepcut> ~/.cabal/bin works for me..
14:05:44 <Entroacceptor> (or that got expanded when the shell set the path, instead of later)
14:05:50 <Entroacceptor> stepcut: but that worked for me.
14:06:28 <stepcut> the issue I saw was, export PATH="~/.cabal/bin:$PATH", does not work as expected. You need it with out the quotes: export PATH=~/.cabal/bin:$PATH
14:06:42 <Entroacceptor> or that way
16:00:24 <McManiaC> happstack-auth got session managment (timeout & http-header-fingerprint): http://n-sch.de/hdocs/happstack-auth/Happstack-Auth.html
16:00:39 <Entroacceptor> yay
16:00:55 <Entroacceptor> does it protect against broken CAs, too?....
16:00:59 <Entroacceptor> http://www.mail-archive.com/cryptography@metzdowd.com/msg11801.html
16:01:01 <McManiaC> CAs?
16:01:33 <Entroacceptor> just making a really bad turn of the conversation towards that link :)
16:01:35 <HugoDaniel> hey
16:01:39 <McManiaC> lol
16:01:43 <HugoDaniel> is there any way to do this: http://hpaste.org/30152/liftio_and in a single line ?
16:01:53 <HugoDaniel> any *elegant* way
16:01:54 <HugoDaniel> :)
16:02:20 <McManiaC> toResponse <$> liftIO (dbStudents >> readFile "students.csv")
16:02:28 <stepcut> McManiaC: that's what I was about to say :p
16:02:42 <McManiaC> hehe
16:02:47 <HugoDaniel> great McManiaC :D
16:02:55 <HugoDaniel> i dont have that kind of "vision" :(
16:03:15 <Entroacceptor> maybe I can ask here again
16:03:27 <Entroacceptor> in the cms I'm writing, I get a pathname from the user
16:03:33 <Entroacceptor> but it is without extension
16:03:46 <McManiaC> HugoDaniel: that just takes some time :)
16:03:49 <Entroacceptor> so like "Foo"
16:04:26 <Entroacceptor> and my app got a list of handlers [("html", htmlHandler), ("markdown", markdownHandler)]
16:04:47 <Entroacceptor> so I want to check if there's a file Foo.html, Foo.markdown,..., in that order
16:05:19 <Entroacceptor> that can't be more than two lines, can it?
16:07:20 <stepcut> it could be :)
16:07:40 <Entroacceptor> I didn't manage to do it..
16:08:08 <McManiaC> msum [ dir "html" htmlHandler, dir "markdown" markdownHandler ]
16:08:36 <stepcut> McManiaC: you need to do some filename concats in there..
16:08:52 <McManiaC> oh
16:08:52 <McManiaC> sorry
16:08:53 <McManiaC> :D
16:09:07 <stepcut> plus it needs to stat the file system and see if the file actually exists ?
16:11:33 <stepcut> do htmlHandler, etc, take an argument?
16:13:22 <Entroacceptor> yes, the file
16:13:26 <McManiaC> hmmmmmmmmmmmmmm
16:13:35 <McManiaC> the timeout manager doesn't work as expecte
16:13:36 <McManiaC> d
16:13:36 <McManiaC> :D
16:14:33 <stepcut> McManiaC: yay!
16:15:53 <Entroacceptor> mm.....
16:16:08 <Entroacceptor> can I chain the path guards
16:16:27 <Entroacceptor> ok, you won't understand that sentence, I guess.
16:17:56 <McManiaC> it does remove expired sessions but doesn't update your current one if you're still active
16:18:21 <McManiaC> hmmmmmmmmmmm
16:18:22 <McManiaC> hmmmmmmmmmmm
16:18:23 <McManiaC> hmmmmmmmmmmmmmmmm
16:19:18 <Entroacceptor> he, you sound like me there ;)
16:20:30 <McManiaC> hehe
16:20:40 <McManiaC>     action (Just sid) = getSession sid >>= maybe noSession (\s -> updateTimeout m sid >> undefined) -- >> f s)
16:20:47 <McManiaC> it ignores the undefined at all
16:20:47 <McManiaC> wtf
16:20:48 <McManiaC> :D
16:21:54 <stepcut> http://hpaste.org/30153/handler_by_extension_happstac
16:22:08 <stepcut> Entroacceptor: haven't tested it, but that might work
16:23:44 <Entroacceptor> arrows?
16:24:40 <Entroacceptor> the Haskell learning curve is weird
16:24:51 <HugoDaniel> i dont like arrows
16:24:58 <HugoDaniel> they are fugly to read :(
16:25:07 <HugoDaniel> sintatically not beautifull things
16:25:15 <McManiaC> hm? theres no arrow
16:25:23 <McManiaC> in stepcuts paste
16:25:42 <HugoDaniel> is hpaste runing on happstack ?
16:25:50 <McManiaC> dont think so
16:27:29 <Entroacceptor> import Control.Arror
16:27:31 <Entroacceptor> Arrow
16:27:59 <Entroacceptor> who is running hpaste, btw? Would be cool to have haddock links in there
16:28:03 <stepcut> hpaste was originally running on happstack, but it has been ported two or three times since then..
16:28:12 <stepcut> someday it will come back to happstack I am sure :)
16:28:32 <stepcut> like the prodigal son..
16:28:43 <McManiaC> Entroacceptor: "first :: (a -> b) -> (a,c) -> (b,c)" just runs on the first argument of a tuple :)
16:29:11 <Entroacceptor> yeah found
16:29:29 <McManiaC> (at least in this context)
16:30:08 <stepcut> that's probably the number one use of arrows in haskell :p
16:30:23 <stepcut> I do have a version of RqData that uses arrows though.. it's actually kind of cool
16:31:27 <stepcut> here is a demo of using it, http://hpaste.org/30155/rqdata_arrow_example
16:31:48 <stepcut> you can set quotas on a per field basis
16:33:17 <stepcut> that information is all collected before anything is actaully read from the network socket. When we do actually process the POST data, the correct thing can be done immediately and precisely
16:33:45 <stepcut> with the current monad based RqData, we have to save files to a temp directory and then clean them up afterwards if they don't get used
16:34:05 <stepcut> in the arrow based version, we know exactly what files we need ahead of time, so we can just save the stuff we want, and discard the rest
16:34:33 <Entroacceptor> that's cool
16:36:34 <McManiaC> 18:30     stepcut that's probably the number one use of arrows in haskell :p
16:36:35 <McManiaC> true :)
16:36:52 <Entroacceptor> mmh, stepcut, your solution compiled (after I cleared out the  type annotations)
16:37:26 <stepcut> Entroacceptor: yeah, but does it work? Maybe I appended the extension on the wrong end of the file or something
16:40:28 <Entroacceptor> seems to, so far: )
16:41:07 <McManiaC> damn damn
16:42:23 <McManiaC> now I cant log in anymore
16:42:24 <McManiaC> :D
16:43:15 <Entroacceptor> ok, thanks stepcut  :)
16:44:01 <Entroacceptor> but that's still longer than I suspected
16:45:55 <McManiaC> well, you cant perform magic with haskell :P
16:46:09 <McManiaC> the "do-what-i-want-you-to-do-function" hasnt been invented yet :>
16:46:28 <Entroacceptor> mhm
16:46:35 <Entroacceptor> ok, if I think about it...
16:46:42 <Entroacceptor> I need a directory listing anyway
16:46:44 <Entroacceptor> d'oh
16:47:01 <Entroacceptor> so I could just reuse that, somehow
16:49:16 <McManiaC> http://n-sch.de/hdocs/happstack-auth/Happstack-Auth.html#v:updateTimeout it works :)
16:53:25 <Entroacceptor> crypto fails to install..
16:53:52 <McManiaC> it does? hmm
16:54:33 <Entroacceptor> or not_
16:54:48 <Entroacceptor> ah, it does, for me, without errrs ^^
16:55:14 <Entroacceptor> something in qukctest
16:55:17 <Entroacceptor> quicktest again
16:55:35 <Entroacceptor> but I'll look at that later, when I'm so far as to try authentication
17:05:45 <McManiaC> http://n-sch.de/happstack-auth-sessions.png :)
17:15:56 <Entroacceptor> :)
17:24:48 <McManiaC> uh
17:24:53 <McManiaC> uh uh
17:24:53 <McManiaC> :D
17:30:11 <McManiaC> stepcut: you have a minute?
17:33:14 <Entroacceptor> mhm...
17:33:22 <Entroacceptor> now I want to check if the file is a dir instead
17:35:34 <Entroacceptor> can I bolt out of a handler and make it use the next one?
17:38:29 <Entroacceptor> of course...
17:38:49 <McManiaC> stepcut: nevermind, got it already
17:43:56 <McManiaC> had to replace "addCookie" with a "setHeaderM" version of it, so you could use "updateTimeout" (update session cookie with a new expire-time) and "clearSessionCookie" (set that cookie to 0 again) in one response :)
17:45:12 <McManiaC> I guessssss
17:45:23 <McManiaC> its time to create a hackage-package
17:46:01 <edon> if i install happstack from cabal, does it come with blazehtml support ?
17:47:14 <McManiaC> Entroacceptor: Crypto builds fine here
17:47:56 <Entroacceptor> I get http://pastie.org/private/nik7odfqcpgpxac7hcz0gw
17:48:56 <Entroacceptor> btw., is it normal to get HTTP request failed with: thread killed
17:48:59 <Entroacceptor> messages?
17:49:16 <Entroacceptor> (sorry, I'm a bit unfocused today)
17:50:10 <McManiaC> I get them all the time
17:50:28 <Entroacceptor> does it mean there's something wrong with closing the connections?
17:50:50 <McManiaC> no idea :)
17:51:58 <McManiaC> yay, and happstack-auth builds with from hackage and with 0.5.1 from darcs :)
17:52:32 <stepcut> Entroacceptor: are you using happstack from darcs or from hackage ?
17:52:49 <Entroacceptor> ohm, I don't know
17:54:27 <Entroacceptor> I think darcs
17:55:29 <stepcut> they have been around for a long time -- clearly something is wrong.. but apparently not anything too exciting because the thread killed message is the only observed side effect so far :)
18:16:39 <Entroacceptor> http://pastie.org/private/turbthwdyesenk7ois3ta <- the dirHandler doesn't do what I'd like to
18:16:41 <McManiaC> http://n-sch.de/hdocs/happstack-auth/Happstack-Auth.html ← any spelling mistakes or similiar?
18:17:14 <Entroacceptor> McManiaC: ha, something I can help with ;)
18:17:28 <McManiaC> hehe
18:24:03 <Entroacceptor> delUser is by name, not id?
18:24:24 <McManiaC> yeh
18:24:53 <Entroacceptor> that's a bit weird imo
18:25:00 <McManiaC> hm maybe I should add a not-so-lowlevel delUser function
18:25:23 <McManiaC> Entroacceptor: blame mightybyte :)
18:25:32 <Entroacceptor> any ideas for my problem?
18:26:00 <Entroacceptor> can I chain it that way, somehow?
18:27:10 <Entroacceptor> or am I missing something trivial?
18:27:55 <Entroacceptor> yes
18:27:57 <Entroacceptor> I did...
18:28:06 <Entroacceptor>  </> "" isn't equal to ++"/"
18:28:49 <McManiaC> stepcut: if I link to "Happstack.State" from my module, will it link correctly on hackage?
18:52:38 <McManiaC> hmmm shit
18:52:43 <McManiaC> forgot my hackage password
18:52:53 <McManiaC> :D
18:54:48 <Entroacceptor>          path $ \_ -> handler $ prefix++"index",
18:55:08 <Entroacceptor> tells me     Ambiguous type variable `a' in the constraint: `FromReqURI a' arising from a use of `path' at Cms/Main.hs:39:9-12
18:55:18 <Entroacceptor> how to add something??
18:55:38 <Entroacceptor> the ambigous type is the variable, I guess?
18:56:23 <McManiaC> use anyPath maybe?
18:56:57 <Entroacceptor> ah
18:56:58 <Entroacceptor> thanks
18:57:57 <Entroacceptor> mh, but that doesn't do what I thought it would.
18:58:24 <McManiaC> what do you think it should do? :)
18:59:21 <Entroacceptor> well
18:59:42 <Entroacceptor> the whole thing, not guard
19:00:35 <Entroacceptor> I think I'd want         nullDir $ (handler $ prefix ++ "index"),
19:00:37 <Entroacceptor> instead
19:01:23 <Entroacceptor> which doesn't work, either, yet ;)
19:02:30 <McManiaC> nullDir >> handler (prefix ++ "index")
19:04:43 <Entroacceptor> yay
19:04:46 <Entroacceptor> thanks
19:19:02 <McManiaC> btw  Entroacceptor
19:19:22 <McManiaC> I could drop userid at all
19:19:41 <McManiaC> its just an Int and the username is just as "unique" as this id
19:19:42 <McManiaC> ^^
19:24:36 <McManiaC> 21:24  * hackagebot happstack-auth 0.2 - A Happstack Authentication Suite  http://hackage.haskell.org/package/happstack-auth-0.2 (NilsSchweinsberg)
19:24:39 <McManiaC> :)
20:37:03 <stepcut> McManiaC: link correctly? I assume you are going to add happstack-state to the .cabal file ?
20:37:17 <McManiaC> jup
20:37:33 <McManiaC> its already on hackage, see above :)
20:37:48 <McManiaC> haddock isnt generated yet, tho
20:48:54 <stepcut> McManiaC: yeah, it's lazy like that ;)
20:49:15 <Entroacceptor> mpf, crypto still fails
20:49:20 <Entroacceptor> rm -rf .cabal ftw
20:54:49 <McManiaC> hehe
20:56:00 <Entroacceptor> mh, didn't help
20:57:13 <McManiaC> you've done "cabal update" and installed the latest cabal-install ?
20:57:26 <McManiaC> what version of ghc/cabal are you using?
20:58:48 <Entroacceptor> I just deleted .ghc for good measure
20:59:02 <Entroacceptor> ghc 6.12.3
21:02:32 <stepcut> rm /bin/rm, for extra good measure ;)
21:03:10 <Entroacceptor> :-P
21:05:43 <McManiaC> :D
21:08:33 <Entroacceptor> mmhm
21:08:35 <Entroacceptor> crypto still fails
23:18:33 <McManiaC> www.n-sch.de/blog-menu-cfg.png :D
23:19:36 <McManiaC> www.n-sch.de/blog-menu-cfg-2.png
23:19:37 <McManiaC> :)
23:26:14 <stepcut> heh
23:42:51 <McManiaC> quick & dirty syntax description: www.n-sch.de/blog-menu-cfg-desc.png
23:42:52 <McManiaC> :>
23:43:35 <McManiaC> gotta love a web application with a decent parser and a database which supports nested types etc
23:43:39 <McManiaC> :D