Logs: liberachat/#haskell
| 2025-11-10 21:14:43 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-10 21:25:40 | → | Googulator6 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 21:25:47 | × | Googulator5 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-10 21:27:49 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-10 21:32:11 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-11-10 21:33:59 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 2025-11-10 21:34:27 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 2025-11-10 21:36:16 | → | Googulator21 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 21:36:28 | × | Googulator6 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-10 21:37:18 | × | Googulator21 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Client Quit) |
| 2025-11-10 21:37:24 | → | Googulator13 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 21:40:06 | × | Googulator13 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Client Quit) |
| 2025-11-10 21:40:30 | → | Googulator13 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 21:43:26 | × | synchromesh quits (~john@2406:5a00:2412:2c00:c5a6:321c:259:76f2) (Read error: Connection reset by peer) |
| 2025-11-10 21:44:13 | → | synchromesh joins (~john@2406:5a00:2412:2c00:c5a6:321c:259:76f2) |
| 2025-11-10 21:50:48 | × | Googulator13 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-10 21:50:49 | → | Googulator73 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 21:51:24 | × | sprout quits (~sprout@84-80-106-227.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 2025-11-10 21:56:30 | × | Zemy quits (~Zemy@72.178.108.235) (Remote host closed the connection) |
| 2025-11-10 21:56:44 | → | Zemy joins (~Zemy@72.178.108.235) |
| 2025-11-10 21:56:53 | × | takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Remote host closed the connection) |
| 2025-11-10 21:57:52 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 2025-11-10 22:01:37 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 2025-11-10 22:01:52 | → | gorignak joins (~gorignak@user/gorignak) |
| 2025-11-10 22:02:48 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 2025-11-10 22:15:47 | → | Googulator21 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-10 22:15:50 | × | Googulator73 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-10 22:20:58 | × | gf3 quits (~gf3@user/gf3) (Ping timeout: 265 seconds) |
| 2025-11-10 22:27:07 | × | tromp quits (~textual@2001:1c00:3487:1b00:5862:9c78:2f27:3ade) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-10 22:27:24 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org )) |
| 2025-11-10 22:28:32 | → | gf3 joins (~gf3@user/gf3) |
| 2025-11-10 22:28:43 | × | acarrico quits (~acarrico@pppoe-209-99-223-51.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 2025-11-10 22:30:32 | → | mange joins (~mange@user/mange) |
| 2025-11-10 22:33:32 | × | machinedgod quits (~machinedg@d75-159-126-101.abhsia.telus.net) (Remote host closed the connection) |
| 2025-11-10 22:38:44 | × | divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer) |
| 2025-11-10 22:39:03 | → | divlamir joins (~divlamir@user/divlamir) |
| 2025-11-10 22:40:01 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-10 22:40:21 | → | machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net) |
| 2025-11-10 22:46:25 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-10 22:49:16 | × | Anarchos quits (~Anarchos@91-161-254-16.subs.proxad.net) (Quit: Vision[]: i've been blurred!) |
| 2025-11-10 22:49:53 | → | tromp joins (~textual@2001:1c00:3487:1b00:5862:9c78:2f27:3ade) |
| 2025-11-10 22:53:57 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2025-11-10 23:00:58 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 2025-11-10 23:01:04 | × | tromp quits (~textual@2001:1c00:3487:1b00:5862:9c78:2f27:3ade) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-10 23:01:25 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 240 seconds) |
| 2025-11-10 23:06:27 | × | bggd quits (~bgg@2a01:e0a:819:1510:285c:2d19:95b6:2c5) (Quit: std::move) |
| 2025-11-10 23:16:01 | → | anselmschueler joins (~Thunderbi@user/schuelermine) |
| 2025-11-10 23:18:37 | × | mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 244 seconds) |
| 2025-11-10 23:23:38 | × | shr\ke quits (~shrike@user/shrke:31298) (Remote host closed the connection) |
| 2025-11-10 23:29:31 | → | peterbecich joins (~Thunderbi@172.222.148.214) |
| 2025-11-10 23:31:14 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 2025-11-10 23:31:14 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 2025-11-10 23:31:46 | × | Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/) |
| 2025-11-10 23:31:47 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 2025-11-10 23:31:55 | → | gmg joins (~user@user/gehmehgeh) |
| 2025-11-10 23:32:28 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 2025-11-10 23:32:33 | → | Anarchos joins (~Anarchos@91-161-254-16.subs.proxad.net) |
| 2025-11-10 23:42:53 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 2025-11-10 23:50:11 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-10 23:55:13 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-10 23:55:25 | → | haltingsolver joins (~cmo@2604:3d09:207f:8000::d1dc) |
| 2025-11-10 23:57:53 | → | Square3 joins (~Square@user/square) |
| 2025-11-10 23:58:19 | × | malte quits (~malte@mal.tc) (Remote host closed the connection) |
| 2025-11-11 00:02:36 | × | Anarchos quits (~Anarchos@91-161-254-16.subs.proxad.net) (Quit: Vision[]: i've been blurred!) |
| 2025-11-11 00:03:36 | → | malte joins (~malte@mal.tc) |
| 2025-11-11 00:05:35 | × | anselmschueler quits (~Thunderbi@user/schuelermine) (Remote host closed the connection) |
| 2025-11-11 00:05:40 | → | Googulator30 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-11 00:05:44 | × | Googulator21 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-11 00:07:13 | × | hiredman quits (~hiredman@frontier1.downey.family) (Ping timeout: 264 seconds) |
| 2025-11-11 00:08:31 | → | hiredman joins (~hiredman@frontier1.downey.family) |
| 2025-11-11 00:08:49 | → | Sidney joins (~Sidney@2600:4040:2678:9600:b1c4:ced3:242d:1252) |
| 2025-11-11 00:10:07 | <Sidney> | Hi, I am trying to learn how to think in the Haskell way (I don't know the precise term), but I am having difficultly solving leetcode problem which require stateful operations such as problems which requires the two pointers technique. Is there pattern/mindset to solve inherently stateful problems elegantly and with good time complexity? I tried |
| 2025-11-11 00:10:07 | <Sidney> | recursion but I does not feel like the right tool. Thanks! |
| 2025-11-11 00:10:50 | → | Googulator9 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-11 00:11:16 | × | Googulator30 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-11 00:15:27 | <L29Ah> | Sidney: there's ST if you find you want to have a state for efficiency in your black-boxable algorithm |
| 2025-11-11 00:18:18 | → | sprout joins (~sprout@84-80-106-227.fixed.kpn.net) |
| 2025-11-11 00:29:25 | × | peterbecich quits (~Thunderbi@172.222.148.214) (Ping timeout: 240 seconds) |
| 2025-11-11 00:31:07 | → | comonad joins (~comonad@2003:d0:2741:a000:c693:4c09:e8b4:6dfd) |
| 2025-11-11 00:35:07 | <mange> | While Haskell has ST and the like, if you're trying to think "in the Haskell way" then you probably don't want to be using ST. |
| 2025-11-11 00:37:18 | × | ttybitnik quits (~ttybitnik@user/wolper) (Quit: Fading out...) |
| 2025-11-11 00:40:42 | × | Googulator9 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-11 00:40:47 | → | Googulator65 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-11 00:41:31 | <EvanR> | Sidney, if the algorithm specifically calls for something like an array of A and numerical indexes, you can pretty easily translate that to a Map Int A and some Ints |
| 2025-11-11 00:41:57 | <EvanR> | (or IntMap A) |
| 2025-11-11 00:43:04 | <EvanR> | for the stateful part, there are several ways to "keep the current state", whatever it is. E.g. pass the latest values to a recursive function which stands for the loop body |
| 2025-11-11 00:44:43 | <EvanR> | another way is to use a State monad, there are other ways |
| 2025-11-11 00:44:48 | × | gf3 quits (~gf3@user/gf3) (Ping timeout: 256 seconds) |
| 2025-11-11 00:47:40 | × | Tuplanolla quits (~Tuplanoll@91-159-187-167.elisa-laajakaista.fi) (Quit: Leaving.) |
| 2025-11-11 00:48:14 | → | gf3 joins (~gf3@user/gf3) |
| 2025-11-11 00:49:18 | <jreicher> | Sidney: what do you need stateful operations for? (Really this is just a polite way for met to ask, are you really really sure you need stateful operations? You might be wrong, and if you're wrong, it's easier to do things without them.) |
| 2025-11-11 00:52:27 | <mange> | In general I would say "the Haskell way" is to avoid state, and to think about functional transformations/reductions instead. Even if it's possible to write programs with state in Haskell, you're usually going against the grain of the language. |
| 2025-11-11 00:59:57 | <Sidney> | I agree, I don't want to use stateful operations. I'm missing something because I don't see an alternate. For example `move zeros` (https://leetcode.com/problems/move-zeroes/description/) requires constant space complexity and I don't how `two sum` (https://leetcode.com/problems/two-sum/description/) could be solved with less than O(N^2) time |
| 2025-11-11 00:59:58 | <Sidney> | complexity without a for loop and a hash table. |
| 2025-11-11 01:00:18 | × | jle` quits (~jle`@2603:8001:3b00:11:5098:4041:9bc7:9b0d) (Ping timeout: 244 seconds) |
| 2025-11-11 01:00:31 | × | Googulator65 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-11 01:00:39 | → | Googulator65 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) |
| 2025-11-11 01:00:47 | → | spew joins (~spew@user/spew) |
| 2025-11-11 01:01:30 | → | jle` joins (~jle`@2603:8001:3b00:11:c2d0:7f27:fab9:22ae) |
| 2025-11-11 01:04:29 | × | xff0x quits (~xff0x@2405:6580:b080:900:2473:b259:8788:143a) (Ping timeout: 260 seconds) |
All times are in UTC.