Search Haskell Channel Logs

Monday, February 20, 2017

#haskell channel featuring tdammers, gfixler, maybefbi, Cale,

tdammers 2017-02-19 21:45:43
19
tdammers 2017-02-19 21:45:52
hrrngh, ignore that
gfixler 2017-02-19 21:46:05
oh, right, it was because he said C x C -> C is really a functor from a *product* of 2 Hasks to Hask
gfixler 2017-02-19 21:46:19
and I thought "But aren't products of Hask still just Hask?"
gfixler 2017-02-19 21:46:55
so far, this is what's been tough about CT - all these little teeny details
gfixler 2017-02-19 21:48:18
and if C x C -> C, then it follows that (C x C) x (C x C) -> C x C -> C
gfixler 2017-02-19 21:48:22
and so on
gfixler 2017-02-19 21:48:40
infinite recursion
gfixler 2017-02-19 21:48:43
unless I'm missing something
Cale 2017-02-19 21:53:13
Hm?
Cale 2017-02-19 21:53:19
I'm confused about what you mean.
gfixler 2017-02-19 21:53:25
I may be as well
Cale 2017-02-19 21:53:30
C x C is a category whose objects are pairs of objects of C
gfixler 2017-02-19 21:53:36
right
gfixler 2017-02-19 21:53:38
but we're reusing C
Cale 2017-02-19 21:53:39
and whose arrows are pairs of arrows
gfixler 2017-02-19 21:53:45
which means some elements of C are C x C
gfixler 2017-02-19 21:53:47
no?
gfixler 2017-02-19 21:54:09
C is made of objects, some of which are products of things in C
Cale 2017-02-19 21:54:11
i.e. an arrow (X,Y) -> (Z,W) consists of some pair (f,g) with f: X -> Z and g: Y -> W
Cale 2017-02-19 21:54:53
We're taking a product of categories, not a product on objects of those categories
gfixler 2017-02-19 21:55:12
this is a constant source of confusion for me
gfixler 2017-02-19 21:55:16
mixing up levels
gfixler 2017-02-19 21:57:36
now I'm confused about the ->
gfixler 2017-02-19 21:57:40
C x C -> C
gfixler 2017-02-19 21:58:06
I thought it meant that the product of two categories C was itself in C
gfixler 2017-02-19 22:02:11
I think it's Hask tripping me up
gfixler 2017-02-19 22:02:24
Bartosz wrote C x C -> C as a kind of stand-in for Hask, I think
gfixler 2017-02-19 22:02:33
in which case, what I was trying to say is [mostly?] right
Cale 2017-02-19 22:03:06
Well, it would be Hask x Hask -> Hask
gfixler 2017-02-19 22:03:10
yeah
Cale 2017-02-19 22:03:20
So, such a functor would take pairs of types to types
gfixler 2017-02-19 22:03:24
yep
gfixler 2017-02-19 22:03:28
which he goes over
gfixler 2017-02-19 22:03:45
and it is recursive, because you can keep doing that, and always stay in types
gfixler 2017-02-19 22:03:51
and that's where the monoidal nature of the category comes in
gfixler 2017-02-19 22:03:55
although you need an identity
gfixler 2017-02-19 22:04:02
I suppose it's a semigroup category otherwise?
gfixler 2017-02-19 22:04:17
maybe the word cartesian needs to go in there, too?
maybefbi 2017-02-19 22:27:10
im unable to avoid mistakes without a type checker. is that acceptable for a live coding interview?
maybefbi 2017-02-19 22:27:32
did the interviewer forgive minor type errors?
maybefbi 2017-02-19 22:27:38
in your case?
maybefbi 2017-02-19 22:32:17
example using (:) instead of (++)