Newest at the top
| 2025-12-02 12:05:38 +0100 | <kuribas> | :t alaf state traverse |
| 2025-12-02 11:51:48 +0100 | <lambdabot> | (Traversable t, Monad m') => (a -> s' -> m' (a', s')) -> t a -> s' -> m' (t a', s') |
| 2025-12-02 11:51:46 +0100 | <kuribas> | :t alaf StateT traverse |
| 2025-12-02 11:50:51 +0100 | Googulator56 | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |
| 2025-12-02 11:50:50 +0100 | Googulator26 | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-02 11:50:34 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2025-12-02 11:50:32 +0100 | <lambdabot> | k1} {a}. (Foldable t, Monoid (Ap g b)) => (a -> g b) -> t a -> g b |
| 2025-12-02 11:50:30 +0100 | <kuribas> | :t alaf Ap foldMap |
| 2025-12-02 11:49:51 +0100 | <lambdabot> | (Functor f, Rewrapping s t) => (Unwrapped s -> s) -> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s) |
| 2025-12-02 11:49:49 +0100 | <kuribas> | :t ala |
| 2025-12-02 11:46:02 +0100 | tromp | (~textual@2001:1c00:3487:1b00:4073:6a24:b181:8b56) |
| 2025-12-02 11:45:47 +0100 | dhil | (~dhil@5.151.29.141) dhil |
| 2025-12-02 11:45:42 +0100 | <Leary> | Yes, `foldMap`. It sure doesn't sound like you need `traverse`. |
| 2025-12-02 11:44:25 +0100 | <kuribas> | foldmap? |
| 2025-12-02 11:42:46 +0100 | trickard_ | trickard |
| 2025-12-02 11:40:19 +0100 | haritz | (~hrtz@user/haritz) haritz |
| 2025-12-02 11:40:19 +0100 | haritz | (~hrtz@140.228.70.141) (Changing host) |
| 2025-12-02 11:40:19 +0100 | haritz | (~hrtz@140.228.70.141) |
| 2025-12-02 11:39:43 +0100 | tromp | (~textual@2001:1c00:3487:1b00:4073:6a24:b181:8b56) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-12-02 11:38:49 +0100 | <Leary> | Or flip the args and call it `forA`, even better. |
| 2025-12-02 11:38:39 +0100 | <Leary> | kuribas: How about `foldA :: (Foldable t, Applicative f, Monoid b) => (a -> f b) -> t a -> f b; foldA f = getAp . foldMap (Ap . f)`? `f` can be `State s`, `b` can be a list ... |
| 2025-12-02 11:37:35 +0100 | vgtw | (~vgtw@user/vgtw) vgtw |
| 2025-12-02 11:37:35 +0100 | comerijn | (~merijn@77.242.116.146) (Ping timeout: 240 seconds) |
| 2025-12-02 11:37:15 +0100 | vgtw | (~vgtw@user/vgtw) (Ping timeout: 240 seconds) |
| 2025-12-02 11:32:23 +0100 | <tomsmeding> | oh |
| 2025-12-02 11:32:15 +0100 | <kuribas> | I forgot a colon. |
| 2025-12-02 11:32:04 +0100 | <tomsmeding> | then what's github's syntax highlighter up about |
| 2025-12-02 11:31:51 +0100 | <tomsmeding> | oh right |
| 2025-12-02 11:31:42 +0100 | <tomsmeding> | is it? |
| 2025-12-02 11:31:38 +0100 | <kuribas> | elif is valid python |
| 2025-12-02 11:31:31 +0100 | <tomsmeding> | (= instead of ==, elif instead of else if) |
| 2025-12-02 11:31:18 +0100 | <kuribas> | actually I have |
| 2025-12-02 11:31:05 +0100 | <tomsmeding> | although the 'break' may be tricky |
| 2025-12-02 11:30:56 +0100 | <tomsmeding> | I see you haven't been programming python recently with the syntax errors, but otherwise yes :p |
| 2025-12-02 11:30:24 +0100 | vgtw | (~vgtw@user/vgtw) vgtw |
| 2025-12-02 11:29:42 +0100 | <kuribas> | python would be something like this: https://gist.github.com/kuribas/bfeb96b35699d6a4f64b50f4732d62b9 |
| 2025-12-02 11:27:22 +0100 | vgtw | (~vgtw@user/vgtw) (Ping timeout: 246 seconds) |
| 2025-12-02 11:26:06 +0100 | <tomsmeding> | I don't think it's Haskell :p |
| 2025-12-02 11:25:59 +0100 | <tomsmeding> | my knowledge of funny programming languages is not large enough to be able to point to which one, but I feel like there's a language where this would be the "neat" solution |
| 2025-12-02 11:25:35 +0100 | <kuribas> | I just feel like all of this is more complicated than equivalent python. |
| 2025-12-02 11:25:15 +0100 | <kuribas> | yes |
| 2025-12-02 11:24:45 +0100 | <tomsmeding> | and 'send out' the aliases to the coroutine via a channel? |
| 2025-12-02 11:24:43 +0100 | acidjnk | (~acidjnk@p200300d6e71719443da791614ae70cbb.dip0.t-ipconnect.de) acidjnk |
| 2025-12-02 11:24:34 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 246 seconds) |
| 2025-12-02 11:24:19 +0100 | <kuribas> | Another interesting solution would be to use coroutines, and have one routine for generating the tables aliases. |
| 2025-12-02 11:22:45 +0100 | <tomsmeding> | anyway this is a function that I needed at some point and couldn't find in the standard libraries |
| 2025-12-02 11:22:21 +0100 | <tomsmeding> | the state is already there, lol |
| 2025-12-02 11:22:13 +0100 | <tomsmeding> | uh, no, don't instantiate m to State |
| 2025-12-02 11:21:00 +0100 | vgtw | (~vgtw@user/vgtw) vgtw |
| 2025-12-02 11:20:47 +0100 | Googulator26 | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |