2026/02/25

2026-02-25 00:00:02 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 00:04:20 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 00:07:49 +0100 <lantti> mine was https://privatebin.net/?97447d6805a0ea49#CfnZntNYLfYtSvpCod6DSKRYS8xDhzqycvhjmKNhppjv
2026-02-25 00:07:59 +0100 <haskellbridge> <ijouw> My solution fails locally at readLn? I am confused.
2026-02-25 00:10:11 +0100emmanuelux(~em@user/emmanuelux) emmanuelux
2026-02-25 00:10:36 +0100 <haskellbridge> <ijouw> I was using a library which wraps reads with Maybe and forgot to adjust the type...
2026-02-25 00:10:50 +0100 <haskellbridge> <ijouw> When removing it so i can submit with fewer deps
2026-02-25 00:15:24 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 00:19:15 +0100 <mauke> lantti: I suggest changing "otherwise" to "print" for even more confusion
2026-02-25 00:19:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 00:20:59 +0100snek(sid280155@id-280155.lymington.irccloud.com) (Server closed connection)
2026-02-25 00:21:11 +0100snek(sid280155@id-280155.lymington.irccloud.com) snek
2026-02-25 00:21:44 +0100 <lantti> mauke: is it not meant to be used like that? is it only for gurads then?
2026-02-25 00:22:21 +0100 <lantti> guards, even
2026-02-25 00:23:39 +0100saolsen(sid26430@id-26430.lymington.irccloud.com) (Server closed connection)
2026-02-25 00:23:50 +0100saolsen(sid26430@id-26430.lymington.irccloud.com) saolsen
2026-02-25 00:25:00 +0100 <lantti> but looking at my code now I do admit that there are some decisions that only make sense if you consider that they were the smallest change to the previous version, like the decision to include the lengths of the sets in the same list as the sets themselves
2026-02-25 00:25:38 +0100 <lantti> (the previous version used length on the generated lists)
2026-02-25 00:26:53 +0100 <lantti> (and the term "step squad" comes from the BBC childrens series called Numberblocks)
2026-02-25 00:29:25 +0100 <lantti> (which I can recommend to anyone with children in the 1-3 primary school or earlier)
2026-02-25 00:30:47 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 00:32:16 +0100 <lantti> should I use _ -> as the catch all case then? I'm not working with haskell all that much as one may notice
2026-02-25 00:33:05 +0100Comstar(~Comstar@user/Comstar) Comstar
2026-02-25 00:33:39 +0100acidsys(~crameleon@openSUSE/member/crameleon) (Server closed connection)
2026-02-25 00:33:54 +0100acidsys(~crameleon@openSUSE/member/crameleon) crameleon
2026-02-25 00:34:09 +0100emmanuelux(~em@user/emmanuelux) (Quit: bye)
2026-02-25 00:35:05 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-02-25 00:36:05 +0100 <int-e> mauke: Yeah that looks like the best solution. Kind of sad; the simple greedy algorithm for the knapsack problem would work here.
2026-02-25 00:36:15 +0100emmanuelux(~em@user/emmanuelux) emmanuelux
2026-02-25 00:37:02 +0100 <int-e> (but then you'd have to accumulate a full result before printing anything)
2026-02-25 00:38:57 +0100chenjf(~chenjf@68.64.178.54)
2026-02-25 00:39:39 +0100tamer(~tamer@user/tamer) (Server closed connection)
2026-02-25 00:40:00 +0100tamer(~tamer@5.2.74.82)
2026-02-25 00:40:59 +0100bjs(sid190364@user/bjs) (Server closed connection)
2026-02-25 00:41:15 +0100bjs(sid190364@user/bjs) bjs
2026-02-25 00:44:58 +0100 <Comstar> I can't think of a way to implement breadth-first searches (for the sake of discussion assume for a binary tree) that doesn't use a `Control.Monad.State` implementation
2026-02-25 00:45:29 +0100 <Comstar> do y'all know of a more pure approach? I guess I could do like, some folding magic
2026-02-25 00:45:49 +0100 <Comstar> I feel like I could probably find some neat code examples searching around github &al
2026-02-25 00:46:11 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 00:46:25 +0100chenjf(~chenjf@68.64.178.54) (Quit: WeeChat 4.8.1)
2026-02-25 00:47:13 +0100 <int-e> Comstar: If you have a state S and function branch :: S -> [S] then the list monad's bind (aka concatMap) can produce the next level of a tree from the previous one. (This gets a bit awkward if you also want to record history, but you can make that part of S)
2026-02-25 00:47:36 +0100 <Comstar> yeah that makes sense
2026-02-25 00:47:54 +0100 <int-e> "history" being the path through the underlying tree
2026-02-25 00:48:15 +0100 <Leary> Comstar: There was a haskell challenge for this a while back. This was my solution: https://gist.github.com/LSLeary/5083d1dfe403d1562e7778713d97b22a
2026-02-25 00:49:31 +0100 <int-e> Leary: that task is related but abuses Foldable on an infinite tree that you already have as a value.
2026-02-25 00:50:18 +0100 <int-e> (and it's an abuse because that Semigroup instance isn't lawful)
2026-02-25 00:50:40 +0100 <Comstar> Leary, oh wow line 25 in `Search.hs` is really interesting, I didn't know you could do `\case` like that, does that trick have a name?
2026-02-25 00:50:51 +0100 <Comstar> oh it's prob the LambdaCase language extension
2026-02-25 00:50:56 +0100 <int-e> it is
2026-02-25 00:50:56 +0100 <Leary> int-e: Do we not have a (foldable) binary tree to search? And yes, I agree, but specialising the code to a binary tree means we can kill the evil.
2026-02-25 00:50:57 +0100 <Comstar> that'll be fun to explore
2026-02-25 00:51:32 +0100 <int-e> Leary: I don't know whether we have one. My main point was that it's abuse.
2026-02-25 00:51:56 +0100earthy(~arthurvl@2a02-a469-f5e2-1-83d2-ca43-57a2-dc81.fixed6.kpn.net) (Ping timeout: 268 seconds)
2026-02-25 00:53:06 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-25 00:53:16 +0100peterbecich(~Thunderbi@71.84.33.135) peterbecich
2026-02-25 00:53:22 +0100 <lantti> mauke: oh, now i see. so the "otherwise" only worked because any identifier would have worked there
2026-02-25 00:53:41 +0100 <int-e> I've implemented quite a few breadth first searches in Haskell and I've never materialized the tree; only levels (usually as lists because it's convenient, or as sets because I expected a significant number of transpositions.)
2026-02-25 01:04:13 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 01:04:16 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Ping timeout: 268 seconds)
2026-02-25 01:05:12 +0100Tuplanolla(~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) Tuplanolla
2026-02-25 01:05:55 +0100 <Comstar> what's materializing the tree mean?
2026-02-25 01:07:54 +0100 <int-e> I mean constructing a (potentially infinite) value of type `Tree S` where `data Tree s = Node s [Tree s]` from a root :: S and a branching function as above.
2026-02-25 01:08:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 01:11:08 +0100 <EvanR> lantti, going through String is probably not great, and then i/o on the Char is doing unicode stuff, and ...
2026-02-25 01:11:43 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-02-25 01:16:27 +0100peterbecich(~Thunderbi@71.84.33.135) (Ping timeout: 246 seconds)
2026-02-25 01:19:04 +0100 <Comstar> int-e, heard, thanks!
2026-02-25 01:19:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 01:20:33 +0100 <EvanR> materialize = have the normal form all in memory ?
2026-02-25 01:20:57 +0100 <int-e> EvanR: well, no; laziness will still be a factor.
2026-02-25 01:22:11 +0100 <int-e> EvanR: But yes, I may be abusing terminology a bit here.
2026-02-25 01:23:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 01:26:39 +0100 <int-e> EvanR: The main reason I think of it that way is that it becomes harder to ensure that you expand exactly the parts of the tree that you need and you also release them to the garbage collector once you're done with them.
2026-02-25 01:29:43 +0100robobub(uid248673@id-248673.uxbridge.irccloud.com) robobub
2026-02-25 01:34:42 +0100 <EvanR> yes constructing an infinite value seems kind of vague operationally, so agree that makes it hard to predict the memory usage pattern
2026-02-25 01:34:58 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 01:39:20 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 01:39:39 +0100tritlo(sid58727@id-58727.hampstead.irccloud.com) (Server closed connection)
2026-02-25 01:39:50 +0100tritlo(sid58727@id-58727.hampstead.irccloud.com)
2026-02-25 01:40:59 +0100lally(sid388228@id-388228.uxbridge.irccloud.com) (Server closed connection)
2026-02-25 01:41:14 +0100lally(sid388228@id-388228.uxbridge.irccloud.com) lally
2026-02-25 01:46:17 +0100xff0x(~xff0x@ai083101.d.east.v6connect.net) (Ping timeout: 265 seconds)
2026-02-25 01:50:21 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 01:55:03 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
2026-02-25 02:05:43 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 02:10:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 02:21:05 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 02:24:27 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2026-02-25 02:27:49 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 02:39:06 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 02:40:15 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2026-02-25 02:43:30 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 02:43:57 +0100Tuplanolla(~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) (Ping timeout: 246 seconds)
2026-02-25 02:52:44 +0100wickedjargon(~user@2605:8d80:5430:8458:d04:837d:bf6b:e6b3) wickedjargon
2026-02-25 02:54:28 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 02:56:23 +0100Vizious(~bes@user/Vizious) (Quit: WeeChat 4.8.1)
2026-02-25 02:58:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 02:59:57 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 03:01:23 +0100uli-fem(~uli-fem@118.210.1.123) (Changing host)
2026-02-25 03:01:23 +0100uli-fem(~uli-fem@user/uli-fem) uli-fem
2026-02-25 03:01:31 +0100uli-femulipink
2026-02-25 03:01:32 +0100rainbyte_(~rainbyte@186.22.19.214) (Quit: rainbyte_)
2026-02-25 03:08:08 +0100Googulator(~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu) (Quit: Client closed)
2026-02-25 03:08:24 +0100Googulator(~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu)
2026-02-25 03:09:50 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 03:14:03 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 03:25:12 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 03:29:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 03:33:39 +0100mstruebing(~mstruebin@ns343649.ip-188-165-193.eu) (Server closed connection)
2026-02-25 03:33:47 +0100mstruebing(~mstruebin@ns343649.ip-188-165-193.eu)
2026-02-25 03:40:33 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 03:42:59 +0100chiselfuse(~chiselfus@user/chiselfuse) (Server closed connection)
2026-02-25 03:43:13 +0100abiss27(~abiss27@user/abiss) ()
2026-02-25 03:43:33 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2026-02-25 03:44:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 03:45:34 +0100philopsos1(~caecilius@user/philopsos) philopsos
2026-02-25 03:48:03 +0100robobub(uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2026-02-25 03:51:11 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 03:55:56 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 03:56:07 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 264 seconds)
2026-02-25 03:57:49 +0100xff0x(~xff0x@2405:6580:b080:900:a3f9:c0ee:35e6:d3d1)
2026-02-25 04:02:33 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-02-25 04:02:36 +0100zfnmxt(~m-gkkevi@209.209.10.107)
2026-02-25 04:04:59 +0100jakzale(6291399afa@user/jakzale) (Server closed connection)
2026-02-25 04:05:06 +0100jakzale(6291399afa@user/jakzale) jakzale
2026-02-25 04:13:19 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 04:14:24 +0100Fischmiep(~Fischmiep@user/Fischmiep) (Ping timeout: 255 seconds)
2026-02-25 04:18:03 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-02-25 04:25:56 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 04:28:40 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 04:33:32 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-25 04:35:41 +0100rekahsoft(~rekahsoft@bras-base-orllon1103w-grc-20-76-67-111-168.dsl.bell.ca) (Remote host closed the connection)
2026-02-25 04:39:39 +0100pmk(6afe4476a1@2a03:6000:1812:100::26d) (Server closed connection)
2026-02-25 04:39:47 +0100pmk(6afe4476a1@2a03:6000:1812:100::26d) pmk
2026-02-25 04:41:50 +0100machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 245 seconds)
2026-02-25 04:44:00 +0100Square2(~Square4@user/square) Square
2026-02-25 04:44:04 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 04:47:08 +0100philopsos1(~caecilius@user/philopsos) (Ping timeout: 256 seconds)
2026-02-25 04:49:07 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)
2026-02-25 04:51:50 +0100arandombit(~arandombi@2a02:2455:8656:7100:d189:bf2e:3659:938e)
2026-02-25 04:51:50 +0100arandombit(~arandombi@2a02:2455:8656:7100:d189:bf2e:3659:938e) (Changing host)
2026-02-25 04:51:50 +0100arandombit(~arandombi@user/arandombit) arandombit
2026-02-25 04:58:00 +0100wickedjargon(~user@2605:8d80:5430:8458:d04:837d:bf6b:e6b3) (Ping timeout: 246 seconds)
2026-02-25 04:59:27 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 05:03:57 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 05:10:10 +0100arandombit(~arandombi@user/arandombit) (Ping timeout: 245 seconds)
2026-02-25 05:10:18 +0100weary-traveler(~user@user/user363627) user363627
2026-02-25 05:12:59 +0100ymherklotz(cb2c9cfbdd@2a03:6000:1812:100::29a) (Server closed connection)
2026-02-25 05:13:06 +0100ymherklotz(cb2c9cfbdd@2a03:6000:1812:100::29a) ymherklotz
2026-02-25 05:14:47 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 05:15:39 +0100akspecs(00cc8321af@sourcehut/user/akspecs) (Server closed connection)
2026-02-25 05:15:49 +0100akspecs(00cc8321af@sourcehut/user/akspecs) akspecs
2026-02-25 05:19:26 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-02-25 05:22:15 +0100ulipink(~uli-fem@user/uli-fem) (Ping timeout: 245 seconds)
2026-02-25 05:30:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 05:34:59 +0100rprospero(eadde01e73@user/rprospero) (Server closed connection)
2026-02-25 05:35:07 +0100rprospero(eadde01e73@user/rprospero) rprospero
2026-02-25 05:35:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 05:36:59 +0100chaitlatte0(ea29c0bb16@user/chaitlatte0) (Server closed connection)
2026-02-25 05:37:08 +0100chaitlatte0(ea29c0bb16@user/chaitlatte0) chaitlatte0
2026-02-25 05:38:07 +0100emaczen(~user@user/emaczen) (Ping timeout: 264 seconds)
2026-02-25 05:43:30 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 05:46:13 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 05:49:30 +0100earthy(~arthurvl@2a02-a469-f5e2-1-83d2-ca43-57a2-dc81.fixed6.kpn.net) earthy
2026-02-25 05:50:23 +0100wickedjargon(~user@2605:8d80:5431:2a54:ed64:7112:3bc:303c) wickedjargon
2026-02-25 05:50:35 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 06:01:35 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 06:05:06 +0100jmcantrell(~weechat@user/jmcantrell) (Ping timeout: 255 seconds)
2026-02-25 06:05:54 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 06:07:39 +0100wickedjargon(~user@2605:8d80:5431:2a54:ed64:7112:3bc:303c) (Ping timeout: 246 seconds)
2026-02-25 06:14:20 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 06:17:40 +0100Square2(~Square4@user/square) (Ping timeout: 245 seconds)
2026-02-25 06:18:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 06:22:19 +0100RalphStalfos(~kvirc@164.sub-174-251-240.myvzw.com)
2026-02-25 06:28:19 +0100RalphStalfos(~kvirc@164.sub-174-251-240.myvzw.com) (Quit: Changing server...)
2026-02-25 06:29:42 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 06:30:59 +0100ajrdck(e0a4b72d53@user/ajrdck) (Server closed connection)
2026-02-25 06:31:08 +0100ajrdck(e0a4b72d53@user/ajrdck) ajrdck
2026-02-25 06:33:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 06:34:19 +0100slondr(cf9f9e8f44@2a03:6000:1812:100::10b6) (Server closed connection)
2026-02-25 06:34:27 +0100slondr(cf9f9e8f44@2a03:6000:1812:100::10b6) slondr
2026-02-25 06:36:26 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac)
2026-02-25 06:37:46 +0100sefidel(~sefidel@user/sefidel) (Remote host closed the connection)
2026-02-25 06:38:33 +0100sefidel(~sefidel@user/sefidel) sefidel
2026-02-25 06:38:54 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac) (Quit: Konversation terminated!)
2026-02-25 06:39:14 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac)
2026-02-25 06:40:17 +0100michalz(~michalz@185.246.207.218)
2026-02-25 06:40:25 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac) (Client Quit)
2026-02-25 06:43:54 +0100wickedjargon(~user@2605:8d80:5c40:245c:9d0a:1dbd:b59f:8c37) wickedjargon
2026-02-25 06:45:04 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 06:45:39 +0100rselim(ce261f06ff@user/milesrout) (Server closed connection)
2026-02-25 06:45:48 +0100rselim(ce261f06ff@user/milesrout) milesrout
2026-02-25 06:49:39 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 06:55:45 +0100filwisher(2e6936c793@2a03:6000:1812:100::170)
2026-02-25 07:00:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 07:05:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 07:05:54 +0100wickedjargon(~user@2605:8d80:5c40:245c:9d0a:1dbd:b59f:8c37) (Read error: Connection reset by peer)
2026-02-25 07:08:01 +0100wickedjargon(~user@2605:8d80:5c40:eae6:dd0f:ce4e:9d20:20f0) wickedjargon
2026-02-25 07:10:54 +0100takuan(~takuan@d8D86B9E9.access.telenet.be)
2026-02-25 07:11:11 +0100Googulator(~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu) (Quit: Client closed)
2026-02-25 07:11:27 +0100Googulator(~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu)
2026-02-25 07:15:20 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 07:18:19 +0100jkoshy(99b9359beb@user/jkoshy) (Server closed connection)
2026-02-25 07:18:20 +0100shr\ke(~shrike@user/shrke:31298) (Ping timeout: 265 seconds)
2026-02-25 07:18:28 +0100jkoshy(99b9359beb@user/jkoshy) jkoshy
2026-02-25 07:19:27 +0100shr\ke(~shrike@user/paxhumana) paxhumana
2026-02-25 07:19:27 +0100shr\ke(~shrike@user/paxhumana) (Changing host)
2026-02-25 07:19:27 +0100shr\ke(~shrike@user/shrke:31298) shr\ke
2026-02-25 07:19:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 07:23:10 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 265 seconds)
2026-02-25 07:26:59 +0100bheesham(3aa22d8375@2a03:6000:1812:100::e40) (Server closed connection)
2026-02-25 07:27:08 +0100bheesham(3aa22d8375@2a03:6000:1812:100::e40) bheesham
2026-02-25 07:30:43 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 07:31:39 +0100whereiseveryone(206ba86c98@2a03:6000:1812:100::2e4) (Server closed connection)
2026-02-25 07:31:47 +0100whereiseveryone(206ba86c98@2a03:6000:1812:100::2e4) jgart
2026-02-25 07:34:19 +0100arcadewise(52968ed80d@2a03:6000:1812:100::3df) (Server closed connection)
2026-02-25 07:34:27 +0100arcadewise(52968ed80d@2a03:6000:1812:100::3df) l3gacyb3ta
2026-02-25 07:34:55 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 07:35:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 07:37:36 +0100wickedjargon(~user@2605:8d80:5c40:eae6:dd0f:ce4e:9d20:20f0) (Ping timeout: 246 seconds)
2026-02-25 07:37:39 +0100JoelMcCracken(5ea8252fbb@2a03:6000:1812:100::10e3) (Server closed connection)
2026-02-25 07:37:50 +0100JoelMcCracken(5ea8252fbb@2a03:6000:1812:100::10e3) JoelMcCracken
2026-02-25 07:38:26 +0100RussetParrotBear(45ce440a48@2a03:6000:1812:100::e2)
2026-02-25 07:39:39 +0100simendsjo(34b0550437@2a03:6000:1812:100::1441) (Server closed connection)
2026-02-25 07:39:47 +0100simendsjo(34b0550437@2a03:6000:1812:100::1441) simendsjo
2026-02-25 07:42:17 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 07:44:19 +0100stureplan(22e45d5caf@user/stureplan) (Server closed connection)
2026-02-25 07:44:28 +0100stureplan(22e45d5caf@user/stureplan) stureplan
2026-02-25 07:44:35 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Excess Flood)
2026-02-25 07:46:08 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2026-02-25 07:46:20 +0100myxokephale(~myxos@174-18-44-59.tcso.qwest.net) myxokephale
2026-02-25 07:46:51 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-02-25 07:47:43 +0100foul_owl(~kerry@94.156.149.97) (Ping timeout: 264 seconds)
2026-02-25 07:48:34 +0100myxos(~myxos@174-18-58-141.tcso.qwest.net) (Ping timeout: 268 seconds)
2026-02-25 07:51:00 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-02-25 07:51:39 +0100probie(cc0b34050a@user/probie) (Server closed connection)
2026-02-25 07:51:47 +0100probie(cc0b34050a@user/probie) probie
2026-02-25 07:52:40 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 07:53:39 +0100lane(809450f172@2a03:6000:1812:100::1300) (Server closed connection)
2026-02-25 07:53:46 +0100lane(809450f172@2a03:6000:1812:100::1300) lane
2026-02-25 07:56:58 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 256 seconds)
2026-02-25 07:57:41 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 08:01:57 +0100foul_owl(~kerry@94.156.149.91) foul_owl
2026-02-25 08:04:37 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2026-02-25 08:11:51 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac)
2026-02-25 08:12:06 +0100agspades(~agspades@2401:4900:cab9:e332:4c8e:11ae:4084:30ac) (Client Quit)
2026-02-25 08:15:33 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9)
2026-02-25 08:15:43 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 08:20:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 08:26:19 +0100mauke(~mauke@user/mauke) (Server closed connection)
2026-02-25 08:26:29 +0100mauke(~mauke@user/mauke) mauke
2026-02-25 08:31:04 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 08:35:35 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 08:36:19 +0100preflex(~preflex@user/mauke/bot/preflex) (Server closed connection)
2026-02-25 08:36:31 +0100preflex(~preflex@user/mauke/bot/preflex) preflex
2026-02-25 08:46:27 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 08:50:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 08:53:00 +0100misterfish(~misterfis@84.53.85.146) misterfish
2026-02-25 08:54:08 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2026-02-25 08:58:45 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 272 seconds)
2026-02-25 09:00:26 +0100misterfish(~misterfis@84.53.85.146) misterfish
2026-02-25 09:01:03 +0100Fischmiep(~Fischmiep@user/Fischmiep) Fischmiep
2026-02-25 09:01:10 +0100__monty__(~toonn@user/toonn) toonn
2026-02-25 09:01:49 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 09:06:09 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 09:06:57 +0100peterbecich(~Thunderbi@71.84.33.135) peterbecich
2026-02-25 09:09:13 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 248 seconds)
2026-02-25 09:24:09 +0100Pozyomka(~pyon@user/pyon) (Ping timeout: 268 seconds)
2026-02-25 09:25:59 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 09:27:02 +0100philopsos1(~caecilius@user/philopsos) philopsos
2026-02-25 09:29:43 +0100chele(~chele@user/chele) chele
2026-02-25 09:33:06 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 246 seconds)
2026-02-25 09:35:16 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 09:39:37 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 248 seconds)
2026-02-25 09:43:28 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2026-02-25 09:45:29 +0100emmanuelux(~em@user/emmanuelux) (Quit: bye)
2026-02-25 09:46:25 +0100peterbecich(~Thunderbi@71.84.33.135) (Ping timeout: 245 seconds)
2026-02-25 09:47:08 +0100merijn(~merijn@77.242.116.146) merijn
2026-02-25 09:50:20 +0100oskarw(~user@user/oskarw) oskarw
2026-02-25 10:09:39 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Server closed connection)
2026-02-25 10:09:55 +0100lbseale(~quassel@user/ep1ctetus) (Ping timeout: 265 seconds)
2026-02-25 10:09:56 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) gabiruh
2026-02-25 10:10:06 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-25 10:11:37 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 10:11:58 +0100slomp_(~slomp@47-158-212-88.lsan.ca.frontiernet.net)
2026-02-25 10:12:14 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2026-02-25 10:14:45 +0100slomp(~slomp@47-158-212-88.lsan.ca.frontiernet.net) (Ping timeout: 272 seconds)
2026-02-25 10:15:10 +0100philopsos1(~caecilius@user/philopsos) (Ping timeout: 245 seconds)
2026-02-25 10:16:31 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 264 seconds)
2026-02-25 10:18:08 +0100fp(~Thunderbi@130.233.70.214) fp
2026-02-25 10:20:24 +0100mange(~mange@user/mange) mange
2026-02-25 10:24:09 +0100housemate(~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-25 10:29:39 +0100j0lol(~j0lol@132.145.17.236) (Server closed connection)
2026-02-25 10:29:53 +0100j0lol(~j0lol@132.145.17.236) j0lol
2026-02-25 10:37:09 +0100shr\ke(~shrike@user/shrke:31298) (Ping timeout: 246 seconds)
2026-02-25 10:39:40 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 10:43:36 +0100shr\ke(~shrike@user/paxhumana) paxhumana
2026-02-25 10:43:36 +0100shr\ke(~shrike@user/paxhumana) (Changing host)
2026-02-25 10:43:36 +0100shr\ke(~shrike@user/shrke:31298) shr\ke
2026-02-25 10:47:01 +0100Digit(~user@user/digit) (Ping timeout: 264 seconds)
2026-02-25 10:47:15 +0100fp(~Thunderbi@130.233.70.214) (Ping timeout: 245 seconds)
2026-02-25 10:49:37 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-02-25 10:50:34 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 10:52:19 +0100vulpine(xfnw@user/meow/xfnw) (Server closed connection)
2026-02-25 10:52:39 +0100vulpine(xfnw@user/meow/xfnw) xfnw
2026-02-25 11:05:47 +0100Digit(~user@user/digit) Digit
2026-02-25 11:06:05 +0100prdak(~Thunderbi@user/prdak) (Remote host closed the connection)
2026-02-25 11:06:24 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 11:10:39 +0100prdak1(~Thunderbi@user/prdak) prdak
2026-02-25 11:10:51 +0100prdak(~Thunderbi@user/prdak) (Read error: Connection reset by peer)
2026-02-25 11:10:51 +0100prdak1prdak
2026-02-25 11:14:23 +0100prdak1(~Thunderbi@user/prdak) prdak
2026-02-25 11:14:34 +0100prdak(~Thunderbi@user/prdak) (Read error: Connection reset by peer)
2026-02-25 11:14:34 +0100prdak1prdak
2026-02-25 11:16:29 +0100prdak1(~Thunderbi@user/prdak) prdak
2026-02-25 11:19:31 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 264 seconds)
2026-02-25 11:19:31 +0100prdak1prdak
2026-02-25 11:23:42 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 246 seconds)
2026-02-25 11:26:42 +0100divlamir(~divlamir@user/divlamir) (Read error: Connection reset by peer)
2026-02-25 11:27:02 +0100natto17(~natto@129.154.243.159) (Read error: Connection reset by peer)
2026-02-25 11:27:03 +0100divlamir(~divlamir@user/divlamir) divlamir
2026-02-25 11:28:18 +0100carbolymer(~carbolyme@delirium.systems) (Read error: Connection reset by peer)
2026-02-25 11:28:24 +0100natto17(~natto@129.154.243.159) natto
2026-02-25 11:28:27 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 11:28:48 +0100carbolymer(~carbolyme@delirium.systems) carbolymer
2026-02-25 11:35:37 +0100mangoiv(~mangoiv@2a01:4f9:c012:6c0e::) (Changing host)
2026-02-25 11:35:37 +0100mangoiv(~mangoiv@user/mangoiv) mangoiv
2026-02-25 11:38:21 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 11:42:28 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 252 seconds)
2026-02-25 11:42:59 +0100systemfault(sid267009@about/typescript/member/systemfault) (Server closed connection)
2026-02-25 11:43:14 +0100systemfault(sid267009@about/typescript/member/systemfault) systemfault
2026-02-25 11:50:16 +0100Arsen(16abab341f@gentoo/developer/managarm.dev.Arsen) (Remote host closed the connection)
2026-02-25 11:50:24 +0100Arsen(16abab341f@gentoo/developer/managarm.dev.Arsen) Arsen
2026-02-25 11:51:38 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 252 seconds)
2026-02-25 11:53:36 +0100fp(~Thunderbi@2001:708:20:1406::10c5) fp
2026-02-25 11:56:57 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2026-02-25 11:57:39 +0100PotatoGim(sid99505@id-99505.lymington.irccloud.com) (Server closed connection)
2026-02-25 11:58:05 +0100PotatoGim(sid99505@id-99505.lymington.irccloud.com) PotatoGim
2026-02-25 12:00:16 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 12:08:25 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 248 seconds)
2026-02-25 12:12:19 +0100Kamuela(sid111576@id-111576.tinside.irccloud.com) (Server closed connection)
2026-02-25 12:12:34 +0100Kamuela(sid111576@id-111576.tinside.irccloud.com) Kamuela
2026-02-25 12:14:29 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 245 seconds)
2026-02-25 12:31:17 +0100housemate(~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-25 12:36:02 +0100Pozyomka(~pyon@user/pyon) pyon
2026-02-25 12:40:02 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 12:43:55 +0100 <chromoblob> why can't the compiler itself choose the optimal representation for strings even when code uses String?
2026-02-25 12:48:04 +0100 <probie> Without forcing "whole program compilation" that's pretty much impossible
2026-02-25 13:01:08 +0100philopsos1(~caecilius@user/philopsos) philopsos
2026-02-25 13:02:15 +0100spew(~spew@user/spew) spew
2026-02-25 13:02:15 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 13:04:05 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 13:08:21 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 246 seconds)
2026-02-25 13:12:01 +0100p3n(~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Quit: ZNC 1.10.1 - https://znc.in)
2026-02-25 13:14:49 +0100p3n(~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) p3n
2026-02-25 13:15:00 +0100spew(~spew@user/spew) (Quit: nyaa~)
2026-02-25 13:17:16 +0100mange(~mange@user/mange) (Quit: Zzz...)
2026-02-25 13:18:19 +0100berberman(~berberman@user/berberman) (Server closed connection)
2026-02-25 13:18:29 +0100berberman(~berberman@user/berberman) berberman
2026-02-25 13:20:40 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 13:24:05 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 13:32:53 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 13:34:31 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
2026-02-25 13:35:54 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2026-02-25 13:36:26 +0100 <merijn> chromoblob: Because "optimal" is a hard thing to define :p
2026-02-25 13:36:38 +0100 <merijn> chromoblob: That said, string literals aren't actually even [Char] in compiled code
2026-02-25 13:36:52 +0100 <merijn> String literals are compiled to dense byte blobs that get lazily converted into [Char]
2026-02-25 13:37:32 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 256 seconds)
2026-02-25 13:38:59 +0100Moyst(~moyst@user/moyst) (Server closed connection)
2026-02-25 13:39:48 +0100 <chromoblob> well, no need to perfect things, but it'd be cool if Strings were stored as a UTF-8 buffer + a thunk for the rest of string
2026-02-25 13:40:11 +0100 <chromoblob> yeah, Unicode complicated
2026-02-25 13:40:14 +0100Moyst(~moyst@user/moyst) Moyst
2026-02-25 13:40:17 +0100 <chromoblob> complicates *
2026-02-25 13:40:23 +0100poscat(~poscat@user/poscat) (Remote host closed the connection)
2026-02-25 13:40:48 +0100 <chromoblob> could use UTF-32 or "UTF-24"
2026-02-25 13:41:41 +0100 <merijn> chromoblob: That's just Text?
2026-02-25 13:41:45 +0100 <merijn> Rather
2026-02-25 13:41:47 +0100 <merijn> Lazy Text
2026-02-25 13:42:02 +0100machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) machinedgod
2026-02-25 13:42:08 +0100 <chromoblob> well, the source code would be portable...
2026-02-25 13:42:11 +0100 <merijn> chromoblob: Basically automatically deciding optimal layout is hard, if not impossible
2026-02-25 13:42:42 +0100 <merijn> That's the reason why Haskell has like 5-8 string types (depending how you count :p)
2026-02-25 13:42:55 +0100tremon(~tremon@83.80.159.219) tremon
2026-02-25 13:43:03 +0100 <chromoblob> i mean, there are almost always very easy to decide optimizations
2026-02-25 13:44:00 +0100poscat(~poscat@user/poscat) poscat
2026-02-25 13:44:19 +0100 <merijn> chromoblob: I mean, feel free to try it :>
2026-02-25 13:44:57 +0100 <chromoblob> ;)
2026-02-25 13:44:59 +0100comonad(~comonad@p200300d02722ae00dce4ce9451b59974.dip0.t-ipconnect.de) (Server closed connection)
2026-02-25 13:45:16 +0100comonad(~comonad@p200300d02722ae00dce4ce9451b59974.dip0.t-ipconnect.de)
2026-02-25 13:50:04 +0100Athas(athas@2a01:7c8:aaac:1cf:10a0:cce8:21cf:53aa) (Quit: ZNC 1.9.1 - https://znc.in)
2026-02-25 13:50:17 +0100Athas(athas@2a01:7c8:aaac:1cf:5b23:7d4e:8d70:47e1)
2026-02-25 13:52:05 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 13:52:37 +0100 <__monty__> chromoblob: Char is analogous to UTF-32 already, no?
2026-02-25 13:53:27 +0100 <__monty__> So that leaves having a "buffer" instead of a list. And that just doesn't play as nice with functional idioms.
2026-02-25 13:54:15 +0100 <chromoblob> speed and memory is "nicer" to me than "niceness"
2026-02-25 13:55:05 +0100 <__monty__> That's the thing, it'd be slower for most of the code written to use String.
2026-02-25 13:56:18 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 246 seconds)
2026-02-25 13:58:34 +0100chenjf(~chenjf@68.64.178.54)
2026-02-25 14:02:57 +0100chenjf(~chenjf@68.64.178.54) (Client Quit)
2026-02-25 14:08:09 +0100 <merijn> hiredman: Then just use Text everywhere :P
2026-02-25 14:08:20 +0100 <merijn> s/hiredman/chromoblob
2026-02-25 14:08:27 +0100 <haskellbridge> <magic_rb> yeah Text ftw
2026-02-25 14:08:48 +0100 <merijn> converting Text to String is pretty efficient anyway
2026-02-25 14:11:52 +0100oskarw(~user@user/oskarw) (ERC 5.6.1 (IRC client for GNU Emacs 30.2))
2026-02-25 14:14:46 +0100 <dminuoso> chromoblob: Also, regarding your initial question: GHC compiles to native machine code ultimately, and we compile into object files that get turned into separate object files that are later together, but you dont even know the access pattern ahead of time.
2026-02-25 14:15:25 +0100 <chromoblob> yes, i got it
2026-02-25 14:17:14 +0100 <dminuoso> Im not entirely sure all excuses are good at the end.
2026-02-25 14:17:18 +0100housemate(~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-25 14:17:24 +0100 <dminuoso> I feel like String was a bad idea to begin with.
2026-02-25 14:18:43 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 14:23:14 +0100qqq(~qqq@185.54.22.240) (Ping timeout: 268 seconds)
2026-02-25 14:23:40 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 265 seconds)
2026-02-25 14:23:46 +0100bggd_(~bgg@2a01:e0a:fd5:f510:37b0:d42d:8afb:890)
2026-02-25 14:27:13 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 14:36:20 +0100 <probie> I think other representations make it a headache if you're not willing to specify what a `Char` actually is
2026-02-25 14:38:55 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 14:43:31 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 264 seconds)
2026-02-25 14:59:12 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 15:01:41 +0100Pozyomka(~pyon@user/pyon) (Quit: brb)
2026-02-25 15:06:03 +0100Pozyomka(~pyon@user/pyon) pyon
2026-02-25 15:09:43 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 268 seconds)
2026-02-25 15:11:39 +0100Wanderer(~wanderer@user/wanderer) (Server closed connection)
2026-02-25 15:14:35 +0100Wanderer(~wanderer@user/wanderer) Wanderer
2026-02-25 15:16:45 +0100 <dutchie> is there a good way to write `lesserPresent :: Ord a => Maybe a -> Maybe a -> Maybe a` that returns the minimum? currently doing silly things with maybeToList and minimum
2026-02-25 15:17:22 +0100 <dutchie> `liftA2 min` is almost exactly the wrong thing
2026-02-25 15:18:13 +0100 <dutchie> `asum [liftA2 min mx my, mx, my]`?
2026-02-25 15:18:14 +0100 <aka_dude> Hey. I want to talk to mentor of https://summer.haskell.org/ideas.html#ui-layout-library-for-haskell proposal, Adrian Sieber (ad-si). Do you know where can I reach him?
2026-02-25 15:20:53 +0100lbseale(~quassel@user/ep1ctetus) ep1ctetus
2026-02-25 15:23:35 +0100lbseale(~quassel@user/ep1ctetus) (Client Quit)
2026-02-25 15:24:19 +0100lbseale(~quassel@user/ep1ctetus) ep1ctetus
2026-02-25 15:24:30 +0100 <dminuoso> https://hackage.haskell.org/package/base64-bytestring-1.2.1.0/docs/src/Data.ByteString.Base64.html - at the bottom there is a definition for decodePF
2026-02-25 15:24:34 +0100 <dminuoso> BS decodeFP _ =
2026-02-25 15:24:37 +0100 <dminuoso> What kind of syntax is that?
2026-02-25 15:26:12 +0100rainbyte(~rainbyte@186.22.19.214) rainbyte
2026-02-25 15:27:54 +0100 <__monty__> dminuoso: CPP-aided crimes?
2026-02-25 15:28:15 +0100 <dminuoso> I mean PS/BS are pattern synonyms..
2026-02-25 15:28:32 +0100 <dminuoso> But neither is PatternSynonyms enabled, nor are there any macros introduced in that file
2026-02-25 15:29:08 +0100 <dminuoso> Or rather, PS is a pattern and BS is a constructor..
2026-02-25 15:30:49 +0100 <mauke> pattern matching/binding
2026-02-25 15:31:11 +0100 <mauke> (:) x _ = [1,2,3]
2026-02-25 15:31:20 +0100 <__monty__> > let [x] = ["hello"] in x
2026-02-25 15:31:21 +0100 <lambdabot> "hello"
2026-02-25 15:31:22 +0100 <dminuoso> mauke: Yeah but..
2026-02-25 15:31:33 +0100 <dminuoso> % x :: Int; [x] = 1
2026-02-25 15:31:33 +0100 <yahb2> <interactive>:7:17: error: [GHC-39999] ; • No instance for ‘Num [Int]’ arising from the literal ‘1’ ; • In the expression: 1 ; In a pattern binding: [x] = 1
2026-02-25 15:31:38 +0100 <dminuoso> I cant do that.
2026-02-25 15:31:45 +0100 <dminuoso> Oh
2026-02-25 15:31:47 +0100 <mauke> well, that's a type error
2026-02-25 15:31:48 +0100 <dminuoso> % x :: Int; [x] = [1]
2026-02-25 15:31:48 +0100 <yahb2> <no output>
2026-02-25 15:31:50 +0100 <dminuoso> o.o
2026-02-25 15:31:53 +0100dminuosois baffled
2026-02-25 15:32:07 +0100 <dminuoso> I mean it feels obvious and nice, it just never occured to me...
2026-02-25 15:32:53 +0100 <mauke> (f, g) = fix (... some nonsense ...)
2026-02-25 15:33:00 +0100 <mauke> I'm pretty sure I've done something like this before
2026-02-25 15:33:16 +0100 <dminuoso> mauke: Now that you mention it, I actually recall some obscure haskell report facts about this.
2026-02-25 15:33:25 +0100 <dminuoso> I think they are called non-trivial pattern bindings or some such
2026-02-25 15:33:31 +0100 <dutchie> I've used it when writing Servant stuff
2026-02-25 15:33:43 +0100 <__monty__> dminuoso: As for PS, "enabled by the language extension PatternSynonyms, which is required for defining them, but not for using them."
2026-02-25 15:34:06 +0100 <dminuoso> __monty__: Ugh.
2026-02-25 15:34:13 +0100 <dminuoso> Okay, that explains that part too, then.
2026-02-25 15:35:05 +0100 <dminuoso> mauke: MMR does not kick in for these non-trivial bindings, and I think (f, g) was even mentioned as an example in the report.
2026-02-25 15:36:24 +0100 <mauke> % [foo] = [42]
2026-02-25 15:36:25 +0100 <yahb2> <no output>
2026-02-25 15:36:29 +0100 <mauke> % :t foo
2026-02-25 15:36:29 +0100 <yahb2> foo :: Num a => a
2026-02-25 15:38:19 +0100sttau(~sttau@199.180.255.81) (Server closed connection)
2026-02-25 15:38:27 +0100sttau(~sttau@199.180.255.81)
2026-02-25 15:40:09 +0100philopsos1(~caecilius@user/philopsos) (Ping timeout: 248 seconds)
2026-02-25 15:46:03 +0100 <dminuoso> By the way, its striking how often the impossible happens to me.
2026-02-25 15:46:05 +0100 <dminuoso> ghc: panic! (the 'impossible' happened) (GHC version 9.2.8: primRepToFFIType
2026-02-25 15:49:31 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 264 seconds)
2026-02-25 15:51:00 +0100fp(~Thunderbi@2001:708:20:1406::10c5) (Ping timeout: 245 seconds)
2026-02-25 15:52:34 +0100fp(~Thunderbi@wireless-86-50-141-0.open.aalto.fi) fp
2026-02-25 15:56:07 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 16:00:35 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 245 seconds)
2026-02-25 16:08:35 +0100troydm(~troydm@user/troydm) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
2026-02-25 16:12:23 +0100Psychotic1(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4)
2026-02-25 16:12:32 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2026-02-25 16:14:56 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 16:16:59 +0100Hafydd(~Hafydd@user/hafydd) (Server closed connection)
2026-02-25 16:17:17 +0100Hafydd(~Hafydd@user/hafydd) Hafydd
2026-02-25 16:19:21 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 16:20:43 +0100fp(~Thunderbi@wireless-86-50-141-0.open.aalto.fi) (Ping timeout: 264 seconds)
2026-02-25 16:22:21 +0100fp(~Thunderbi@2001:708:150:10::9d7e) fp
2026-02-25 16:23:39 +0100Adeon(sid418992@id-418992.lymington.irccloud.com) (Server closed connection)
2026-02-25 16:23:50 +0100Adeon(sid418992@id-418992.lymington.irccloud.com) Adeon
2026-02-25 16:25:39 +0100ProofTechnique_(sid79547@id-79547.ilkley.irccloud.com) (Server closed connection)
2026-02-25 16:25:48 +0100ProofTechnique_(sid79547@id-79547.ilkley.irccloud.com)
2026-02-25 16:29:00 +0100rekahsoft(~rekahsoft@76.67.111.168) rekahsoft
2026-02-25 16:32:59 +0100dunj3(~dunj3@2a01:239:328:1600::1) (Server closed connection)
2026-02-25 16:33:12 +0100dunj3(~dunj3@2a01:239:328:1600::1)
2026-02-25 16:34:57 +0100Psychotic1(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Quit: Leaving)
2026-02-25 16:35:31 +0100emaczen(~user@user/emaczen) emaczen
2026-02-25 16:36:09 +0100Katarushisu6(~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Ping timeout: 245 seconds)
2026-02-25 16:43:32 +0100fp(~Thunderbi@2001:708:150:10::9d7e) (Quit: fp)
2026-02-25 16:48:09 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 16:48:30 +0100Psychotic1(~Psychotic@65.sub-174-245-22.myvzw.com)
2026-02-25 16:49:05 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 16:52:39 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 255 seconds)
2026-02-25 16:52:54 +0100housemate(~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-25 16:56:43 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 264 seconds)
2026-02-25 16:57:49 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 16:59:20 +0100Psychotic1(~Psychotic@65.sub-174-245-22.myvzw.com) (Ping timeout: 245 seconds)
2026-02-25 16:59:46 +0100Psychotic1(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4)
2026-02-25 17:01:08 +0100Psychotic1_(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4)
2026-02-25 17:01:37 +0100weary-traveler(~user@user/user363627) (Remote host closed the connection)
2026-02-25 17:01:49 +0100Psychotic1__(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4)
2026-02-25 17:04:15 +0100Psychotic1(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Ping timeout: 246 seconds)
2026-02-25 17:05:39 +0100Psychotic1_(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Ping timeout: 246 seconds)
2026-02-25 17:07:28 +0100Psychotic1__(~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Remote host closed the connection)
2026-02-25 17:11:57 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 17:12:58 +0100prdak(~Thunderbi@user/prdak) (Read error: Connection reset by peer)
2026-02-25 17:13:16 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 17:13:24 +0100chele(~chele@user/chele) (Remote host closed the connection)
2026-02-25 17:16:17 +0100prdak(~Thunderbi@user/prdak) (Remote host closed the connection)
2026-02-25 17:16:37 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 17:24:59 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Server closed connection)
2026-02-25 17:25:15 +0100Maxdamantus(~Maxdamant@user/maxdamantus) Maxdamantus
2026-02-25 17:26:19 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 17:29:44 +0100 <EvanR> if chromoblob goes to the oracle and comes back with a ghc which chooses the optimal implementation for String at each point in the program, and optimal conversion points. Then I want it to also work on cartesian vs polar complex numbers please
2026-02-25 17:30:11 +0100 <EvanR> feel free to pile on other examples
2026-02-25 17:31:28 +0100housemate(~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/)
2026-02-25 17:33:36 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 17:43:02 +0100housemate(~housemate@202.7.248.67) housemate
2026-02-25 17:48:54 +0100 <ski> @ghc
2026-02-25 17:48:54 +0100 <lambdabot> Can't happen
2026-02-25 17:49:10 +0100messewix(~jmc@user/messewix) messewix
2026-02-25 17:49:22 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 17:49:55 +0100 <ski> loop@(map f) (x:xs) = f x : loop xs -- would be nice to be able to do this kind of thing
2026-02-25 17:51:16 +0100 <ski> (fooWith cfg)@(let cfg = defaultCfg in foo) ... = ... -- or this
2026-02-25 17:52:43 +0100st_aldini(~Thunderbi@136.48.46.187) (Quit: st_aldini)
2026-02-25 17:53:27 +0100 <EvanR> what's this @ sign
2026-02-25 17:53:36 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 246 seconds)
2026-02-25 17:54:35 +0100 <Clint> as-pattern
2026-02-25 17:54:59 +0100EvanR(~EvanR@user/evanr) (Server closed connection)
2026-02-25 17:55:24 +0100EvanR(~EvanR@user/evanr) EvanR
2026-02-25 17:56:29 +0100 <ski> > let f :: Integer -> Integer; f ?x = ?x + 1 in f (f 3)
2026-02-25 17:56:31 +0100 <lambdabot> <hint>:1:32: error: Expression syntax in pattern: ?x
2026-02-25 17:57:05 +0100 <ski> yes. the second `@' would be the generalization of and/conjunction-pattern
2026-02-25 17:58:21 +0100 <ski> where `let cfg = defaultCfg in foo' is a pattern that matches the input to `foo', and additionally binds `cfg' to `defaultCfg' (so that regardless of whether we use the `fooWith' or the `foo' entry point to the code, `cfg' will be in scope in the body)
2026-02-25 17:59:41 +0100fgarcia(~lei@user/fgarcia) (Ping timeout: 268 seconds)
2026-02-25 18:01:39 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 246 seconds)
2026-02-25 18:03:39 +0100lortabac(~lortabac@mx1.fracta.dev) (Server closed connection)
2026-02-25 18:03:53 +0100lortabac(~lortabac@mx1.fracta.dev) lortabac
2026-02-25 18:04:29 +0100 <ski> it would be nice to be able to say something like `(frob,barf) = (\ ?cfg -> foo,\ ?cfg -> bar) where foo :: (?cfg :: ...) => ...; foo = ..?cfg..foo..bar..; bar :: (?cfg :: ...) => ...; bar = ..?cfg..foo.bar..' (having a common "config" argument in scope, over mutual recursion, avoiding repeating it in the recursive calls)
2026-02-25 18:05:31 +0100 <ski> maybe there's be some version of
2026-02-25 18:05:52 +0100 <ski> foo@(frob cfg) = ..cfg..foo..bar..
2026-02-25 18:06:01 +0100 <ski> bar@(barf cfg) = ..cfg..foo..bar..
2026-02-25 18:06:08 +0100 <ski> to express this ..
2026-02-25 18:06:39 +0100 <ski> (issue is how to (reasonably) get both `foo' and `bar' in scope in both bodies ..)
2026-02-25 18:08:59 +0100sondr3(sondr3@2a01:7e01::f03c:92ff:fe06:7664) (Server closed connection)
2026-02-25 18:09:09 +0100sondr3(sondr3@2a01:7e01::f03c:92ff:fe06:7664)
2026-02-25 18:10:29 +0100 <ski> (for the `loop' & `map' case above, `loop' doesn't explicitly bind the `f' parameter (and so must already assume `f' already comes from somewhere), so `loop' would just be in scope in the body, and not be in scope elsewhere `map' is in scope (where `f' isn't). in the `fooWith' & `foo' case, both conjuncts does bind `cfg', so both `fooWith' and `foo' makes sense here to use in a scope where `cfg' is not bound)
2026-02-25 18:10:37 +0100 <haskellbridge> <ijouw> You want (f g) to implicitly use another function named g that is in scope at use site?
2026-02-25 18:11:34 +0100 <ski> no
2026-02-25 18:11:47 +0100 <ski> (this is not about dynamic scope)
2026-02-25 18:15:19 +0100 <ski> (it's not clear whether by `f g' you mean an expression, or a pattern, btw ..)
2026-02-25 18:16:50 +0100 <ski> this is about creative uses of patterns and scoping, to effect some convenience/elegance, for certain kinds of definition idioms
2026-02-25 18:18:55 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 245 seconds)
2026-02-25 18:20:59 +0100 <ski> (a) the `loop' and `map' case would be a way to give a *local* name for the function you're defining, applied to some prefix of the formal parameters, so that you don't need to repeat those parameters at recursive calls. this abbreviated form would naturally only be in scope inside the definition, and not elsewhere (because we would not know which value `f' would be bound to). it would be possible to use an
2026-02-25 18:21:05 +0100 <ski> explicit recursive call, passing some different value(s) for the prefix parameters, which would then bind the identifier (`loop') here to this *new* prefix, for that recursive call (this can e.g. be useful, if you're passing around an environment to an interpreter or type checker, mostly you want to pass along the same environment, but sometimes you want to change it)
2026-02-25 18:23:02 +0100 <ski> (b) sometimes you have a general version of a function, and one version specialized to passing some default value for a parameter, as exemplified by `fooWith' & `foo'. as indicated, this could be done with conjunctive patterns, and `let'-`in'-patterns
2026-02-25 18:24:14 +0100 <haskellbridge> <ijouw> Do you intend foo = ..?cfg..foo..bar.. to be recursive?
2026-02-25 18:25:35 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 18:25:52 +0100 <ski> (c) sometimes you want to do (a), but for mutually recursive functions, wanting to avoid passing around the *same* identical prefix parameters. so, i was pondering how one could possibly effect that, with a minimum of fuss. one attempt was to locally bind the respective parameters to an implicit `?cfg' (implementation detail), and then use that for the local, mutually recursive, definitions. there might be a
2026-02-25 18:25:59 +0100 <ski> nicer way to do it, but one would need to explain how `foo' could be in scope in the `barf' definition, and how `bar' could be in scope in the `frob' definition
2026-02-25 18:26:36 +0100 <ski> ijouw : yes (that's why i wrote `foo' and `bar' in `..?cfg..foo.bar..', to indicate that those three would be allowed to occur free in that body)
2026-02-25 18:27:08 +0100jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-02-25 18:27:37 +0100 <haskellbridge> <ijouw> After enabling OverloadedRecordDot my brain parses that weirdly
2026-02-25 18:27:59 +0100skiprefers to pretend that extension does not exist
2026-02-25 18:30:14 +0100 <ski> (btw, it would perhaps look neater to say `foo where cfg = defaultCfg' in place of `let cfg = defaultCfg in foo' .. but `where' is not an expression, attaches to defining equations (and `case' branches))
2026-02-25 18:30:17 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 248 seconds)
2026-02-25 18:34:19 +0100 <haskellbridge> <ijouw> Using current language, I would likely try to solve the dependency by making foo and bar a function and using liftA2 a lot and other pointfree stuff so cfg is never specified (but that will likely not make it readable).
2026-02-25 18:34:49 +0100 <ski> yea, that's too invasive
2026-02-25 18:35:05 +0100emaczen(~user@user/emaczen) (Remote host closed the connection)
2026-02-25 18:36:10 +0100 <ski> a somewhat related thing is the `local <decls> in <decls> end' declaration, in SML. it declares the latter declarations (between `in' and `end'), while hiding the former ones, letting them be in scope in the latter ones, but not visible elsewhere
2026-02-25 18:37:00 +0100 <ski> in Haskell, you often have to resort to `(foo,bar) = (myFoo,MyBar) where myFoo = ...; myBar = ...; extraDef = ...', for this, which is ugly
2026-02-25 18:37:38 +0100 <ski> in SML, this would be `local fun extraDef ... = ... in fun foo ... = ... and bar ... = ... end'
2026-02-25 18:38:04 +0100 <ski> (`fun ... and ...' is mutual recursive functions)
2026-02-25 18:38:09 +0100emaczen(~user@user/emaczen) emaczen
2026-02-25 18:38:19 +0100fgarcia(~lei@user/fgarcia) fgarcia
2026-02-25 18:40:01 +0100 <ski> (of course, you could simply hide, not export, `extraDef', from the module in question. but it's often nice to restrict scope more, to make sure it's evident that `extraDef' isn't used elsewhere in the module. and Haskell doesn't allow nested submodules ..)
2026-02-25 18:41:22 +0100 <EvanR> I have to admit I'm a never nester
2026-02-25 18:41:42 +0100 <ski> you never define local functions in a `where' or `let' ?
2026-02-25 18:45:16 +0100 <ski> (.. sometimes i also want to use `if' or `case', at declaration level. `if ... then {f x = ...; g y z = ...} else {f x = ...; g y z = ...}'. having declarations as the body of the branches, conditionally defining in one of several ways (all branches have to define the same identifiers, naturally))
2026-02-25 18:45:20 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9)
2026-02-25 18:45:54 +0100 <__monty__> I love Agda's approach to scoping, https://agda.readthedocs.io/en/latest/language/module-system.html
2026-02-25 18:47:15 +0100 <EvanR> ski, I do, but often it's a oneliner, and or doesn't appear indented more than 1
2026-02-25 18:47:41 +0100 <EvanR> this was a joke about indentation levels rather than submodules
2026-02-25 18:48:21 +0100 <EvanR> putting non trivial functions inside a where clause always bites me since then I can't use it in the repl
2026-02-25 18:49:00 +0100 <ski> __monty__ : reminds me that in OCaml, you can not only do `M.f x (M.g y z)', but you can also say `M.(f x (g y z))', where for `M.(...)', the identifiers exported by `M' are all in scope directly in the expression `...'
2026-02-25 18:49:12 +0100euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2026-02-25 18:49:41 +0100 <ski> (iow, this is a shorter way to say `let open M in ...')
2026-02-25 18:50:42 +0100 <ski> EvanR : mm, yep. i recall pondering a type system that would let you access them, from an interactor / debugger
2026-02-25 18:51:25 +0100 <haskellbridge> <ijouw> can you do that top level?
2026-02-25 18:51:36 +0100 <ski> (oh, and iirc, with breakpoints in GHCi, you can access them, if you break inside such a scope)
2026-02-25 18:51:53 +0100 <ski> how do you mean, ijouw ?
2026-02-25 18:52:25 +0100 <EvanR> the power of the OOP dot
2026-02-25 18:52:26 +0100v0id_7(~v0id_7@user/v0id-7:62772) v0id_7
2026-02-25 18:53:00 +0100 <ski> well .. this is module system dot, not quite the same thing ?
2026-02-25 18:54:17 +0100 <ski> (typically module system have static, compile-time, resolvers. sometimes you can pass around modules at run-time, though, blurring the line a bit)
2026-02-25 18:54:59 +0100 <ski> (e.g. in OCaml, and Alice ML)
2026-02-25 18:56:15 +0100 <EvanR> it fills the same blank... single term dot stuff, which people like to latch their IDE features onto
2026-02-25 18:57:11 +0100 <ski> (.. i'm not too sure how common it is to be able to define (e.g. abstract) data types inside an object, with OOP, though .. which routinely happens, with modules)
2026-02-25 18:57:27 +0100 <EvanR> you mean inner class?
2026-02-25 18:57:42 +0100 <EvanR> I know you don't mean that, but that's pretty common
2026-02-25 18:59:14 +0100 <ski> i mean so that you can specify a functor (module function), that takes a module (with a type inside), and returns another module, with a `sharing' constraint saying that the type exported by the resulting module is the same as the type in the parameter module, so that other code can use values of one type where values of the other are expected
2026-02-25 18:59:38 +0100 <ski> standard module system stuff you do in the ML module system
2026-02-25 19:01:23 +0100 <ski> .. i'm not sure how easy it would be do express something like that, with the "module with abstract data type(s), as existentially quantified record" idiom for simulating modules, in e.g. Haskell
2026-02-25 19:02:20 +0100 <EvanR> unfortunate past tense did backpack have this "functor" feature?
2026-02-25 19:02:35 +0100 <ski> with `myFunctor :: (exists t. ..t..) -> (exists t. ..t..)', how would you ensure the two `t's are the same, *apart* from rewriting to `myFunctor :: forall t. (..t.. -> ..t..)' ?
2026-02-25 19:03:16 +0100 <EvanR> myFunctor :: exists t . Sig1 t -> Sig2 t
2026-02-25 19:03:17 +0100 <EvanR> xD
2026-02-25 19:03:24 +0100 <EvanR> make that forall
2026-02-25 19:03:36 +0100 <ski> (imagine there's a whole bunch of different abstract types, and one `t' is in a nested submodule, and perhaps the other one as well, and you'd like to not disturb all this structure, while still ensuring the two `t's are known to be equal)
2026-02-25 19:03:55 +0100 <EvanR> ah you called it
2026-02-25 19:04:07 +0100 <ski> yes
2026-02-25 19:04:59 +0100 <ski> (iirc, you can also add sharing constraints for whole submodules)
2026-02-25 19:05:20 +0100 <EvanR> so much stuff boils down to the management of scopes
2026-02-25 19:07:15 +0100 <ski> yea
2026-02-25 19:07:18 +0100 <EvanR> what's an example of a sharing constraint
2026-02-25 19:07:44 +0100wickedjargon(~user@208.98.208.115)
2026-02-25 19:09:08 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2026-02-25 19:09:22 +0100 <__monty__> Backpack was sold to me as bringing ML's functors to Haskell.
2026-02-25 19:11:39 +0100yahb2(~yahb2@user/tomsmeding/bot/yahb2) (Server closed connection)
2026-02-25 19:12:02 +0100yahb2(~yahb2@user/tomsmeding/bot/yahb2) yahb2
2026-02-25 19:12:02 +0100ChanServ+v yahb2
2026-02-25 19:12:58 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 19:13:25 +0100 <ski> module Set.Make : functor (Ord : OrderedType) -> S with type elt = Ord.t
2026-02-25 19:13:39 +0100 <ski> is one example, from OCaml, <https://ocaml.org/manual/5.4/api/Set.S.html>
2026-02-25 19:14:54 +0100 <EvanR> so elt is defined in ...
2026-02-25 19:15:18 +0100 <ski> given a parameter module `Ord', of signature `OrderedType' (equal to `sig type t val compare : t -> t -> int'), it constructs a module of signature `S' (including a type `elt' of set elements, a type `t' of sets, and various operations on sets)
2026-02-25 19:16:07 +0100 <ski> and the `with type elt = Ord.t' ensures that it is known to callers of `Make' that the type `elt' in the resulting module will be equal to the type `t' in the parameter module
2026-02-25 19:17:00 +0100 <ski> (otherwise, you would know nothing about `elt', except, perhaps, that it has a `compare' function (or any function defined in terms of that), assuming the result module exports that operation)
2026-02-25 19:17:10 +0100 <EvanR> ok elt is in the resulting module
2026-02-25 19:17:14 +0100 <ski> yes
2026-02-25 19:17:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-02-25 19:17:39 +0100 <EvanR> Set.S
2026-02-25 19:17:53 +0100 <EvanR> er Set
2026-02-25 19:19:55 +0100 <ski> here's one SML example (from lambdaProlog implementation Terzo) :
2026-02-25 19:21:00 +0100 <ski> functor Program (structure Lg : LOGICALS structure Lam : LAM structure Error : ERROR structure Module : MODULE structure UU : UUTILS structure IU : IU sharing type Lam.lterm = Module.lterm = IU.lterm = UU.lterm sharing type Lg.const = Module.const = Lam.const sharing type IU.tp = Lg.tp = Lam.tp = Module.tp) : PROGRAM = struct ... end
2026-02-25 19:21:29 +0100jmcantrell_jmcantrell
2026-02-25 19:21:54 +0100 <ski> here, the `sharing type ... = ...' constraints ensure that all the different parameter agree about the relevant types that are supposed to be the same over their interfaces/signatures
2026-02-25 19:23:30 +0100 <ski> EvanR : well, strictly speaking `Make(Ord)' (`Set' is a functor, a module function. `elt' is in the output/result module, constructed by this) (and the functor `Make' itself is a component of the module `Set', so `Set.Make(Ord)') .. where `Ord' is whatever parameter module you decide to use
2026-02-25 19:24:55 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 19:24:56 +0100Milan_Vanca(~milan@88.212.61.169)
2026-02-25 19:25:55 +0100 <Milan_Vanca> Hello guyz, is "let something = case of" forbiden in "do notation"?
2026-02-25 19:26:04 +0100 <ski> no
2026-02-25 19:26:26 +0100 <ski> (well, you need an expression between the `case' and `of'. assuming you just omitted that)
2026-02-25 19:26:37 +0100 <ski> you likely have indentation off
2026-02-25 19:27:03 +0100 <ski> make sure the branches after the `of' are indented more than the start of `something'
2026-02-25 19:28:01 +0100 <Milan_Vanca> ski: I don't know.. to me code looks good
2026-02-25 19:28:03 +0100 <Milan_Vanca> https://paste.tomsmeding.com/tCHM4xIg
2026-02-25 19:28:27 +0100 <EvanR> indent lines Left and Right more
2026-02-25 19:28:37 +0100 <ski> `Left' and `Right' must be indented at least three spaces more
2026-02-25 19:28:48 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 19:28:54 +0100 <ski> (one more than the `r' in `result')
2026-02-25 19:29:15 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 19:29:42 +0100 <EvanR> that is so much equality constraints now I'm imagining things to do with them
2026-02-25 19:29:47 +0100 <ski> .. also, instead of `... -> (...)', you can simply write `... -> ...' (extra brackets redundant)
2026-02-25 19:30:06 +0100 <EvanR> could you encode category theory
2026-02-25 19:30:14 +0100 <Milan_Vanca> ski: I added bracket as I thought this is root of error..
2026-02-25 19:30:31 +0100 <ski> ah
2026-02-25 19:30:42 +0100 <Milan_Vanca> I don't understand the problem with indentation. It has one more indentaion as "let" and that should be enough
2026-02-25 19:30:48 +0100 <ski> no
2026-02-25 19:30:52 +0100 <ski> consider
2026-02-25 19:30:59 +0100 <ski> let result = case ... of
2026-02-25 19:31:06 +0100 <ski> Foo -> ...
2026-02-25 19:31:12 +0100 <ski> anotherResult = case ... of
2026-02-25 19:31:15 +0100 <ski> Foo -> ...
2026-02-25 19:31:50 +0100 <EvanR> Milan_Vanca, let lets you define multiple things
2026-02-25 19:31:59 +0100 <Milan_Vanca> At once?
2026-02-25 19:31:59 +0100 <ski> any line which is at the same level of indentation as `result' is assumed to start a new defining equation, inside the `let'
2026-02-25 19:32:01 +0100 <EvanR> yes
2026-02-25 19:32:09 +0100 <EvanR> let x = ...
2026-02-25 19:32:12 +0100 <EvanR> y = ...
2026-02-25 19:32:15 +0100 <EvanR> z = ...
2026-02-25 19:32:15 +0100 <ski> any line which is at *less* indentation than `result' ends the `let' block
2026-02-25 19:32:24 +0100PaulMartensen(15a119e437@2001:bc8:1210:2cd8::3bc) (Ping timeout: 245 seconds)
2026-02-25 19:32:24 +0100 <ski> yes
2026-02-25 19:32:46 +0100PaulMartensen(15a119e437@2001:bc8:1210:2cd8::3bc)
2026-02-25 19:32:59 +0100 <ski> for my example, you need to type
2026-02-25 19:33:05 +0100 <ski> let result = case ... of
2026-02-25 19:33:11 +0100 <ski> Foo -> ...
2026-02-25 19:33:13 +0100 <ski> anotherResult = case ... of
2026-02-25 19:33:15 +0100 <ski> Foo -> ...
2026-02-25 19:33:38 +0100 <Milan_Vanca> ski: :D This is ugly
2026-02-25 19:33:42 +0100 <ski> to make it clear when the next defining equation inside `let' starts, and then (after this), when the whole `let' block ends
2026-02-25 19:33:45 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-02-25 19:33:49 +0100 <Milan_Vanca> This let can define multiple things is ugly :D
2026-02-25 19:34:08 +0100 <EvanR> either don't try to do this case inside a let, or put the case on one line
2026-02-25 19:34:22 +0100 <EvanR> if you don't want to just indent more
2026-02-25 19:34:31 +0100bggd_(~bgg@2a01:e0a:fd5:f510:37b0:d42d:8afb:890) (Remote host closed the connection)
2026-02-25 19:34:45 +0100 <ski> you *could* do
2026-02-25 19:34:48 +0100 <ski> let
2026-02-25 19:34:49 +0100 <EvanR> if you want to emphasize the case, indent all the way past the case
2026-02-25 19:34:53 +0100 <ski> result = case ... of
2026-02-25 19:35:00 +0100 <ski> Left ... -> ...
2026-02-25 19:35:04 +0100 <ski> Right ... -> ...
2026-02-25 19:35:27 +0100 <__monty__> Indentation in do-notation always trips me up. let ... in ... has no qualms with the definitions being less indented than the let.
2026-02-25 19:35:31 +0100 <ski> (iow, breaking line after `let', then you can indent the followin lines a little bit less)
2026-02-25 19:36:02 +0100 <Milan_Vanca> Yeah thy guyz now I get it. :)
2026-02-25 19:36:06 +0100 <Milan_Vanca> TY
2026-02-25 19:36:14 +0100 <ski> yea .. the block starts at the first (non-comment) token *after* the layout-introducing keyword (here `let')
2026-02-25 19:36:34 +0100 <ski> (in Milan_Vanca's case, the block starts at `result')
2026-02-25 19:37:20 +0100 <ski> (same rule holds for `of', and for `do', and `where')
2026-02-25 19:38:29 +0100 <haskellbridge> <ijouw> let x = y in and let x = y have same rules reguarding where x may be. Everything y must be indented more than x.
2026-02-25 19:38:39 +0100 <probie> If you don't want to indent, you can always just use braces
2026-02-25 19:38:40 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-25 19:39:05 +0100 <ski> Milan_Vanca : btw, if you wanted to, you could factor out some common code from the two branches
2026-02-25 19:39:09 +0100wickedja`(~user@2605:8d80:5430:818:b927:d532:959:409c)
2026-02-25 19:39:30 +0100 <__monty__> But braces require semicolons, eww.
2026-02-25 19:40:58 +0100 <probie> Only if you want more than one thing :p
2026-02-25 19:41:03 +0100wickedjargon(~user@208.98.208.115) (Ping timeout: 246 seconds)
2026-02-25 19:41:39 +0100 <ski> let (status,result) = case eitherDecode body of
2026-02-25 19:41:59 +0100 <Milan_Vanca> I don't think same rules apply for where I can have where\n..something or where\n..................something
2026-02-25 19:42:02 +0100 <ski> Left e -> (status400,PL.pack e)
2026-02-25 19:42:15 +0100 <ski> Right c -> (status200,encode (increment c))
2026-02-25 19:42:28 +0100 <ski> return (responseLBS status [(hContentType,hvAplicationJSON)] result)
2026-02-25 19:43:08 +0100 <Milan_Vanca> ski: Nicer solution.. so tuple is ok ni this case?
2026-02-25 19:43:22 +0100 <ski> Milan_Vanca : yes, it's same rule. `where'-block also starts at whatever column `something' is at, regardless of which column `where' is at
2026-02-25 19:43:41 +0100 <ski> you can always match on tuples, in `let' and `where' (and toplevel)
2026-02-25 19:44:13 +0100rncwnd(~quassel@2a01:4f8:221:27c6::1) (Quit: Later)
2026-02-25 19:44:33 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 19:44:49 +0100rncwnd(~quassel@2a01:4f8:221:27c6::1)
2026-02-25 19:45:11 +0100 <ski> (and on other data constructors. however, a value of tuple type can never fail to match a tuple pattern, but for data types with multiple data constructors, you can get match failure, so it's good to only match on those, in `let'/`where'/toplevel sparingly, when you're sure that they won't actually fail ..)
2026-02-25 19:45:19 +0100 <haskellbridge> <ijouw> counter = fmap (((s,v) -> responseLBS s [(hContentType, hvApplicationJson)] v) . ((status400,) . PL.pack ||| (status200,) . encode . increment)) . lazyRequestBody
2026-02-25 19:45:38 +0100 <ski> > let x:xs = [] :: [Integer] in (x,xs)
2026-02-25 19:45:40 +0100 <lambdabot> (*Exception: <interactive>:3:5-26: Non-exhaustive patterns in x : xs
2026-02-25 19:46:03 +0100 <ski> > let Nothing = Just 3 in ()
2026-02-25 19:46:05 +0100 <lambdabot> ()
2026-02-25 19:46:08 +0100 <ski> > let !Nothing = Just 3 in ()
2026-02-25 19:46:10 +0100 <lambdabot> *Exception: <interactive>:3:5-21: Non-exhaustive patterns in !Nothing
2026-02-25 19:46:48 +0100 <ski> hah, ijouw :)
2026-02-25 19:47:05 +0100 <haskellbridge> <ijouw> i did not typecheck it
2026-02-25 19:47:43 +0100 <Milan_Vanca> ijouw do you really find this more readable?
2026-02-25 19:47:44 +0100 <probie> > (\xs -> let y:ys = xs in if null xs then Nothing else Just (y, ys)) []
2026-02-25 19:47:45 +0100 <lambdabot> Nothing
2026-02-25 19:47:57 +0100 <haskellbridge> <ijouw> i usually use left to right composition
2026-02-25 19:51:18 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-02-25 19:55:45 +0100 <haskellbridge> <ijouw> Like so
2026-02-25 19:55:45 +0100 <haskellbridge> ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/ROHzIHXhlwulEzElCZCROwyR/IEURazvg-wM (5 lines)
2026-02-25 19:56:03 +0100 <haskellbridge> <ijouw> That prints weiredly
2026-02-25 19:56:20 +0100 <haskellbridge> <ijouw> Some formatting issue
2026-02-25 19:56:45 +0100 <haskellbridge> <ijouw> https://paste.tomsmeding.com/OUVh8TUU
2026-02-25 19:58:17 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 20:00:56 +0100 <haskellbridge> <ijouw> I think i messed the fmap up
2026-02-25 20:02:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 20:02:40 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 245 seconds)
2026-02-25 20:03:37 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9)
2026-02-25 20:04:07 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 20:05:06 +0100tjbc(~tjbc@user/fliife) (Ping timeout: 268 seconds)
2026-02-25 20:06:24 +0100tjbc(~tjbc@user/fliife) fliife
2026-02-25 20:06:50 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-25 20:10:39 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 20:12:15 +0100tjbc(~tjbc@user/fliife) (Ping timeout: 245 seconds)
2026-02-25 20:13:43 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) tzh
2026-02-25 20:14:20 +0100Tuplanolla(~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) Tuplanolla
2026-02-25 20:16:55 +0100tjbc(~tjbc@user/fliife) fliife
2026-02-25 20:16:56 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-25 20:16:57 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 255 seconds)
2026-02-25 20:22:39 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2026-02-25 20:22:50 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 20:23:37 +0100Square3(~Square@user/square) Square
2026-02-25 20:23:50 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-25 20:27:05 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 248 seconds)
2026-02-25 20:29:40 +0100Guest8708(~john@user/n0w0n) n0w0n
2026-02-25 20:30:27 +0100morj_away(~morj@user/morj) morj
2026-02-25 20:31:27 +0100Guest8708(~john@user/n0w0n) (Client Quit)
2026-02-25 20:32:05 +0100n0w0n(~john@user/n0w0n) n0w0n
2026-02-25 20:35:04 +0100prdak(~Thunderbi@user/prdak) prdak
2026-02-25 20:39:55 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 264 seconds)
2026-02-25 20:43:34 +0100uli-fem(~uli-fem@118.210.1.123)
2026-02-25 20:47:14 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2026-02-25 20:47:26 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
2026-02-25 20:48:00 +0100uli-fem(~uli-fem@118.210.1.123) (Ping timeout: 255 seconds)
2026-02-25 20:49:56 +0100Lord_of_Life_Lord_of_Life
2026-02-25 20:53:50 +0100stackdroid18(~stackdroi@user/stackdroid) stackdroid
2026-02-25 21:08:22 +0100ctk(~calimero@ctkarch.org) (Changing host)
2026-02-25 21:08:22 +0100ctk(~calimero@user/calimeroteknik) CalimeroTeknik
2026-02-25 21:11:21 +0100wickedja`(~user@2605:8d80:5430:818:b927:d532:959:409c) (Ping timeout: 246 seconds)
2026-02-25 21:13:15 +0100ctkCalimeroTeknik
2026-02-25 21:20:10 +0100Pozyomka(~pyon@user/pyon) (Ping timeout: 245 seconds)
2026-02-25 21:20:35 +0100Pozyomka(~pyon@user/pyon) pyon
2026-02-25 21:20:48 +0100fgarcia(~lei@user/fgarcia) (Ping timeout: 246 seconds)
2026-02-25 21:24:55 +0100machinedgod(~machinedg@d172-219-48-230.abhsia.telus.net) (Ping timeout: 264 seconds)
2026-02-25 21:31:52 +0100dtman34(~dtman34@2601:447:d183:2302:b0c5:8965:1c3f:d560) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
2026-02-25 21:32:13 +0100dtman34(~dtman34@2601:447:d183:2302:b0c5:8965:1c3f:d560) dtman34
2026-02-25 21:36:22 +0100Square3(~Square@user/square) (Ping timeout: 256 seconds)
2026-02-25 21:43:22 +0100pavonia(~user@user/siracusa) siracusa
2026-02-25 21:45:58 +0100Googulator88(~Googulato@2a01-036d-0106-499d-5cc3-861f-fb3b-e380.pool6.digikabel.hu)
2026-02-25 21:47:34 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) lisbeths
2026-02-25 21:50:33 +0100Googulator(~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu) (Ping timeout: 272 seconds)
2026-02-25 21:53:36 +0100Milan_Vanca(~milan@88.212.61.169) (Quit: WeeChat 4.7.2)
2026-02-25 21:57:33 +0100takuan(~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 246 seconds)
2026-02-25 21:59:44 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-25 22:02:06 +0100kaankeskin(~kaankeski@user/kaankeskin) (Quit: Ping timeout (120 seconds))
2026-02-25 22:03:09 +0100gAy_Dragon(A_D@libera/staff/dragon) (Quit: ZNC - https://znc.in)
2026-02-25 22:06:02 +0100morj_away(~morj@user/morj) (Quit: Konversation terminated!)
2026-02-25 22:06:22 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9)
2026-02-25 22:12:03 +0100kaankeskin(~kaankeski@user/kaankeskin) kaankeskin
2026-02-25 22:12:11 +0100A_Dragon(A_D@libera/staff/dragon) ad
2026-02-25 22:25:44 +0100misterfish(~misterfis@84.53.85.146) misterfish
2026-02-25 22:48:46 +0100terrorjack(~terrorjac@2a01:4f8:271:2d98::2) (Quit: The Lounge - https://thelounge.chat)
2026-02-25 22:50:22 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 268 seconds)
2026-02-25 22:57:17 +0100terrorjack(~terrorjac@static.27.101.55.162.clients.your-server.de) terrorjack
2026-02-25 22:59:51 +0100tjbc(~tjbc@user/fliife) (Ping timeout: 255 seconds)
2026-02-25 23:02:10 +0100target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2026-02-25 23:07:57 +0100tjbc(~tjbc@user/fliife) fliife