2024/11/19

2024-11-19 00:02:46 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate
2024-11-19 00:19:04 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk) (Ping timeout: 252 seconds)
2024-11-19 00:21:21 +0100acidjnk_new(~acidjnk@p200300d6e7283f69701fb6560bc0f0be.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2024-11-19 00:23:00 +0100 <iteratee> briandead: Yes, it looks like that was fixed for reading from a file, but it was left unchanged for reading from a bytestring.
2024-11-19 00:25:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-11-19 00:28:20 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk) gabriel_sevecek
2024-11-19 00:35:47 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-19 00:52:35 +0100Alleria_(~Alleria@user/alleria) Alleria
2024-11-19 00:53:01 +0100troojg(~troojg@user/troojg) troojg
2024-11-19 00:56:50 +0100Alleria(~Alleria@user/alleria) (Ping timeout: 272 seconds)
2024-11-19 00:59:00 +0100chele(~chele@user/chele) (Remote host closed the connection)
2024-11-19 00:59:29 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-11-19 01:01:55 +0100Everything(~Everythin@31.144.80.156) (Quit: leaving)
2024-11-19 01:11:29 +0100alp(~alp@2001:861:e3d6:8f80:568b:9761:243e:95b5) (Ping timeout: 248 seconds)
2024-11-19 01:14:18 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2024-11-19 01:19:26 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 244 seconds)
2024-11-19 01:19:32 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2024-11-19 01:20:56 +0100Lord_of_Life_Lord_of_Life
2024-11-19 01:25:35 +0100Alleria(~Alleria@user/alleria) Alleria
2024-11-19 01:27:29 +0100Alleria_(~Alleria@user/alleria) (Ping timeout: 248 seconds)
2024-11-19 01:41:16 +0100sprotte24(~sprotte24@p200300d16f36e9004570e4f99d260ace.dip0.t-ipconnect.de) (Quit: Leaving)
2024-11-19 01:48:10 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-19 01:48:11 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) (Quit: Nothing to see here. I wasn't there.)
2024-11-19 01:53:14 +0100talismanick(~user@2601:644:937c:ed10::ae5) talismanick
2024-11-19 01:54:30 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-11-19 02:04:11 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds)
2024-11-19 02:06:18 +0100ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2024-11-19 02:06:44 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 255 seconds)
2024-11-19 02:10:27 +0100sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 252 seconds)
2024-11-19 02:12:56 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2024-11-19 02:14:24 +0100Alleria(~Alleria@user/alleria) (Ping timeout: 246 seconds)
2024-11-19 02:24:42 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate
2024-11-19 02:27:47 +0100Alleria(~Alleria@user/alleria) Alleria
2024-11-19 02:47:56 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds)
2024-11-19 02:48:04 +0100son0p(~ff@2800:e2:f80:ee7::4) son0p
2024-11-19 02:51:31 +0100ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2024-11-19 03:02:06 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:02:19 +0100Guest49(~Guest49@2001:16a2:cf8d:df00:80b8:7a13:6821:1741)
2024-11-19 03:02:37 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 03:03:03 +0100Guest49(~Guest49@2001:16a2:cf8d:df00:80b8:7a13:6821:1741) (Client Quit)
2024-11-19 03:03:51 +0100troojg(~troojg@user/troojg) (Ping timeout: 276 seconds)
2024-11-19 03:12:17 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:12:48 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 03:16:09 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds)
2024-11-19 03:20:31 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 264 seconds)
2024-11-19 03:22:08 +0100troojg(~troojg@user/troojg) troojg
2024-11-19 03:22:28 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:22:59 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 03:32:39 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:33:40 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 03:42:50 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:43:21 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 03:45:27 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds)
2024-11-19 03:53:01 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 03:53:32 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 04:03:12 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 04:03:42 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 04:06:08 +0100euleritian(~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Remote host closed the connection)
2024-11-19 04:06:28 +0100euleritian(~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de)
2024-11-19 04:07:03 +0100euleritian(~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Remote host closed the connection)
2024-11-19 04:07:20 +0100euleritian(~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de)
2024-11-19 04:13:07 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2024-11-19 04:13:23 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 04:13:54 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 04:18:40 +0100haetsal(~quassel@221.138.168.192) (Quit: No Ping reply in 180 seconds.)
2024-11-19 04:20:57 +0100haetsal(~quassel@221.138.168.192)
2024-11-19 04:21:12 +0100son0p(~ff@2800:e2:f80:ee7::4) (Ping timeout: 276 seconds)
2024-11-19 04:22:34 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2024-11-19 04:30:19 +0100gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-11-19 04:30:49 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 04:32:48 +0100Alleria(~Alleria@user/alleria) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2024-11-19 04:35:43 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) (Quit: Nothing to see here. I wasn't there.)
2024-11-19 04:35:54 +0100cptaffe(~cptaffe@user/cptaffe) (Ping timeout: 260 seconds)
2024-11-19 04:36:49 +0100cptaffe(~cptaffe@user/cptaffe) cptaffe
2024-11-19 04:36:50 +0100Alleria(~Alleria@user/alleria) Alleria
2024-11-19 04:38:22 +0100dpk(~dpk@jains.nonceword.org)
2024-11-19 04:49:05 +0100troojg(~troojg@user/troojg) (Ping timeout: 248 seconds)
2024-11-19 04:55:41 +0100chiselfuse(~chiselfus@user/chiselfuse) (Ping timeout: 260 seconds)
2024-11-19 04:58:26 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2024-11-19 05:03:16 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2024-11-19 05:03:31 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2024-11-19 05:03:56 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2024-11-19 05:37:41 +0100califax(~califax@user/califx) (Ping timeout: 260 seconds)
2024-11-19 05:37:59 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-19 05:38:42 +0100califax(~califax@user/califx) califx
2024-11-19 05:51:49 +0100lockywolf(~lockywolf@coconut.lockywolf.net) lockywolf
2024-11-19 05:55:24 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 260 seconds)
2024-11-19 06:06:29 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-11-19 06:13:37 +0100troydm(~troydm@user/troydm) (Ping timeout: 265 seconds)
2024-11-19 06:20:23 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-19 06:31:39 +0100son0p(~ff@2800:e2:f80:ee7::4) son0p
2024-11-19 06:34:47 +0100notzmv(~daniel@user/notzmv) notzmv
2024-11-19 06:43:19 +0100michalz(~michalz@185.246.207.193)
2024-11-19 06:58:53 +0100euleritian(~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Ping timeout: 244 seconds)
2024-11-19 06:59:24 +0100euleritian(~euleritia@dynamic-176-007-203-044.176.7.pool.telefonica.de)
2024-11-19 07:07:28 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2024-11-19 07:07:29 +0100alp(~alp@2001:861:8ca0:4940:9ecb:356a:49a5:63a3)
2024-11-19 07:19:18 +0100unalmasIRC(~alphazone@2.219.56.221) (Ping timeout: 276 seconds)
2024-11-19 07:23:26 +0100briandaed(~root@user/briandaed) briandaed
2024-11-19 07:25:30 +0100euleritian(~euleritia@dynamic-176-007-203-044.176.7.pool.telefonica.de) (Ping timeout: 252 seconds)
2024-11-19 07:25:38 +0100euleritian(~euleritia@77.22.252.159)
2024-11-19 07:25:49 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-11-19 07:30:05 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-11-19 07:38:45 +0100euleritian(~euleritia@77.22.252.159) (Ping timeout: 248 seconds)
2024-11-19 07:39:29 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de)
2024-11-19 07:44:58 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-11-19 07:45:38 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de)
2024-11-19 07:50:14 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-11-19 07:50:31 +0100euleritian(~euleritia@77.22.252.159)
2024-11-19 07:56:16 +0100alphazone(~alphazone@2.219.56.221)
2024-11-19 07:57:32 +0100euleritian(~euleritia@77.22.252.159) (Ping timeout: 265 seconds)
2024-11-19 07:59:58 +0100Square2(~Square4@user/square) Square
2024-11-19 08:00:05 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de)
2024-11-19 08:00:53 +0100acidjnk_new(~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de)
2024-11-19 08:04:21 +0100dumptruckman(~dumptruck@66-175-211-75.ip.linodeusercontent.com) (Ping timeout: 252 seconds)
2024-11-19 08:05:10 +0100dumptruckman(~dumptruck@66-175-211-75.ip.linodeusercontent.com)
2024-11-19 08:17:59 +0100zlqrvx_(~zlqrvx@2001:8003:8c8b:e00:58ff:a30c:881f:1fe4) (Quit: %quit%)
2024-11-19 08:18:00 +0100j1n37(j1n37@user/j1n37) (Read error: Connection reset by peer)
2024-11-19 08:24:50 +0100j1n37(j1n37@user/j1n37) j1n37
2024-11-19 08:29:02 +0100kronicmage(~kronicmag@neotame.csclub.uwaterloo.ca) (Ping timeout: 272 seconds)
2024-11-19 08:29:25 +0100kronicmage(~kronicmag@neotame.csclub.uwaterloo.ca)
2024-11-19 08:33:16 +0100zlqrvx(~zlqrvx@user/zlqrvx) zlqrvx
2024-11-19 08:55:12 +0100alp(~alp@2001:861:8ca0:4940:9ecb:356a:49a5:63a3) (Remote host closed the connection)
2024-11-19 08:55:29 +0100alp(~alp@2001:861:8ca0:4940:e2f7:5955:8ab2:2afc)
2024-11-19 08:58:59 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-11-19 08:59:49 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac
2024-11-19 09:00:01 +0100caconym(~caconym@user/caconym) (Quit: bye)
2024-11-19 09:00:41 +0100caconym(~caconym@user/caconym) caconym
2024-11-19 09:03:22 +0100misterfish(~misterfis@h239071.upc-h.chello.nl) misterfish
2024-11-19 09:19:29 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2024-11-19 09:29:55 +0100p3n(~p3n@217.198.124.246) (Quit: ZNC 1.8.2 - https://znc.in)
2024-11-19 09:30:58 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-11-19 09:31:15 +0100euleritian(~euleritia@77.22.252.159)
2024-11-19 09:31:35 +0100p3n(~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) p3n
2024-11-19 09:32:24 +0100rootnode`(~user@softbank126206228003.bbtec.net)
2024-11-19 09:32:36 +0100rootnode`(~user@softbank126206228003.bbtec.net) (Client Quit)
2024-11-19 09:33:06 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2024-11-19 09:36:55 +0100petrichor(~znc-user@user/petrichor) petrichor
2024-11-19 09:37:45 +0100emmanuelux_(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2024-11-19 09:46:39 +0100euleritian(~euleritia@77.22.252.159) (Ping timeout: 252 seconds)
2024-11-19 09:47:21 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de)
2024-11-19 09:52:02 +0100ft(~ft@p4fc2a26f.dip0.t-ipconnect.de) (Quit: leaving)
2024-11-19 09:52:16 +0100ski(~ski@remote11.chalmers.se) (Read error: Connection reset by peer)
2024-11-19 09:54:20 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate
2024-11-19 09:54:57 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) (Remote host closed the connection)
2024-11-19 09:58:19 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod
2024-11-19 09:59:00 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 10:03:54 +0100chele(~chele@user/chele) chele
2024-11-19 10:04:21 +0100shilowon(~Guest4@105.112.117.167)
2024-11-19 10:04:25 +0100gorignak(~gorignak@user/gorignak) (Read error: Connection reset by peer)
2024-11-19 10:04:47 +0100gorignak(~gorignak@user/gorignak) gorignak
2024-11-19 10:06:19 +0100euleritian(~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-11-19 10:06:36 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de)
2024-11-19 10:08:47 +0100divya`(~user@139.5.11.231)
2024-11-19 10:09:25 +0100divya(~user@139.5.11.231) (Read error: Connection reset by peer)
2024-11-19 10:13:05 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-11-19 10:14:29 +0100misterfish(~misterfis@h239071.upc-h.chello.nl) (Ping timeout: 248 seconds)
2024-11-19 10:17:26 +0100 <Leary> So I'm generating instances with TH, but I'm not sure how best to deal with messy constraints. I can generate a /sufficient/ (highly redundant and simplifiable) constraint easily, but cleaning it up looks to be quite a hassle. Any tips?
2024-11-19 10:23:37 +0100misterfish(~misterfis@31-161-39-137.biz.kpn.net) misterfish
2024-11-19 10:25:26 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2024-11-19 10:35:37 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2024-11-19 10:37:15 +0100shilowon(~Guest4@105.112.117.167) (Quit: Ping timeout (120 seconds))
2024-11-19 10:41:00 +0100igemnace(~igemnace@user/igemnace) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in)
2024-11-19 10:41:18 +0100sroso(~sroso@user/SrOso) SrOso
2024-11-19 10:42:28 +0100igemnace(~igemnace@user/igemnace) igemnace
2024-11-19 10:44:28 +0100Guest4(~Guest4@105.112.117.167)
2024-11-19 10:53:34 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2024-11-19 10:54:11 +0100Guest4(~Guest4@105.112.117.167) (Quit: Ping timeout (120 seconds))
2024-11-19 10:55:35 +0100 <jackdk> Generate deriving via instances instead of generating the constraint directly, maybe?
2024-11-19 10:55:54 +0100carbolymer(~carbolyme@dropacid.net) (Read error: Connection reset by peer)
2024-11-19 10:58:11 +0100sand-witch(~m-mzmz6l@vmi833741.contaboserver.net) (Ping timeout: 255 seconds)
2024-11-19 11:02:09 +0100 <Leary> jackdk: Hmmm. So the idea is to hide the messy instances by tying them to a private newtype wrapper, then produce a standalone `deriving instance ... via ...` declaration, for which GHC would infer a clean context? Sounds feasible...
2024-11-19 11:05:43 +0100Guest4(~Guest4@102.91.71.26)
2024-11-19 11:06:05 +0100Guest4(~Guest4@102.91.71.26) (Client Quit)
2024-11-19 11:06:35 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-19 11:06:41 +0100CrunchyFlakes(~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de)
2024-11-19 11:07:15 +0100Guest4(~Guest4@102.91.71.26)
2024-11-19 11:07:21 +0100Guest4(~Guest4@102.91.71.26) (Client Quit)
2024-11-19 11:12:58 +0100lxsameer(~lxsameer@Serene/lxsameer) lxsameer
2024-11-19 11:13:12 +0100 <jackdk> Something like that. I don't know enough about your problem to be sure
2024-11-19 11:18:31 +0100 <Leary> jackdk: For e.g. `type data Wibble = Wobble Foo | Nibble Wibble Wibble` I'm writing TH that ought to generate `deriving instance Show (Wibble @ t)` given that we already have `Show! Foo` in scope, but really it will generate `deriving instance (Show! Foo, Show! Wibble, Show! Wibble) => Show (Wibble @ t)`.
2024-11-19 11:19:23 +0100 <Leary> (where `type f ! k = forall t. f (k @ t)`)
2024-11-19 11:21:54 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2024-11-19 11:23:37 +0100mange(~user@user/mange) (Quit: Zzz...)
2024-11-19 11:53:16 +0100__monty__(~toonn@user/toonn) toonn
2024-11-19 12:01:56 +0100 <kuribas> Would it be possible to train a llm to generate better error messages?
2024-11-19 12:02:31 +0100 <Hecate> kuribas: hahahahahahaha
2024-11-19 12:02:32 +0100 <Hecate> you silly
2024-11-19 12:02:33 +0100 <Hecate> :P
2024-11-19 12:03:01 +0100 <int-e> @ghc
2024-11-19 12:03:01 +0100 <lambdabot> Its main purpose is to encapsulate the Horrible State Hack
2024-11-19 12:03:04 +0100 <kuribas> Is that so outrageous?
2024-11-19 12:03:20 +0100 <int-e> @ghc
2024-11-19 12:03:20 +0100 <lambdabot> the eta-reduction property does not hold
2024-11-19 12:03:28 +0100 <Hecate> kuribas: no it's not outrageous, it's ridiculous :P
2024-11-19 12:03:30 +0100 <int-e> kuribas: define "better"
2024-11-19 12:03:41 +0100 <kuribas> More beginner friendly.
2024-11-19 12:04:00 +0100 <int-e> but error messages need to be accurate
2024-11-19 12:04:02 +0100 <kuribas> I am happy with GHC error messages, but I am interested in creating a general purpose dependently typed language.
2024-11-19 12:04:06 +0100 <int-e> and LLMs are terrible at that
2024-11-19 12:04:11 +0100 <Hecate> kuribas: To rephrase your suggestion: "Would it be possible to train an LLM on an existing dataset to generate new things, which an LLM simply cannot?"
2024-11-19 12:04:35 +0100 <kuribas> Or maybe elaborate a bit then?
2024-11-19 12:04:40 +0100 <Hecate> kuribas: ah, DT languages with good ergonomics are something that need you to advance the state of the art
2024-11-19 12:04:52 +0100 <kuribas> Hecate: agreed :)
2024-11-19 12:04:53 +0100 <Hecate> best case, an LLM will feed off of your work later
2024-11-19 12:05:07 +0100 <kuribas> When dabbling with idris I feel there is a lot of low hanging fruit there.
2024-11-19 12:05:14 +0100 <Hecate> there are indeed
2024-11-19 12:05:16 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2024-11-19 12:05:23 +0100 <Hecate> maybe improve idris too while you're at it? :D
2024-11-19 12:05:33 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 12:05:35 +0100 <kuribas> yeah ...
2024-11-19 12:05:52 +0100 <kuribas> One blocking issue for me with idris and error messages is the ad-hoc polymorphism.
2024-11-19 12:06:05 +0100 <kuribas> Which makes getting accurate error message difficult.
2024-11-19 12:06:18 +0100 <kuribas> And type checking very slow.
2024-11-19 12:07:20 +0100 <kuribas> It's a nice to have in idris, because it allows syntactic overloading, but I am not sure it is necessary to have.
2024-11-19 12:09:56 +0100notzmv(~daniel@user/notzmv) (Read error: Connection reset by peer)
2024-11-19 12:10:02 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2024-11-19 12:10:30 +0100sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-11-19 12:10:49 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2024-11-19 12:11:12 +0100 <kuribas> For example, do can be overloaded by defining your own (>>=) function.
2024-11-19 12:21:35 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 12:29:18 +0100pavonia(~user@user/siracusa) siracusa
2024-11-19 12:29:34 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2024-11-19 12:31:19 +0100 <geekosaur> we have that in at least two ways though (RebindableSyntax and QualifiedDo)
2024-11-19 12:31:19 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-11-19 12:32:28 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de)
2024-11-19 12:34:08 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2)
2024-11-19 12:36:54 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
2024-11-19 12:38:18 +0100euleritian(~euleritia@dynamic-176-001-000-183.176.1.pool.telefonica.de)
2024-11-19 12:39:20 +0100igemnace(~igemnace@user/igemnace) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in)
2024-11-19 12:40:42 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2024-11-19 12:42:10 +0100igemnace(~igemnace@user/igemnace) igemnace
2024-11-19 12:43:05 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate
2024-11-19 12:45:55 +0100 <hellwolf> what's the standard "hush" function for Ether a b -> Maybe b?
2024-11-19 12:45:58 +0100 <hellwolf> I can't find one.
2024-11-19 12:46:39 +0100sprotte24(~sprotte24@p200300d16f3e1d00202469f625d2cba6.dip0.t-ipconnect.de)
2024-11-19 12:46:47 +0100 <mari-estel> @hoogle Either a b -> Maybe b
2024-11-19 12:46:48 +0100 <lambdabot> Data.Either.Combinators rightToMaybe :: Either a b -> Maybe b
2024-11-19 12:46:48 +0100 <lambdabot> Data.Either.Extra eitherToMaybe :: Either a b -> Maybe b
2024-11-19 12:46:48 +0100 <lambdabot> Extra eitherToMaybe :: Either a b -> Maybe b
2024-11-19 12:47:08 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 12:47:12 +0100 <mari-estel> @hoogle Either a b -> Maybe a
2024-11-19 12:47:13 +0100 <lambdabot> Data.Either.Combinators leftToMaybe :: Either a b -> Maybe a
2024-11-19 12:47:13 +0100 <lambdabot> Rebase.Prelude leftToMaybe :: () => Either a b -> Maybe a
2024-11-19 12:47:13 +0100 <lambdabot> Protolude leftToMaybe :: Either l r -> Maybe l
2024-11-19 12:47:29 +0100 <hellwolf> so lambdabot doesn't show which package it's from.
2024-11-19 12:47:41 +0100sprotte24(~sprotte24@p200300d16f3e1d00202469f625d2cba6.dip0.t-ipconnect.de) (Client Quit)
2024-11-19 12:47:47 +0100 <hellwolf> but I can't find it from base... :/
2024-11-19 12:48:03 +0100 <geekosaur> it's not in base
2024-11-19 12:48:26 +0100 <geekosaur> eitherToMaybe = either Nothing Just
2024-11-19 12:48:35 +0100 <geekosaur> er
2024-11-19 12:48:42 +0100 <geekosaur> eitherToMaybe = either (const Nothing) Just
2024-11-19 12:49:16 +0100 <dminuoso> It's usually called `hush`
2024-11-19 12:49:25 +0100 <geekosaur> I think losing information is not encouraged, though
2024-11-19 12:50:01 +0100 <dminuoso> Every non-injective loses information. :-)
2024-11-19 12:51:11 +0100 <hellwolf> yea, fair enough. in this case, the error information is not too useful in production.
2024-11-19 12:51:24 +0100 <hellwolf> I opt just inline it: case S.decode bs of Left _ -> Nothing; Right a -> Just (ADDR a)
2024-11-19 12:52:00 +0100 <dminuoso> hellwolf: You can alsoo just write `either Nothing Just` inline.
2024-11-19 12:52:15 +0100yaroot(~yaroot@2400:4052:ac0:d901:1cf4:2aff:fe51:c04c) (Remote host closed the connection)
2024-11-19 12:52:23 +0100 <dminuoso> Or `either nothing (Just . Addr)` in your case.
2024-11-19 12:52:45 +0100 <hellwolf> That's smart
2024-11-19 12:53:22 +0100 <Leary> % :t asum . fmap Just
2024-11-19 12:53:22 +0100 <yahb2> asum . fmap Just :: (Foldable t, Functor t) => t a -> Maybe a
2024-11-19 12:53:28 +0100 <Leary> Another option.
2024-11-19 12:53:36 +0100yaroot(~yaroot@2400:4052:ac0:d901:1cf4:2aff:fe51:c04c) yaroot
2024-11-19 12:53:53 +0100 <hellwolf> $ echo 'make this shorter: case S.decode bs of Left _ -> Nothing; Right a -> Just (ADDR a)' | chatgpt
2024-11-19 12:53:53 +0100 <hellwolf> This: S.decode bs >>= Just . ADDR
2024-11-19 12:54:13 +0100 <dminuoso> That looks wrong
2024-11-19 12:54:35 +0100 <hellwolf> it compiles. actually it's correct. since Either is a monad
2024-11-19 12:54:45 +0100 <hellwolf> no, it doesn't compile
2024-11-19 12:54:46 +0100 <hellwolf> sorry
2024-11-19 12:54:48 +0100 <hellwolf> bad gpt
2024-11-19 12:54:59 +0100 <dminuoso> hellwolf: Here's a quick hint
2024-11-19 12:55:02 +0100 <dminuoso> :t (>>=)
2024-11-19 12:55:03 +0100 <lambdabot> Monad m => m a -> (a -> m b) -> m b
2024-11-19 12:55:14 +0100 <dminuoso> Note that it's the same `m` here in both arguments and the resultg?
2024-11-19 12:56:10 +0100 <hellwolf> yea, got it, it would stay Either
2024-11-19 12:56:43 +0100 <hellwolf> but "either" is good. here shows my lack of production experience of Haskell, in general. I only plays around :)
2024-11-19 12:57:47 +0100 <dminuoso> No worries. Leary's answer is more clever, though if you are curious.
2024-11-19 12:59:33 +0100 <hellwolf> yes, that's interest. but I had to import Data.Applicative
2024-11-19 12:59:54 +0100 <hellwolf> same for nothing <-- where is it even from? I used Const nothing
2024-11-19 13:00:04 +0100son0p(~ff@2800:e2:f80:ee7::4) (Ping timeout: 260 seconds)
2024-11-19 13:00:09 +0100caconym(~caconym@user/caconym) (Quit: bye)
2024-11-19 13:00:23 +0100 <dminuoso> hellwolf: You can use hoogle https://hoogle.haskell.org/?hoogle=nothing to discover likely origins of identifiers.
2024-11-19 13:01:09 +0100 <dminuoso> As you can see, it's from other packages. I think hoogle always lists `base` references first.
2024-11-19 13:01:33 +0100 <dminuoso> (Or maybe its defined in some module in your project)
2024-11-19 13:02:01 +0100caconym(~caconym@user/caconym) caconym
2024-11-19 13:03:22 +0100sroso(~sroso@user/SrOso) (Quit: Leaving :))
2024-11-19 13:03:31 +0100chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2024-11-19 13:05:40 +0100 <hellwolf> I can't wrap my head around intuitively wrt asum. fmap Just. I can see the type matches.
2024-11-19 13:05:41 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds)
2024-11-19 13:05:41 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds)
2024-11-19 13:05:58 +0100 <hellwolf> "The sum of a collection of actions using (<|>), generalizing concat."
2024-11-19 13:07:40 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2024-11-19 13:07:46 +0100mari-estel(~mari-este@user/mari-estel) (Remote host closed the connection)
2024-11-19 13:08:08 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2024-11-19 13:09:03 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2024-11-19 13:10:52 +0100 <kuribas> geekosaur: It's not the same. In haskell you must have a non ambiguous way to resolve (>>=), but in idris it's overloaded, it will do a search.
2024-11-19 13:11:57 +0100 <kuribas> geekosaur: rebindable syntax will use the (>>=) in scope, but in idris it will try every definition of (>>=), and pick the one that typechecks..
2024-11-19 13:12:56 +0100 <Leary> Sounds evil. Isn't that just IncoherentInstances?
2024-11-19 13:14:20 +0100 <kuribas> Leary: no, that's just type checking, implicit resolution and proof search are different features.
2024-11-19 13:14:30 +0100 <kuribas> instance resolution corresponds to proof search.
2024-11-19 13:14:46 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
2024-11-19 13:14:59 +0100 <kuribas> Literally. They merged the auto implicit feature and type classes.
2024-11-19 13:15:06 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2024-11-19 13:15:16 +0100euleritian(~euleritia@dynamic-176-001-000-183.176.1.pool.telefonica.de) (Read error: Connection reset by peer)
2024-11-19 13:15:28 +0100 <dminuoso> Sounds like the type system way of duck typing. :-)
2024-11-19 13:15:34 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de)
2024-11-19 13:15:48 +0100 <dminuoso> If it type checks like a duck, we shall make it a duck.
2024-11-19 13:16:15 +0100 <kuribas> Isn't duck typing the equivalent of type classes?
2024-11-19 13:17:25 +0100 <dminuoso> Id say not really.
2024-11-19 13:18:26 +0100stiell_(~stiell@gateway/tor-sasl/stiell) stiell
2024-11-19 13:18:42 +0100 <kuribas> Well, if duck typing is structural typing, then idris doesn't have it, but it's possible to emulate it with dependent types.
2024-11-19 13:18:44 +0100Digit(~user@user/digit) (Ping timeout: 260 seconds)
2024-11-19 13:19:04 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac
2024-11-19 13:19:06 +0100 <kuribas> For example anonymous records.
2024-11-19 13:19:10 +0100 <dminuoso> In duck typing, rather than formally (via a type system) asserting that you have some sort of impedance match between componets (say the function signature with the passed arguments), if it works out at runtime, thats just as good.
2024-11-19 13:19:40 +0100 <kuribas> "if it works out". If it doesn't, you get an unpredictable error.
2024-11-19 13:19:47 +0100 <dminuoso> Duck typing is nothing that you can sensibly annotate with formal names, because its a very loose abstract idea.
2024-11-19 13:20:04 +0100 <dminuoso> Well, the "if it doesn't" is not something that duck type proponents really worry about.
2024-11-19 13:20:17 +0100 <kuribas> looks like structural subtyping to me: https://peps.python.org/pep-0544/
2024-11-19 13:20:41 +0100 <dminuoso> It mostly arises from the idea of smalltalk object orientation, where if some object behaves as if it was a duck, you can just call it a duck.
2024-11-19 13:21:34 +0100 <dminuoso> kuribas: Structural subtyping captures some, but not all commonly mentioned, ideas of duck typing.
2024-11-19 13:23:29 +0100 <mauke> structural doctyping
2024-11-19 13:31:18 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2024-11-19 13:31:26 +0100 <bwe> I'd like to define some instances for a type class without the member of the class as argument, like `f :: Int` instead of `f :: a -> Int`. Reason: Before `a` gets constructed, I need some functions that are specific to the variant of `a`. Which approaches do you recommend?
2024-11-19 13:34:47 +0100 <haskellbridge> <hellwolf> Proxy
2024-11-19 13:34:47 +0100 <haskellbridge> or AmbiguousTypes
2024-11-19 13:34:55 +0100 <Leary> bwe: Proxies and TypeApplications are the usual options. If you're fine with being limited to GHC 9.10 or newer you can use RequiredTypeArguments instead.
2024-11-19 13:36:30 +0100 <mauke> f :: Const Int a
2024-11-19 13:40:05 +0100sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-11-19 13:40:23 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2024-11-19 13:41:48 +0100notzmv(~daniel@user/notzmv) notzmv
2024-11-19 13:44:39 +0100alexherbo2(~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) alexherbo2
2024-11-19 13:47:11 +0100 <bwe> mauke: Excellent. Does my job.
2024-11-19 13:49:37 +0100 <hellwolf> interesting :)
2024-11-19 13:49:49 +0100 <hellwolf> Const () a probably could work too
2024-11-19 13:50:09 +0100 <mauke> that's just Proxy
2024-11-19 13:50:56 +0100carbolymer(~carbolyme@dropacid.net) carbolymer
2024-11-19 13:52:13 +0100 <hellwolf> right. I also misread the original question, in the first place.
2024-11-19 13:56:06 +0100lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds)
2024-11-19 13:56:10 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-11-19 13:56:49 +0100acidjnk_new(~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2024-11-19 14:00:27 +0100Digit(~user@user/digit) Digit
2024-11-19 14:01:03 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
2024-11-19 14:01:13 +0100acidjnk_new(~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) acidjnk
2024-11-19 14:01:21 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-11-19 14:01:28 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Remote host closed the connection)
2024-11-19 14:05:37 +0100sand-witch(~m-mzmz6l@vmi833741.contaboserver.net)
2024-11-19 14:07:08 +0100 <Leary> Oh, bit late, but I thought of something cute and silly!
2024-11-19 14:07:14 +0100 <Leary> % :t find \_ -> True
2024-11-19 14:07:14 +0100 <yahb2> find \_ -> True :: Foldable t => t a -> Maybe a
2024-11-19 14:07:17 +0100 <Leary> hellwolf: ^
2024-11-19 14:10:18 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) (Ping timeout: 244 seconds)
2024-11-19 14:19:34 +0100housemate(~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate
2024-11-19 14:27:46 +0100 <hellwolf> that's very cute, indeed
2024-11-19 14:28:05 +0100 <hellwolf> it all hinges all the fact of the Foldable Either instance.
2024-11-19 14:28:28 +0100 <hellwolf> Left elements are mempty, right elements are actually "foldable"
2024-11-19 14:30:53 +0100 <hellwolf> fmap ADDR . find (const True) $ S.decode b
2024-11-19 14:30:59 +0100 <hellwolf> or
2024-11-19 14:31:00 +0100 <hellwolf> either (const Nothing) (Just . ADDR) (S.decode b)
2024-11-19 14:31:38 +0100 <hellwolf> hard to choose :)
2024-11-19 14:31:48 +0100 <hellwolf> import Data.List (find) is required though
2024-11-19 14:34:21 +0100 <Leary> Personally, I would go with `asum`. Either way, get them from `Data.Foldable`; a `Data.List` import suggests list specialisation (which could actually happen at some point).
2024-11-19 14:34:51 +0100 <dminuoso> bwe: Id say Proxy is the least akward and most common way.
2024-11-19 14:35:11 +0100 <dminuoso> Const will constantly (the pun!) be in the way because you need to wrap/unwrap potentially many times
2024-11-19 14:35:23 +0100 <dminuoso> And it will probably require using ScopedTypeVariables and some annoyances.
2024-11-19 14:35:48 +0100rvalue(~rvalue@user/rvalue) (Ping timeout: 265 seconds)
2024-11-19 14:36:09 +0100 <hellwolf> Leary: I could balance between readability (which is subjective, up to the code reader's knowledge about all these instances) and performance; so what about any performance consideration?
2024-11-19 14:36:20 +0100 <bwe> dminuoso: that's exactly where I am stuck right now: applying a function wrapped in a Const to values wrapped in Const
2024-11-19 14:36:24 +0100 <dminuoso> Leary: That `find (const True)` is cunning. :-)
2024-11-19 14:36:45 +0100 <dminuoso> bwe: Yeah, just use Proxy.
2024-11-19 14:37:07 +0100 <hellwolf> is Const a r Coercible with a?
2024-11-19 14:37:15 +0100 <dminuoso> bwe: For extra points parameterize by `proxy Foo` rather than `Proxy `Foo`
2024-11-19 14:37:54 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-11-19 14:38:05 +0100 <hellwolf> dminuoso: I never understood that. I see base code having lower case proxy in many places. why?
2024-11-19 14:38:20 +0100 <dminuoso> hellwolf: It allows for arbitrary parameterized types.
2024-11-19 14:38:37 +0100 <hellwolf> I mean, okay, what is the second example of proxy? from a differenr base, perhaps?
2024-11-19 14:38:38 +0100 <bwe> dminuoso: Do you mean I should define `proxy` as my own function? I don't find `proxy` in https://hackage.haskell.org/package/base-4.20.0.1/docs/Data-Proxy.html
2024-11-19 14:38:41 +0100 <Leary> hellwolf: All approaches should optimise to pretty much the same code; it shouldn't matter.
2024-11-19 14:38:44 +0100 <dminuoso> bwe: No, as a type variable.
2024-11-19 14:39:10 +0100 <dminuoso> bwe: i.e. `f :: HasFoo a => proxy a -> ...`
2024-11-19 14:39:29 +0100 <dminuoso> Which is essentially just `f :: forall proxy a. HasFoo a => proxy a -> ...`
2024-11-19 14:39:31 +0100 <[exa]> Is there any "good natural" way to make an instances for `Ord (Tree a)` other than what is in Data.Tree? The one there is the automatic one obtained with `deriving`, i.e. basically follows the syntax. I feel like that ordering is very left-subtree-biased but no idea how to compensate for that (and esp. if there's some ground reason for why not).
2024-11-19 14:39:35 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2024-11-19 14:39:42 +0100 <hellwolf> Leary: in that case, I still think either has lower requirement of for Haskell knowledge for readability
2024-11-19 14:39:52 +0100rvalue(~rvalue@user/rvalue) rvalue
2024-11-19 14:39:53 +0100 <hellwolf> but it was fun to discover the N ways of doing the same thing.
2024-11-19 14:40:00 +0100 <dminuoso> bwe: (I have added the constraint just as an example, since many uses of Proxy usually only make sense together with a constraint)
2024-11-19 14:40:47 +0100 <dminuoso> [exa]: If there is not a single authoritative instance, I would hide them behind newtypes.
2024-11-19 14:41:40 +0100 <[exa]> dminuoso: yeah me too, which brings me to the question "why is the default `deriving Ord` THE authoritative one"
2024-11-19 14:42:01 +0100 <dminuoso> Sort of how ZonedTime has no Eq instance because there's two different ways to think about equality, none of them clearly better.
2024-11-19 14:42:34 +0100 <bwe> dminuoso: I don't grasp how to use Proxy instead of Const. `Const Int a` becomes what using Proxy?
2024-11-19 14:42:46 +0100 <dminuoso> bwe: Just add an extra argument.
2024-11-19 14:43:01 +0100 <dminuoso> Always make it an argument.
2024-11-19 14:43:16 +0100 <bwe> oh, that's it.
2024-11-19 14:43:23 +0100 <dminuoso> 13:39:10 dminuoso │ bwe: i.e. `f :: HasFoo a => proxy a -> ...`
2024-11-19 14:43:34 +0100 <bwe> dminuoso: I missed that message! Thanks!
2024-11-19 14:43:35 +0100 <Leary> [exa], dminuoso: I wouldn't bother with that for `Ord`. Usually you don't actually want to sort e.g. trees, you just want /any/ Ord instance for loggy assymptotics in things like Set/Map/etc.
2024-11-19 14:44:03 +0100 <[exa]> saaaaaad but truuuuuuueeeeee
2024-11-19 14:44:44 +0100 <dminuoso> Yup, and if you really want it just add via newtype with some haddock so the price foor your comparee is obvious.
2024-11-19 14:45:35 +0100 <hellwolf> as a bit OCD in certain things, I find the choice between with or without "forall." an nuance. I sometimes do "forall." . Is that psychopathic?
2024-11-19 14:46:11 +0100 <dminuoso> bwe: The beauty here is that you can bind that proxy to a parameter name and pass it along for further functions needing that type tag.
2024-11-19 14:46:18 +0100 <dminuoso> bwe: servant does this all over the place, by the way.
2024-11-19 14:46:54 +0100 <bwe> dminuoso: I get `f :: HasFoo a => Proxy a -> b -> c`, what's the next step to understand turning `Proxy` into type argument `proxy`?
2024-11-19 14:47:10 +0100 <dminuoso> bwe: You just call at some point with `f (Proxy :: Proxy Int)`
2024-11-19 14:47:40 +0100 <dminuoso> Or if you like, one of the few safe uses of type applications: f (Proxy @Int)
2024-11-19 14:47:49 +0100 <[exa]> hellwolf: might serve as a kinda complexity warning. "hey there's a forall here, smells like rankNtypes"
2024-11-19 14:48:56 +0100 <hellwolf> oh? I haven't seen that. but what choice do I have if I just want to say, "there is no other type variables, and I want to be clear to you, GHC."
2024-11-19 14:49:49 +0100 <dminuoso> hellwolf: Use a different language. Sadly `forall` is implicitg.
2024-11-19 14:50:33 +0100 <hellwolf> huh? so "Class A a where f :: forall. a -> a" is not good?
2024-11-19 14:50:39 +0100 <Leary> [exa]: BTW, re left-subtree bias and derived instances, the choice between `data Tree a = ... | Node (Tree a) a (Tree a) | ...` and `Node a (Tree a) (Tree a)` will give you depth-first and breadth-first instances respectively for things like Foldable, Traversable and Ord. The latter could be a serious optimisation, since comparisons would average constant rather than log n complexity.
2024-11-19 14:50:48 +0100 <hellwolf> I thought rankn would require "(forall. a) -> a"
2024-11-19 14:50:59 +0100 <hellwolf> a parenthesis is mandatory
2024-11-19 14:51:18 +0100 <dminuoso> hellwolf: Not sure what your `Class A a where f :: forall. a -> a` example is meant to mean.
2024-11-19 14:51:30 +0100 <hellwolf> that's where things get less intuitive for people used to parenthesis being an aid to oprand priority
2024-11-19 14:51:41 +0100 <dminuoso> But shouldn'tg that signature read `f :: forall a. A a => a` ?
2024-11-19 14:52:02 +0100 <[exa]> Leary: oh ok that's a valid point... The Data.Tree is the breadth one, right? (data Tree a = Tree a [Tree a])
2024-11-19 14:52:31 +0100 <Leary> Yeah.
2024-11-19 14:52:39 +0100 <dminuoso> hellwolf: well we could just toss out all fixity and demand that you write a function signature lik `f :: ((A -> B) -> C) -> D
2024-11-19 14:52:50 +0100 <dminuoso> hellwolf: Or we just accept the fact that fixity is part of grammars for less clutter.
2024-11-19 14:53:12 +0100 <bwe> dminuoso: https://paste.tomsmeding.com/DGhLoKgV something like this?
2024-11-19 14:53:19 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 14:53:25 +0100 <mauke> bwe: that's because f doesn't actually need to look at the proxy value. it only cares about the type parameter a, so proxy can be free
2024-11-19 14:53:31 +0100 <[exa]> Leary: ok great thanks
2024-11-19 14:54:09 +0100 <bwe> how then does my instance type signature look like?
2024-11-19 14:54:26 +0100 <dminuoso> bwe: What kind of class are you thinking of?
2024-11-19 14:54:36 +0100 <mauke> bwe: it also means you can define your function without importing Data.Proxy, and if someone already has an expression of the right parameterized type, they can pass that in
2024-11-19 14:54:52 +0100 <mauke> e.g. if you take 'proxy a', then f ([] :: [Int]) is a valid use
2024-11-19 14:55:14 +0100 <mauke> (because proxy = [] for this call)
2024-11-19 14:55:27 +0100 <dminuoso> ^- Of course, [Int] is just some infix notation for `[] Int`
2024-11-19 14:55:49 +0100 <dminuoso> Where proxy ~ []
2024-11-19 14:55:51 +0100 <mauke> (circumfix)
2024-11-19 14:55:56 +0100 <dminuoso> circumfix?
2024-11-19 14:55:59 +0100 <dminuoso> Ah I guess.
2024-11-19 14:56:11 +0100 <mauke> :-)
2024-11-19 14:56:52 +0100 <dminuoso> Ah right, infix is for something like `f :+: b`
2024-11-19 14:57:35 +0100 <dminuoso> bwe: Out of curiosity, that snippet reads `Proxy 3`, where is that from?
2024-11-19 14:59:31 +0100 <bwe> dminuoso: here is some more specific example: https://paste.tomsmeding.com/M0BnSi2q
2024-11-19 14:59:40 +0100 <bwe> (of a type class)
2024-11-19 14:59:54 +0100 <bwe> (before switching to Proxy)
2024-11-19 15:00:06 +0100 <dminuoso> Im not quite sure what the intent is.
2024-11-19 15:00:29 +0100 <dminuoso> You could add `proxy a` to your methods.
2024-11-19 15:00:35 +0100 <dminuoso> (If thats the intent)
2024-11-19 15:00:52 +0100 <dminuoso> That way you could write `getNavigationURIs (Proxy @Website)`
2024-11-19 15:01:05 +0100 <bwe> Yes, it is. I omitted functions with `a` which do exist.
2024-11-19 15:01:16 +0100 <dminuoso> i.e. `class FromWebsite a where getNavigationURIs :: proxy a -> [NaviURI]`
2024-11-19 15:01:28 +0100 <mauke> (the latter part being equivalent to (Proxy :: Proxy Website))
2024-11-19 15:02:23 +0100 <dminuoso> bwe: Take note that this is exactly how servant works its magic:
2024-11-19 15:02:26 +0100 <dminuoso> https://hackage.haskell.org/package/servant-server-0.20.2/docs/Servant-Server.html#t:HasServer
2024-11-19 15:04:11 +0100 <dminuoso> bwe: Fun fact, the proxy pattern is what sizeOf in Storable should arguably use.
2024-11-19 15:04:25 +0100 <dminuoso> You will find plenty of snippets like `sizeOf (undefined :: T)` in the wild.
2024-11-19 15:04:38 +0100 <dminuoso> Something like `sizeOf (Proxy :: Proxy T)` would have been cleaner.
2024-11-19 15:05:30 +0100 <dminuoso> (Now in this particular example it could be argued, that sizeOf might also be applied to actual values not just undefined at a type)
2024-11-19 15:07:28 +0100 <dminuoso> Though we could conceive a world of having `sizeOf :: Storable s => s -> Int`, `sizeOfP :: Storable s => proxy s -> Int`, `alignment :: Storable s => s -> Int` and `alignmentP :: Storable s => proxy s -> Int`
2024-11-19 15:07:53 +0100 <dminuoso> With default implementations of sizeOfP
2024-11-19 15:14:46 +0100 <bwe> dminuoso: wow, I've got it working now. It's magic.
2024-11-19 15:18:53 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-11-19 15:21:25 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-19 15:22:54 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 276 seconds)
2024-11-19 15:24:08 +0100jinsun(~jinsun@user/jinsun) jinsun
2024-11-19 15:30:45 +0100 <bwe> dminuoso, mauke, Leary: Thanks for your inputs!
2024-11-19 15:33:51 +0100 <haskellbridge> <hellwolf> https://kf8nh.com/_heisenbridge/media/matrix.org/UnZTcaLGKnpftQUaEXKifiUY/SmsNSH3-GDQ/image.png
2024-11-19 15:34:10 +0100 <hellwolf> emacs lsp haskell formatting just not ideal, not sure how to fix :/
2024-11-19 15:34:18 +0100 <hellwolf> I bet vscode has it better.
2024-11-19 15:36:41 +0100sawilagar(~sawilagar@user/sawilagar) (Remote host closed the connection)
2024-11-19 15:37:04 +0100sawilagar(~sawilagar@user/sawilagar) sawilagar
2024-11-19 15:42:18 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2024-11-19 15:42:35 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 15:43:33 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2024-11-19 15:44:19 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de)
2024-11-19 15:48:39 +0100euleritian(~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-11-19 15:49:17 +0100euleritian(~euleritia@dynamic-176-001-192-221.176.1.pool.telefonica.de)
2024-11-19 15:50:45 +0100tv(~tv@user/tv) (Quit: derp)
2024-11-19 15:51:19 +0100tv(~tv@user/tv) tv
2024-11-19 16:00:08 +0100alexherbo2(~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) (Remote host closed the connection)
2024-11-19 16:09:08 +0100divya`(~user@139.5.11.231) (Ping timeout: 244 seconds)
2024-11-19 16:17:37 +0100alp(~alp@2001:861:8ca0:4940:e2f7:5955:8ab2:2afc) (Remote host closed the connection)
2024-11-19 16:18:00 +0100alp(~alp@2001:861:8ca0:4940:789d:8e16:7be2:5e3)
2024-11-19 16:18:07 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Remote host closed the connection)
2024-11-19 16:18:16 +0100f-a(ff2a@joined.irc.for-some.fun) f-a
2024-11-19 16:18:26 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert