Logs: liberachat/#haskell
| 2026-01-08 16:59:29 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-08 17:00:46 | × | trickard quits (~trickard@cpe-50-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-01-08 17:01:00 | → | trickard_ joins (~trickard@cpe-50-98-47-163.wireline.com.au) |
| 2026-01-08 17:03:40 | × | Enrico63 quits (~Enrico63@host-95-251-99-143.retail.telecomitalia.it) (Quit: Client closed) |
| 2026-01-08 17:03:57 | → | Enrico63 joins (~Enrico63@host-95-251-99-143.retail.telecomitalia.it) |
| 2026-01-08 17:13:06 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2026-01-08 17:13:15 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 2026-01-08 17:16:09 | × | m_a_r_k quits (~m_a_r_k@archlinux/support/mark) (Remote host closed the connection) |
| 2026-01-08 17:26:21 | → | m_a_r_k joins (~m_a_r_k@archlinux/support/mark) |
| 2026-01-08 17:33:14 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Remote host closed the connection) |
| 2026-01-08 17:35:26 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2026-01-08 17:37:48 | × | tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection) |
| 2026-01-08 17:38:06 | → | tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
| 2026-01-08 17:38:22 | × | Googulator46 quits (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) (Quit: Client closed) |
| 2026-01-08 17:38:41 | → | Googulator46 joins (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) |
| 2026-01-08 17:40:08 | → | comerijn joins (~merijn@77.242.116.146) |
| 2026-01-08 17:40:09 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Read error: Connection reset by peer) |
| 2026-01-08 17:42:44 | × | itaipu quits (~itaipu@168.121.99.54) (Read error: Connection timed out) |
| 2026-01-08 17:48:05 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 2026-01-08 17:48:48 | → | gmg joins (~user@user/gehmehgeh) |
| 2026-01-08 17:51:51 | × | Enrico63 quits (~Enrico63@host-95-251-99-143.retail.telecomitalia.it) (Ping timeout: 272 seconds) |
| 2026-01-08 17:53:22 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2026-01-08 18:00:46 | → | itaipu joins (~itaipu@168.121.99.54) |
| 2026-01-08 18:03:09 | → | Enrico63 joins (~Enrico63@host-95-251-99-143.retail.telecomitalia.it) |
| 2026-01-08 18:03:56 | → | danz94513 joins (~danza@user/danza) |
| 2026-01-08 18:04:27 | × | newmind quits (~newmind@91-133-90-252.dyn.cablelink.at) (Quit: Client closed) |
| 2026-01-08 18:05:03 | × | danza quits (~danza@user/danza) (Read error: Connection reset by peer) |
| 2026-01-08 18:09:53 | → | Square3 joins (~Square@user/square) |
| 2026-01-08 18:12:39 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org )) |
| 2026-01-08 18:15:49 | → | Googulator82 joins (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) |
| 2026-01-08 18:17:50 | × | Googulator46 quits (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) (Quit: Client closed) |
| 2026-01-08 18:18:01 | × | tromp quits (~textual@2001:1c00:3487:1b00:a460:d351:8685:d1f0) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-01-08 18:19:13 | × | mulk quits (~mulk@pd95143a6.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 2026-01-08 18:19:20 | → | Milan_Vanca joins (~milan@user/Milan-Vanca:32634) |
| 2026-01-08 18:20:10 | → | mulk joins (~mulk@pd95143a6.dip0.t-ipconnect.de) |
| 2026-01-08 18:25:52 | → | newmind joins (~newmind@91-133-90-252.dyn.cablelink.at) |
| 2026-01-08 18:27:24 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 2026-01-08 18:28:53 | → | euphores joins (~SASL_euph@user/euphores) |
| 2026-01-08 18:29:08 | → | tromp joins (~textual@2001:1c00:3487:1b00:a460:d351:8685:d1f0) |
| 2026-01-08 18:37:13 | × | itaipu quits (~itaipu@168.121.99.54) (Ping timeout: 264 seconds) |
| 2026-01-08 18:40:36 | × | synchromesh quits (~john@2406:5a00:2412:2c00:d907:3b01:3c28:cb58) (Read error: Connection reset by peer) |
| 2026-01-08 18:40:51 | × | Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection) |
| 2026-01-08 18:41:06 | → | Leary joins (~Leary@user/Leary/x-0910699) |
| 2026-01-08 18:41:41 | → | synchromesh joins (~john@2406:5a00:2412:2c00:d907:3b01:3c28:cb58) |
| 2026-01-08 18:45:10 | × | Everything quits (~Everythin@172-232-54-192.ip.linodeusercontent.com) (Quit: leaving) |
| 2026-01-08 18:56:14 | × | tromp quits (~textual@2001:1c00:3487:1b00:a460:d351:8685:d1f0) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-01-08 18:57:28 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 2026-01-08 18:59:39 | → | itaipu joins (~itaipu@168.121.99.54) |
| 2026-01-08 19:02:54 | → | tromp joins (~textual@2001:1c00:3487:1b00:a460:d351:8685:d1f0) |
| 2026-01-08 19:03:47 | trickard_ | is now known as trickard |
| 2026-01-08 19:03:49 | → | peterbecich joins (~Thunderbi@71.84.33.135) |
| 2026-01-08 19:05:36 | → | bggd joins (~bgg@user/bggd) |
| 2026-01-08 19:06:49 | × | shr\ke quits (~shrike@user/shrke:31298) (Remote host closed the connection) |
| 2026-01-08 19:17:15 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 240 seconds) |
| 2026-01-08 19:20:04 | × | jreicher quits (~joelr@user/jreicher) (Quit: In transit) |
| 2026-01-08 19:24:34 | × | Googulator82 quits (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) (Quit: Client closed) |
| 2026-01-08 19:24:50 | → | Googulator82 joins (~Googulato@2a01-036d-0106-4994-68db-cf64-05de-a70a.pool6.digikabel.hu) |
| 2026-01-08 19:31:30 | → | Guest94 joins (~Guest94@2402:a00:402:648b:9145:dcf0:d0e8:6860) |
| 2026-01-08 19:32:23 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 2026-01-08 19:37:43 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 2026-01-08 19:37:53 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 2026-01-08 19:39:13 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2026-01-08 19:40:59 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-08 19:43:07 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 256 seconds) |
| 2026-01-08 19:43:35 | × | comerijn quits (~merijn@77.242.116.146) (Ping timeout: 240 seconds) |
| 2026-01-08 19:46:17 | → | Guest63 joins (~Guest22@ip-005-147-245-066.um06.pools.vodafone-ip.de) |
| 2026-01-08 19:50:30 | × | Guest63 quits (~Guest22@ip-005-147-245-066.um06.pools.vodafone-ip.de) (Client Quit) |
| 2026-01-08 19:52:22 | → | comerijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-08 19:53:13 | <tomsmeding> | Everyone knows how foldl should never be used and you should use foldl' instead. Few people know that mapAccumL has _exactly_ the same issue, and there is no mapAccumL' in base |
| 2026-01-08 19:53:27 | × | newmind quits (~newmind@91-133-90-252.dyn.cablelink.at) (Ping timeout: 272 seconds) |
| 2026-01-08 19:54:22 | × | Guest94 quits (~Guest94@2402:a00:402:648b:9145:dcf0:d0e8:6860) (Quit: Client closed) |
| 2026-01-08 19:54:50 | <larsivi> | fwiw, for a newbie coming from languages without use of weird little markers here and there, the little ' at the end there is not particularly easy to pick up :) |
| 2026-01-08 19:54:57 | <monochrom> | mapAccumL is kind of going out of style because you can use the State monad instead, and you have multiple strictness options there. |
| 2026-01-08 19:55:13 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-01-08 19:55:13 | × | itaipu quits (~itaipu@168.121.99.54) (Ping timeout: 264 seconds) |
| 2026-01-08 19:55:20 | <tomsmeding> | in fact, mapAccumL is defined in terms of traverse with a lazy state monad |
| 2026-01-08 19:56:10 | <tomsmeding> | monochrom: you could use a state monad, but you should be careful with moving away from plain list functions because you might miss out on fusion RULEs that can cost integer factors in performance |
| 2026-01-08 19:56:15 | <haskellbridge> | <sm> yikes.. I am using that |
| 2026-01-08 19:56:42 | <tomsmeding> | sm: if the list is not that long it's not that bad of a problem :) |
| 2026-01-08 19:56:48 | <monochrom> | Ah. |
| 2026-01-08 19:57:14 | <c_wraith> | yeah, mapAccumL is like the worst possible strictness behavior. |
| 2026-01-08 19:57:15 | <tomsmeding> | (my post was inspired by optimising an application that, indirectly, applies these list functions to lists millions of elements long) |
| 2026-01-08 19:57:23 | <larsivi> | Is there a list of all such things that are improved and shouldn't be used? Preferably with some explanations. |
| 2026-01-08 19:57:25 | <dolio> | > foldl (\_ e -> e) (error "last: empty list") [1,2,3] |
| 2026-01-08 19:57:26 | <lambdabot> | 3 |
| 2026-01-08 19:57:32 | <dolio> | > foldl' (\_ e -> e) (error "last: empty list") [1,2,3] |
| 2026-01-08 19:57:33 | <lambdabot> | *Exception: last: empty list |
| 2026-01-08 19:57:33 | <lambdabot> | CallStack (from HasCallStack): |
| 2026-01-08 19:57:33 | <lambdabot> | error, called at <interactive>:3:21 in interactive:Ghci1 |
| 2026-01-08 19:57:55 | <monochrom> | As usual, a stricter mapAccumL is always welcome, but as usual again, we all vote that someone else should do it. |
| 2026-01-08 19:58:00 | <tomsmeding> | dolio: ah nice, so that's the one counterexample :) |
| 2026-01-08 19:58:02 | <haskellbridge> | <sm> https://hackage-content.haskell.org/package/infinite-list-0.1.3/docs/Data-List-Infinite.html#v:mapAccumL-39- seems to be the strict version |
| 2026-01-08 19:58:28 | <c_wraith> | note that mapAccumL *does* have a way to sneak strictness in, and it's the worst possible way |
| 2026-01-08 19:58:58 | <c_wraith> | you link evaluation of the state to evaluation of the map result, and force each map result sequentially before examining the final state |
| 2026-01-08 19:59:14 | <Leary> | tomsmeding: The other countexample is on any traversable that isn't right-biased. |
| 2026-01-08 19:59:34 | <tomsmeding> | I'm interested in lists only in this case, but yes :p |
| 2026-01-08 19:59:34 | <monochrom> | Worst is a monad. pure :: a -> Worst a; join :: Worst (Worst a) -> Worst a. >:) |
| 2026-01-08 19:59:38 | <c_wraith> | reverse is an example of something where foldl vs foldl' just doesn't matter |
| 2026-01-08 20:00:09 | <dolio> | Yeah. It might make some microscopic difference, but not much. |
| 2026-01-08 20:00:27 | <c_wraith> | if it does, the optimizer should be working harder. :) |
All times are in UTC.