00:22:06 <stepkut> dcoutts: I am looking at adding NFData instances for the Happstack types.. on issue is that ByteString did not have NFData instances until bytestring 0.10, which is not what is bundled with earlier versions of ghc
02:00:09 <donri> https://plus.google.com/u/0/110988559818762092753/posts/jKJRVw1wDCT
02:04:36 <stepcut> happstack is over engineered, but using monds for updating a record is not?
02:05:45 <stepcut> i released happstack-server-7.1.1 btw
02:06:32 <stepcut> now I am wrapping up the next clckwrks release
02:21:45 <sm> \o/
05:35:46 <chaotic_good> duuuuuuudes
05:35:57 <chaotic_good> ok I am learning haskell from learn you a haskell book
05:36:05 <chaotic_good> and wow th etype clas spart blew my brain up
05:36:12 <chaotic_good> is it supposed to be hard?
05:36:21 <chaotic_good> I just dont get what the guy is saying
05:36:25 <chaotic_good> after tuples
05:39:20 <chaotic_good> any advice?
05:40:46 <luite> practice, and ask questions here if you get stuck :p
06:01:40 <donri> chaotic_good: it can be confusing because it's different from things you're likely to already know from programming
06:01:42 <chaotic_good> the type class part I was liek OWAAAA
06:01:48 <donri> chaotic_good: is anything in particular confusing you?
06:01:50 <chaotic_good> I only know tcl
06:01:54 <chaotic_good> and some forth and lisp
06:01:56 <chaotic_good> and bash
06:02:03 <chaotic_good> I mean its kinda cool you define stuff
06:02:07 <donri> chaotic_good: so, do you accept that every value has a type in haskell?
06:02:11 <chaotic_good> then kinda take sets of lists
06:02:21 <chaotic_good> uh yes I think so
06:03:20 <donri> chaotic_good: alright, and do you accept that haskell can often infer this type? for example, "Just 'a'" is quite clearly a "Maybe Char"?
06:03:30 <chaotic_good> yes
06:04:55 <chaotic_good> with u sofar
06:05:36 <donri> chaotic_good: alright. so with type classes you can have functions and operators and even constants selected by type
06:06:29 <donri> chaotic_good: for example "return" is a different function for every type [that is an instance of Monad], and you get the right function based on the inferred type (based on how the resulting value is used)
06:06:45 <donri> chaotic_good: does that help you in any way?
06:06:57 <chaotic_good> yep
06:06:59 <chaotic_good> makes sense
06:07:30 <chaotic_good> I will continue reading
06:07:39 <chaotic_good> I want to get to a point I can try a happs site
06:08:21 <donri> > (return 'c', return 'c') :: (Maybe Char, [Char]) -- here we provide an explicit type instead of letting it be inferred, but you can see how 'return' changes based on the type
06:08:22 <lambdabot>   (Just 'c',"c")
06:09:01 <donri> > map toUpper (return 'c') -- here the type is inferred to a list because 'map' only works for lists
06:09:02 <lambdabot>   "C"
06:09:42 <donri> > fmap toUpper (return 'c') -- this is a type error because there's not enough information to infer a specific type
06:09:43 <lambdabot>   No instance for (GHC.Show.Show (f0 GHC.Types.Char))
06:09:43 <lambdabot>    arising from a use o...
06:34:47 <chaotic_good> now
06:35:00 <chaotic_good> I suppose I should put it out of my mind to use haskell in place of shell
07:09:01 <KBme> wow…forth
07:09:11 <KBme> I have always admired people who know forth
07:09:42 <donri> and fortran?
07:13:12 <KBme> heh
07:13:16 <KBme> not that much
07:13:30 <KBme> though kind of, maybe
10:08:25 <KBme> hi again
10:08:41 <KBme> what do I need to do to send a cookie to a client?
10:08:54 <KBme> I am using addCookie, but the cookie isn't showing up
10:09:32 <donri> in a response?
10:09:52 <KBme> yeah
10:10:24 <donri> @hpaste
10:10:24 <lambdabot> Haskell pastebin: http://hpaste.org/
10:11:15 <KBme> ok, I actually have to send the response
10:11:20 <KBme> which is weird
10:12:31 <KBme> I mean I have to send the response from my handler, just a 404 isn't enough
10:13:12 <donri> well sure
10:29:55 <KBme> is there a way to access the referrer url of the request?
10:30:41 <KBme> I'm trying to do authentication, so if the user is not authenticated, I render a login form, and on POST to /login (if successful) I want to redirect him to the original page he wanted to visit…
10:37:55 <donri> getHeaderM "Referer"
10:40:39 <donri> note that some people disable that header in their browser
10:41:40 <KBme> yeah
10:42:05 <KBme> well, those people can just visit the login page and then navigate back ;)
10:43:32 <donri> you could store the url in a query parameter if it's important
10:46:20 <KBme> right
10:46:40 <KBme> well, not right now, but yeah, that can be done easily also
11:54:38 <KBme> donri, do you know why seeOther doesn't have a normal Response type?
11:54:49 <KBme> that messes my whole routing scheme up …  ◕ ‿ ◕
11:56:10 <donri> it does if you give it a response
11:56:18 <donri> it's like "ok"
11:56:20 <KBme> huh
11:56:44 <KBme> well I do …
11:56:47 <donri> seeOther url (toResponse "bla")
11:56:49 <KBme> i'll paste asnippet
11:56:52 <KBme> right
11:57:44 <donri> this one is better anyway v
11:57:45 <donri> http://hackage.haskell.org/packages/archive/web-routes-happstack/0.23.4/doc/html/Web-Routes-Happstack.html
11:59:00 <KBme> yeah, but then I have to 1, add a new dependency 2, implement the routemonad
11:59:07 <KBme> er monadroute
11:59:23 <hpaste> KBme pasted “route” at http://hpaste.org/78399
12:01:34 <donri> yea you're giving it B.unpack url which is a [Word8]
12:01:49 <KBme> right
12:01:53 <KBme> now it works
12:01:59 <KBme> my bad again…
12:02:15 <donri> you need to decode the bytestring into a text or string
12:03:44 <KBme> yep
12:03:56 <KBme> I had to decodeUtf8 and T.unpack it
12:03:58 <KBme> yay
12:04:03 <KBme> auth is D O N E
12:04:05 <donri> well string since you're using ++ later
12:04:26 <KBme> yep
12:04:34 <donri> or change that to <> from Data.Monoid to work for Text
12:05:00 <KBme> well, that might be for later
12:05:10 <KBme> internally happstack uses Strings, right?
12:06:03 <donri> for urls yea since it uses the URI type from network
13:06:49 <KBme> oh, for other stuff it doesn't use strings,
13:06:51 <KBme> ?
13:09:37 <KBme> also, do you guys think it's a good idea to map uuids to users for session management?
13:52:43 <donri> incremental ids work fine with acid-state
14:00:23 <KBme> ok
14:00:29 <KBme> so maybe overkill
14:20:56 <stepkut> happstack uses a combination of ByteString, Text, and String