2022/12/16

2022-12-16 00:00:08 +0100bilegeek_(~bilegeek@2600:1008:b015:7e38:b69d:8e53:dae7:9c4c) (Remote host closed the connection)
2022-12-16 00:00:37 +0100bilegeek_(~bilegeek@2600:1008:b015:7e38:b69d:8e53:dae7:9c4c)
2022-12-16 00:09:08 +0100bilegeek_(~bilegeek@2600:1008:b015:7e38:b69d:8e53:dae7:9c4c) (Remote host closed the connection)
2022-12-16 00:09:22 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 252 seconds)
2022-12-16 00:09:32 +0100bilegeek_(~bilegeek@2600:1008:b015:7e38:b69d:8e53:dae7:9c4c)
2022-12-16 00:11:14 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 246 seconds)
2022-12-16 00:14:35 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-16 00:17:01 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk)
2022-12-16 00:18:51 +0100crazazy``(~user@130.89.173.127)
2022-12-16 00:20:54 +0100crazazy`(~user@130.89.171.62) (Ping timeout: 268 seconds)
2022-12-16 00:22:05 +0100ksqsf(~user@134.209.106.31) (Remote host closed the connection)
2022-12-16 00:24:00 +0100shapr(~user@68.54.166.125) (Remote host closed the connection)
2022-12-16 00:27:35 +0100ubert1(~Thunderbi@p200300ecdf264e7202f1c0a81cd86a27.dip0.t-ipconnect.de)
2022-12-16 00:27:54 +0100ubert(~Thunderbi@p200300ecdf264e1ec8d72b0a2c29e966.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-12-16 00:27:54 +0100ubert1ubert
2022-12-16 00:28:55 +0100crazazy``(~user@130.89.173.127) (Ping timeout: 268 seconds)
2022-12-16 00:30:20 +0100bilegeek_(~bilegeek@2600:1008:b015:7e38:b69d:8e53:dae7:9c4c) (Ping timeout: 260 seconds)
2022-12-16 00:34:24 +0100Topsi(~Topsi@dyndsl-095-033-225-198.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-12-16 00:35:12 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:39df:b639:fbf4:175b) (Remote host closed the connection)
2022-12-16 00:35:31 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2022-12-16 00:35:57 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-16 00:44:05 +0100xff0x_(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 252 seconds)
2022-12-16 00:44:26 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-16 00:45:47 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-16 00:45:47 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-16 00:45:47 +0100wroathe(~wroathe@user/wroathe)
2022-12-16 00:49:47 +0100Guest75(Guest75@2a01:7e01::f03c:92ff:fe5d:7b18) (Quit: Client closed)
2022-12-16 00:50:34 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2022-12-16 00:51:25 +0100ksqsf(~user@134.209.106.31)
2022-12-16 00:53:15 +0100ksqsf(~user@134.209.106.31) ()
2022-12-16 00:53:25 +0100ksqsf(~user@134.209.106.31)
2022-12-16 00:59:37 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-16 01:12:12 +0100acidjnk(~acidjnk@p200300d6e7137a0005c6f28ba6b2016c.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-12-16 01:13:06 +0100raster(~raster@183.82.204.115)
2022-12-16 01:14:15 +0100raster(~raster@183.82.204.115) (Client Quit)
2022-12-16 01:15:38 +0100beefbambi(~beefbambi@183.82.204.115)
2022-12-16 01:19:12 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
2022-12-16 01:21:29 +0100ksqsf(~user@134.209.106.31) (Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.60))
2022-12-16 01:24:04 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-16 01:33:18 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-16 01:37:12 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Quit: WeeChat 3.7.1)
2022-12-16 01:38:42 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-12-16 01:40:39 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-12-16 01:41:41 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds)
2022-12-16 01:45:42 +0100JordiGH(~jordi@user/jordigh) (Remote host closed the connection)
2022-12-16 01:46:15 +0100JordiGH(~jordi@user/jordigh)
2022-12-16 01:46:19 +0100JordiGH(~jordi@user/jordigh) (Remote host closed the connection)
2022-12-16 01:46:38 +0100JordiGH(~jordi@user/jordigh)
2022-12-16 01:46:38 +0100JordiGH(~jordi@user/jordigh) (Remote host closed the connection)
2022-12-16 01:54:47 +0100j4cc3b(~jeffreybe@pool-74-105-2-138.nwrknj.fios.verizon.net)
2022-12-16 01:59:14 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 260 seconds)
2022-12-16 02:01:07 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-16 02:01:07 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-16 02:01:07 +0100wroathe(~wroathe@user/wroathe)
2022-12-16 02:05:26 +0100fizbin(~fizbin@user/fizbin)
2022-12-16 02:09:24 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 02:10:35 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-12-16 02:14:22 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-12-16 02:16:43 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-12-16 02:17:05 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-16 02:35:05 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe)
2022-12-16 02:40:06 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126)
2022-12-16 02:40:08 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126) (Client Quit)
2022-12-16 02:41:47 +0100razetime(~quassel@49.207.203.213)
2022-12-16 02:42:04 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-12-16 02:42:23 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-16 02:42:44 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2022-12-16 02:46:59 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
2022-12-16 02:54:23 +0100rodental(~rodental@38.146.5.222) (Remote host closed the connection)
2022-12-16 03:00:22 +0100j4cc3b(~jeffreybe@pool-74-105-2-138.nwrknj.fios.verizon.net) (Ping timeout: 272 seconds)
2022-12-16 03:05:24 +0100money_(~money@216-131-83-77.nyc.as62651.net)
2022-12-16 03:08:38 +0100beefbambi(~beefbambi@183.82.204.115) (Ping timeout: 268 seconds)
2022-12-16 03:09:18 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 03:10:20 +0100rodental(~rodental@38.146.5.222)
2022-12-16 03:13:39 +0100simp|e(~skralg@user/simple) (Remote host closed the connection)
2022-12-16 03:13:56 +0100dgb8(~dgb@astra4961.startdedicated.net) (Quit: The Lounge - https://thelounge.github.io)
2022-12-16 03:14:26 +0100dgb8(~dgb@astra4961.startdedicated.net)
2022-12-16 03:14:26 +0100dgb8(~dgb@astra4961.startdedicated.net) (Client Quit)
2022-12-16 03:14:49 +0100simple(skralg@user/simple)
2022-12-16 03:14:55 +0100dgb8(~dgb@astra4961.startdedicated.net)
2022-12-16 03:16:00 +0100dgb8(~dgb@astra4961.startdedicated.net) (Client Quit)
2022-12-16 03:18:52 +0100gwern(~gwern@user/gwern) ()
2022-12-16 03:19:51 +0100dgb8(~dgb@astra4961.startdedicated.net)
2022-12-16 03:27:08 +0100razetime(~quassel@49.207.203.213) (Ping timeout: 252 seconds)
2022-12-16 03:32:20 +0100oatstomas
2022-12-16 03:36:26 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
2022-12-16 03:36:45 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2022-12-16 03:37:59 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 03:39:27 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 03:46:23 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-16 03:46:23 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-16 03:46:23 +0100wroathe(~wroathe@user/wroathe)
2022-12-16 03:55:07 +0100money_(~money@216-131-83-77.nyc.as62651.net) (Ping timeout: 256 seconds)
2022-12-16 03:59:45 +0100money_(~money@216-131-83-77.nyc.as62651.net)
2022-12-16 04:00:50 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
2022-12-16 04:02:34 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 252 seconds)
2022-12-16 04:09:33 +0100money__(~money@50.239.93.29)
2022-12-16 04:11:54 +0100money__(~money@50.239.93.29) (Read error: Connection reset by peer)
2022-12-16 04:12:41 +0100money_(~money@216-131-83-77.nyc.as62651.net) (Ping timeout: 256 seconds)
2022-12-16 04:12:42 +0100money__(~money@50.239.93.29)
2022-12-16 04:16:09 +0100johnw(~johnw@2600:1700:cf00:db0:b0f5:26ad:fa0:865f) (Quit: ZNC - http://znc.in)
2022-12-16 04:19:24 +0100burakcan-burakcank
2022-12-16 04:25:37 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-12-16 04:25:37 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-12-16 04:25:37 +0100finn_elijaFinnElija
2022-12-16 04:33:10 +0100money__(~money@50.239.93.29) (Read error: Connection reset by peer)
2022-12-16 04:34:10 +0100money_(~money@50.239.93.29)
2022-12-16 04:35:14 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-12-16 04:35:35 +0100td_(~td@83.135.9.20) (Ping timeout: 268 seconds)
2022-12-16 04:37:13 +0100td_(~td@83.135.9.25)
2022-12-16 04:37:37 +0100lyxia(~lyxia@poisson.chat) (Ping timeout: 256 seconds)
2022-12-16 04:37:53 +0100lyxia(~lyxia@poisson.chat)
2022-12-16 04:41:27 +0100money_(~money@50.239.93.29) (Read error: Connection reset by peer)
2022-12-16 04:42:46 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-12-16 04:43:01 +0100money__(~money@50.239.93.29)
2022-12-16 04:45:31 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-16 04:45:36 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
2022-12-16 04:46:36 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-16 04:48:02 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2022-12-16 04:48:36 +0100masterbuilder(~master@user/masterbuilder)
2022-12-16 04:49:46 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 268 seconds)
2022-12-16 05:03:29 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-16 05:04:18 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 05:04:23 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
2022-12-16 05:05:42 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-16 05:06:31 +0100money__(~money@50.239.93.29) (Ping timeout: 256 seconds)
2022-12-16 05:07:48 +0100money_(~money@172.58.203.79)
2022-12-16 05:08:55 +0100money__(~money@50.239.93.29)
2022-12-16 05:09:03 +0100money_(~money@172.58.203.79) (Read error: Connection reset by peer)
2022-12-16 05:09:50 +0100money_(~money@2607:fb91:bd34:c1b1:60ff:ce4f:5cae:2e80)
2022-12-16 05:13:19 +0100money__(~money@50.239.93.29) (Ping timeout: 256 seconds)
2022-12-16 05:14:38 +0100dsrt^(~dsrt@76.145.185.103)
2022-12-16 05:21:06 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2022-12-16 05:22:53 +0100money__(~money@50.239.93.29)
2022-12-16 05:26:21 +0100money_(~money@2607:fb91:bd34:c1b1:60ff:ce4f:5cae:2e80) (Ping timeout: 256 seconds)
2022-12-16 05:26:28 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-16 05:29:32 +0100slack1256(~slack1256@181.42.45.84)
2022-12-16 05:30:57 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 05:32:56 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
2022-12-16 05:35:28 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-12-16 05:42:44 +0100razetime(~quassel@49.207.203.213)
2022-12-16 05:45:13 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-12-16 05:45:40 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 05:58:32 +0100mbuf(~Shakthi@49.204.113.218)
2022-12-16 06:00:52 +0100slack1256(~slack1256@181.42.45.84) (Ping timeout: 272 seconds)
2022-12-16 06:01:26 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-16 06:11:13 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-12-16 06:19:55 +0100jargon(~jargon@174-22-192-24.phnx.qwest.net)
2022-12-16 06:27:00 +0100slack1256(~slack1256@181.42.45.84)
2022-12-16 06:28:22 +0100mcfilib(uid302703@user/mcfilib)
2022-12-16 06:28:54 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2022-12-16 06:32:14 +0100money_(~money@2607:fb91:bd24:772:1444:8545:2c03:8bb9)
2022-12-16 06:32:32 +0100slack1256(~slack1256@181.42.45.84) (Ping timeout: 272 seconds)
2022-12-16 06:35:07 +0100 <iqubic> I'm looking for a version of a lens function that might not exist.
2022-12-16 06:35:29 +0100money__(~money@50.239.93.29) (Ping timeout: 256 seconds)
2022-12-16 06:35:54 +0100 <iqubic> I want something like "at :: Index m -> Lens' m (Maybe (IxValue m))" but gives me a "Lens' m (IxValue m)" that just errors if it's a Nothing.
2022-12-16 06:36:27 +0100 <c_wraith> you can use ix with singular
2022-12-16 06:37:54 +0100 <iqubic> How does that work?
2022-12-16 06:38:04 +0100 <c_wraith> :t ix
2022-12-16 06:38:05 +0100 <lambdabot> (Ixed m, Applicative f) => Index m -> (IxValue m -> f (IxValue m)) -> m -> f m
2022-12-16 06:38:20 +0100 <c_wraith> ix is like at, but it gives back a traversal
2022-12-16 06:38:24 +0100 <c_wraith> :t singular
2022-12-16 06:38:26 +0100 <lambdabot> (Conjoined p, Functor f) => Traversing p f s t a a -> Over p f s t a a
2022-12-16 06:38:49 +0100 <c_wraith> singular transforms a traversal into a lens that will crash if it doesn't have exactly one target
2022-12-16 06:38:58 +0100 <iqubic> I see. Makes sense.
2022-12-16 06:39:10 +0100 <iqubic> I'm using this to index into a "Map String a"
2022-12-16 06:42:14 +0100 <c_wraith> > M.fromList [("hello", 1),("world", 2)] ^. singular (ix "hello")
2022-12-16 06:42:15 +0100 <lambdabot> 1
2022-12-16 06:42:20 +0100 <c_wraith> > M.fromList [("hello", 1),("world", 2)] ^. singular (ix "help")
2022-12-16 06:42:22 +0100 <lambdabot> *Exception: singular: empty traversal
2022-12-16 06:46:21 +0100 <c_wraith> Whoops, I was a bit off on my description of singular. If the traversal has multiple targets, it will just get the first one, not error.
2022-12-16 06:49:45 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-16 06:50:48 +0100money__(~money@50.239.93.29)
2022-12-16 06:54:45 +0100money_(~money@2607:fb91:bd24:772:1444:8545:2c03:8bb9) (Ping timeout: 256 seconds)
2022-12-16 06:56:31 +0100slack1256(~slack1256@181.42.45.84)
2022-12-16 07:01:44 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 255 seconds)
2022-12-16 07:11:32 +0100trev(~trev@user/trev)
2022-12-16 07:16:22 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-16 07:16:43 +0100iqubic(~avi@2601:601:1100:edd0:9ce:db2c:6ec0:6fd1) (Remote host closed the connection)
2022-12-16 07:18:12 +0100iqubic(~avi@2601:601:1100:edd0:8902:307c:9a5f:dd30)
2022-12-16 07:20:29 +0100money__(~money@50.239.93.29) (Quit: late)
2022-12-16 07:25:53 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-16 07:25:53 +0100dtman34(~dtman34@2601:447:d000:93c9:f2ce:ff11:8e35:42b2) (Ping timeout: 246 seconds)
2022-12-16 07:29:23 +0100money_(~money@50.239.93.29)
2022-12-16 07:34:45 +0100fizbin_(~fizbin@user/fizbin)
2022-12-16 07:36:27 +0100Ybombinator(~Ybombinat@85.254.75.176)
2022-12-16 07:36:50 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 252 seconds)
2022-12-16 07:37:13 +0100fizbin_fizbin
2022-12-16 07:37:20 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-16 07:44:49 +0100dtman34(~dtman34@2601:447:d000:93c9:5a3c:a3a1:a91d:2efa)
2022-12-16 07:46:23 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-16 07:46:55 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-12-16 07:55:00 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2022-12-16 07:55:46 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds)
2022-12-16 07:56:08 +0100 <Ybombinator> Why can desort accept arguments in this example https://bpa.st/P43E4 ? Shouldn't desort have a parameter like x that it accepts in it's definition like this "desort x" and then somehow pass it to function composition?
2022-12-16 07:58:38 +0100johnw(~johnw@2600:1700:cf00:db0:fc6e:5acb:13f7:b72d)
2022-12-16 07:59:27 +0100 <jackdk> @src (.)
2022-12-16 07:59:27 +0100 <lambdabot> (f . g) x = f (g x)
2022-12-16 07:59:53 +0100 <c_wraith> in Haskell a function is a function. (.) returns a function.
2022-12-16 08:00:07 +0100 <jackdk> `desort = (reverse . sort)` is `\x -> reverse (sort x)`, which is a function
2022-12-16 08:00:40 +0100 <c_wraith> you don't need to bind parameters for a definition to be a function.
2022-12-16 08:01:22 +0100 <opqdonut> consider a simpler example like: mysort = sort
2022-12-16 08:01:37 +0100 <opqdonut> you can still call mysort [1,2,3], because it's just sort [1,2,3]
2022-12-16 08:02:14 +0100 <Ybombinator> oh right
2022-12-16 08:02:23 +0100 <Ybombinator> thanks
2022-12-16 08:09:32 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving)
2022-12-16 08:11:19 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2022-12-16 08:14:19 +0100Ybombinator(~Ybombinat@85.254.75.176) (Quit: Quit)
2022-12-16 08:19:53 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-12-16 08:20:17 +0100 <int-e> "in Haskell a function is a function" -- a value, maybe?
2022-12-16 08:21:44 +0100 <Jade[m]> I think they meant A function can take a function as it's input?
2022-12-16 08:22:04 +0100 <Jade[m]> And likewise return one
2022-12-16 08:22:34 +0100 <int-e> Yeah, that's the sense of "value" that I meant.
2022-12-16 08:22:38 +0100 <c_wraith> no, I meant exactly what I said. a function simply *is* a function
2022-12-16 08:22:45 +0100 <c_wraith> no special syntax required
2022-12-16 08:23:27 +0100Inst(~Inst@2601:6c4:4081:54f0:8d82:4e66:2137:ab94)
2022-12-16 08:23:34 +0100 <Inst> wait, isn't GHCJS sort of pointless?
2022-12-16 08:23:45 +0100 <Inst> because you can't get integration in or out of existing JS code
2022-12-16 08:23:46 +0100 <int-e> Jade[m]: (so none of the more theoretical stuff with weak head normal forms and the like)
2022-12-16 08:23:54 +0100 <Inst> elm developers told me that GHCJS outputs terrible JS
2022-12-16 08:23:56 +0100 <c_wraith> Inst: it has an ffi
2022-12-16 08:24:10 +0100 <Inst> I took a look at a site that seems to be using GHCJS
2022-12-16 08:24:32 +0100 <Inst> and I was like, what, it's a Haskell RTS implemented in JS
2022-12-16 08:24:39 +0100 <c_wraith> but GHCJS is also mostly obsolete
2022-12-16 08:24:43 +0100 <int-e> "outputs terrible JS" is fine as long as you never look at it and it's not *too* hard on browsers
2022-12-16 08:25:21 +0100 <davean> Inst: Of course you can get integration in and out of existing JS
2022-12-16 08:25:21 +0100 <int-e> (I'm actually not a fan, but pragmatically there's no issue.)
2022-12-16 08:26:03 +0100 <Inst> I mean this is relative to recent integration of a GHCJS variant into GHC in 9.6
2022-12-16 08:26:24 +0100 <Inst> there's a potential convenience feature in that you can make Haskell code readable in a JS form
2022-12-16 08:26:36 +0100 <davean> Inst: I have no idea why you think you couldn't. Yes it has a good bit of the GHC RTS compiled in, but that has nothing to do with integrating with other JS
2022-12-16 08:27:11 +0100 <int-e> It's fair to say that it would be useless without a working FFI to connect to (other) JS.
2022-12-16 08:27:26 +0100 <davean> Right, its very obvious it can do it
2022-12-16 08:27:44 +0100 <davean> I suppose making it callable from JS isn't as obvious, but that works fine too
2022-12-16 08:27:46 +0100shane(~shane@ana.rch.ist) (Remote host closed the connection)
2022-12-16 08:27:56 +0100 <Inst> i mean, from my use case, it's more, I want to make my Haskell code readable to non-haskellers
2022-12-16 08:28:07 +0100 <Inst> an easy way to do this is via GHCJS
2022-12-16 08:28:27 +0100 <Inst> or, I misunderstood, because it looks like it's not intended to be human readable
2022-12-16 08:28:30 +0100 <davean> GHCJS isn't code translation, its compilation
2022-12-16 08:28:43 +0100 <davean> Its a compiler
2022-12-16 08:28:50 +0100 <int-e> Inst: yeah it doesn't work for that purpose
2022-12-16 08:28:51 +0100 <Inst> in which case, why not asterius / new wasm backend?
2022-12-16 08:29:43 +0100 <int-e> And it's hard to imagine anything that really works for that purpose... you express algorithms differently in Haskell. So it's more of a machine translation task, but in an unforgiving environment with little redundancy.
2022-12-16 08:29:52 +0100 <Inst> with WASM at least, it's not intended to be readable
2022-12-16 08:29:57 +0100 <davean> Inst: You might want to review the difference between a compiler and a transpiler
2022-12-16 08:30:08 +0100 <Inst> I understand
2022-12-16 08:30:24 +0100 <int-e> Most JS in the wild isn't readable either, even when it's written in JS or TS... because of minification.
2022-12-16 08:30:34 +0100 <davean> There has been a Haskell-JS transpiler or two
2022-12-16 08:30:40 +0100 <davean> I don't think anyone ever cares about them though
2022-12-16 08:30:44 +0100 <davean> why would you want that?
2022-12-16 08:30:56 +0100 <davean> Right, you want web pages to work well
2022-12-16 08:31:01 +0100 <davean> No one reads the code on the page
2022-12-16 08:31:08 +0100 <davean> well, other than security researchers
2022-12-16 08:31:27 +0100 <davean> The code that you serve is for execution, you want the best form for execution
2022-12-16 08:31:28 +0100 <c_wraith> haste and sunroof? those two were basically transpilers, right?
2022-12-16 08:31:43 +0100 <Inst> haste iirc had RTS code, no?
2022-12-16 08:31:52 +0100 <int-e> Even as a human who understands the code... if your Haskell code actually depends on laziness, translation will not be straightforward.
2022-12-16 08:31:52 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 08:31:54 +0100 <c_wraith> ah, ok. it was bigger than I recalled
2022-12-16 08:32:10 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2022-12-16 08:32:10 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 08:32:42 +0100 <davean> c_wraith: There were a few others ...
2022-12-16 08:33:00 +0100 <c_wraith> but yeah, I agree with int-e. idiomatic Haskell code looks like a nightmare in most other languages if you preserve the semantics of individual portions of the code.
2022-12-16 08:33:27 +0100 <davean> And if you don't, its not that code
2022-12-16 08:34:05 +0100 <Inst> you know what I mean when I say Hascalator, right?
2022-12-16 08:34:22 +0100manwithluck(~manwithlu@194.177.28.176) (Remote host closed the connection)
2022-12-16 08:34:32 +0100 <davean> Oh hey, Fay got a release in the last decade
2022-12-16 08:34:49 +0100 <Inst> sarcasm?
2022-12-16 08:35:11 +0100 <davean> No, it got a 2021 release. Apparently thats still alive
2022-12-16 08:36:12 +0100manwithluck(~manwithlu@194.177.28.176)
2022-12-16 08:36:45 +0100gmg(~user@user/gehmehgeh)
2022-12-16 08:37:57 +0100mcfilib(uid302703@user/mcfilib) (Quit: Connection closed for inactivity)
2022-12-16 08:39:00 +0100 <Inst> by Hascalator, it's a joke between Haskell and Scala communities
2022-12-16 08:39:22 +0100 <Inst> quite a few Scala developers eventually end up becoming Haskell developers because they're interested in the typed FP side, and Scala is a way for them to build experience in typed FP
2022-12-16 08:39:48 +0100 <Inst> It appears that JS is also becoming sort of a Hascalator; iirc, wasn't Alexis King formerly a JS dev?
2022-12-16 08:40:45 +0100 <davean> Inst: you may not be horrified by the Fay output, though like, its a subset, and subset isn't stressed enough in that sentance. Its missing some of the best parts of Haskell
2022-12-16 08:41:12 +0100 <Inst> I'm just a bit disappointed
2022-12-16 08:41:24 +0100 <Inst> since GHCJS being officially supported by GHC means that there's more support to GHCJS
2022-12-16 08:41:45 +0100 <Inst> I guess Fay is more interesting; i.e, the idea is, a production team can experiment with Haskell, with their former language being a functional dialect of JS
2022-12-16 08:41:59 +0100 <Inst> the idea is, if the project fails, transpile to JS, keep the transpiled code
2022-12-16 08:42:12 +0100 <Inst> reducing the costs of an experimental project in Haskell
2022-12-16 08:42:22 +0100 <Inst> it also encourages JSers to move into Haskell
2022-12-16 08:43:03 +0100 <Inst> since they could transpile their Haskell into JS and have some safety features, and if there's FFI, as with the apparently abandoned inline-JS, transition to Haskell is gentler
2022-12-16 08:44:18 +0100 <davean> What does inline-js have to do with there being an FFI?
2022-12-16 08:44:56 +0100 <Inst> erm, let's backtrack, you are familiar with the joke "Hascalator", right?
2022-12-16 08:45:18 +0100 <davean> I've come across it, but we're not joking here
2022-12-16 08:45:57 +0100 <Inst> If you're talking about FFI, the idea is that being able to FFI into JS libs provides a level of comfort and adjustment to JS devs moving into Haskell, and inline-JS does the same thing
2022-12-16 08:46:52 +0100 <davean> same thing, but we have FFIs
2022-12-16 08:47:00 +0100 <davean> inline-js would use the FFI
2022-12-16 08:47:02 +0100 <davean> not provide it
2022-12-16 08:47:48 +0100 <Inst> I'm not sure what's going on with that project
2022-12-16 08:47:55 +0100 <Inst> I assumed they'd develop a FFI for JS
2022-12-16 08:48:22 +0100 <davean> No, we HAVE FFIs
2022-12-16 08:48:33 +0100 <davean> Thats how like GHCJS can exist as a functional thing
2022-12-16 08:48:58 +0100 <davean> You have to have them in both directions for that to even start working
2022-12-16 08:49:17 +0100 <davean> FFIs are an entire different level and thing from inline- packages
2022-12-16 08:49:46 +0100 <Inst> I'm searching for it, but I don't see Haskell FFIs to JS other than Foreign.JavaScript in ThreePennyGUI
2022-12-16 08:50:14 +0100 <davean> Because they're a BASE COMPONENT PROVIDED AS PART OF A COMPILER - they have to be
2022-12-16 08:50:23 +0100 <davean> you can't "build" one, you have to have one
2022-12-16 08:50:36 +0100 <Inst> well, i'll walk off if i'm being frustrating
2022-12-16 08:50:38 +0100 <Inst> thanks for your time
2022-12-16 08:50:46 +0100 <jackdk> I have literally in the past provided functions written in Haskell to be called by JS
2022-12-16 08:51:12 +0100 <jackdk> Unfortunately it was for an internal project but yeah
2022-12-16 08:51:38 +0100 <davean> Inst: you're just clearly ignorant of the very idea of what an FFI is
2022-12-16 08:52:14 +0100 <davean> while theoretically you can write them inside some languages, certainly Haskell isn't one, it directly involves the calling conventions of the host system
2022-12-16 08:52:15 +0100 <Inst> a foreign function interface, a provision for one language to call another or be called by another
2022-12-16 08:52:48 +0100 <Inst> afaik Haskell has C FFIs
2022-12-16 08:53:04 +0100 <Inst> there's attempts at building FFIs between Haskell and Python, but the project seems old and bitrotted
2022-12-16 08:53:04 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-16 08:53:42 +0100 <davean> Yes, but you can NOT write those *inside* the language of anything remotely high level. The compiler of a language that doesn't let you directly mess with the host architecture MUST be a COMPILER PRIMATIVE
2022-12-16 08:53:55 +0100 <davean> And we keep telling you, the JS one is right there
2022-12-16 08:53:57 +0100 <Inst> and yeah, I'm aware of that
2022-12-16 08:54:17 +0100 <davean> you seem not to be, because you point to things like inline-js
2022-12-16 08:54:21 +0100 <Inst> the way I understand it is that the JS FFI is implemented as part of GHCJS
2022-12-16 08:54:31 +0100 <davean> For the GHCJS compiler
2022-12-16 08:54:45 +0100 <davean> being a compiler primative, it must be in the compiler that it is related to, yes
2022-12-16 08:55:26 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-12-16 08:55:38 +0100 <Inst> I'm curious, afaik GHCJS was extremely hard to use, i.e, the support had dropped. The interest right now is building a JS backend for GHC in 9.6
2022-12-16 08:56:32 +0100 <Inst> but if it's a backend, does that apply to FFI with the normal LLVM backend?
2022-12-16 08:56:37 +0100 <davean> A lot of the "hard to use" is it required an appropriate enviroment, and since it wasn't integrated into GHC it always trailed, and stuff wasn't tested for it specificly.
2022-12-16 08:57:05 +0100 <Inst> NixOS, I assume
2022-12-16 08:57:08 +0100 <davean> no
2022-12-16 08:57:11 +0100 <davean> though it was easy there
2022-12-16 08:57:35 +0100 <davean> but ... A) the LLVM backend isn't "normal" B) what do you mean "to FFI with the normal LLVM backend"?
2022-12-16 08:58:22 +0100 <davean> I wouldn't be surprised if you'd never used the LLVM backend
2022-12-16 08:58:31 +0100 <Inst> the implication of GHCJS is that it's localized to the backend, like, if I use inline-C right now, GHC will compile C object code (if I'm correct here), then call into it when I FFI
2022-12-16 08:58:41 +0100 <jackdk> There was support in stack for a time, but it bitrotted. Most people I know who use ghcjs do so with Nix but not necessarily NixOS
2022-12-16 08:58:50 +0100 <Inst> how have I offended you, davean?
2022-12-16 08:58:57 +0100 <davean> no
2022-12-16 08:59:31 +0100 <Inst> So, I'm guessing, GHC is still using the gcc backend by default, no?
2022-12-16 08:59:38 +0100 <davean> No
2022-12-16 08:59:47 +0100 <Inst> or rather, clang
2022-12-16 08:59:49 +0100 <davean> No
2022-12-16 08:59:55 +0100 <davean> It generated native machine code
2022-12-16 09:00:02 +0100 <davean> *generates
2022-12-16 09:00:24 +0100 <davean> You can ask it to generate C code, which can be compiled with GCC or clang, but thats SUPER rare and mostly unsupported
2022-12-16 09:00:32 +0100 <davean> mostly exists for bootstrapping on new architectures
2022-12-16 09:00:52 +0100 <davean> and it has an LLVM one, if you ask it nicely to use it, though its usually worse except for tight numeric code
2022-12-16 09:01:49 +0100 <Inst> so regarding the JS FFI, say, post 9.6, if I just use the default backend, I won't have access to the JS FFI?
2022-12-16 09:02:14 +0100 <davean> You can't just call another language, there has to be a host architecture relationship to that language.
2022-12-16 09:02:24 +0100 <davean> so if you compile with a JS targetting backend, you can just use the FFI
2022-12-16 09:02:33 +0100 <davean> also probably the wasm one.
2022-12-16 09:02:47 +0100 <davean> but certainly not the x86 or ARM one, that would be nonsensicle
2022-12-16 09:03:33 +0100 <davean> You could have an API to a JS execution engine - thats what the Python one you cite sorta is
2022-12-16 09:03:38 +0100thaumavorio(~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-16 09:03:58 +0100 <davean> If you link to a JS execution engine, you can use the native FFI to call the symbols it exports.
2022-12-16 09:04:22 +0100 <Inst> I assume with custom build, you could link into Node and call JS code
2022-12-16 09:04:46 +0100 <davean> Nothing custom needed, but yes
2022-12-16 09:06:19 +0100 <davean> You could use the compilers FFI to bridge into the JS execution enviroment
2022-12-16 09:06:24 +0100thaumavorio(~thaumavor@thaumavor.io)
2022-12-16 09:07:06 +0100 <davean> We already have some of those hanging around
2022-12-16 09:07:26 +0100 <davean> we have to for things like running Template Haskell
2022-12-16 09:10:08 +0100manwithl-(~manwithlu@2a09:bac1:5bc0:20::49:125)
2022-12-16 09:10:52 +0100manwithluck(~manwithlu@194.177.28.176) (Ping timeout: 272 seconds)
2022-12-16 09:15:24 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 09:15:46 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 09:17:06 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 09:17:10 +0100ubert(~Thunderbi@p200300ecdf264e7202f1c0a81cd86a27.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-12-16 09:17:24 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 09:18:45 +0100money_(~money@50.239.93.29) (Quit: late)
2022-12-16 09:20:21 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 09:21:59 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 09:22:25 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 09:23:15 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:70c3:bbfa:bcc:5827)
2022-12-16 09:25:15 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Ping timeout: 260 seconds)
2022-12-16 09:26:01 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 09:27:43 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 09:30:11 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe)
2022-12-16 09:32:31 +0100slack1256(~slack1256@181.42.45.84) (Remote host closed the connection)
2022-12-16 09:34:13 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 252 seconds)
2022-12-16 09:35:52 +0100thegeekinside(~thegeekin@189.217.82.244) (Read error: Connection reset by peer)
2022-12-16 09:40:41 +0100vpan(~0@212.117.1.172)
2022-12-16 09:41:08 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 252 seconds)
2022-12-16 09:42:51 +0100nschoe(~q@141.101.51.197)
2022-12-16 09:43:52 +0100ft(~ft@p4fc2a257.dip0.t-ipconnect.de) (Quit: leaving)
2022-12-16 09:45:48 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-16 09:46:43 +0100 <Inst> are there any leaks about what's planned for 9.8?
2022-12-16 09:46:53 +0100 <Inst> I knew 9.6 was the GHCJS / Asterius release
2022-12-16 09:49:12 +0100 <int-e> https://gitlab.haskell.org/ghc/ghc/-/milestones/379#tab-issues doesn't seem to have anything dramatic yet
2022-12-16 09:51:25 +0100 <Inst> this is more interesting
2022-12-16 09:51:26 +0100 <Inst> https://gitlab.haskell.org/ghc/ghc/-/issues/22326
2022-12-16 09:51:59 +0100 <dminuoso> Im looking for a minimalistic mustache-style template library with a lot dependency footprint. Any ideas?
2022-12-16 09:52:09 +0100 <dminuoso> *small dependency footprint, heh
2022-12-16 09:52:22 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 09:52:49 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-16 09:53:11 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member)
2022-12-16 09:53:40 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32)
2022-12-16 09:53:42 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-12-16 09:53:59 +0100 <jonathanx__> I'm looking for a datatype that is a bit like Data.These, but instead of "This a | That b | These a b", I want "Foo a | Bar b | Baz"
2022-12-16 09:54:24 +0100 <jonathanx__> I can make it myself ofc, but does anyone know a lib that has somehting like it?
2022-12-16 09:54:25 +0100 <dminuoso> jonathanx__: And what is that data type supposed to do?
2022-12-16 09:54:34 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Ping timeout: 252 seconds)
2022-12-16 09:54:38 +0100 <dminuoso> You could just use `Maybe (Either S T)`
2022-12-16 09:56:58 +0100 <jonathanx__> yes I could, I'd be interested in something akin to a performant partition, with the type "partition' :: Foldable f => (a -> PotentialType b c) -> f a -> (f b, f c))
2022-12-16 09:57:06 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 272 seconds)
2022-12-16 09:57:21 +0100 <jonathanx__> and yes, I could make this through combining partitionEithers and catMaybes
2022-12-16 09:57:43 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2022-12-16 09:57:53 +0100 <jonathanx__> I'm just wondering it there's prior art, since I'm working with something that's a bit performance sensitive
2022-12-16 09:57:58 +0100 <dminuoso> Foldable is not powerful enough to do this.
2022-12-16 09:58:25 +0100 <jonathanx__> true
2022-12-16 09:58:33 +0100 <jonathanx__> excahnge it for a list
2022-12-16 09:59:03 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 09:59:20 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds)
2022-12-16 10:00:16 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
2022-12-16 10:00:53 +0100 <dminuoso> I've been thinking about ways to generalize partitioning for a while
2022-12-16 10:01:34 +0100 <dminuoso> The best thing I can ever come up with, is essentially optics, lens.
2022-12-16 10:01:48 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-12-16 10:01:58 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 10:02:08 +0100 <jonathanx__> Right!
2022-12-16 10:02:37 +0100 <jonathanx__> I could kind of remembers seeing some mention of a datatype like this in an announcement for Data.These
2022-12-16 10:02:53 +0100 <dminuoso> So by using hlists, you could do something along the lines of
2022-12-16 10:03:32 +0100 <jonathanx__> There is a symmetry where you can get 4 different data types by removing one constructor from "Foo | Bar a | Baz b | Bazz ab"
2022-12-16 10:03:38 +0100 <jonathanx__> *Bazz a b
2022-12-16 10:03:40 +0100 <dminuoso> `partition :: HList ... -> [a] -> HList ...`
2022-12-16 10:04:00 +0100 <dminuoso> Doing this in a general pattern is awkwardly difficult
2022-12-16 10:04:05 +0100 <dminuoso> But it is easy enough to just say
2022-12-16 10:04:20 +0100 <dminuoso> Conjure up a typeclass
2022-12-16 10:05:05 +0100 <dminuoso> Such that you could say `gpartition (_Left, _Right) [Left 1, Left 2, Left 3, Right 4]`
2022-12-16 10:05:12 +0100 <dminuoso> And you could have
2022-12-16 10:05:55 +0100 <dminuoso> oh just strike that I havent quite worked it out yet
2022-12-16 10:06:12 +0100 <dminuoso> but the main issue is that I dont know how to do this efficiently
2022-12-16 10:06:35 +0100 <dminuoso> What we would need is some general:
2022-12-16 10:06:40 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 252 seconds)
2022-12-16 10:06:47 +0100thyriaen(~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1)
2022-12-16 10:06:51 +0100 <dminuoso> `fuse :: Fold s t -> Fold s u -> Fold s (t, u)`
2022-12-16 10:07:09 +0100 <dminuoso> That will correctly fuse it together at their common merge point
2022-12-16 10:07:26 +0100 <dminuoso> or their split point, rather
2022-12-16 10:08:16 +0100 <dminuoso> (I guess this would be a kind of cross join in algebraic terms)
2022-12-16 10:08:36 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:484b:db47:7265:c55f)
2022-12-16 10:09:16 +0100 <dminuoso> jonathanx__: For what its worth, I think this *can* be built using the same dark black magic that drives this
2022-12-16 10:09:19 +0100 <dminuoso> :t upon
2022-12-16 10:09:20 +0100 <lambdabot> (Indexable [Int] p, Data s, Data a, Applicative f) => (s -> a) -> p a (f a) -> s -> f s
2022-12-16 10:09:49 +0100xff0x_(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
2022-12-16 10:10:01 +0100 <dminuoso> Or you could even use `upon` directly probably
2022-12-16 10:10:17 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 255 seconds)
2022-12-16 10:10:29 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 10:11:02 +0100 <dminuoso> > [1,2,3,4] & upon head .~ 0
2022-12-16 10:11:04 +0100 <lambdabot> [0,2,3,4]
2022-12-16 10:11:31 +0100 <iqubic> What does upon do?
2022-12-16 10:11:55 +0100 <dminuoso> Just provide it a regular function, and by pure black magic, it transforms it into a traversal.
2022-12-16 10:12:06 +0100 <iqubic> I see.
2022-12-16 10:12:35 +0100 <iqubic> > (1,2) & upon fst +~ 7
2022-12-16 10:12:36 +0100 <lambdabot> (8,2)
2022-12-16 10:12:49 +0100 <iqubic> That is pure black magic.
2022-12-16 10:12:56 +0100 <dminuoso> :>
2022-12-16 10:13:00 +0100son0p(~ff@2604:3d08:5b7f:5540::d832) (Ping timeout: 255 seconds)
2022-12-16 10:13:06 +0100 <dminuoso> The type of upon tells you how this works.
2022-12-16 10:13:32 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-16 10:13:57 +0100 <iqubic> > Just 1 & upon (\x -> case x of Nothing -> 0; Just y -> y) .~ 2
2022-12-16 10:13:59 +0100 <lambdabot> Just 2
2022-12-16 10:14:13 +0100 <iqubic> > Nothing & upon (\x -> case x of Nothing -> 0; Just y -> y) .~ 2
2022-12-16 10:14:15 +0100 <lambdabot> Nothing
2022-12-16 10:14:20 +0100 <dminuoso> It involves sorcery including unsafePerformIO, using Data to just try out every field in the ADT representation, provoking runtime exceptions, catching them..
2022-12-16 10:14:30 +0100 <iqubic> Okay, that is pure black magic.
2022-12-16 10:14:41 +0100 <dminuoso> https://hackage.haskell.org/package/lens-5.2/docs/src/Data.Data.Lens.html#lookupon
2022-12-16 10:14:54 +0100 <iqubic> > Nothing & upon (\x -> case x of Nothing -> undefined; Just y -> y) .~ 2
2022-12-16 10:14:55 +0100 <dminuoso> And it then counts the indices as it goes through..
2022-12-16 10:14:56 +0100 <lambdabot> Nothing
2022-12-16 10:15:14 +0100 <iqubic> Wait... what!?!?
2022-12-16 10:15:29 +0100 <iqubic> Nothing & upon undefined .~ 2
2022-12-16 10:15:35 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-12-16 10:15:39 +0100 <iqubic> > Nothing & upon undefined .~ 2
2022-12-16 10:15:41 +0100 <lambdabot> Nothing
2022-12-16 10:15:42 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
2022-12-16 10:15:49 +0100 <iqubic> That really is black magic.
2022-12-16 10:15:50 +0100 <dminuoso> you're invalidating a precondition
2022-12-16 10:15:58 +0100 <dminuoso> `First, the user supplied function must access only one field of the specified type.`
2022-12-16 10:16:08 +0100 <dminuoso> your function does not actually access a field.
2022-12-16 10:16:16 +0100 <iqubic> Didn't know there was a precondition.
2022-12-16 10:16:23 +0100 <dminuoso> It says so on the haddock.
2022-12-16 10:16:26 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-16 10:16:46 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-12-16 10:17:07 +0100 <iqubic> How enlightened is edwardk?
2022-12-16 10:17:23 +0100 <dminuoso> First, the user supplied function must access only one field of the specified type. T
2022-12-16 10:17:26 +0100 <dminuoso> Oops
2022-12-16 10:17:28 +0100 <dminuoso> https://hackage.haskell.org/package/lens-5.2/docs/src/Data.Data.Lens.html#template
2022-12-16 10:17:35 +0100 <dminuoso> iqubic: well honestly this primitive isnt as complicated to build
2022-12-16 10:17:37 +0100 <dminuoso> its just very evil.
2022-12-16 10:18:00 +0100 <dminuoso> It shows that you can do ruby-style metaprogramming with runtime reflection *just* *fine* in haskell
2022-12-16 10:18:46 +0100 <iqubic> The craziest thing I've ever done with Lens is write my own Plated instance and run a paramorphism on some custom data type.
2022-12-16 10:19:22 +0100money_(~money@50.239.93.29)
2022-12-16 10:19:31 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 10:19:54 +0100money_(~money@50.239.93.29) (Client Quit)
2022-12-16 10:20:30 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-16 10:20:44 +0100money_(~money@50.239.93.29)
2022-12-16 10:21:41 +0100 <dminuoso> If I read the code right, the way this works is that by using the data instance and template, it swaps out *every* value in the ADT with an exception
2022-12-16 10:22:04 +0100 <dminuoso> And it then uses the function zooming into each field while counting a kind of field index
2022-12-16 10:22:09 +0100 <dminuoso> and if the exception is tripped
2022-12-16 10:22:24 +0100 <iqubic> Why!?!?! That's all kinds of messed up
2022-12-16 10:22:31 +0100 <dminuoso> then you know what the accessor was looking at
2022-12-16 10:22:50 +0100 <dminuoso> https://hackage.haskell.org/package/lens-5.2/docs/src/Data.Data.Lens.html#lookupon
2022-12-16 10:23:03 +0100 <dminuoso> case unsafePerformIO $ E.try $ evaluate $ field $ s & indexing l %@~ \i (a::a) -> E.throw (FieldException i a) of ....
2022-12-16 10:23:42 +0100 <dminuoso> Yup its doubly crazy because its not entirely reliable due to imprecise exceptions
2022-12-16 10:24:03 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 260 seconds)
2022-12-16 10:24:39 +0100 <dminuoso> iqubic: ah hold on, let me rephrase.
2022-12-16 10:24:42 +0100 <dminuoso> no its even better!
2022-12-16 10:24:48 +0100 <dminuoso> each field is replaced by an exception that contains the index
2022-12-16 10:24:56 +0100 <dminuoso> (the index in template)
2022-12-16 10:25:08 +0100 <dminuoso> then you just use the accessor, provoke the pure exception, catch it, extract the index
2022-12-16 10:25:16 +0100 <dminuoso> and then using the index you can recover a traversal
2022-12-16 10:25:27 +0100 <dminuoso> oh this is lovely
2022-12-16 10:25:36 +0100 <dminuoso> somebody went to prison for this one
2022-12-16 10:25:54 +0100 <money_> ?
2022-12-16 10:26:37 +0100 <dminuoso> So yeah. Using this technique we can definitely conjure up some kind of
2022-12-16 10:26:48 +0100 <iqubic> edward is to blame for this, I think.
2022-12-16 10:26:48 +0100 <dminuoso> fuse :: Data s => Data t => Fold s t -> Fold s u -> Fold s (t, u)
2022-12-16 10:27:51 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-12-16 10:28:13 +0100 <dminuoso> with some precondition that the folds dont overlap
2022-12-16 10:28:22 +0100 <dminuoso> and probably better both be affine
2022-12-16 10:28:49 +0100money_(~money@50.239.93.29) (Quit: late)
2022-12-16 10:29:44 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-16 10:30:23 +0100razetime(~quassel@49.207.203.213) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-12-16 10:31:38 +0100money_(~money@50.239.93.29)
2022-12-16 10:33:18 +0100money_(~money@50.239.93.29) (Client Quit)
2022-12-16 10:34:50 +0100akegalj(~akegalj@93-137-174-44.adsl.net.t-com.hr)
2022-12-16 10:36:42 +0100money_(~money@50.239.93.29)
2022-12-16 10:36:48 +0100money_(~money@50.239.93.29) (Client Quit)
2022-12-16 10:38:43 +0100money_(~money@50.239.93.29)
2022-12-16 10:40:41 +0100money_(~money@50.239.93.29) (Read error: Connection reset by peer)
2022-12-16 10:43:47 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-16 10:44:45 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 10:51:12 +0100CiaoSen(~Jura@p200300c95730b6002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-16 10:52:43 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
2022-12-16 11:03:11 +0100ksqsf(~user@134.209.106.31)
2022-12-16 11:09:47 +0100chele(~chele@user/chele)
2022-12-16 11:09:59 +0100xff0x_(~xff0x@2405:6580:b080:900:5047:9af2:d4a8:44bb)
2022-12-16 11:15:40 +0100zaquest(~notzaques@5.130.79.72)
2022-12-16 11:17:09 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-16 11:17:24 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 11:17:43 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 11:19:59 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:70c3:bbfa:bcc:5827) (Ping timeout: 265 seconds)
2022-12-16 11:21:55 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
2022-12-16 11:22:36 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 272 seconds)
2022-12-16 11:22:43 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-12-16 11:22:48 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 11:23:17 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-12-16 11:24:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-16 11:25:11 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 11:25:57 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 11:26:37 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:c184:76cc:3bad:bcb1)
2022-12-16 11:29:03 +0100maerwald(~maerwald@user/maerwald) (Quit: gone)
2022-12-16 11:29:09 +0100ksqsf`(~user@134.209.106.31)
2022-12-16 11:29:35 +0100maerwald(~maerwald@mail.hasufell.de)
2022-12-16 11:30:23 +0100maerwald(~maerwald@mail.hasufell.de) (Changing host)
2022-12-16 11:30:23 +0100maerwald(~maerwald@user/maerwald)
2022-12-16 11:32:44 +0100ksqsf(~user@134.209.106.31) (Ping timeout: 272 seconds)
2022-12-16 11:34:00 +0100ksqsf`(~user@134.209.106.31) (Ping timeout: 272 seconds)
2022-12-16 11:35:12 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 11:35:17 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-12-16 11:35:32 +0100 <tvandinther> I'm building a command line app and I want to incorporate logging of different types (switchable using options) as output as well as the data itself. Which approach would be recommended? Should I just use a writer monad or something more?
2022-12-16 11:35:43 +0100tvandinther(~tvandinth@101.98.118.246) (Quit: Quit)
2022-12-16 11:35:58 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 11:36:00 +0100 <dminuoso> I too tend to ask questions and leave 11 seconds afterwads.
2022-12-16 11:36:02 +0100 <dminuoso> :p
2022-12-16 11:36:16 +0100 <tvandinther> Haha sorry. Wrong button on this new irc app
2022-12-16 11:36:24 +0100 <dminuoso> tvandinther: I would probably use monad-logger (or use the same style)
2022-12-16 11:36:37 +0100 <dminuoso> Because it docouples the place of logging from a concrete implementation
2022-12-16 11:37:01 +0100 <dminuoso> As for different outputs, make it a runtime flag that alters how the log string is pushed into the logger
2022-12-16 11:37:11 +0100 <dminuoso> or maybe just the latter
2022-12-16 11:37:24 +0100 <iqubic> Yeah, use monad-logger or similar and then you can mock different implementations
2022-12-16 11:37:30 +0100 <dminuoso> that is, monad-logger is useful if you want to quickly switch out where logs go to (and how they are filtered)
2022-12-16 11:37:40 +0100 <dminuoso> but if output ever only goes to stdout, might as well just use fast-logger
2022-12-16 11:38:04 +0100 <tvandinther> Yeah it'll be nice to write all logs and then filter them based on the switch when I want to write them to the console
2022-12-16 11:38:18 +0100 <dminuoso> tvandinther: for that you can still do it with fast-logger.
2022-12-16 11:38:46 +0100 <dminuoso> the main advantage of monad-logger is decoupling the implementation (especially useful if you ship it as a library), or if you wantt o switch out the implementation (log to stdout, to a file, to a tchan, etc...)
2022-12-16 11:39:04 +0100 <dminuoso> THough personally I would probably favour `hsyslog`
2022-12-16 11:39:06 +0100 <dminuoso> over fast-logger.
2022-12-16 11:39:40 +0100 <tvandinther> It's a small app so I would favour simplicity over decoupling
2022-12-16 11:39:50 +0100Xeroine(~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-12-16 11:39:51 +0100 <tvandinther> I'll take a look at fast-logger and hsyslog
2022-12-16 11:39:55 +0100 <dminuoso> hsyslog is simple, and yet strong in decoupling
2022-12-16 11:40:03 +0100 <dminuoso> the decoupling mechanism is completely there
2022-12-16 11:40:15 +0100 <dminuoso> given that in most systemd installations, syslog goes directly into journald
2022-12-16 11:40:26 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-16 11:40:26 +0100 <dminuoso> so you have filtering built-in in journald
2022-12-16 11:40:28 +0100 <dminuoso> and facilities
2022-12-16 11:41:13 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-16 11:41:31 +0100 <dminuoso> you can also use monad-logger and syslog in tandem
2022-12-16 11:41:45 +0100xff0x_(~xff0x@2405:6580:b080:900:5047:9af2:d4a8:44bb) (Ping timeout: 260 seconds)
2022-12-16 11:41:51 +0100xacktm(~xacktm@user/xacktm) (Ping timeout: 260 seconds)
2022-12-16 11:41:57 +0100 <tvandinther> Although my purpose isn't *really* considered logging, right? It's more just about aggregating a classifiable output and processing it to stdout
2022-12-16 11:41:58 +0100 <dminuoso> this way you can reduce the journal storage requirements outside of debugging scenarios, enable debugging, but *still* be able to quickly and comfortably filter output
2022-12-16 11:42:02 +0100 <dminuoso> okay
2022-12-16 11:42:15 +0100 <dminuoso> tvandinther: then, perhaps you rather just want ReaderT or a global IORef.
2022-12-16 11:42:19 +0100andreas303(andreas303@ip227.orange.bnc4free.com) (Ping timeout: 260 seconds)
2022-12-16 11:42:35 +0100 <dminuoso> Which just keeps the sort of "format/precision" as ambient state or an environment
2022-12-16 11:42:41 +0100 <dminuoso> and you then have functions like
2022-12-16 11:42:57 +0100 <dminuoso> `pprThing :: PprMode -> Thing -> Doc ann`
2022-12-16 11:43:14 +0100 <dminuoso> with say `data PppMode = PprJSON | PprSimple | PprDetailed`
2022-12-16 11:43:15 +0100xff0x_(~xff0x@ai071162.d.east.v6connect.net)
2022-12-16 11:43:32 +0100michalz(~michalz@185.246.204.72)
2022-12-16 11:45:24 +0100 <tvandinther> With WriterT I read that there are performance issues with it but would it be a problem for let's say 10000 appends considering the process will exit afterwards?
2022-12-16 11:46:58 +0100tvandinther(~tvandinth@101.98.118.246) (Quit: Quit)
2022-12-16 11:47:11 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 11:51:11 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-16 11:52:25 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-16 12:03:18 +0100jespada_jespada
2022-12-16 12:05:02 +0100akegalj(~akegalj@93-137-174-44.adsl.net.t-com.hr) (Ping timeout: 272 seconds)
2022-12-16 12:05:30 +0100CiaoSen(~Jura@p200300c95730b6002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-12-16 12:05:42 +0100xacktm(~xacktm@user/xacktm)
2022-12-16 12:05:52 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-16 12:07:10 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-16 12:09:28 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 272 seconds)
2022-12-16 12:10:37 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-12-16 12:13:57 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-16 12:19:22 +0100andreas303(andreas303@ip227.orange.bnc4free.com)
2022-12-16 12:20:23 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 12:22:11 +0100son0p(~ff@2604:3d08:5b7f:5540::417e)
2022-12-16 12:22:30 +0100mmhat(~mmh@p5081a34e.dip0.t-ipconnect.de)
2022-12-16 12:23:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 12:23:45 +0100ksqsf`(~user@134.209.106.31)
2022-12-16 12:23:52 +0100 <jackdk> Run it and see? But we have Control.Monad.Trans.Writer.CPS now which lacks this problem. (It is isomorphic to StateT but does not provide MonadState-esque operations)
2022-12-16 12:24:01 +0100ksqsf`ksqsf
2022-12-16 12:24:40 +0100 <jackdk> the concrete transformer is in transformers-0.6 and the MTL support is since mtl-2.3
2022-12-16 12:25:09 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 260 seconds)
2022-12-16 12:25:39 +0100 <jackdk> @tell tvandinther https://hackage.haskell.org/package/transformers-0.6.0.4/docs/Control-Monad-Trans-Writer-CPS.html If you're appending on the right, you may want a snoc list, Data.Sequence, or difference list (dlist)
2022-12-16 12:25:39 +0100 <lambdabot> Consider it noted.
2022-12-16 12:26:18 +0100fizbin(~fizbin@user/fizbin) (Remote host closed the connection)
2022-12-16 12:26:19 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 12:26:37 +0100fizbin(~fizbin@user/fizbin)
2022-12-16 12:27:06 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 12:27:50 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Ping timeout: 260 seconds)
2022-12-16 12:31:45 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 252 seconds)
2022-12-16 12:37:00 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-16 12:37:32 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-16 12:38:23 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 12:38:40 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 12:38:55 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 12:39:48 +0100ec_(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-12-16 12:40:28 +0100ec_(~ec@gateway/tor-sasl/ec)
2022-12-16 12:42:55 +0100dextaa(~DV@user/dextaa) (Quit: Ping timeout (120 seconds))
2022-12-16 12:43:15 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 256 seconds)
2022-12-16 12:43:19 +0100dextaa(~DV@user/dextaa)
2022-12-16 12:46:17 +0100CiaoSen(~Jura@p200300c95730b6002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-16 12:47:28 +0100rnat(uid73555@id-73555.lymington.irccloud.com)
2022-12-16 12:47:38 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-16 12:52:18 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-16 13:01:27 +0100phma(phma@2001:5b0:211f:2488:eec1:974f:5902:6cf5) (Read error: Connection reset by peer)
2022-12-16 13:02:30 +0100phma(~phma@host-67-44-208-106.hnremote.net)
2022-12-16 13:03:30 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-16 13:03:38 +0100doyougnu(~doyougnu@cpe-74-69-132-225.stny.res.rr.com)
2022-12-16 13:20:04 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 13:21:00 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Read error: Connection reset by peer)
2022-12-16 13:24:39 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 260 seconds)
2022-12-16 13:25:36 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-12-16 13:25:41 +0100__monty__(~toonn@user/toonn)
2022-12-16 13:25:59 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-16 13:29:06 +0100__xor(~xor@74.215.182.83)
2022-12-16 13:29:54 +0100_xor(~xor@74.215.182.83) (Ping timeout: 272 seconds)
2022-12-16 13:33:36 +0100__xor(~xor@74.215.182.83) (Ping timeout: 252 seconds)
2022-12-16 13:34:21 +0100hsw_(~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net)
2022-12-16 13:34:53 +0100__xor(~xor@74.215.182.83)
2022-12-16 13:35:29 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-16 13:37:13 +0100elevenkb(~elevenkb@105.224.37.128)
2022-12-16 13:37:51 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
2022-12-16 13:39:20 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com)
2022-12-16 13:44:05 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2022-12-16 13:46:38 +0100 <dminuoso> monochrom: You were using emacs with ghci for integrating errors, right?
2022-12-16 13:48:01 +0100bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-16 13:50:33 +0100hsw_(~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Quit: Leaving)
2022-12-16 13:55:01 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-16 13:55:13 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2022-12-16 13:56:51 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-12-16 14:00:29 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 14:01:44 +0100kaskal(~kaskal@2001:4bb8:2d1:32ed:7894:4e7:1e3f:f8dd) (Ping timeout: 246 seconds)
2022-12-16 14:06:12 +0100kaskal(~kaskal@213-147-167-253.nat.highway.webapn.at)
2022-12-16 14:15:07 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-16 14:18:26 +0100zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-12-16 14:22:05 +0100zaquest(~notzaques@5.130.79.72)
2022-12-16 14:22:45 +0100mncheck(~mncheck@193.224.205.254) (Remote host closed the connection)
2022-12-16 14:23:50 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe)
2022-12-16 14:24:42 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 14:27:32 +0100paulpaul1076(~textual@95-29-5-111.broadband.corbina.ru) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-12-16 14:29:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Ping timeout: 252 seconds)
2022-12-16 14:30:03 +0100 <dminuoso> % type Nummy = forall a. Num a => Maybe a
2022-12-16 14:30:03 +0100 <yahb2> <no output>
2022-12-16 14:30:15 +0100 <dminuoso> % a :: () -> Nummy; a _ = Just 5
2022-12-16 14:30:15 +0100 <yahb2> <no output>
2022-12-16 14:30:25 +0100 <dminuoso> % b :: () -> Maybe Int; b = a
2022-12-16 14:30:25 +0100 <yahb2> <interactive>:42:27: error: ; • Couldn't match type: forall a. Num a => Maybe a ; with: Maybe Int ; Expected: () -> Maybe Int ; Actual: () -> Nummy ; • In...
2022-12-16 14:30:46 +0100 <dminuoso> % :set -XDeepSubsumption
2022-12-16 14:30:47 +0100 <yahb2> <no output>
2022-12-16 14:30:49 +0100 <dminuoso> % b :: () -> Maybe Int; b = a
2022-12-16 14:30:49 +0100 <yahb2> <no output>
2022-12-16 14:30:57 +0100 <dminuoso> Why is simple subsumption breaking this?
2022-12-16 14:31:18 +0100 <dminuoso> Isnt `a :: () -> Nummy` perfectly equivalent to `a :: Num a => () -> Maybe a`?
2022-12-16 14:32:33 +0100elevenkb(~elevenkb@105.224.37.128) (Ping timeout: 260 seconds)
2022-12-16 14:32:37 +0100freeside(~mengwong@eduroam-134-96-204-5.uni-saarland.de)
2022-12-16 14:34:20 +0100CiaoSen(~Jura@p200300c95730b6002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-12-16 14:39:29 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-12-16 14:42:18 +0100mncheck(~mncheck@193.224.205.254)
2022-12-16 14:49:44 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-16 14:50:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-16 15:04:13 +0100thegeekinside(~thegeekin@189.217.82.244)
2022-12-16 15:04:24 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-12-16 15:08:54 +0100freeside(~mengwong@eduroam-134-96-204-5.uni-saarland.de) (Ping timeout: 268 seconds)
2022-12-16 15:11:40 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 15:13:42 +0100ksqsf(~user@134.209.106.31) (Remote host closed the connection)
2022-12-16 15:14:52 +0100ksqsf(~user@2001:da8:d800:336:943b:89e6:6fda:8564)
2022-12-16 15:17:34 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 272 seconds)
2022-12-16 15:20:02 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2022-12-16 15:24:05 +0100waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Quit: WeeChat 3.7.1)
2022-12-16 15:26:32 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 15:37:06 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
2022-12-16 15:40:50 +0100pavonia(~user@user/siracusa) (Ping timeout: 252 seconds)
2022-12-16 15:44:30 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-12-16 15:46:37 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2022-12-16 15:56:01 +0100califax(~califax@user/califx)
2022-12-16 15:59:19 +0100hpc(~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 256 seconds)
2022-12-16 16:01:01 +0100hpc(~juzz@ip98-169-35-163.dc.dc.cox.net)
2022-12-16 16:02:35 +0100gdd(~gdd@2001:470:1f13:187:e8a5:fbff:fe29:42f5) (Ping timeout: 264 seconds)
2022-12-16 16:03:58 +0100akegalj(~akegalj@141-136-165-175.dsl.iskon.hr)
2022-12-16 16:05:39 +0100hpc(~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 260 seconds)
2022-12-16 16:08:01 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:c184:76cc:3bad:bcb1) (Ping timeout: 252 seconds)
2022-12-16 16:11:14 +0100thyriaen(~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection)
2022-12-16 16:11:35 +0100hpc(~juzz@ip98-169-35-163.dc.dc.cox.net)
2022-12-16 16:11:52 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 252 seconds)
2022-12-16 16:12:51 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
2022-12-16 16:13:01 +0100dsrt^(~dsrt@76.145.185.103) (Remote host closed the connection)
2022-12-16 16:16:13 +0100Azel_(~Azel@2a01:e0a:1f1:98e0:fa28:19ff:fea0:c205)
2022-12-16 16:20:07 +0100tomasoats
2022-12-16 16:25:29 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-16 16:26:11 +0100mestre(~mestre@191.177.185.178)
2022-12-16 16:27:01 +0100rnat(uid73555@id-73555.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-16 16:27:22 +0100 <mestre> Hello, does anybody knows if there is a mastodon instance for functional programming?
2022-12-16 16:29:21 +0100 <Jade[m]> @pl a . a
2022-12-16 16:29:21 +0100 <lambdabot> a . a
2022-12-16 16:29:36 +0100 <leah2> mestre: types.pl maybe
2022-12-16 16:30:26 +0100 <Jade[m]> theres fix of course which is the infinite version of this
2022-12-16 16:30:27 +0100 <Jade[m]> is there an idiom for f . f or f . f . f?
2022-12-16 16:30:46 +0100 <mestre> leah2: uh, this looks interesting, ty!
2022-12-16 16:31:56 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 16:32:33 +0100 <geekosaur> Jade[m], it's too short for there to be one, we just write it
2022-12-16 16:32:55 +0100 <geekosaur> for many of them there's a use of iterate, but for 2 or 3 it's not worth it
2022-12-16 16:40:26 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 255 seconds)
2022-12-16 16:42:31 +0100CiaoSen(~Jura@p200300c95718c3002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-16 16:45:22 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-12-16 16:48:19 +0100 <Jade[m]> fair
2022-12-16 16:50:46 +0100 <EvanR> :t groupBy
2022-12-16 16:50:47 +0100 <lambdabot> (a -> a -> Bool) -> [a] -> [[a]]
2022-12-16 16:51:24 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 16:51:57 +0100 <EvanR> how do you group by a field, such as fst or snd
2022-12-16 16:52:06 +0100 <unit73e> :t exterminatus
2022-12-16 16:52:07 +0100 <lambdabot> error: Variable not in scope: exterminatus
2022-12-16 16:52:10 +0100 <unit73e> :(
2022-12-16 16:52:20 +0100 <EvanR> this signature seems wonderfully obtuse right now
2022-12-16 16:52:32 +0100ozkutuk53(~ozkutuk@176.240.173.153)
2022-12-16 16:52:38 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de)
2022-12-16 16:52:53 +0100 <unit73e> :t groupOn
2022-12-16 16:52:54 +0100 <lambdabot> error:
2022-12-16 16:52:54 +0100 <lambdabot> • Variable not in scope: groupOn
2022-12-16 16:52:54 +0100 <lambdabot> • Perhaps you meant one of these:
2022-12-16 16:53:01 +0100 <geekosaur> `groupBy (comparing snd)`
2022-12-16 16:53:02 +0100 <unit73e> I was hoping that existed lol
2022-12-16 16:53:07 +0100ksqsf(~user@2001:da8:d800:336:943b:89e6:6fda:8564) (Ping timeout: 252 seconds)
2022-12-16 16:53:21 +0100 <unit73e> well there you go
2022-12-16 16:53:30 +0100 <unit73e> groupBy (comparing ...)
2022-12-16 16:53:36 +0100 <EvanR> :t comparing
2022-12-16 16:53:37 +0100 <lambdabot> Ord a => (b -> a) -> b -> b -> Ordering
2022-12-16 16:53:59 +0100 <EvanR> Ordering... Bool... the neutrons aren't forming right now
2022-12-16 16:55:03 +0100 <geekosaur> given a transformer from a value to another value inside of it (a primitive lens, if you will) and a pair of values, apply the transformer to each value and pass both to `compare`
2022-12-16 16:55:12 +0100Guest|65(~Guest|65@84.22.220.152)
2022-12-16 16:55:19 +0100 <EvanR> > groupBy (\(x,_) (y,_) -> x==y) [(1,2),(1,3),(2,5)]
2022-12-16 16:55:21 +0100 <lambdabot> [[(1,2),(1,3)],[(2,5)]]
2022-12-16 16:55:56 +0100 <geekosaur> and comparing is the same as (compare `on`)
2022-12-16 16:56:08 +0100 <EvanR> yeah but groupBy wants a Bool
2022-12-16 16:56:17 +0100 <EvanR> for some reason
2022-12-16 16:56:33 +0100 <geekosaur> well, yes, it looks for some notion of equality
2022-12-16 16:56:33 +0100 <EvanR> comparing works great for sortBy
2022-12-16 16:56:45 +0100 <geekosaur> so there is equatingt,m or equivalently ((==) `on`)
2022-12-16 16:56:53 +0100 <geekosaur> *equating,
2022-12-16 16:57:01 +0100 <EvanR> there is equating?
2022-12-16 16:57:03 +0100 <EvanR> :t equating
2022-12-16 16:57:04 +0100 <lambdabot> error: Variable not in scope: equating
2022-12-16 16:57:08 +0100 <geekosaur> @index equating
2022-12-16 16:57:08 +0100 <lambdabot> Distribution.Simple.Utils
2022-12-16 16:57:13 +0100 <geekosaur> wrong one
2022-12-16 16:57:32 +0100 <geekosaur> think it's in there somewhere, but ((==) `on`) is the same thing and I think preferred
2022-12-16 16:57:45 +0100 <geekosaur> only reason there's a separate `comparing` is it came first
2022-12-16 16:58:02 +0100 <geekosaur> :t on
2022-12-16 16:58:03 +0100 <lambdabot> (b -> b -> c) -> (a -> b) -> a -> a -> c
2022-12-16 16:58:05 +0100 <EvanR> on (==) is what I was forgetting
2022-12-16 16:58:05 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-16 16:58:35 +0100 <Jade[m]> ((==) `on`) isn't that the same as (on (==))
2022-12-16 16:58:43 +0100 <EvanR> > groupBy (on (==) id) [(1,2),(1,3),(2,5)]
2022-12-16 16:58:44 +0100 <lambdabot> [[(1,2)],[(1,3)],[(2,5)]]
2022-12-16 16:58:51 +0100 <Jade[m]> * `((==) \`on`)` isn't that the same as `(on (==))`
2022-12-16 16:58:55 +0100 <EvanR> uhg
2022-12-16 16:58:56 +0100j4cc3b(~jeffreybe@pool-74-105-2-138.nwrknj.fios.verizon.net)
2022-12-16 16:58:59 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-16 16:59:04 +0100 <Jade[m]> * `((==) \`on`)` isn't that the same as `(on (==))`
2022-12-16 16:59:05 +0100 <EvanR> > groupBy (on (==) fst) [(1,2),(1,3),(2,5)]
2022-12-16 16:59:07 +0100 <lambdabot> [[(1,2),(1,3)],[(2,5)]]
2022-12-16 16:59:09 +0100 <EvanR> \o/
2022-12-16 16:59:10 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 252 seconds)
2022-12-16 16:59:14 +0100 <geekosaur> yes
2022-12-16 16:59:35 +0100 <Jade[m]> * `((==) \\`on\`)` isn't that the same as `(on (==))`
2022-12-16 16:59:36 +0100 <Jade[m]> * `((==) `on`)` isn't that the same as `(on (==))`
2022-12-16 16:59:37 +0100 <geekosaur> but `(==) \`on\` snd` reads better
2022-12-16 16:59:40 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 252 seconds)
2022-12-16 17:00:05 +0100 <geekosaur> fsvo "reads better"
2022-12-16 17:00:22 +0100 <EvanR> do you guys know there are randomly backslashes in your messages
2022-12-16 17:00:50 +0100 <EvanR> is that a matrix thing or
2022-12-16 17:00:53 +0100 <geekosaur> that's to keep matrix from exploding (Jade[m] is on Matrix)
2022-12-16 17:01:02 +0100 <EvanR> lol
2022-12-16 17:01:07 +0100 <EvanR> it will explode?
2022-12-16 17:01:08 +0100 <Jade[m]> I often use it instead of flip because (flip f) x reads a lot worse than (`f` x)
2022-12-16 17:01:14 +0100 <geekosaur> since `x` is fixed width / code, but we have `` used in its Haskell sense within
2022-12-16 17:01:23 +0100 <EvanR> and now I'm seeing unicode character 0011
2022-12-16 17:01:24 +0100 <geekosaur> welll, it'll misrender
2022-12-16 17:01:34 +0100 <geekosaur> that's another matrix thingt
2022-12-16 17:01:40 +0100 <EvanR> :(
2022-12-16 17:01:51 +0100 <Jade[m]> yeah im on matrix
2022-12-16 17:02:02 +0100 <geekosaur> I tried to configure hexchat to translate it but that stopped tabs from updating (longstanding hexchat bug)
2022-12-16 17:02:09 +0100 <Jade[m]> what does my username look like?
2022-12-16 17:02:20 +0100califax(~califax@user/califx)
2022-12-16 17:02:20 +0100 <EvanR> <Jade[m]>
2022-12-16 17:02:26 +0100 <geekosaur> "Jade[m]" but that probably gfets translated by the gateway
2022-12-16 17:03:11 +0100 <Jade[m]> geekosaur: ah ok, was wondering if it'd transfer the flag as well haha
2022-12-16 17:03:43 +0100 <geekosaur> the default is to convert your matrix username to something valid as an IRC nick and then append "[m]"
2022-12-16 17:03:53 +0100 <EvanR> you have a flag? cool
2022-12-16 17:04:02 +0100 <Jade[m]> ok I see
2022-12-16 17:04:25 +0100 <Jade[m]> EvanR: trans flag 🏳️‍⚧️
2022-12-16 17:04:28 +0100 <geekosaur[m]> I'm over here too but it's a separate account
2022-12-16 17:04:49 +0100 <Jade[m]> geekosaur[m]: very nice
2022-12-16 17:04:51 +0100 <geekosaur> not a valid nick char
2022-12-16 17:05:07 +0100 <Jade[m]> yep
2022-12-16 17:05:26 +0100 <geekosaur> nicks are limited to one of the ISO charsets (not iso8859-1, it's the scandinavian charset for historical reasons)
2022-12-16 17:06:21 +0100 <geekosaur> letters and digits only, but within that charset so we get extra chars that represent things like ø
2022-12-16 17:06:30 +0100Guest75(Guest75@2a01:7e01::f03c:92ff:fe5d:7b18)
2022-12-16 17:06:48 +0100 <Jade[m]> lets goo
2022-12-16 17:06:51 +0100 <Jade[m]> äöü?
2022-12-16 17:07:16 +0100 <EvanR> that flag appears correctly, impressive
2022-12-16 17:08:15 +0100jinsun(~jinsun@user/jinsun)
2022-12-16 17:09:27 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 17:09:37 +0100 <EvanR> whenever sortBy and groupBy are needed, it means comparing and on are needed, and so three imports are needed
2022-12-16 17:09:48 +0100 <EvanR> Data.List, Data.Ord, Data.Function
2022-12-16 17:09:57 +0100 <EvanR> three imports for 2 functions xD
2022-12-16 17:10:34 +0100 <Jade[m]> make a module that re-exports these
2022-12-16 17:10:49 +0100Guest|65(~Guest|65@84.22.220.152) (Quit: Connection closed)
2022-12-16 17:11:23 +0100 <EvanR> custom prelude? xD
2022-12-16 17:12:32 +0100 <geekosaur> there is sortOn that combines sortBy with on. sadly the same is not true of groupBy
2022-12-16 17:12:57 +0100 <geekosaur> then again it's arguable that if it matters that much, you probably shouldn't be using a list
2022-12-16 17:14:31 +0100nschoe(~q@141.101.51.197) (Quit: Switching off)
2022-12-16 17:15:09 +0100Guest|65(~Guest|65@84.22.220.152)
2022-12-16 17:16:12 +0100bitmapper(uid464869@id-464869.lymington.irccloud.com)
2022-12-16 17:16:46 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds)
2022-12-16 17:18:31 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-16 17:19:04 +0100nschoe(~q@141.101.51.197)
2022-12-16 17:22:04 +0100 <EvanR> when life gives you a list, you use all this stuff to make a Map
2022-12-16 17:23:11 +0100Guest|65(~Guest|65@84.22.220.152) (Quit: Connection closed)
2022-12-16 17:24:52 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 272 seconds)
2022-12-16 17:25:10 +0100 <Jade[m]> hahaha
2022-12-16 17:29:23 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 17:30:08 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-16 17:32:19 +0100Jade[m]uploaded an image: (32KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/ptUmacIdEbgEpCUEDyaGQXul/2022-12-16_1… >
2022-12-16 17:33:03 +0100manwithl-(~manwithlu@2a09:bac1:5bc0:20::49:125) (Remote host closed the connection)
2022-12-16 17:33:25 +0100manwithluck(~manwithlu@2a09:bac1:5bc0:20::49:125)
2022-12-16 17:33:40 +0100mbuf(~Shakthi@49.204.113.218) (Quit: Leaving)
2022-12-16 17:35:19 +0100 <geekosaur> someone needs to upgrade @girl19, clearly 🙂
2022-12-16 17:38:44 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-16 17:45:46 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 272 seconds)
2022-12-16 17:54:53 +0100razetime(~quassel@49.207.203.213)
2022-12-16 17:54:53 +0100ft(~ft@p4fc2a257.dip0.t-ipconnect.de)
2022-12-16 17:56:41 +0100random-jellyfish(~random-je@user/random-jellyfish)
2022-12-16 17:58:29 +0100freeside(~mengwong@nat-veranstaltungen.uni-saarland.de) (Ping timeout: 268 seconds)
2022-12-16 17:58:50 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-16 18:02:01 +0100 <monochrom> dminuoso: Yes emacs haskell-mode has error integration. P.S. I think simple subsumption's purpose includes treating "forall a. X -> F a" and "X -> forall a. F a" differently (to make something else easier).
2022-12-16 18:03:19 +0100Sgeo(~Sgeo@user/sgeo)
2022-12-16 18:05:04 +0100 <monochrom> EvanR: When life gives you C, you write Hugs. :)
2022-12-16 18:09:23 +0100nschoe(~q@141.101.51.197) (Remote host closed the connection)
2022-12-16 18:11:46 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Remote host closed the connection)
2022-12-16 18:12:04 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-16 18:12:57 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 18:16:48 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 18:17:39 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds)
2022-12-16 18:18:07 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 18:18:54 +0100razetime(~quassel@49.207.203.213) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-12-16 18:19:37 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-16 18:20:54 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-16 18:23:53 +0100michalz(~michalz@185.246.204.72) (Remote host closed the connection)
2022-12-16 18:24:39 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:484b:db47:7265:c55f) (Quit: use-value)
2022-12-16 18:25:33 +0100jespada(~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
2022-12-16 18:25:34 +0100Vajb(~Vajb@2001:999:250:c9:8588:6e93:7809:7816) (Read error: Connection reset by peer)
2022-12-16 18:26:42 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-12-16 18:30:40 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126)
2022-12-16 18:32:34 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-12-16 18:34:51 +0100Vajb(~Vajb@2001:999:250:c9:8588:6e93:7809:7816)
2022-12-16 18:37:03 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 18:47:12 +0100juri_(~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 268 seconds)
2022-12-16 18:49:40 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 18:50:13 +0100zeenk(~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!)
2022-12-16 18:57:41 +0100michalz(~michalz@185.246.204.94)
2022-12-16 18:57:56 +0100vpan(~0@212.117.1.172) (Quit: Leaving.)
2022-12-16 18:58:28 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126) (Quit: Going elsewhere)
2022-12-16 18:58:55 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 268 seconds)
2022-12-16 18:59:52 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 19:02:15 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
2022-12-16 19:03:22 +0100Hercules1(~Hercules@ti0018a400-7782.bb.online.no)
2022-12-16 19:04:59 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-16 19:05:27 +0100Hercules1(~Hercules@ti0018a400-7782.bb.online.no) (Client Quit)
2022-12-16 19:06:17 +0100michalz(~michalz@185.246.204.94) (Ping timeout: 246 seconds)
2022-12-16 19:06:26 +0100califax(~califax@user/califx)
2022-12-16 19:07:22 +0100michalz(~michalz@185.246.204.94)
2022-12-16 19:08:47 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-12-16 19:10:41 +0100CiaoSen(~Jura@p200300c95718c3002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
2022-12-16 19:11:54 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 272 seconds)
2022-12-16 19:12:47 +0100juri_(~juri@84-19-175-179.pool.ovpn.com)
2022-12-16 19:17:00 +0100econo(uid147250@user/econo)
2022-12-16 19:17:08 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2022-12-16 19:18:23 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-12-16 19:19:40 +0100 <voidzero> hey so thanks for the reinforcement yesterday
2022-12-16 19:20:56 +0100 <monochrom> :)
2022-12-16 19:22:37 +0100 <voidzero> today my studies went great, and when I got to the assignment "write a caesar cipher function and add a decipher function" I wrote this. Please rate it. https://paste.tomsmeding.com/KvwMuHdh
2022-12-16 19:23:45 +0100 <voidzero> nixos-install -v --show-trace --no-root-passwd --root /mnt
2022-12-16 19:23:48 +0100 <voidzero> oops
2022-12-16 19:24:17 +0100 <voidzero> wrong clipboard
2022-12-16 19:24:51 +0100 <monochrom> I think it's OK.
2022-12-16 19:26:48 +0100random-jellyfish(~random-je@user/random-jellyfish) (Quit: Client closed)
2022-12-16 19:26:58 +0100 <voidzero> :)
2022-12-16 19:28:04 +0100 <voidzero> originally I thought I'd use the range > 48 and < 123, but ' ' is ord 32 so I took that as the bottom limit
2022-12-16 19:28:46 +0100 <voidzero> lower limit
2022-12-16 19:29:20 +0100 <VOID[m]> Fellas, I was here recently trying to make lenses for my tree
2022-12-16 19:29:21 +0100 <VOID[m]> I did a thing after getting some suggestions from nice people here
2022-12-16 19:29:21 +0100 <VOID[m]> Could someone please take a look and tell me how much I overcomplicated it?
2022-12-16 19:29:21 +0100 <VOID[m]> https://paste.tomsmeding.com/2x1wnlBN
2022-12-16 19:29:59 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-16 19:30:14 +0100 <dsal> VOID[m]: can you not derive Functor, Foldable, and Traversable?
2022-12-16 19:30:45 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-16 19:31:18 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2022-12-16 19:31:47 +0100 <VOID[m]> I am not sure, I didn't trust derive for complex type :P
2022-12-16 19:31:47 +0100 <VOID[m]> How do I know if it derived correctly? Is it as simple as "if it compiles its good"?
2022-12-16 19:33:33 +0100 <dsal> You can test laws with checkers, but it's probably more likely to be correct if it can derive than if you wrote it by hand.
2022-12-16 19:34:12 +0100 <geekosaur> in the case of Functor, there is only one correct derivation and if the compiler can't do it then it almost certainly can't be done
2022-12-16 19:34:29 +0100tomjagua1paw(~tom@li367-225.members.linode.com) (Ping timeout: 260 seconds)
2022-12-16 19:34:55 +0100 <VOID[m]> Then from now on I shall derive
2022-12-16 19:35:03 +0100tomjaguarpaw(~tom@li367-225.members.linode.com)
2022-12-16 19:35:44 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-16 19:36:43 +0100 <geekosaur> (there are cases involving GADTs where you have to use standalone deriving, but the same rule applies)
2022-12-16 19:37:17 +0100 <dsal> Yeah, last time I built something fancy and tree-like, I apparently did a ton of checkers.
2022-12-16 19:37:27 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-16 19:37:42 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Remote host closed the connection)
2022-12-16 19:38:33 +0100 <monochrom> I am the opposite. I don't trust myself for complex types.
2022-12-16 19:39:27 +0100 <VOID[m]> monochrom: Honestly, that's probably smarter. I just didn't expect it to be able to derive...
2022-12-16 19:39:57 +0100 <dsal> That's how I ended up with my last somewhat complex type. I wrote all the things and the tests and then I realized I could derive them so pulled out all that extra code.
2022-12-16 19:40:05 +0100 <monochrom> More honestly I'm just lazy.
2022-12-16 19:41:17 +0100 <geekosaur> if it can derive it then by construction it is correct. it's only in the case where it can't derive Foldable or Traversable that it's possible you can write it. (for Functor, as I said, if it can't derive it then it can't be done)
2022-12-16 19:42:01 +0100 <monochrom> I need to test that against my favourite example... >:D
2022-12-16 19:42:31 +0100 <VOID[m]> I was right, deriving doesn't work well for Foldable for my type. It derives but order is terrible
2022-12-16 19:43:04 +0100 <geekosaur> hm, that is a possibility, yes.
2022-12-16 19:43:05 +0100 <VOID[m]> (so traversable maybe too? I don't remember if order matters there)
2022-12-16 19:43:07 +0100 <monochrom> Ugh I'm impressed. DeriveFunctor works for C r a = ((a -> r) -> r) too.
2022-12-16 19:43:27 +0100 <geekosaur> order doesn't matter for Traversable
2022-12-16 19:43:46 +0100 <monochrom> How is order terrible?
2022-12-16 19:44:18 +0100 <monochrom> Ah there is choice of preorder postorder inorder.
2022-12-16 19:44:28 +0100 <monochrom> But "terrible" is the wrong word.
2022-12-16 19:44:49 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 19:45:08 +0100 <VOID[m]> Implementing by hand: λ> foldr (:) [] sampleTree -- [1,2,3,4,5,6,7,8,9]
2022-12-16 19:45:12 +0100 <VOID[m]> Deriving: [4,5,6,7,8,9,1,2,3]
2022-12-16 19:45:32 +0100 <VOID[m]> For a tree:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/4efca93f25b953e5c3d04383b1a2519b2f0f…>)
2022-12-16 19:49:16 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 272 seconds)
2022-12-16 19:52:32 +0100slack1256(~slack1256@191.125.227.69)
2022-12-16 19:52:43 +0100 <monochrom> Alternatively you could have declared _values before _branches.
2022-12-16 19:53:08 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 19:53:17 +0100 <slack1256> Does stack's package.yaml have a section to specify data-files as in cabal?
2022-12-16 19:57:30 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 252 seconds)
2022-12-16 19:59:24 +0100 <sm1> I'm guessing data-files:
2022-12-16 20:00:12 +0100cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2022-12-16 20:00:39 +0100 <dsal> VOID[m]: https://play-haskell.tomsmeding.com/saved/K2DGICtL
2022-12-16 20:00:59 +0100cheater(~Username@user/cheater)
2022-12-16 20:01:28 +0100paulpaul1076(~textual@95-29-5-111.broadband.corbina.ru)
2022-12-16 20:02:22 +0100nek0(~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
2022-12-16 20:02:38 +0100AlexZenon(~alzenon@178.34.161.14) (Ping timeout: 252 seconds)
2022-12-16 20:03:02 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-16 20:03:22 +0100Alex_test(~al_test@178.34.161.14) (Ping timeout: 252 seconds)
2022-12-16 20:04:12 +0100 <VOID[m]> I'll refactor my pattern matching to actually use records and I'll be able to use that, thanks
2022-12-16 20:05:28 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 20:05:38 +0100 <VOID[m]> And that foldr in getTree? It feels ugly, have I missed an obvious way to write it prettier?
2022-12-16 20:05:38 +0100 <VOID[m]> Or is it ok...
2022-12-16 20:10:53 +0100Alex_test(~al_test@178.34.161.14)
2022-12-16 20:11:14 +0100 <dsal> You might be able to get further with uniplate, but I don't know that it's holding you back in any way.
2022-12-16 20:12:04 +0100doyougnu(~doyougnu@cpe-74-69-132-225.stny.res.rr.com) (Ping timeout: 272 seconds)
2022-12-16 20:12:31 +0100AlexZenon(~alzenon@178.34.161.14)
2022-12-16 20:14:41 +0100 <voidzero> if not pretty, embellish with comments
2022-12-16 20:16:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 20:17:15 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-12-16 20:18:26 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-16 20:20:52 +0100Guest75(Guest75@2a01:7e01::f03c:92ff:fe5d:7b18) (Quit: Client closed)
2022-12-16 20:24:18 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 20:27:57 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 20:34:18 +0100 <iqubic> I hate that there's no HasTrie instance for Sets
2022-12-16 20:35:38 +0100 <iqubic> https://hackage.haskell.org/package/MemoTrie-0.6.10/docs/Data-MemoTrie.html
2022-12-16 20:36:33 +0100 <VOID[m]> maybe `o & branches %~ (\b -> set ps b t)` is better than map inside fmap
2022-12-16 20:37:32 +0100 <iqubic> Ideally I'd want `Instance (HasTrie a) => HasTrie (Set a)`
2022-12-16 20:37:39 +0100gmg(~user@user/gehmehgeh)
2022-12-16 20:37:59 +0100mestre(~mestre@191.177.185.178) (Quit: Lost terminal)
2022-12-16 20:38:22 +0100 <VOID[m]> Except I think I made a mistake...
2022-12-16 20:41:50 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 272 seconds)
2022-12-16 20:47:25 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 252 seconds)
2022-12-16 20:47:28 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Remote host closed the connection)
2022-12-16 20:47:41 +0100 <VOID[m]> Ok, do you guys have any tips on navigating lens docs
2022-12-16 20:47:52 +0100 <VOID[m]> Finding anything there seems near impossible for me...
2022-12-16 20:48:12 +0100 <VOID[m]> They have some weirdly specific operators
2022-12-16 20:48:34 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 260 seconds)
2022-12-16 20:49:38 +0100 <VOID[m]> I want to iterate over a list applying a function until it returns a Just
2022-12-16 20:51:48 +0100 <VOID[m]> Also, is it possible to check if a function has infix version in lens?
2022-12-16 20:53:08 +0100paulpaul1076(~textual@95-29-5-111.broadband.corbina.ru) (Quit: Textual IRC Client: www.textualapp.com)
2022-12-16 20:53:25 +0100asthasr(~asthasr@208.80.78.154)
2022-12-16 20:54:29 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-16 20:54:57 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2022-12-16 20:56:51 +0100 <unit73e> kind of needed actual cross platform paths but it's still in experimental :\
2022-12-16 20:57:41 +0100 <unit73e> it will be filepath 2.x
2022-12-16 20:58:56 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 272 seconds)
2022-12-16 21:03:37 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 21:03:59 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 21:04:03 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 21:05:20 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-16 21:08:14 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-12-16 21:08:45 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 260 seconds)
2022-12-16 21:09:29 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-16 21:10:27 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 21:15:24 +0100tvandinther(~tvandinth@101.98.118.246) (Ping timeout: 272 seconds)
2022-12-16 21:15:55 +0100tvandinther(~tvandinth@101.98.118.246)
2022-12-16 21:17:17 +0100slack1256(~slack1256@191.125.227.69) (Remote host closed the connection)
2022-12-16 21:18:57 +0100tvandinther(~tvandinth@101.98.118.246) (Client Quit)
2022-12-16 21:20:53 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 21:23:17 +0100mmhat(~mmh@p5081a34e.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1)
2022-12-16 21:34:23 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-12-16 21:35:34 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:8ce1:49ba:5282:c918)
2022-12-16 21:36:03 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-16 21:38:28 +0100monochromturns on both LambdaCase and BlockArguments to write "catchError xyz \case E1 -> ... E2 -> ..." \∩/
2022-12-16 21:38:36 +0100pavonia(~user@user/siracusa)
2022-12-16 21:39:05 +0100 <monochrom> {-# language JavaCatchSyntax #-}
2022-12-16 21:39:10 +0100 <Rembane> How to win at life
2022-12-16 21:39:40 +0100 <Rembane> I've activated RecordDotSyntax and that makes my Haskell code look very unHaskelly
2022-12-16 21:39:55 +0100 <monochrom> Oh I could also use infix `catchError`!
2022-12-16 21:40:15 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-12-16 21:40:58 +0100 <dsal> iqubic: can't you just write that?
2022-12-16 21:41:17 +0100 <dsal> VOID[m]: I liked "optics by example" for understanding the concepts. The docs are just… you've got to know things.
2022-12-16 21:41:47 +0100 <unit73e> Rembane, I do have some Javaskell in my code, like having each record in its own file, but that's about it
2022-12-16 21:42:07 +0100 <unit73e> It just feels more organized to me that way
2022-12-16 21:42:14 +0100 <unit73e> private files, obviously
2022-12-16 21:42:28 +0100 <unit73e> so say Entry is it's own file
2022-12-16 21:42:32 +0100 <VOID[m]> I've read many optics tutorials now ;_;
2022-12-16 21:42:32 +0100 <VOID[m]> I just want a way to find specific stuff...
2022-12-16 21:42:32 +0100 <VOID[m]> Like having array of Maybe, get first Just
2022-12-16 21:42:36 +0100 <Rembane> unit73e: Private files are the best, or wait... what does that mean?
2022-12-16 21:42:46 +0100 <unit73e> Rembane, it means they're not exposed in cabal
2022-12-16 21:42:56 +0100 <VOID[m]> How do I even look for that...
2022-12-16 21:43:18 +0100 <unit73e> they're in other-modules, basically
2022-12-16 21:43:19 +0100 <Rembane> VOID[m]: I have no idea... fold using <|> as operator instead?
2022-12-16 21:43:38 +0100 <Rembane> unit73e: Cool. Sounds like a way to encapsulate things.
2022-12-16 21:43:43 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:8ce1:49ba:5282:c918) (Quit: WeeChat 2.8)
2022-12-16 21:44:02 +0100 <unit73e> yeah then I can just use Entry.whatever and it's a good deal
2022-12-16 21:44:05 +0100 <dsal> > foldr (<|>) Nothing [Nothing, Nothing, Just 3, Just 5, Nothing]
2022-12-16 21:44:06 +0100 <lambdabot> Just 3
2022-12-16 21:44:18 +0100 <dsal> > listToMaybe . catMaybes $ [Nothing, Nothing, Just 3, Just 5, Nothing]
2022-12-16 21:44:19 +0100 <lambdabot> Just 3
2022-12-16 21:44:48 +0100 <VOID[m]> That's what I am doing right now, but lens has so much weirdly specific stuff, that it feels like there might be a thing for that...
2022-12-16 21:44:48 +0100 <VOID[m]> It has a specific thing for list of booleans for example
2022-12-16 21:44:53 +0100 <unit73e> like we say here, each monkey in his own branch
2022-12-16 21:45:09 +0100 <dsal> > [Nothing, Nothing, Just 3, Just 5, Nothing] ^? folded . _Just
2022-12-16 21:45:10 +0100 <lambdabot> Just 3
2022-12-16 21:46:38 +0100 <Rembane> :t (^?)
2022-12-16 21:46:39 +0100 <lambdabot> s -> Getting (First a) s a -> Maybe a
2022-12-16 21:46:48 +0100 <dsal> :t preview
2022-12-16 21:46:49 +0100 <lambdabot> MonadReader s m => Getting (First a) s a -> m (Maybe a)
2022-12-16 21:47:41 +0100 <dsal> > preview (folded . _Just) [Nothing, Nothing, Just 3, Just 5, Nothing]
2022-12-16 21:47:43 +0100 <lambdabot> Just 3
2022-12-16 21:47:52 +0100 <monochrom> I have lots of inner classes in a Java file.
2022-12-16 21:48:11 +0100 <monochrom> I guess my Java code is fairly Haskelly.
2022-12-16 21:48:23 +0100 <monochrom> or fairly Cish.
2022-12-16 21:48:43 +0100 <dsal> I was writing a lot of scheme last time I had a java job. I had a ~70 line method that started with `return` and just nested a bunch of junk.
2022-12-16 21:48:44 +0100 <VOID[m]> dsal: <3 thx, that seems obvious now
2022-12-16 21:48:45 +0100 <monochrom> actually I know, Algolly.
2022-12-16 21:49:01 +0100 <monochrom> haha
2022-12-16 21:49:38 +0100 <monochrom> Yeah in C I write like fib(n) { return n<=2 ? 1 : fib(n-1) + fib(n-2) ; }
2022-12-16 21:49:55 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-16 21:50:07 +0100 <Rembane> dsal: Is that MonadReader in preview a red herring or... why does it work?
2022-12-16 21:51:53 +0100 <dsal> Yeah, I didn't expect that.
2022-12-16 21:52:18 +0100 <dsal> preview l = asks (getFirst #. foldMapOf l (First #. Just))
2022-12-16 21:52:52 +0100 <monochrom> I think the lens library is a large vocabulary. Like all large vocabulary in all languages (especially natural languages), even a dictionary that explains each word is of limited use. You immerse yourself in that language and absorb by osmosis and practice.
2022-12-16 21:54:10 +0100 <monochrom> Yes IOW I'm saying that this is like 0.1 times "where is a better doc for English?"
2022-12-16 21:54:36 +0100 <Rembane> monochrom: I would love to have a better doc for English
2022-12-16 21:55:18 +0100 <Rembane> dsal: That's an interesting definition that makes me slightly worried. Oh well. If it work it works.
2022-12-16 21:55:46 +0100 <monochrom> My personal example: Although "precarity" is clearly in dictionaries, I didn't even know it existed until my labour union used it in newsletters.
2022-12-16 21:56:13 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Remote host closed the connection)
2022-12-16 21:56:47 +0100 <monochrom> There is not going to be a tutorial or library doc that would tell me about "precarity" in advance. One has to wait until someone else actually uses it in a real sentence.
2022-12-16 21:57:51 +0100 <monochrom> Natural language teachers recommend that the only way to help is to read more books.
2022-12-16 21:58:04 +0100 <monochrom> So, read more other people's code.
2022-12-16 21:59:18 +0100 <dsal> Rembane: My brain's not good at understanding what asks is doing there.
2022-12-16 21:59:21 +0100 <VOID[m]> monochrom: but it'd be great to at least be able to look for an infix version of function quickly, and I think there was a naming patter explained in one of the tutorials, idk if it's described in docks somewhere, couldn't find it
2022-12-16 21:59:43 +0100 <dsal> VOID[m]: hoogle?
2022-12-16 21:59:58 +0100 <VOID[m]> For which problem...
2022-12-16 22:00:16 +0100 <dsal> hoogle's good for finding the name of a thing you want done.
2022-12-16 22:00:57 +0100 <dsal> :t getFirst #. foldMapOf l (First #. Just)
2022-12-16 22:00:58 +0100 <lambdabot> error:
2022-12-16 22:00:58 +0100 <lambdabot> • Variable not in scope:
2022-12-16 22:00:58 +0100 <lambdabot> (#.) :: (First a0 -> Maybe a0) -> (s0 -> r0) -> t
2022-12-16 22:01:04 +0100 <dsal> :t getFirst . foldMapOf l (First . Just)
2022-12-16 22:01:05 +0100 <lambdabot> error:
2022-12-16 22:01:05 +0100 <lambdabot> • Couldn't match type ‘Expr’
2022-12-16 22:01:05 +0100 <lambdabot> with ‘(a -> Const (First a) a) -> s -> Const (First a) s’
2022-12-16 22:01:11 +0100 <dsal> :t \l -> getFirst . foldMapOf l (First . Just)
2022-12-16 22:01:12 +0100 <lambdabot> Getting (First a) s a -> s -> Maybe a
2022-12-16 22:01:16 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-16 22:01:48 +0100 <VOID[m]> The types in lenses are long and hard to get
2022-12-16 22:01:48 +0100 <VOID[m]> And stuff like "is there an infix for view?" (an obvious example, I know) is hard to find
2022-12-16 22:01:48 +0100 <VOID[m]> With view/set it's easyish thanks to readme, but other functions?
2022-12-16 22:01:52 +0100 <dsal> OK. I figured it was something like that. I don't think I would've thought to construct it that way.
2022-12-16 22:02:07 +0100 <dsal> :t view
2022-12-16 22:02:08 +0100 <lambdabot> MonadReader s m => Getting a s a -> m a
2022-12-16 22:02:17 +0100 <dsal> @hoogle MonadReader s m => Getting a s a -> m a
2022-12-16 22:02:17 +0100 <lambdabot> Control.Lens.Combinators view :: MonadReader s m => Getting a s a -> m a
2022-12-16 22:02:17 +0100 <lambdabot> Control.Lens.Getter view :: MonadReader s m => Getting a s a -> m a
2022-12-16 22:02:17 +0100 <lambdabot> Network.AWS.Lens view :: MonadReader s m => Getting a s a -> m a
2022-12-16 22:02:56 +0100 <dsal> Yeah, preview and ^? are slightly different because of that weird monadreader thing.
2022-12-16 22:03:49 +0100 <dsal> You have to rearrange it some.
2022-12-16 22:03:53 +0100 <dsal> :t preview
2022-12-16 22:03:54 +0100 <lambdabot> MonadReader s m => Getting (First a) s a -> m (Maybe a)
2022-12-16 22:04:14 +0100 <dsal> @hoogle Getting (First a) s a -> s -> Maybe a
2022-12-16 22:04:15 +0100 <lambdabot> Lens.Micro.Extras preview :: Getting (First a) s a -> s -> Maybe a
2022-12-16 22:04:15 +0100 <lambdabot> Control.Lens.Fold (^?) :: s -> Getting (First a) s a -> Maybe a
2022-12-16 22:04:15 +0100 <lambdabot> Control.Lens.Operators (^?) :: s -> Getting (First a) s a -> Maybe a
2022-12-16 22:04:59 +0100 <unit73e> monochrom, interestingly java tried to copy haskell with its own modules, aka project jigsaw, but it's so crappy that nobody uses
2022-12-16 22:05:44 +0100 <unit73e> and javascript, off all languages, actually copied kind of right
2022-12-16 22:06:32 +0100 <Rembane> dsal: Same here. The Reader monad is IIRC function application but in a monad, can that intuition help here?
2022-12-16 22:07:35 +0100 <VOID[m]> I'll have to figure out the rearranging
2022-12-16 22:07:42 +0100 <dsal> > asks (+) 2 3
2022-12-16 22:07:44 +0100 <lambdabot> 5
2022-12-16 22:07:45 +0100trev(~trev@user/trev) (Remote host closed the connection)
2022-12-16 22:08:30 +0100 <unit73e> I also find it interesting that React is a cheap knockoff of haskell in the monad idea
2022-12-16 22:08:39 +0100 <unit73e> but only somewhat
2022-12-16 22:08:50 +0100crazazy(~user@130.89.171.62)
2022-12-16 22:09:28 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 22:09:48 +0100 <[exa]> react has anything like monads?
2022-12-16 22:10:20 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 22:11:12 +0100 <geekosaur> callbacks?
2022-12-16 22:11:26 +0100 <Rembane> Hooks?
2022-12-16 22:11:47 +0100 <[exa]> that's a bit more like an effect system but no monads
2022-12-16 22:11:47 +0100 <dsal> blackjack?
2022-12-16 22:12:28 +0100 <unit73e> [exa], they have this components idea, where you have to lift and whatnot, but it's only somewhat copied
2022-12-16 22:12:38 +0100 <unit73e> and they even copied Effect
2022-12-16 22:12:47 +0100 <unit73e> but only superficially
2022-12-16 22:12:53 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 22:13:21 +0100 <unit73e> it's obvious they copied the name and are going somewhat with the same idea, but it's javascript
2022-12-16 22:13:50 +0100 <unit73e> so it leaves a lot to be desired
2022-12-16 22:13:55 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 22:13:55 +0100 <unit73e> Purescript is the way to go imo
2022-12-16 22:14:20 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 255 seconds)
2022-12-16 22:14:31 +0100 <[exa]> lifting in react usually means making state more global, still no monads :(
2022-12-16 22:14:34 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 22:14:44 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 22:15:46 +0100 <[exa]> (you could say the nice musculous people in gyms copied lifting from haskell)
2022-12-16 22:15:56 +0100 <unit73e> the first time I used React it felt like they tried to shoehorn functional into javascript and came up with that thingy
2022-12-16 22:16:06 +0100 <unit73e> it's not great but they have something
2022-12-16 22:17:04 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 22:17:18 +0100 <unit73e> they even tried to sell the idea of high order components
2022-12-16 22:17:32 +0100 <unit73e> which is kind off.. wtf.. but whatever
2022-12-16 22:18:05 +0100 <crazazy> ngl i like class components in react over hooks
2022-12-16 22:18:40 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-16 22:18:54 +0100 <crazazy> was also a nice distinction: class components hold local state, function components do not
2022-12-16 22:19:12 +0100 <unit73e> I honestly don't care how react or anything JS ends up, because in the end of the day, there's always some weirdness you can't get rid off in JS
2022-12-16 22:19:22 +0100 <unit73e> but that's just me
2022-12-16 22:19:26 +0100 <unit73e> who gave up on JS
2022-12-16 22:19:45 +0100 <unit73e> still have to program in JS but I just don't care if it's pretty or not
2022-12-16 22:19:46 +0100 <unit73e> rant over
2022-12-16 22:20:30 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 252 seconds)
2022-12-16 22:20:32 +0100 <[exa]> well it would be great to have more of the sensible js frontends like purescript
2022-12-16 22:20:42 +0100 <[exa]> s/sensible/sensibler/
2022-12-16 22:20:48 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 22:21:32 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds)
2022-12-16 22:24:10 +0100 <dolio> Or to not require compiling to JS to begin with.
2022-12-16 22:25:05 +0100Rembanewaves the webassembly flag for completion
2022-12-16 22:30:38 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-16 22:31:56 +0100jinsun__(~jinsun@user/jinsun)
2022-12-16 22:31:56 +0100jinsun(~jinsun@user/jinsun) (Killed (mercury.libera.chat (Nickname regained by services)))
2022-12-16 22:31:56 +0100jinsun__jinsun
2022-12-16 22:32:27 +0100 <iqubic> So, is there no way good way to memoize a function that takes a `(HasTrie a) => Set a` as one of its input!
2022-12-16 22:32:29 +0100 <iqubic> ??
2022-12-16 22:32:54 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 268 seconds)
2022-12-16 22:33:10 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 22:33:20 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds)
2022-12-16 22:33:28 +0100jinsun__(~jinsun@user/jinsun)
2022-12-16 22:33:28 +0100jinsunGuest8699
2022-12-16 22:33:28 +0100jinsun__jinsun
2022-12-16 22:33:58 +0100gehmehgeh(~user@user/gehmehgeh)
2022-12-16 22:34:41 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2022-12-16 22:35:00 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-12-16 22:36:38 +0100Guest8699(~jinsun@user/jinsun) (Ping timeout: 252 seconds)
2022-12-16 22:36:53 +0100 <juri_> is there a way to intentionally create an orphan deriving instance? my test suite wants Eq everywhere, but i want to remove it from my program.
2022-12-16 22:37:02 +0100 <juri_> s/program/library/
2022-12-16 22:37:43 +0100 <geekosaur> standalone deriving in the test suite?
2022-12-16 22:37:50 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 22:38:08 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 22:41:33 +0100 <juri_> i suppose. i didn't want to write it myself, but seems pretty boilerplate.
2022-12-16 22:43:39 +0100 <geekosaur> erm, I meant adding `{-# LANGUAGE StandaloneDeriving #-}` and writing `deriving instance …` (https://downloads.haskell.org/ghc/9.4.1/docs/users_guide/exts/standalone_deriving.html)
2022-12-16 22:44:59 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-16 22:46:44 +0100RedSwan(~jared@174-23-134-43.slkc.qwest.net)
2022-12-16 22:48:07 +0100 <juri_> oh, neat. thanks!
2022-12-16 22:50:49 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-16 22:50:57 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-16 22:51:10 +0100mmhat(~mmh@p200300f1c72368bbee086bfffe095315.dip0.t-ipconnect.de)
2022-12-16 22:56:43 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100)
2022-12-16 23:01:12 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:b575:bbf6:df74:2100) (Ping timeout: 252 seconds)
2022-12-16 23:04:03 +0100 <jackdk> Could use reflection? There's code to synthesise temporary monoid instances, I'm sure you could do the same for eq
2022-12-16 23:04:58 +0100beefbambi(~beefbambi@183.82.176.168) (Ping timeout: 268 seconds)
2022-12-16 23:05:11 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-16 23:10:36 +0100texasmynsted(~texasmyns@99.96.221.112) (Ping timeout: 255 seconds)
2022-12-16 23:12:47 +0100doyougnu(~doyougnu@cpe-74-69-132-225.stny.res.rr.com)
2022-12-16 23:14:39 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-16 23:15:38 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 23:22:03 +0100euandreh(~Thunderbi@179.214.113.107) (Remote host closed the connection)
2022-12-16 23:24:21 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 23:24:34 +0100beefbambi(~beefbambi@183.82.176.168)
2022-12-16 23:26:40 +0100euandreh(~Thunderbi@179.214.113.107)
2022-12-16 23:28:42 +0100doyougnu(~doyougnu@cpe-74-69-132-225.stny.res.rr.com) (Ping timeout: 252 seconds)
2022-12-16 23:29:39 +0100 <dsal> iqubic: can't you just make that instance?
2022-12-16 23:31:43 +0100jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
2022-12-16 23:32:09 +0100euandreh(~Thunderbi@179.214.113.107) (Quit: euandreh)
2022-12-16 23:34:16 +0100Azel_(~Azel@2a01:e0a:1f1:98e0:fa28:19ff:fea0:c205) (Quit: Konversation terminated!)
2022-12-16 23:38:32 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 272 seconds)
2022-12-16 23:39:43 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-16 23:45:44 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-16 23:52:05 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-16 23:54:06 +0100beefbambi(~beefbambi@183.82.176.168) (Read error: Connection reset by peer)
2022-12-16 23:54:48 +0100beefbambi(~beefbambi@183.82.176.168)