2025/12/02

Newest at the top

2025-12-02 10:59:26 +0100vgtw(~vgtw@user/vgtw) vgtw
2025-12-02 10:58:56 +0100 <kuribas> or easier : concat $ runState $ traverse (state $ \s -> [...]) l
2025-12-02 10:58:15 +0100vgtw(~vgtw@user/vgtw) (Ping timeout: 240 seconds)
2025-12-02 10:56:41 +0100 <kuribas> Maybe ListT done right: ListT (State s) a
2025-12-02 10:56:23 +0100 <kuribas> I can make a transformer, but "StateT [] s a" would not work, as it trows away state.
2025-12-02 10:55:43 +0100 <lambdabot> Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
2025-12-02 10:55:42 +0100 <kuribas> :t mapAccumL
2025-12-02 10:55:08 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) kuribas
2025-12-02 10:50:47 +0100Googulator22(~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed)
2025-12-02 10:50:47 +0100Googulator26(~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu)
2025-12-02 10:49:29 +0100vgtw(~vgtw@user/vgtw) vgtw
2025-12-02 10:39:14 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-02 10:38:08 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-12-02 10:36:49 +0100DetourNetworkUK(DetourNetw@user/DetourNetworkUK) DetourNetworkUK
2025-12-02 10:35:49 +0100DetourNetworkUK(DetourNetw@user/DetourNetworkUK) (Read error: Connection reset by peer)
2025-12-02 10:34:47 +0100 <sprout> Axman6: yah, that must be the same thing
2025-12-02 10:34:37 +0100 <Lycurgus> the type sig circle jerks being a prime epiphenomon of that
2025-12-02 10:34:22 +0100 <lucabtz> i ended up doing like this Rembane https://paste.tomsmeding.com/gp5xEGzv
2025-12-02 10:34:07 +0100 <dminuoso> chromoblob: Weechat.
2025-12-02 10:33:22 +0100 <Lycurgus> *quite practical
2025-12-02 10:33:11 +0100 <Lycurgus> hs is a wonderment in that it managed to become quite practically while going full on ivory tower dont give a damn if u think it's a ball breaker
2025-12-02 10:32:34 +0100kuribas(~user@2a02:1808:d1:d243:9821:bd8c:f208:7dc) (Ping timeout: 260 seconds)
2025-12-02 10:32:25 +0100 <lambdabot> Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
2025-12-02 10:32:23 +0100 <Axman6> :t mapAccumL
2025-12-02 10:32:20 +0100 <Axman6> that definitely sounds like mapAccumL to me ...
2025-12-02 10:32:09 +0100 <sprout> not everything has to be a monad
2025-12-02 10:32:02 +0100 <sprout> I just wrote a foldl_with_state in Egel
2025-12-02 10:29:10 +0100DetourNetworkUK(DetourNetw@user/DetourNetworkUK) DetourNetworkUK
2025-12-02 10:27:53 +0100 <kuribas> But she is doing clojure now.
2025-12-02 10:27:46 +0100 <kuribas> Funny, one of my colleages went to university in Glasgow, she never did haskell because it was to complicated...
2025-12-02 10:27:17 +0100 <Axman6> or mapAccumL/R
2025-12-02 10:26:54 +0100 <kuribas> Concretely, I want to generate some SQL query, but I need to generate aliases for tables, like alias1, alias2 (the state).
2025-12-02 10:26:10 +0100 <lambdabot> (b -> a -> b) -> b -> [a] -> [b]
2025-12-02 10:26:09 +0100 <Lycurgus> state u dont even think about hardly
2025-12-02 10:26:08 +0100 <kuribas> :t scanl
2025-12-02 10:25:55 +0100chele(~chele@user/chele) chele
2025-12-02 10:25:52 +0100 <kuribas> So I could: 1) use traverse on the list, using an inner state monad, then flatten. 2) make a list and state monad. 3) do an explicit tail recursive loop.
2025-12-02 10:25:39 +0100 <merijn> kuribas: That just sounds like scanl + flatten?
2025-12-02 10:25:37 +0100 <Lycurgus> easy state anywho
2025-12-02 10:25:23 +0100 <Lycurgus> wrong lang 4 state
2025-12-02 10:24:49 +0100 <kuribas> Funny how haskell makes easy things harder sometimes. I have a list of items, and I need to produce another list, but flatten it (so like a list monad). But I also want to have some state variable.
2025-12-02 10:23:39 +0100kuribas(~user@2a02:1808:d1:d243:9821:bd8c:f208:7dc) kuribas
2025-12-02 10:21:23 +0100Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-12-02 10:20:45 +0100Googulator22(~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu)
2025-12-02 10:20:43 +0100Googulator31(~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed)
2025-12-02 10:17:39 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-02 10:17:25 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-02 10:14:45 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-02 10:10:37 +0100 <chromoblob> dminuoso: mind sharing which IRC client you use? interesting
2025-12-02 10:10:02 +0100dhs(~dhs@user/dhscholb) ()