Newest at the top
2024-10-06 20:38:03 +0200 | <tomsmeding> | it's not like I understand the CT |
2024-10-06 20:37:55 +0200 | <tomsmeding> | of course :p |
2024-10-06 20:37:48 +0200 | <geekosaur> | remembering that what I wrote may be not merely out in left field, but somewhere in the parking lot, because I barely understand half the stuff involved |
2024-10-06 20:37:32 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection) |
2024-10-06 20:35:48 +0200 | <tomsmeding> | (i.e. I'm not trying to prove geekosaur wrong, I'm trying to make sure that I'm not wrong by investigating the incompatibility between my mental model and what geekosaur writes) |
2024-10-06 20:35:13 +0200 | <tomsmeding> | and geekosaur was claiming that it does, hedged in uncertainty that I fully respect |
2024-10-06 20:34:49 +0200 | <tomsmeding> | I was trying to argue that this IxFunctor extends Functor in an orthogonal way that doesn't solve the "Set can't be an instance of this class" 'problem' |
2024-10-06 20:34:43 +0200 | <davean> | Set specificly violates what a functor is |
2024-10-06 20:34:24 +0200 | <davean> | Set *can't* be a member of functor, and thats the proof why |
2024-10-06 20:34:22 +0200 | <tomsmeding> | which is what I was trying to argue to geekosaur? |
2024-10-06 20:34:11 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-10-06 20:34:11 +0200 | <davean> | it doesn't it shows why said is impossible. |
2024-10-06 20:33:53 +0200 | <tomsmeding> | i.e. the "Set should be an instance of this class somehow" |
2024-10-06 20:33:43 +0200 | <tomsmeding> | but how does keeping j and k constant help in implementing my Functor' from above? |
2024-10-06 20:33:39 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection) |
2024-10-06 20:33:32 +0200 | <tomsmeding> | I know, I saw IxMonad |
2024-10-06 20:33:27 +0200 | <davean> | Consider vs. Monad |
2024-10-06 20:33:16 +0200 | <davean> | tomsmeding: yes, EXACTLY |
2024-10-06 20:33:12 +0200 | <tomsmeding> | monochrom: that's just if you want the fmap to be linear time :p |
2024-10-06 20:32:50 +0200 | <tomsmeding> | davean: they are kept constant, which is indeed a use I guess |
2024-10-06 20:32:43 +0200 | <monochrom> | My perspective is you need a theorem-stating language. fmap_Set :: (Ord a, Ord b) => (a -> b) -> (assurance that that function is monotonic) -> Set a -> Set b should be fine. Alternatively, (Ord a, Ord b) => (MonotonicFunction a b) -> Set a -> Set b |
2024-10-06 20:32:38 +0200 | <tomsmeding> | the input and output type _of this fmap-like operation_ are just a and b |
2024-10-06 20:32:36 +0200 | <davean> | tomsmeding: They're not unused. |
2024-10-06 20:32:16 +0200 | <tomsmeding> | just to be certain we're talking about the same thing: class IxFunctor f where imap :: (a -> b) -> f j k a -> f j k b |
2024-10-06 20:31:39 +0200 | <tomsmeding> | (and I do have a vague suspicion of what it's supposed to mean, by looking at IxMonad, but that's beside the point in this case) |
2024-10-06 20:31:32 +0200 | <geekosaur> | I think in the case of Set (or Ord constraint) it captures the input and output types so they don't have to obey "doesn't alter structure" except in an abstract sense (hence "pseudonatural transformation"); but you'd need to ask a CT wonk to be certain |
2024-10-06 20:31:05 +0200 | <tomsmeding> | because there are no constraints on 'a' and 'b' |
2024-10-06 20:30:23 +0200 | <tomsmeding> | well, my point is that whatever it's supposed to mean, it _cannot_ express my Functor' :p |
2024-10-06 20:30:18 +0200 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
2024-10-06 20:30:00 +0200 | <geekosaur> | unfortunately that package didn't bother to document its IxFunctor, so who even knows what that's supposed to mean |
2024-10-06 20:29:32 +0200 | <tomsmeding> | (ignoring all the other classes in the package) |
2024-10-06 20:29:28 +0200 | <geekosaur> | changing type is another kind of pseudonatural transformation you can use |
2024-10-06 20:29:20 +0200 | <tomsmeding> | I don't know the CT either; I just see that that IxFunctor class simply adds two unused 'j' and 'k' parameters to 'f' |
2024-10-06 20:29:01 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-10-06 20:28:43 +0200 | <geekosaur> | mm, this is a bit beyond my CT knowledge but my understanding, to the extent that I have it, is that if you can derive a "pseudonatural transformation" for e.g. Functor+Ord, you can e.g. make an indexed Functor of it |
2024-10-06 20:27:41 +0200 | <tomsmeding> | geekosaur: https://hackage.haskell.org/package/indexed-0.1.3/docs/Control-Monad-Indexed.html#t:IxMonad |
2024-10-06 20:27:30 +0200 | <Inst> | i guess the reason i'm moaning about containesr tbh is that it feels like something interesting, intellectual, and within my ability to make a contribution, as you've said, a solution in search of a (social) problem, as opposed to an individual one |
2024-10-06 20:27:26 +0200 | <tomsmeding> | which is also a useful generalisation of the FAM typeclasses, but an orthogonal one |
2024-10-06 20:26:50 +0200 | <tomsmeding> | this kind of indexing seems to be for monads where the bind operation changes the monad type |
2024-10-06 20:26:24 +0200 | <tomsmeding> | 'f j k' being preserved by the imap method |
2024-10-06 20:26:12 +0200 | <tomsmeding> | geekosaur: looking at that IxFunctor, I really don't see how adding more type variables to f makes Set any more likely to be an instance of this class :p |
2024-10-06 20:26:01 +0200 | <monochrom> | There are a lot more I don't remember. Basically jokes on how to write impossible recommendations. |
2024-10-06 20:25:32 +0200 | <Inst> | not the second |
2024-10-06 20:25:28 +0200 | <Inst> | to the first claim |
2024-10-06 20:25:18 +0200 | Inst | giggles |
2024-10-06 20:25:16 +0200 | <monochrom> | In another circumstance, if it's a coworker who has had affairs with most people in the office, you can write "they know everyone here well" ("know" in the Bible sense haha) |
2024-10-06 20:24:49 +0200 | <geekosaur> | iirc indexed typeclasses solve a more general problem, which makes them a little cumbersome compared to just letting you have a Functor-like class over Set |
2024-10-06 20:24:22 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-10-06 20:24:08 +0200 | <monochrom> | If an ex-convict asks you for a recommendation letter, and you must not refuse because like they're gangsters, you can write "this is person with a strong conviction" |
2024-10-06 20:23:48 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |