Newest at the top
2024-12-27 18:11:34 +0100 | jathan | (~jathan@69.61.93.38) jathan |
2024-12-27 18:11:19 +0100 | jathan | (~jathan@69.61.93.38) (Quit: WeeChat 2.3) |
2024-12-27 18:11:16 +0100 | <kuribas> | Guess I am missing the relevant backlog? |
2024-12-27 18:10:04 +0100 | <haskellbridge> | <hellwolf> no, it's simply not the way you should use State Monad. I don't find the type synonym of reader monad problematic, so far. |
2024-12-27 18:09:18 +0100 | <kuribas> | There is no need for it, if you want it, better use Reader. |
2024-12-27 18:08:58 +0100 | <kuribas> | Which should be abolished IMO. |
2024-12-27 18:08:51 +0100 | <kuribas> | I bet if you get obscure behaviour, it's because of the (->) r monad. |
2024-12-27 18:08:17 +0100 | <kuribas> | well, replicateM better. |
2024-12-27 18:08:08 +0100 | <kuribas> | oh, you want sequence . map... |
2024-12-27 18:07:29 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
2024-12-27 18:03:44 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
2024-12-27 18:00:09 +0100 | <lambdabot> | Expected type: State s (t a) |
2024-12-27 18:00:09 +0100 | <lambdabot> | • Couldn't match type ‘[]’ with ‘StateT s Identity’ |
2024-12-27 18:00:09 +0100 | <lambdabot> | error: |
2024-12-27 18:00:07 +0100 | <kuribas> | > runState $ sequence (traverse (\x -> state $ \y -> (x + y, x + y)) [1, 2, 3]) |
2024-12-27 17:59:53 +0100 | <lambdabot> | (Traversable t, MonadState a t, Num a) => [t a] |
2024-12-27 17:59:43 +0100 | <kuribas> | :t sequence (traverse (\x -> state $ \y -> (x + y, x + y)) [1, 2, 3]) |
2024-12-27 17:59:42 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-27 17:58:14 +0100 | <kuribas> | What's *wrong* about sequence . traverse ? |
2024-12-27 17:58:02 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2024-12-27 17:57:25 +0100 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2024-12-27 17:55:06 +0100 | litharge | -bo *!*@sgyl-37-b2-v4wan-168528-cust2421.vm6.cable.virginm.net litharge |
2024-12-27 17:55:05 +0100 | ChanServ | +o litharge |
2024-12-27 17:51:01 +0100 | sayurc | (~sayurc@169.150.203.34) (Ping timeout: 252 seconds) |
2024-12-27 17:48:00 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/qbFUoFrAFuCPVSQFnYhWTBqZ/WEGsG3OErzA (3 lines) |
2024-12-27 17:48:00 +0100 | <haskellbridge> | <hellwolf> sequence . mapM state monads is wrong. |
2024-12-27 17:47:38 +0100 | euleritian | (~euleritia@dynamic-176-006-128-055.176.6.pool.telefonica.de) (Ping timeout: 272 seconds) |
2024-12-27 17:47:20 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-12-27 17:46:43 +0100 | sawilagar | (~sawilagar@user/sawilagar) sawilagar |
2024-12-27 17:46:24 +0100 | sawilagar_ | (~sawilagar@user/sawilagar) (Quit: Leaving) |
2024-12-27 17:42:38 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-27 17:40:23 +0100 | <kuribas> | haskellbridge: what was the mistake? |
2024-12-27 17:40:04 +0100 | <kuribas> | (-> r a) |
2024-12-27 17:39:50 +0100 | <kuribas> | For example, the newtype-less reader Monad should not exist IMO. |
2024-12-27 17:39:33 +0100 | <geekosaur> | Agda or Idris2 would get you closer, but still not there |
2024-12-27 17:39:18 +0100 | <kuribas> | I find "unintended behaviour" is often a result of too much Polymorphism. |
2024-12-27 17:38:36 +0100 | <haskellbridge> | <hellwolf> I agree. It only makes me think how it is possible to make such a mistake unrepresentable, without bringing all the bazookas in. |
2024-12-27 17:36:59 +0100 | tv | (~tv@user/tv) (Read error: Connection reset by peer) |
2024-12-27 17:36:42 +0100 | <kuribas> | I don't have this experience with Python, even if I write the code and use types etc... |
2024-12-27 17:36:00 +0100 | <kuribas> | Still, haskell is my favourite for expressing intent. |
2024-12-27 17:35:19 +0100 | <geekosaur> | despite the meme, Haskell has never really been "if it compiles, it works", and I think that state of affairs is impossible. No programming language can ensure that a program acts according to an unstated intent |
2024-12-27 17:35:16 +0100 | <kuribas> | Why silly? |
2024-12-27 17:34:28 +0100 | <haskellbridge> | <hellwolf> the gist is currently you can do silly things with State monad with mapM, sequence, etc. |
2024-12-27 17:34:20 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 244 seconds) |
2024-12-27 17:34:16 +0100 | prasad | (~Thunderbi@c-73-75-25-251.hsd1.in.comcast.net) |
2024-12-27 17:31:17 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
2024-12-27 17:27:33 +0100 | <haskellbridge> | <hellwolf> not very haskellisk experience |
2024-12-27 17:27:28 +0100 | haver | (~Enviosity@2.219.56.221) |
2024-12-27 17:27:00 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-27 17:26:51 +0100 | <haskellbridge> | <hellwolf> no errors. compiled, but with unintended behaviour |