Newest at the top
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. |
2024-10-06 20:19:12 +0200 | <geekosaur> | (look for "indexed functors"/"indexed monads"/etc.) |
2024-10-06 20:18:53 +0200 | <geekosaur> | it's on Hackage but unlikely to make base |
2024-10-06 20:18:33 +0200 | <tomsmeding> | but it's generally considered not worth it for the sheer carnage of backwards incompatibility it would incur |
2024-10-06 20:18:26 +0200 | <monochrom> | For that, you can go back to: <geekosaur> have you ever looked at EdisonCore? |
2024-10-06 20:18:18 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-10-06 20:18:15 +0200 | <tomsmeding> | there have been proposals for a modified Functor class that admits additional constraints on fmap |
2024-10-06 20:17:57 +0200 | <Inst> | Set isn't a functor, can't be made into a functor |
2024-10-06 20:17:48 +0200 | <tomsmeding> | well, then I guess that, yes |
2024-10-06 20:17:45 +0200 | <tomsmeding> | oh I see |
2024-10-06 20:17:37 +0200 | <Inst> | tomsmeding: Set a |
2024-10-06 20:17:35 +0200 | <tomsmeding> | unless what you want out is indeed a list :p |
2024-10-06 20:17:28 +0200 | <tomsmeding> | the toList is pointless in that expression |
2024-10-06 20:17:23 +0200 | <geekosaur> | honestly, all I am seeing here is "it's not done the way I prefer from other languages, this!must!be!fixed!!" |
2024-10-06 20:17:14 +0200 | <Inst> | ehhh, honestly, probably just traverse f . toList solves all the problems I'm whining about |
2024-10-06 20:17:14 +0200 | <yahb2> | type Traversable :: (* -> *) -> Constraint ; class (Functor t, Foldable t) => Traversable t where ; traverse :: Applicative f => (a -> f b) -> t a -> f (t b) ; sequenceA :: Applicative f => t (... |
2024-10-06 20:17:14 +0200 | <tomsmeding> | % :i Traversable |
2024-10-06 20:16:48 +0200 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
2024-10-06 20:16:47 +0200 | <tomsmeding> | :t fmap |
2024-10-06 20:16:42 +0200 | <Inst> | Container c => (a -> b) -> c a -> c b |
2024-10-06 20:16:36 +0200 | <tomsmeding> | note that Functor (with fmap) is a superclass of Traversable |
2024-10-06 20:16:33 +0200 | <geekosaur> | (f)map is Traversable |
2024-10-06 20:16:16 +0200 | <int-e> | don't say "unreadable" when you mean "ugly" |
2024-10-06 20:16:15 +0200 | <tomsmeding> | Inst: what would its type be? |
2024-10-06 20:16:14 +0200 | <Inst> | wait, does foldable now come with a fmap like action? |
2024-10-06 20:15:54 +0200 | <geekosaur> | Inst, that's where FOldable and Traversable come in |
2024-10-06 20:15:47 +0200 | <monochrom> | Even COBOL requires English education to read. |
2024-10-06 20:15:45 +0200 | <Franciman> | of expertise |
2024-10-06 20:15:38 +0200 | <Franciman> | haskell people come in various levels... |
2024-10-06 20:15:30 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2024-10-06 20:15:23 +0200 | <Inst> | so what's wrong with having a single cMap that does a fmap-like action over any container? |
2024-10-06 20:15:11 +0200 | ljdarj | (~Thunderbi@user/ljdarj) (Remote host closed the connection) |
2024-10-06 20:14:53 +0200 | <monochrom> | I'm only obliged to write Haskell code for Haskell people, Python code for Python people. |
2024-10-06 20:14:26 +0200 | <monochrom> | If I'm writing Haskell code I'm not obliged to make it comprehensible to Python people. Or vice versa. |
2024-10-06 20:14:22 +0200 | <int-e> | or maybe more to the point, https://paste.tomsmeding.com/EkhhpQ4l |
2024-10-06 20:14:08 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
2024-10-06 20:13:56 +0200 | <monochrom> | I am wary of harping over "unreadable" as if it's an political ideological religious slogan. (un)readable to which target audience? |
2024-10-06 20:13:45 +0200 | <davean> | I don't see the use there, but theres nothing special going on? |
2024-10-06 20:13:08 +0200 | <int-e> | there's also this... and you can argue at length whether it's a use or an abuse: https://paste.tomsmeding.com/eLPAX2o3 |
2024-10-06 20:13:01 +0200 | <monochrom> | I also expect educated people to see what I'm doing, even without that comment. |
2024-10-06 20:12:32 +0200 | <Inst> | abc <- pure $ do ... |
2024-10-06 20:12:27 +0200 | <davean> | You can do any sort of calculation in IO, so? |
2024-10-06 20:12:26 +0200 | <monochrom> | I do that. But I also add a comment "this is in Maybe". |
2024-10-06 20:11:56 +0200 | <Inst> | well, the point is, you can insert do within the definition of an IO value that's actually a Maybe computation and it gets confusing |
2024-10-06 20:11:14 +0200 | <davean> | do doesn't have type stuff, its syntax ... |
2024-10-06 20:11:05 +0200 | <davean> | there is no polymorphism here. |
2024-10-06 20:10:49 +0200 | <Inst> | in the sense that having too much polymorphism can be a bad thing |
2024-10-06 20:10:40 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |