Logs: freenode/#haskell
| 2020-10-21 22:29:24 | <crestfallen> | from understanding* |
| 2020-10-21 22:29:33 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:29:36 | <koz_> | crestfallen: I would argue that, for understanding do-notation, this is a _terrible_ plan. |
| 2020-10-21 22:29:43 | <koz_> | Do-notation is syntactic sugar. |
| 2020-10-21 22:29:55 | <koz_> | If you want the semantics of a particular piece of do-notation, desugar it. |
| 2020-10-21 22:30:07 | × | thir quits (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 2020-10-21 22:30:12 | <koz_> | That is 100% of the issue, and tying yourself in knots about it like this impedes your own understanding. |
| 2020-10-21 22:30:42 | → | aidecoe joins (~aidecoe@unaffiliated/aidecoe) |
| 2020-10-21 22:31:01 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-21 22:31:25 | → | Tops2 joins (~Tobias@dyndsl-095-033-090-095.ewe-ip-backbone.de) |
| 2020-10-21 22:32:16 | × | Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds) |
| 2020-10-21 22:32:31 | <crestfallen> | wow, ok thanks. like this I get: Just (Just a) >>= id ==> Just a |
| 2020-10-21 22:32:48 | <texasmynsted> | wow. stan is working for me now. :-) It is really helpful |
| 2020-10-21 22:33:02 | <koz_> | OK, then your only issue is that you have to stop thinking about do-notation as _anything_ other than syntactic sugar. |
| 2020-10-21 22:33:17 | <koz_> | Literally, just go 'right, this is do-notation, let's manually desugar'. |
| 2020-10-21 22:33:21 | <koz_> | And do this until it sticks. |
| 2020-10-21 22:33:24 | → | Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) |
| 2020-10-21 22:34:20 | × | karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde) |
| 2020-10-21 22:34:30 | → | whatisRT joins (~whatisRT@2002:5b41:6a33:0:61c5:a3a1:1437:ebe5) |
| 2020-10-21 22:34:39 | <crestfallen> | koz_, while learning, I need to take any angle I can get. (>>= id) brought a lot of insight. so yeah I'm hung up on it presently :) |
| 2020-10-21 22:35:05 | <koz_> | crestfallen: And I'm telling you that your attempt at angling is getting you _more_ confused. |
| 2020-10-21 22:35:06 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-10-21 22:35:20 | <koz_> | Literally, do-notation is syntax sugar. Nothing more, nothing less. Approach it as such, nothing else. |
| 2020-10-21 22:35:40 | <monochrom> | do-notation doesn't desugar to join or >>=id. |
| 2020-10-21 22:36:15 | <crestfallen> | someone on the channel told me to use >>= instead. not sure of the context of that chat, but I do prefer it somehow. |
| 2020-10-21 22:36:28 | × | AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!) |
| 2020-10-21 22:36:40 | <koz_> | crestfallen: Nobody's holding a gun to your head and forcing you to use do-notation. |
| 2020-10-21 22:36:52 | <crestfallen> | !! thanks |
| 2020-10-21 22:36:54 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:36:57 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-21 22:37:09 | <monochrom> | Preference is irrelevant. do-notation desugars to >>=. Not join, not >>=id. |
| 2020-10-21 22:37:23 | × | p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 258 seconds) |
| 2020-10-21 22:38:21 | <crestfallen> | well, if I could ask differently: is (>=>) just like bind, sans join? |
| 2020-10-21 22:38:29 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 2020-10-21 22:38:46 | <davean> | sans join? |
| 2020-10-21 22:38:47 | <crestfallen> | meaning >=> sans join |
| 2020-10-21 22:39:11 | <crestfallen> | >=> doesn't implement join |
| 2020-10-21 22:39:11 | <monochrom> | I refuse to talk about "like". Everything is like everything. Everything is also unlike everything else. |
| 2020-10-21 22:40:57 | <davean> | Hum, in this case we're talking about something precise. We can say "A can be implimented with the same code as B, except lacking exactly the inclusion of a join" |
| 2020-10-21 22:41:29 | <koz_> | monochrom is like koz_. |
| 2020-10-21 22:41:50 | <monochrom> | http://www.vex.net/~trebla/humour/tautologies.html #0 |
| 2020-10-21 22:41:50 | × | chaosmasttter quits (~chaosmast@p200300c4a70942015d50de0935368812.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 2020-10-21 22:42:33 | <crestfallen> | for example, this is lost on me: |
| 2020-10-21 22:42:40 | × | tzh quits (~tzh@2601:448:c500:5300::19b0) (Quit: jsdkj) |
| 2020-10-21 22:42:59 | <crestfallen> | λ > :t (>=> join) |
| 2020-10-21 22:43:03 | <crestfallen> | (>=> join) :: Monad m => (a -> m (m (m c))) -> a -> m c |
| 2020-10-21 22:43:19 | <davean> | monochrom: perhaps you'd prefer the question "What is the relation of (>>=) and (>=>) in regards to 'join'?"? |
| 2020-10-21 22:43:27 | <monochrom> | Fortunately (>=> join) seldom comes up at all. |
| 2020-10-21 22:43:44 | <davean> | I don't know why that would come up - thats a weird structure |
| 2020-10-21 22:43:45 | <crestfallen> | davean thanks I need that terminology! |
| 2020-10-21 22:44:08 | × | AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!) |
| 2020-10-21 22:44:25 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 2020-10-21 22:44:35 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:47:18 | × | AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit) |
| 2020-10-21 22:47:23 | <crestfallen> | davean, if you care to look, this is from a bartosz tutorial: https://termbin.com/xnxfu |
| 2020-10-21 22:47:23 | × | stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer) |
| 2020-10-21 22:47:41 | → | stefan-__ joins (~cri@42dots.de) |
| 2020-10-21 22:47:44 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:47:48 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 2020-10-21 22:47:50 | <crestfallen> | https://www.schoolofhaskell.com/user/Lkey/kleisli |
| 2020-10-21 22:48:07 | <davean> | crestfallen: right and join takes 'm (m a) -> m a' |
| 2020-10-21 22:48:58 | <crestfallen> | yeah that was helpful, I thought anyway :) |
| 2020-10-21 22:49:01 | <davean> | Because of a property of m |
| 2020-10-21 22:49:17 | <davean> | Its not helpful for me, and I'm unclear why its helpful for you which worries me but :) |
| 2020-10-21 22:49:18 | <koz_> | Is there such a thing as mapMaybeM? |
| 2020-10-21 22:49:34 | <davean> | koz_: yes? |
| 2020-10-21 22:49:42 | <davean> | in a few packages |
| 2020-10-21 22:49:49 | <koz_> | @hoogle mapMaybeM |
| 2020-10-21 22:49:50 | <lambdabot> | Data.Conduit.List mapMaybeM :: Monad m => (a -> m (Maybe b)) -> ConduitT a b m () |
| 2020-10-21 22:49:50 | <lambdabot> | Control.Monad.Extra mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b] |
| 2020-10-21 22:49:50 | <lambdabot> | Extra mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b] |
| 2020-10-21 22:50:05 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 240 seconds) |
| 2020-10-21 22:50:13 | <davean> | You can easily compose it from base with catMaybes and mapM of course |
| 2020-10-21 22:50:28 | <davean> | Which is generally what I do ... repeatedly |
| 2020-10-21 22:50:33 | <koz_> | davean: Rofl. |
| 2020-10-21 22:50:38 | × | AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit) |
| 2020-10-21 22:51:01 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:51:41 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 2020-10-21 22:51:51 | <koz_> | :t catMaybes |
| 2020-10-21 22:51:52 | <lambdabot> | [Maybe a] -> [a] |
| 2020-10-21 22:51:57 | <koz_> | (miaow) |
| 2020-10-21 22:52:15 | <davean> | I just grepped, the occurencies of the obvious definition currently in my projects on this computer is depressing. |
| 2020-10-21 22:52:20 | <crestfallen> | davean, helpful because m(m a) needs a flatten. so it led me to think if flatten is implicit in >>= alone. also because of seeing this notation which implies that: do; ma <- mma |
| 2020-10-21 22:52:28 | × | AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit) |
| 2020-10-21 22:52:47 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 2020-10-21 22:52:49 | × | babygnu quits (~robert@gateway/tor-sasl/babygnu) (Remote host closed the connection) |
| 2020-10-21 22:52:53 | → | AceNovo joins (~chris@67-42-33-191.phnx.qwest.net) |
| 2020-10-21 22:53:11 | → | dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net) |
| 2020-10-21 22:53:30 | <davean> | er ... |
| 2020-10-21 22:53:42 | <davean> | So try desuggering what actually happens there. |
| 2020-10-21 22:54:09 | <crestfallen> | thanks ko*z suggested that but I'm not sure what to do.. |
| 2020-10-21 22:54:22 | <davean> | Also, if you think of it as "flattening" its one *very* specific notion of that at best. |
| 2020-10-21 22:54:48 | <crestfallen> | thanks that's helpful |
| 2020-10-21 22:54:50 | <davean> | Not saying you're entirely off base, but I think that conceptualization will lead you astray |
| 2020-10-21 22:55:22 | <davean> | crestfallen: so you've never seen how "do" desugars? |
| 2020-10-21 22:56:08 | <crestfallen> | davean I'm reviewing some stuff after a long and difficult absence from learning. not sure |
| 2020-10-21 22:56:48 | <crestfallen> | pretty straightforward, I guess? |
| 2020-10-21 22:56:52 | <davean> | EXTREMELY |
| 2020-10-21 22:56:57 | <davean> | crestfallen: you might want to look at the Haskell Report |
| 2020-10-21 22:57:05 | <davean> | it isn't very long and its very clear and covers all the sugar |
All times are in UTC.