Newest at the top
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 |
2024-10-06 20:10:39 +0200 | <Inst> | i'm just saying that it's related to me complaining about how you don't have container polymorphism due to all the annotations required to use functions from different container libraries / modules |
2024-10-06 20:10:21 +0200 | ljdarj | (~Thunderbi@user/ljdarj) (Remote host closed the connection) |
2024-10-06 20:10:14 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-10-06 20:09:51 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-10-06 20:09:51 +0200 | <int-e> | we can still shoot programmers who, err, do that. |
2024-10-06 20:09:51 +0200 | <Inst> | no, but some people apparently inline do blocks without type annotations and then complain that it's unreadable |
2024-10-06 20:09:45 +0200 | <geekosaur> | why does this bother you? |
2024-10-06 20:09:30 +0200 | <Inst> | do pi is valid |
2024-10-06 20:09:27 +0200 | <davean> | right, its *syntax* |
2024-10-06 20:09:15 +0200 | <Inst> | see the do bulleting fanclub |
2024-10-06 20:09:04 +0200 | <Inst> | actually, do blocks don't even require monads or applicatives |
2024-10-06 20:09:02 +0200 | <monochrom> | I thought people complained not having ApplicativeDo when it was not available. |
2024-10-06 20:08:58 +0200 | <int-e> | davean: well that's a very important question when you overload it Stroustrup style |
2024-10-06 20:08:35 +0200 | <davean> | thats like asking what the type of whitespace is |
2024-10-06 20:08:17 +0200 | <davean> | there is no type of a do block ... its syntax ... |
2024-10-06 20:08:02 +0200 | <Inst> | you can't see the type of the do block |
2024-10-06 20:07:58 +0200 | <Inst> | do is polymorphic over monads and applicatives (with -XApplicativeDo) |
2024-10-06 20:07:52 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2024-10-06 20:07:39 +0200 | <davean> | what is polymorphic do? |