Newest at the top
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) |
2024-10-06 20:23:20 +0200 | <monochrom> | Oh let me also tell you about a book I read about writing recommendation letters when you don't want to. |
2024-10-06 20:22:38 +0200 | <tomsmeding> | "solution in want of a problem" is multiple times more explicit and clear than those other phrases :p |
2024-10-06 20:22:33 +0200 | Sgeo | (~Sgeo@user/sgeo) Sgeo |
2024-10-06 20:22:31 +0200 | <int-e> | monochrom: "smells like blockchain" |
2024-10-06 20:22:22 +0200 | <Inst> | monochrom: how often do people parse those phrases incorrectly? |
2024-10-06 20:22:09 +0200 | <monochrom> | or "solution in want of a problem" |
2024-10-06 20:21:46 +0200 | <monochrom> | Likewise for polite negative thesis/paper review. "solves a much needed problem". |
2024-10-06 20:21:26 +0200 | <tomsmeding> | * :p |
2024-10-06 20:21:24 +0200 | <tomsmeding> | or any of the zillion variations on this idea, without a clearly most-general option that is workable p |
2024-10-06 20:21:19 +0200 | <monochrom> | If you want to politely write a negative book review, you can write "this book fills a much needed gap". I think someone actually did that. |
2024-10-06 20:21:18 +0200 | <Inst> | monochrom: survivorship bias? |
2024-10-06 20:21:04 +0200 | <tomsmeding> | I was thinking of class Functor' f where { type FConstr f ; fmap' :: (FConstr a, FConstr b) => (a -> b) -> f a -> f b } |
2024-10-06 20:20:42 +0200 | <monochrom> | Oh let me just tell you jokes about reviews that roast, in closing. |
2024-10-06 20:20:27 +0200 | <geekosaur> | iirc it is |
2024-10-06 20:20:26 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection) |
2024-10-06 20:19:50 +0200 | <tomsmeding> | geekosaur: if you mean this https://hackage.haskell.org/package/indexed-0.1.3/docs/Data-Functor-Indexed.html , that's not quite the same, is it? |
2024-10-06 20:19:44 +0200 | <monochrom> | And that actually tells you a lot about the economics of how many people actually care. |
2024-10-06 20:19:22 +0200 | <monochrom> | probably also unmaintained. |