Newest at the top
| 2025-12-02 16:22:44 +0100 | <tomsmeding> | looks like <> |
| 2025-12-02 16:22:31 +0100 | <tomsmeding> | this thing? https://hackage.haskell.org/package/monad-chronicle-1.1/docs/Control-Monad-Chronicle.html#t:Chroni… |
| 2025-12-02 16:22:24 +0100 | <merijn> | something existed that was a better Writter beyond just strict :p |
| 2025-12-02 16:22:12 +0100 | <kuribas> | Hmm right, ListT cannot be used for coroutines. |
| 2025-12-02 16:22:04 +0100 | <merijn> | I was thinking something like Chronicle or seomthing? |
| 2025-12-02 16:22:02 +0100 | <tomsmeding> | (C.M.T.Writer.CPS is just a state monad) |
| 2025-12-02 16:21:39 +0100 | <tomsmeding> | if your <> is expensive, you're out of luck |
| 2025-12-02 16:21:29 +0100 | <tomsmeding> | it still can't do better than just using <> on your things |
| 2025-12-02 16:21:17 +0100 | <tomsmeding> | merijn: that's just for strictness, if you mean Control.Monad.Trans.Writer.CPS |
| 2025-12-02 16:21:05 +0100 | <merijn> | There was an optimised writer somewhere too |
| 2025-12-02 16:21:04 +0100 | <kuribas> | yeah |
| 2025-12-02 16:20:57 +0100 | <tomsmeding> | but DList or an Endo wrapper or something else can fix that |
| 2025-12-02 16:20:44 +0100 | <tomsmeding> | the problem with writer is that it just <>'s your lists, and probably in the wrong order, so you're going to get O(n^2) behaviour |
| 2025-12-02 16:20:06 +0100 | <tomsmeding> | or execWriterT (mapM_ _ input) [] |
| 2025-12-02 16:19:32 +0100 | <kuribas> | I suppose the mapAccumL is easier to understand. |
| 2025-12-02 16:19:32 +0100 | <tomsmeding> | meh it's not in base |
| 2025-12-02 16:19:14 +0100 | <lambdabot> | Suggested fix: |
| 2025-12-02 16:19:14 +0100 | <lambdabot> | Variable not in scope: concatMapM |
| 2025-12-02 16:19:14 +0100 | <lambdabot> | error: [GHC-88464] |
| 2025-12-02 16:19:12 +0100 | <tomsmeding> | :t concatMapM |
| 2025-12-02 16:18:59 +0100 | <tomsmeding> | it creates entirely the wrong intuition for what you're trying to do |
| 2025-12-02 16:18:45 +0100 | <tomsmeding> | please don't use ListT for this |
| 2025-12-02 16:18:37 +0100 | <tomsmeding> | okay I get it now |
| 2025-12-02 16:18:35 +0100 | <tomsmeding> | _right_ |
| 2025-12-02 16:18:28 +0100 | <tomsmeding> | oh but the `col <- input` does do the mapping |
| 2025-12-02 16:18:20 +0100 | <kuribas> | I mean, this is concatMap, with effects, no? |
| 2025-12-02 16:17:34 +0100 | <tomsmeding> | that's not what ListT does |
| 2025-12-02 16:17:31 +0100 | <tomsmeding> | that's what a writer monad does |
| 2025-12-02 16:17:27 +0100 | <tomsmeding> | isn't what you are trying to do, outputting lists of things at various points in the computation, and then at the end you want the concatenated list of all of those? |
| 2025-12-02 16:16:56 +0100 | <kuribas> | tomsmeding: That would mean another monad in the stack, no? |
| 2025-12-02 16:15:58 +0100 | <tomsmeding> | kuribas: are you sure you're not confusing ListT for a writer monad? |
| 2025-12-02 16:15:53 +0100 | <kuribas> | right, sorry... |
| 2025-12-02 16:15:10 +0100 | <kuribas> | hmm, missing a "lift". |
| 2025-12-02 16:15:09 +0100 | <tomsmeding> | and where fromList is toList? |
| 2025-12-02 16:14:36 +0100 | <kuribas> | ah input should be "fromFoldable input" |
| 2025-12-02 16:14:07 +0100 | <kuribas> | tomsmeding: fromFoldable and fromList |
| 2025-12-02 16:13:24 +0100 | <tomsmeding> | oh |
| 2025-12-02 16:13:18 +0100 | <tomsmeding> | kuribas: I don't see any ListT? |
| 2025-12-02 16:10:36 +0100 | <kuribas> | tomsmeding: the ListT version would look something like this (untested) https://gist.github.com/kuribas/bfeb96b35699d6a4f64b50f4732d62b9 |
| 2025-12-02 16:09:31 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
| 2025-12-02 16:00:59 +0100 | tt123160 | (~tt1231@2603:6010:8700:4a81:a4f6:acff:fe95:3803) tt1231 |
| 2025-12-02 15:54:31 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 255 seconds) |
| 2025-12-02 15:53:19 +0100 | <kuribas> | I mean I can use this over ListT or Streamly |
| 2025-12-02 15:52:11 +0100 | <merijn> | Generally you'd use `ResourceT IO` or similar as base for conduit |
| 2025-12-02 15:50:43 +0100 | <kuribas> | merijn: So I can just use this over IO or ST ? |
| 2025-12-02 15:49:52 +0100 | <merijn> | (for exception handling) |
| 2025-12-02 15:49:45 +0100 | <merijn> | kuribas: conduit just assumes you use ResourceT |
| 2025-12-02 15:47:26 +0100 | <kuribas> | There is something true about haskell making hard things easy, and easy things hard. |
| 2025-12-02 15:43:07 +0100 | Googulator13 | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-02 15:40:33 +0100 | merijn | (~merijn@77.242.116.146) merijn |