2020/12/23

2020-12-23 00:01:12 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d) (Ping timeout: 260 seconds)
2020-12-23 00:01:23 +0100Franciman(~francesco@host-82-49-79-73.retail.telecomitalia.it) (Quit: Leaving)
2020-12-23 00:06:12 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:21e9:329e:6e0c:5ce)
2020-12-23 00:06:32 +0100solonarv(~solonarv@adijon-656-1-25-229.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds)
2020-12-23 00:06:53 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 00:07:15 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 00:08:34 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d)
2020-12-23 00:09:17 +0100o1lo01ol1o(~o1lo01ol1@89.214.139.246)
2020-12-23 00:10:35 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
2020-12-23 00:11:58 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2020-12-23 00:12:01 +0100xcmw(~textual@2603-6011-2200-f103-b803-6e7f-4f6f-d00a.res6.spectrum.com)
2020-12-23 00:13:19 +0100kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-12-23 00:15:13 +0100neiluj(~jco@unaffiliated/neiluj) (Ping timeout: 264 seconds)
2020-12-23 00:17:13 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c)
2020-12-23 00:18:04 +0100nineonine(~nineonine@50.216.62.2) (Ping timeout: 246 seconds)
2020-12-23 00:18:19 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 00:19:50 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 00:20:15 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 00:20:49 +0100nineonine(~nineonine@50.216.62.2)
2020-12-23 00:21:50 +0100wonko7(~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 256 seconds)
2020-12-23 00:22:19 +0100Tops2(~Tobias@dyndsl-095-033-089-034.ewe-ip-backbone.de)
2020-12-23 00:23:02 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c) (Ping timeout: 260 seconds)
2020-12-23 00:23:57 +0100nineonine(~nineonine@50.216.62.2) (Remote host closed the connection)
2020-12-23 00:25:43 +0100nineonine(~nineonine@50.216.62.2)
2020-12-23 00:26:08 +0100Tops21(~Tobias@dyndsl-095-033-089-034.ewe-ip-backbone.de) (Ping timeout: 256 seconds)
2020-12-23 00:26:20 +0100wonko7(~wonko7@2a01:e35:2ffb:7040:4535:f480:7dff:b3b5)
2020-12-23 00:26:38 +0100acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Remote host closed the connection)
2020-12-23 00:29:16 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-12-23 00:32:43 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716)
2020-12-23 00:32:44 +0100nineonine(~nineonine@50.216.62.2) (Remote host closed the connection)
2020-12-23 00:34:26 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 00:34:47 +0100Tops2(~Tobias@dyndsl-095-033-089-034.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2020-12-23 00:35:00 +0100Melanie(~Melanie@192-0-134-138.cpe.teksavvy.com)
2020-12-23 00:36:19 +0100leungbk(~user@2603-8000-f144-2028-88ca-9c13-d300-2ffb.res6.spectrum.com) (Quit: ERC (IRC client for Emacs 28.0.50))
2020-12-23 00:36:26 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 00:36:46 +0100toxikos(uid438942@gateway/web/irccloud.com/x-wiojjvxxqjpnnnsa)
2020-12-23 00:36:58 +0100nineonine(~nineonine@50.216.62.2)
2020-12-23 00:37:13 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c)
2020-12-23 00:38:39 +0100toxikos(uid438942@gateway/web/irccloud.com/x-wiojjvxxqjpnnnsa) ()
2020-12-23 00:38:48 +0100Melanie(~Melanie@192-0-134-138.cpe.teksavvy.com) (Client Quit)
2020-12-23 00:38:57 +0100o1lo01ol1o(~o1lo01ol1@89.214.139.246) (Remote host closed the connection)
2020-12-23 00:39:43 +0100o1lo01ol1o(~o1lo01ol1@89.214.139.246)
2020-12-23 00:40:01 +0100nineonine(~nineonine@50.216.62.2) (Remote host closed the connection)
2020-12-23 00:40:11 +0100nineonine(~nineonine@50.216.62.2)
2020-12-23 00:41:39 +0100 <hololeap> ok, so TemplateHaskell allows GHC to make network calls during a compile?
2020-12-23 00:42:50 +0100nineonine(~nineonine@50.216.62.2) (Remote host closed the connection)
2020-12-23 00:43:30 +0100nineonine(~nineonine@50.216.62.2)
2020-12-23 00:44:30 +0100o1lo01ol1o(~o1lo01ol1@89.214.139.246) (Ping timeout: 256 seconds)
2020-12-23 00:44:31 +0100 <glguy> With Template Haskell you're running an arbitrary program that generates some Haskell syntax.
2020-12-23 00:46:16 +0100nineonin_(~nineonine@50.216.62.2)
2020-12-23 00:46:16 +0100nineonine(~nineonine@50.216.62.2) (Remote host closed the connection)
2020-12-23 00:46:43 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c) (Ping timeout: 268 seconds)
2020-12-23 00:47:11 +0100cosimone(~cosimone@2001:b07:ae5:db26:1fb3:ef3f:ece2:c6f8) (Quit: cosimone)
2020-12-23 00:48:53 +0100 <hololeap> gross :(
2020-12-23 00:49:06 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 272 seconds)
2020-12-23 00:49:26 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-12-23 00:49:33 +0100 <glguy> Yeah, it's a bad idea, so don't do it
2020-12-23 00:50:29 +0100Varis(~Tadas@unaffiliated/varis)
2020-12-23 00:50:32 +0100 <hololeap> apparently elm does it, that's what ezzieyguywuf was asking about
2020-12-23 00:51:38 +0100 <hololeap> i looked into it and sure enough when compiling elm-compiler with GHC, it made a network call
2020-12-23 00:54:04 +0100UltimateNate(~UltimateN@s91904426.blix.com) (Remote host closed the connection)
2020-12-23 00:54:35 +0100wonko7(~wonko7@2a01:e35:2ffb:7040:4535:f480:7dff:b3b5) (Ping timeout: 258 seconds)
2020-12-23 00:55:24 +0100jedws(~jedws@121.209.189.201)
2020-12-23 00:57:55 +0100son0p(~son0p@181.136.122.143) (Quit: leaving)
2020-12-23 00:58:21 +0100 <monochrom> The Q monad is a MonadIO.
2020-12-23 00:58:45 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c)
2020-12-23 00:59:06 +0100 <monochrom> Since day one I already made a joke about launching a movie player when TH is compiling.
2020-12-23 00:59:23 +0100hexo(~hexo@gateway/tor-sasl/hexo) (Ping timeout: 240 seconds)
2020-12-23 01:00:07 +0100 <monochrom> Unrelated:
2020-12-23 01:00:12 +0100 <monochrom> @quote monochrom play
2020-12-23 01:00:12 +0100 <lambdabot> monochrom says: Hey! If you extend the random monad to playing Poker, do you call the new monad... Pokermon? :)
2020-12-23 01:00:20 +0100hexo(~hexo@gateway/tor-sasl/hexo)
2020-12-23 01:00:21 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-12-23 01:00:25 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d) (Remote host closed the connection)
2020-12-23 01:02:17 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:21e9:329e:6e0c:5ce) (Ping timeout: 272 seconds)
2020-12-23 01:02:21 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 01:02:25 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 01:04:00 +0100hackagekempe 0.1.1.1 - Kempe compiler https://hackage.haskell.org/package/kempe-0.1.1.1 (vmchale)
2020-12-23 01:04:38 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d)
2020-12-23 01:05:33 +0100aveltras(uid364989@gateway/web/irccloud.com/x-zzmyqiierndocsik)
2020-12-23 01:06:28 +0100ron3(~ron@s91904426.blix.com)
2020-12-23 01:06:43 +0100livvy(~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
2020-12-23 01:06:51 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds)
2020-12-23 01:07:25 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2020-12-23 01:09:36 +0100wonko7(~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net)
2020-12-23 01:10:09 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 268 seconds)
2020-12-23 01:17:01 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 01:19:16 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
2020-12-23 01:21:19 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2020-12-23 01:22:05 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-12-23 01:23:10 +0100Vulfe_(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 01:24:15 +0100xiinotulp(~q@node-uov.pool-125-24.dynamic.totinternet.net) (Quit: Leaving)
2020-12-23 01:25:28 +0100Alleria_(~AllahuAkb@2604:2000:1484:26:158b:2144:660a:a16b) (Ping timeout: 260 seconds)
2020-12-23 01:26:39 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-rkgukjcpotfcdltb)
2020-12-23 01:27:02 +0100Alleria_(~AllahuAkb@69.202.254.168)
2020-12-23 01:28:47 +0100Lycurgus(~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
2020-12-23 01:31:55 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 246 seconds)
2020-12-23 01:33:16 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 01:35:25 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 246 seconds)
2020-12-23 01:35:55 +0100alx741(~alx741@186.178.110.239) (Ping timeout: 256 seconds)
2020-12-23 01:37:54 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 268 seconds)
2020-12-23 01:40:24 +0100magma(~magma@host-79-22-138-220.retail.telecomitalia.it) (Ping timeout: 272 seconds)
2020-12-23 01:42:13 +0100Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 264 seconds)
2020-12-23 01:42:48 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 01:48:00 +0100jonkri(~jonkri@pontarius/jon) (Quit: leaving)
2020-12-23 01:49:02 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Remote host closed the connection)
2020-12-23 01:49:55 +0100alx741(~alx741@186.178.110.248)
2020-12-23 01:50:28 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-12-23 01:52:06 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 01:54:02 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c) (Ping timeout: 260 seconds)
2020-12-23 01:55:29 +0100abitibien(~abitibien@51.194.80.91)
2020-12-23 01:57:28 +0100uraniumz(x64cmd@gateway/vpn/privateinternetaccess/x64cmd)
2020-12-23 01:58:09 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 260 seconds)
2020-12-23 02:01:22 +0100Younder(~john@33.51-174-155.customer.lyse.net) (Quit: Leaving)
2020-12-23 02:07:25 +0100wonko7(~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 240 seconds)
2020-12-23 02:07:25 +0100kam1(~kam1@24.231.108.143)
2020-12-23 02:08:17 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 02:08:20 +0100 <ezzieyguywuf> lol
2020-12-23 02:08:30 +0100 <ezzieyguywuf> @ hololeap thanks for helping me look into this
2020-12-23 02:08:39 +0100 <ezzieyguywuf> I at least have a clue now of how to move forward
2020-12-23 02:08:39 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 02:08:41 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d) (Remote host closed the connection)
2020-12-23 02:09:51 +0100fxg(~fxg@unaffiliated/fxg)
2020-12-23 02:10:16 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
2020-12-23 02:11:10 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 02:11:17 +0100eacameron(uid256985@gateway/web/irccloud.com/x-vxdrpcotoqmkhsji) (Quit: Connection closed for inactivity)
2020-12-23 02:18:42 +0100kuribas(~user@ptr-25vy0i7ylwdflfexhxz.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2020-12-23 02:24:25 +0100hieung1401(ac6529a5@cpe-172-101-41-165.maine.res.rr.com)
2020-12-23 02:25:56 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-12-23 02:26:42 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:21e9:329e:6e0c:5ce)
2020-12-23 02:26:50 +0100benjamingr__(uid23465@gateway/web/irccloud.com/x-ohsvkwapujoenvvu) (Quit: Connection closed for inactivity)
2020-12-23 02:27:34 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2020-12-23 02:28:38 +0100aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2020-12-23 02:29:06 +0100Zialus(~RMF@2001:818:de63:c300:211:32ff:fe8d:ad2a) (Quit: i'm out!)
2020-12-23 02:29:41 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716) (Ping timeout: 272 seconds)
2020-12-23 02:31:30 +0100Wamanuz2(~wamanuz@78-70-34-81-no84.tbcn.telia.com)
2020-12-23 02:33:25 +0100Wamanuz(~wamanuz@90-230-67-56-no84.tbcn.telia.com) (Ping timeout: 240 seconds)
2020-12-23 02:33:28 +0100jedws(~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 02:34:19 +0100jedws(~jedws@121.209.189.201)
2020-12-23 02:39:07 +0100al3x27(~plovs@85.254.75.83) (Ping timeout: 246 seconds)
2020-12-23 02:39:30 +0100 <ezzieyguywuf> yikes
2020-12-23 02:39:32 +0100 <ezzieyguywuf> template haskell
2020-12-23 02:39:32 +0100 <ezzieyguywuf> lol
2020-12-23 02:41:16 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 240 seconds)
2020-12-23 02:46:50 +0100hiroaki(~hiroaki@ip4d16fa3b.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2020-12-23 02:47:07 +0100columbarius(~columbari@i5E86B3C9.versanet.de) (Read error: Connection reset by peer)
2020-12-23 02:48:10 +0100uraniumz(x64cmd@gateway/vpn/privateinternetaccess/x64cmd) (Quit: Leaving)
2020-12-23 02:49:02 +0100hieung1401(ac6529a5@cpe-172-101-41-165.maine.res.rr.com) ()
2020-12-23 02:49:27 +0100columbarius(~columbari@87.123.198.19)
2020-12-23 02:50:40 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 268 seconds)
2020-12-23 02:53:57 +0100Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2020-12-23 02:54:49 +0100Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 264 seconds)
2020-12-23 02:55:00 +0100hackagehinit 0.1.0 - Generic project initialization tool https://hackage.haskell.org/package/hinit-0.1.0 (Poscat)
2020-12-23 02:55:16 +0100Lord_of_Life_Lord_of_Life
2020-12-23 02:55:51 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716)
2020-12-23 02:57:00 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 02:59:05 +0100m0rphism(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 240 seconds)
2020-12-23 02:59:40 +0100roconnor(~roconnor@host-45-78-199-13.dyn.295.ca)
2020-12-23 03:00:25 +0100kam1(~kam1@24.231.108.143)
2020-12-23 03:01:38 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 03:02:33 +0100hiroaki(~hiroaki@2a02:810b:c63f:eea0::3)
2020-12-23 03:02:37 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-12-23 03:02:42 +0100uwap_(~uwap@genja.uwap.name) (Quit: ZNC 1.8.0 - https://znc.in)
2020-12-23 03:05:58 +0100jrc73(6fc8f137@111.200.241.55)
2020-12-23 03:06:04 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2020-12-23 03:06:49 +0100Entertainment(~entertain@104.246.132.210) (Ping timeout: 264 seconds)
2020-12-23 03:09:25 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d)
2020-12-23 03:09:49 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 264 seconds)
2020-12-23 03:11:14 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d) (Remote host closed the connection)
2020-12-23 03:11:23 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d)
2020-12-23 03:11:40 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 246 seconds)
2020-12-23 03:15:33 +0100drbean(~drbean@TC210-63-209-216.static.apol.com.tw)
2020-12-23 03:16:02 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:21e9:329e:6e0c:5ce) (Ping timeout: 260 seconds)
2020-12-23 03:17:01 +0100kam1(~kam1@24.231.108.143)
2020-12-23 03:18:25 +0100mounty(~mounty@2001:8000:2f59:0:dc99:8f7f:11be:dca1) (Ping timeout: 268 seconds)
2020-12-23 03:20:40 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
2020-12-23 03:21:37 +0100borne(~fritjof@200116b864c6f800c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-12-23 03:22:39 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
2020-12-23 03:24:37 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 03:24:59 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 03:25:23 +0100jedws(~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 03:25:24 +0100aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net)
2020-12-23 03:27:39 +0100drbean(~drbean@TC210-63-209-216.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin1 - https://znc.in)
2020-12-23 03:28:42 +0100jrc73(6fc8f137@111.200.241.55) ()
2020-12-23 03:29:13 +0100uwap(~uwap@genja.uwap.name)
2020-12-23 03:30:45 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716) (Ping timeout: 268 seconds)
2020-12-23 03:33:41 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 03:37:51 +0100xcmw(~textual@2603-6011-2200-f103-b803-6e7f-4f6f-d00a.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 03:37:51 +0100rBiosas(~biosas@ip-62-24-80-122.net.upcbroadband.cz)
2020-12-23 03:43:59 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 03:44:08 +0100nineonin_(~nineonine@50.216.62.2) (Ping timeout: 256 seconds)
2020-12-23 03:44:21 +0100rBiosas(~biosas@ip-62-24-80-122.net.upcbroadband.cz) (Quit: Konversation terminated!)
2020-12-23 03:44:26 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-rkgukjcpotfcdltb) ()
2020-12-23 03:45:14 +0100aveltras(uid364989@gateway/web/irccloud.com/x-zzmyqiierndocsik) (Quit: Connection closed for inactivity)
2020-12-23 03:45:25 +0100Lycurgus(~niemand@cpe-45-46-137-210.buffalo.res.rr.com) (Quit: Exeunt)
2020-12-23 03:45:33 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2020-12-23 03:47:55 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2020-12-23 03:48:46 +0100nbloomf(~nbloomf@2600:8803:7c88:cb00:b91f:8517:762f:dce7)
2020-12-23 03:50:54 +0100 <sshine> dminuoso, I glanced at Parsley and see that it defines a Quapplicative. Ó_ò
2020-12-23 03:53:46 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 03:54:01 +0100jmchael(~jmchael@81.174.205.210) (Ping timeout: 246 seconds)
2020-12-23 03:54:23 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c)
2020-12-23 03:57:30 +0100d34df00d(~d34df00d@104-14-27-213.lightspeed.austtx.sbcglobal.net)
2020-12-23 03:57:34 +0100 <d34df00d> Hi!
2020-12-23 03:57:41 +0100 <sshine> do μ <- askM
2020-12-23 03:57:42 +0100 <sshine> σ <- freshΣ
2020-12-23 03:57:59 +0100 <sshine> natural choices for variable names.
2020-12-23 03:58:22 +0100 <d34df00d> I have a somewhat (computationally) simple pure function returning an Int and I'd like to run it a bunch of times to estimate its performance, summing all the results.
2020-12-23 03:58:22 +0100 <sshine> hello d34df00d
2020-12-23 03:58:27 +0100 <MarcelineVQ> sometimes you just want the freshest sigmas in the pantry
2020-12-23 03:58:35 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Read error: Connection reset by peer)
2020-12-23 03:58:36 +0100nineonin_(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 03:58:41 +0100 <d34df00d> How can I do that without the compiler doing any kind of fancy optimizations like calling the function once instead of several times?
2020-12-23 03:58:58 +0100 <d34df00d> > μ, σ, Σ
2020-12-23 03:59:00 +0100 <lambdabot> <hint>:1:2: error: <hint>:1:2: error: parse error on input ‘,’
2020-12-23 03:59:00 +0100 <d34df00d> Is this agda channel?
2020-12-23 03:59:27 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c) (Ping timeout: 260 seconds)
2020-12-23 03:59:34 +0100 <sshine> d34df00d, well, you can turn off optimizations.
2020-12-23 03:59:47 +0100 <sshine> d34df00d, you can also run your benchmark with and without optimizations to see if it makes a difference.
2020-12-23 03:59:53 +0100 <d34df00d> sshine: that kinda ruins the purpose of stupid benchmarks.
2020-12-23 04:00:12 +0100 <sshine> d34df00d, not if the purpose of your stupid benchmarks is to understand how your code behaves?
2020-12-23 04:00:15 +0100xff0x_(~fox@2001:1a81:53b4:600:a2ff:122b:9237:e1f5) (Ping timeout: 272 seconds)
2020-12-23 04:00:48 +0100 <d34df00d> Nah, I'm arguing with somebody over the internets, and they claim that C is the fastest language for a certain thing.
2020-12-23 04:01:05 +0100 <sshine> ah. someone is clearly wrong on the internets. :-D
2020-12-23 04:01:17 +0100 <d34df00d> Exactly!
2020-12-23 04:01:19 +0100 <sshine> I think OCaml already beat C in that old language shoutout?
2020-12-23 04:01:37 +0100xff0x_(~fox@2001:1a81:53e9:2700:dda4:db:6894:1544)
2020-12-23 04:01:53 +0100 <sshine> d34df00d, https://chrispenner.ca/posts/wc
2020-12-23 04:02:22 +0100 <MarcelineVQ> languages don't have a speed :X
2020-12-23 04:02:43 +0100 <d34df00d> sshine: funnily, I did play around with that implementation some time ago.
2020-12-23 04:02:48 +0100 <d34df00d> https://0xd34df00d.me/posts/2020/02/beating-c-with-20-lines-of-haskell.html
2020-12-23 04:03:07 +0100 <sshine> d34df00d, haha.
2020-12-23 04:03:11 +0100 <d34df00d> Well, dunno how February 02 is "recent", I have completely lost the sense of time.
2020-12-23 04:03:32 +0100 <sshine> time no longre exists. we are inside a fractal.
2020-12-23 04:03:42 +0100 <MarcelineVQ> all times are recent if you're over 30
2020-12-23 04:03:53 +0100 <d34df00d> I'll be 30 in a couple of months, so dunno.
2020-12-23 04:03:58 +0100 <MarcelineVQ> there you go
2020-12-23 04:04:01 +0100 <sshine> https://xkcd.com/891/ obligatory
2020-12-23 04:04:24 +0100 <sshine> although this one is outdated, the 2011 title alone makes me feel old.
2020-12-23 04:05:06 +0100 <d34df00d> Dang, my haskell implementation got faster than C.
2020-12-23 04:05:14 +0100 <d34df00d> I mean, in my today's case.
2020-12-23 04:05:50 +0100 <sshine> d34df00d, I think if you run criterion on your function, it won't cache anything unless you specifically try to.
2020-12-23 04:06:59 +0100 <d34df00d> I mean, some guy gave me a C version of an algorithm to implement (roughly speaking), including a main() consisting of `volatile int sum = 0; for (int i = 0; i < 999999; ++i) sum += ...`, and I"m trying to get something getting that very job with a minimal amount of stuff on top.
2020-12-23 04:07:10 +0100 <d34df00d> But maybe I'll just go ahead and use criterion, yes.
2020-12-23 04:08:01 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-12-23 04:08:16 +0100 <sshine> maybe that is a geometric series with a closed form? :-P
2020-12-23 04:08:45 +0100nineonin_(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds)
2020-12-23 04:09:13 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 04:09:23 +0100 <MarcelineVQ> sshine: lel
2020-12-23 04:09:28 +0100jedws(~jedws@121.209.189.201)
2020-12-23 04:09:38 +0100sdrodge_(~sdrodge@unaffiliated/sdrodge) (Quit: WeeChat 2.9)
2020-12-23 04:10:19 +0100 <d34df00d> Lol, unlikely.
2020-12-23 04:10:41 +0100 <MarcelineVQ> % foldl1' (+) [0 .. 999998]
2020-12-23 04:10:41 +0100 <yahb> MarcelineVQ: 499998500001
2020-12-23 04:10:46 +0100sdrodge(~sdrodge@unaffiliated/sdrodge)
2020-12-23 04:11:00 +0100 <MarcelineVQ> oh ++i
2020-12-23 04:11:02 +0100 <MarcelineVQ> damn you c!
2020-12-23 04:13:25 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 240 seconds)
2020-12-23 04:13:25 +0100theDon(~td@muedsl-82-207-238-252.citykom.de) (Ping timeout: 264 seconds)
2020-12-23 04:13:52 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c)
2020-12-23 04:14:05 +0100jespada(~jespada@90.254.245.49) (Ping timeout: 240 seconds)
2020-12-23 04:14:22 +0100 <d34df00d> Ok, I must have made a mistake somewhere.
2020-12-23 04:14:31 +0100 <d34df00d> My haskell version is about 20 times faster than C.
2020-12-23 04:14:41 +0100 <d34df00d> https://bpaste.net/4C5Q
2020-12-23 04:14:49 +0100 <d34df00d> ^ here's my implementation. Do you folks spot any obvious nonsense?
2020-12-23 04:15:05 +0100theDon(~td@muedsl-82-207-238-067.citykom.de)
2020-12-23 04:15:54 +0100hexfive(~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
2020-12-23 04:16:37 +0100jespada(~jespada@90.254.245.49)
2020-12-23 04:17:38 +0100 <sshine> d34df00d, won't 'all' be faster than 'and . zipWith f'?
2020-12-23 04:17:59 +0100 <sshine> maybe not. sounds like you've got it pretty tweaked already.
2020-12-23 04:18:35 +0100lagothrixGuest36126
2020-12-23 04:18:35 +0100xirhtogal(~lagothrix@unaffiliated/lagothrix)
2020-12-23 04:18:35 +0100Guest36126(~lagothrix@unaffiliated/lagothrix) (Killed (hitchcock.freenode.net (Nickname regained by services)))
2020-12-23 04:18:35 +0100xirhtogallagothrix
2020-12-23 04:18:39 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 04:18:51 +0100N3RGY(~N3RGY@2600:1700:65aa:90b0:6446:3ba0:c322:ad4c) (Ping timeout: 268 seconds)
2020-12-23 04:19:02 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 04:19:32 +0100 <sshine> wait, never mind.
2020-12-23 04:21:53 +0100 <MarcelineVQ> could check your core for countAllMatches being lifted to the top level, there's no need to compute it more than once in this program so maybe it's not
2020-12-23 04:22:21 +0100 <MarcelineVQ> could also try countAllMatches :: () -> ST s Int cnt <- countAllMatches ()
2020-12-23 04:23:36 +0100 <MarcelineVQ> since functions aren't shared in this way afaik
2020-12-23 04:23:48 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2020-12-23 04:25:15 +0100kam1(~kam1@24.231.108.143)
2020-12-23 04:25:21 +0100bitmapper(uid464869@gateway/web/irccloud.com/x-icrmchothviupllr) (Quit: Connection closed for inactivity)
2020-12-23 04:27:15 +0100 <jle`> whoa, the StateT-backed version of WriterT is in transformers
2020-12-23 04:27:17 +0100 <jle`> when did this happen
2020-12-23 04:27:30 +0100 <MarcelineVQ> iiuc countAllMatches is a name, which means it can be shared (computed at most once on average). In the same way that x is a name and can be shared in let x = 2 + 1 in x + x
2020-12-23 04:28:30 +0100 <jle`> the main reason i avoided WriterT is now gone
2020-12-23 04:28:47 +0100 <MarcelineVQ> jle`: I challenge you to use it this advent season
2020-12-23 04:28:57 +0100Fractalis(~Fractalis@2601:987:280:8d40:45d0:942f:6e60:692f)
2020-12-23 04:29:17 +0100 <jle`> actually i was looking for it to refactor one of my solutions heh
2020-12-23 04:32:33 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 04:33:06 +0100howdoi(uid224@gateway/web/irccloud.com/x-sxhozuhwqoyrdzui) (Quit: Connection closed for inactivity)
2020-12-23 04:35:06 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 04:35:45 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-12-23 04:35:48 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 04:36:00 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Client Quit)
2020-12-23 04:39:04 +0100urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2020-12-23 04:39:11 +0100vikfret(~vikfret@2806:2f0:90e1:6afe:d1fc:fdcb:aaa3:aab6)
2020-12-23 04:41:56 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 04:43:28 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 04:43:41 +0100 <d34df00d> sshine: yea, I don't think it could be nicely expressed with `all`
2020-12-23 04:45:07 +0100 <d34df00d> MarcelineVQ: looks like it isn't at the top even without () argument. Anyway, wouldn't it living in the ST monad prevent floating anyway?
2020-12-23 04:45:13 +0100 <ezzieyguywuf> I don't know anything at all about elm, but these error messages seem nice af https://elm-lang.org/news/the-syntax-cliff
2020-12-23 04:45:56 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 04:46:34 +0100 <sshine> ezzieyguywuf, I know few things about Elm, but I know that their error messages are excellent. :) they even try to suggest what you did wrong sometimes, because the syntax is simple enough to make such assumptions.
2020-12-23 04:46:56 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-12-23 04:47:12 +0100n1n3fly(n1n3fly@gateway/vpn/protonvpn/n1n3fly)
2020-12-23 04:48:12 +0100 <ezzieyguywuf> sshine: yes indeed!
2020-12-23 04:48:25 +0100 <ezzieyguywuf> this very fact alone makes me much more likely to give it a whirl (one day...)
2020-12-23 04:49:55 +0100 <MarcelineVQ> d34df00d: I'm sad to say I don't know, or more specifically (since it's already at the top and so doens't need to float) I'm say to say I'm not sure if it's shared or not
2020-12-23 04:50:10 +0100 <sshine> ezzieyguywuf, yes. I remember a student worker at my old job was really into Haskell and Elm. he did his programming test for getting employed in Elm, and he ran into some problems with 'Set (Set a)' not being representable because you can't make your own data type instances of 'Ord' (because the equivalent of 'Ord' is a magic type variable, kinda like Standard ML's ''a polymorphic equality type, but
2020-12-23 04:50:16 +0100 <sshine> worse). in spite of these warts, he really liked it because the restriction meant he could be really productive as long as he didn't try to be too smart. :)
2020-12-23 04:50:40 +0100 <MarcelineVQ> Especially dunno how the presence of the 's' variable affects that
2020-12-23 04:50:42 +0100 <sshine> ezzieyguywuf, I'd like type classes. that's it. I think.
2020-12-23 04:50:55 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 272 seconds)
2020-12-23 04:51:14 +0100 <sshine> ezzieyguywuf, maybe I don't even need custom type classes, I just want to be able to define instances for existing ones!
2020-12-23 04:52:56 +0100 <d34df00d> MarcelineVQ: just to be clear, -ddump-simpl is the right one to get the final output of the simplifier?
2020-12-23 04:53:48 +0100 <d34df00d> Crap, it floated, I think.
2020-12-23 04:54:22 +0100 <MarcelineVQ> d34df00d: simpl or prep ye
2020-12-23 04:55:00 +0100hackagearch-hs 0.6.0.0 - Distribute hackage packages to archlinux https://hackage.haskell.org/package/arch-hs-0.6.0.0 (berberman)
2020-12-23 04:55:05 +0100 <d34df00d> So my loop in main pattern-matches (in Core) on something called Main.countAllMatches2, and that one is defined as this::
2020-12-23 04:55:13 +0100 <ezzieyguywuf> sshine: I think there's a language extension for that in haskell, no?
2020-12-23 04:55:14 +0100 <d34df00d> https://bpaste.net/JU6A
2020-12-23 04:55:18 +0100 <d34df00d> That's gonna be memoized, right?
2020-12-23 04:55:18 +0100 <ezzieyguywuf> FlexibleTypes or summat?
2020-12-23 04:55:52 +0100 <glguy> GHC doesn't generally memoize anything
2020-12-23 04:56:16 +0100 <dsal> jle`: What's the use case you have for WriterT? It's never seemed like a useful thing to me.
2020-12-23 04:56:16 +0100guest1222(~user@49.5.6.87)
2020-12-23 04:56:26 +0100 <dsal> "logging" or whatever.
2020-12-23 04:56:56 +0100 <sshine> ezzieyguywuf, FlexibleContexts or FlexibleInstances? what do you mean?
2020-12-23 04:57:10 +0100 <d34df00d> glguy: I mean, is that equivalent to a top-level value of type `Int`, that will surely be memoized?
2020-12-23 04:57:13 +0100 <sshine> ezzieyguywuf, Haskell lets you define your own type classes without extensions? :)
2020-12-23 04:57:40 +0100 <jle`> dsal: just accumulate a monoid. a lot of times i'd like to use it over Endo
2020-12-23 04:57:47 +0100 <jle`> or use Sum to count how many times
2020-12-23 04:58:03 +0100 <ezzieyguywuf> oh maybe I was just confused.
2020-12-23 04:58:20 +0100 <sshine> that happens to me once a minute.
2020-12-23 04:58:23 +0100 <dsal> Hmm... I guess I could see that. I'd pretty much always go State first and then decide I'm not reading anything.
2020-12-23 04:58:31 +0100 <dsal> I don't think in terms of State much either, though.
2020-12-23 05:00:20 +0100n1n3fly(n1n3fly@gateway/vpn/protonvpn/n1n3fly) (Quit: Leaving)
2020-12-23 05:00:33 +0100guest1222(~user@49.5.6.87) (Remote host closed the connection)
2020-12-23 05:00:41 +0100notzmv(~user@unaffiliated/zmv) (Remote host closed the connection)
2020-12-23 05:00:42 +0100guest1222(~user@49.5.6.87)
2020-12-23 05:01:10 +0100 <monochrom> d34df00d: simpl is at the best level of abstraction and details for humans. But I have seen one or two rare cases of infelicity in simpl, in terms of what becomes a thunk vs what becomes evaluated right away. prep is official on this, but usually too tedious for humans. I always ask for all 4 of simpl, prep, opt-cmm, and asm at the same time. Sometimes also stg.
2020-12-23 05:01:20 +0100 <sshine> I often build interpreters for small things, and I really like State/StateT there.
2020-12-23 05:02:20 +0100Wuzzy(~Wuzzy@p549c9519.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-12-23 05:02:39 +0100Mikagami(~MOSCOS@122.54.107.175) (Remote host closed the connection)
2020-12-23 05:02:50 +0100 <dsal> Yeah, I should get more practice doing neat things rather than being all boring with these. I like reading jle`s writeups from AoC. Every once in a while, I learn something useful that I'm willing to apply.
2020-12-23 05:03:06 +0100 <dsal> jle`: TBH, I wouldn't ever reach for Endo, either. Do you have an example/
2020-12-23 05:03:06 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 05:04:50 +0100 <sshine> dsal, yeah, especially related to Free. :)
2020-12-23 05:05:34 +0100 <glguy> d34df00d, Oh, a top-level Main.countAllMatches2 :: Int would generally only be computed once, if that's the question
2020-12-23 05:06:38 +0100 <glguy> dsal, writer is good for lazy streaming situations, generally
2020-12-23 05:07:47 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716)
2020-12-23 05:07:55 +0100 <dsal> hmm... That's interesting. I need to make more exercises for myself to solve problems in different ways. We've had a couple good problems this year I could do that with.
2020-12-23 05:08:01 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 264 seconds)
2020-12-23 05:08:29 +0100 <glguy> but you have to be very careful when doing that that you don't inadvertently create a data dependency that would defeat that laziness
2020-12-23 05:10:16 +0100ddellacosta(dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds)
2020-12-23 05:11:02 +0100Fractalis(~Fractalis@2601:987:280:8d40:45d0:942f:6e60:692f) (Ping timeout: 258 seconds)
2020-12-23 05:11:11 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 05:11:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 05:13:15 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 05:13:23 +0100nbloomf(~nbloomf@2600:8803:7c88:cb00:b91f:8517:762f:dce7) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 05:13:45 +0100fxg(~fxg@unaffiliated/fxg) (Ping timeout: 265 seconds)
2020-12-23 05:14:07 +0100 <glguy> dsal, In 2016 advent of code had 3 related problems built around a common assembly language extended in a couple of ways
2020-12-23 05:14:29 +0100 <dsal> I've not done any of 2016
2020-12-23 05:14:36 +0100 <jle`> dsal: this blog post was nice i think
2020-12-23 05:14:38 +0100 <jle`> https://ocharles.org.uk/blog/posts/2013-02-12-quick-dsls-with-endo-writers.html
2020-12-23 05:15:15 +0100 <dsal> glguy: your lazy intcode stuff was magic. My approach was not lazy. I don't quite "embrace" laziness as much as appreciate it.
2020-12-23 05:15:30 +0100 <glguy> I did a merged implementation of the 3 where you could incrementally add instructions to the machine that could be interpreted in multiple ways: https://github.com/glguy/advent2016/blob/master/asmprog-final/Main.hs
2020-12-23 05:15:57 +0100 <glguy> like this machine had an "out" instruction that emitted a value. I could run it with a Writer (Endo [Int]) in order to produce a lazy list of outputs
2020-12-23 05:16:11 +0100 <glguy> or with a strict mode that counted the outputs and ran until completion
2020-12-23 05:16:34 +0100 <hololeap> how would one go about debugging the decrypted https traffic being sent by some TemplateHaskell shenanigans?
2020-12-23 05:16:35 +0100 <glguy> with the Writer behavior the program would only evaluate long enough to produce the 50 outputs I wanted to look at
2020-12-23 05:16:49 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 268 seconds)
2020-12-23 05:17:21 +0100 <ezzieyguywuf> does anyone know if the hlint guy hangs around here? https://github.com/ndmitchell/hlint
2020-12-23 05:17:32 +0100 <dsal> glguy: Cool, thanks for the poiners.
2020-12-23 05:17:34 +0100 <hololeap> elm-compiler makes an https connection, and i want to see what it's sending/receiving
2020-12-23 05:17:48 +0100 <ezzieyguywuf> trying to get some traction on this: https://github.com/ndmitchell/hlint
2020-12-23 05:17:55 +0100 <ezzieyguywuf> whoops, https://github.com/ndmitchell/hlint/issues/1185
2020-12-23 05:17:56 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 258 seconds)
2020-12-23 05:18:09 +0100 <ezzieyguywuf> hololeap: https://github.com/elm/compiler/issues/2160
2020-12-23 05:19:05 +0100 <ezzieyguywuf> hololeap: also, I've posted some of my findings here https://github.com/gentoo-haskell/gentoo-haskell/issues/618
2020-12-23 05:19:11 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 05:19:13 +0100 <ezzieyguywuf> 😯
2020-12-23 05:19:16 +0100 <hololeap> ezzieyguywuf: glad you filed a bug report, but i also want to know how to go about doing this
2020-12-23 05:19:17 +0100 <ezzieyguywuf> I'm like the link king today
2020-12-23 05:19:34 +0100 <ezzieyguywuf> hololeap: sure, just wanted to give you the info in case it is useful.
2020-12-23 05:19:39 +0100wei2912(~wei2912@unaffiliated/wei2912)
2020-12-23 05:19:40 +0100 <sshine> Gen.subtermM contractGen (\contract -> Scale <$> scaleGen <*> pure contract) -- can this be more nicely written?
2020-12-23 05:21:56 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 05:21:59 +0100 <sshine> I've got another simpler one that just is: Gen.subterm2 contractGen contractGen Both -- works nicely because it only contains recursive parameters, whereas the other one has 'scaleGen', too.
2020-12-23 05:22:20 +0100 <sshine> (This is Hedgehog.Gen.)
2020-12-23 05:22:32 +0100 <MarcelineVQ> liftA2 Scale scaleGen . pure meb, idk if nicer
2020-12-23 05:23:57 +0100 <MarcelineVQ> erm, I'm not sure what I was thinking there :>
2020-12-23 05:24:46 +0100 <MarcelineVQ> is that the right translation for liftA2..
2020-12-23 05:25:24 +0100 <sshine> maybe something like (Scale <$> scaleGen) <*> Gen.subterm... meh. I'll think of it. I think that the first one was easy to write, so it is probably easy to comprehend for that reason. :)
2020-12-23 05:26:18 +0100 <sshine> sometimes I end up with stuff that contains '(f .)' and 'fmap .' and I know I overdid it.
2020-12-23 05:26:51 +0100 <sshine> sometimes, though, a simplification gives way to clearer thinking.
2020-12-23 05:31:03 +0100jfalcon(905c1fea@144.92.31.234) (Remote host closed the connection)
2020-12-23 05:33:30 +0100Deide(~Deide@217.155.19.23) (Quit: Seeee yaaaa)
2020-12-23 05:34:20 +0100Codaraxis(Codaraxis@gateway/vpn/mullvad/codaraxis)
2020-12-23 05:42:13 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716) (Ping timeout: 272 seconds)
2020-12-23 05:43:54 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 05:45:05 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 240 seconds)
2020-12-23 05:49:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 272 seconds)
2020-12-23 05:51:26 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 05:51:45 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
2020-12-23 05:55:40 +0100Fractalis(~Fractalis@2601:987:280:8d40:45d0:942f:6e60:692f)
2020-12-23 05:56:18 +0100toorevitimirp(~tooreviti@117.182.182.252)
2020-12-23 05:56:37 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-12-23 06:01:12 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 06:01:49 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2020-12-23 06:06:09 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 268 seconds)
2020-12-23 06:10:42 +0100Fractalis(~Fractalis@2601:987:280:8d40:45d0:942f:6e60:692f) (Ping timeout: 260 seconds)
2020-12-23 06:11:14 +0100 <iqubic> So, I a parsec question. Let's say I have a string like "41352" and I want to parse it into a [Int]. How do I do that?
2020-12-23 06:12:01 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 06:17:03 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 272 seconds)
2020-12-23 06:18:54 +0100Tario(~Tario@201.192.165.173) (Ping timeout: 260 seconds)
2020-12-23 06:19:50 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 06:23:24 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 06:24:19 +0100zv(~zv@unaffiliated/zv) (Ping timeout: 265 seconds)
2020-12-23 06:24:31 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2020-12-23 06:24:33 +0100 <hololeap> map read <$> many digit :: ParsecT s u m [Int]
2020-12-23 06:26:55 +0100al3x27(~plovs@85.254.75.199)
2020-12-23 06:28:28 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-12-23 06:28:41 +0100 <topos> > digits = some $ do d <- digit; return (digitToInt d); parse digits "" "43256"
2020-12-23 06:28:44 +0100 <lambdabot> <hint>:1:8: error: <hint>:1:8: error: parse error on input ‘=’
2020-12-23 06:28:53 +0100 <topos> you get the idea
2020-12-23 06:29:16 +0100 <topos> > let digits = some $ do d <- digit; return (digitToInt d) in parse digits "" "43256"
2020-12-23 06:29:18 +0100 <lambdabot> error: Variable not in scope: digit :: f Charerror:
2020-12-23 06:29:18 +0100 <lambdabot> Variable not in scope: parse :: f0 [Int] -> [Char] -> [Char] -> t
2020-12-23 06:29:26 +0100 <topos> \o/
2020-12-23 06:29:36 +0100 <topos> П> parse digits "" "43525"
2020-12-23 06:29:37 +0100 <topos> Right [4,3,5,2,5]
2020-12-23 06:31:09 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 06:32:11 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 06:32:39 +0100nurupo(~nurupo.ga@unaffiliated/nurupo) (Quit: nurupo.ga)
2020-12-23 06:33:42 +0100jedws(~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 06:33:46 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
2020-12-23 06:35:45 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 268 seconds)
2020-12-23 06:36:38 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 264 seconds)
2020-12-23 06:36:52 +0100jedws(~jedws@121.209.189.201)
2020-12-23 06:41:45 +0100howdoi(uid224@gateway/web/irccloud.com/x-rqnxrwxnhxikpetx)
2020-12-23 06:44:01 +0100Merfont(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 06:44:02 +0100Kaeipi(~Kaiepi@47.54.252.148)
2020-12-23 06:50:43 +0100Kaeipi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 06:50:55 +0100Kaeipi(~Kaiepi@47.54.252.148)
2020-12-23 06:54:41 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 06:59:03 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716)
2020-12-23 07:16:38 +0100sord937(~sord937@gateway/tor-sasl/sord937)
2020-12-23 07:17:50 +0100Kaeipi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 07:19:16 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds)
2020-12-23 07:20:42 +0100Kaeipi(~Kaiepi@47.54.252.148)
2020-12-23 07:20:43 +0100Merfont(~Kaiepi@47.54.252.148)
2020-12-23 07:20:54 +0100Kaeipi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 07:23:05 +0100Merfont(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 07:25:00 +0100jedws(~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 07:25:24 +0100Kaiepi(~Kaiepi@47.54.252.148)
2020-12-23 07:29:01 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-12-23 07:31:58 +0100olligobber(~olligobbe@unaffiliated/olligobber)
2020-12-23 07:33:38 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716) (Ping timeout: 258 seconds)
2020-12-23 07:41:01 +0100bitmagie(~Thunderbi@200116b806efa400c8baafc3789c3ca0.dip.versatel-1u1.de)
2020-12-23 07:42:03 +0100bitmagie(~Thunderbi@200116b806efa400c8baafc3789c3ca0.dip.versatel-1u1.de) (Client Quit)
2020-12-23 07:44:09 +0100Genius123(~jessiesgi@S01069050ca4e3573.cg.shawcable.net)
2020-12-23 07:44:55 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2020-12-23 07:45:10 +0100Kaiepi(~Kaiepi@47.54.252.148)
2020-12-23 07:45:21 +0100mimi_vx(~mimi@2a01:490:16:1026:81e9:63f1:91e1:9716)
2020-12-23 07:46:12 +0100 <Genius123> question: whats the next abstraction after software? For example atoms can be organized into electronic components which can be organized into circuits/hardware but software (types, functions) can only ever be reorganized into other software (by defining functors and categories instead of types)
2020-12-23 07:46:28 +0100 <Genius123> so whats "beyond" software? are we just too dumb to see the next level up?
2020-12-23 07:49:42 +0100vsiddharth(~user@c-73-15-251-38.hsd1.ca.comcast.net)
2020-12-23 07:50:15 +0100thc202(~thc202@unaffiliated/thc202)
2020-12-23 07:50:36 +0100 <pjb> Genius123: basically what we already have biologically: life, including intelligent life.
2020-12-23 07:51:20 +0100 <pjb> (self-organizing, self-conscious).
2020-12-23 07:51:41 +0100 <int-e> software is heavily multi-leveled itself and growing a new level every decade or so
2020-12-23 07:52:06 +0100 <Genius123> is that a "moores" law of software
2020-12-23 07:52:20 +0100 <Genius123> pjb, yes i thought so
2020-12-23 07:52:26 +0100 <int-e> did you talk about virtual machine orchestration in 2010?
2020-12-23 07:52:27 +0100 <Genius123> but still whats after that? God?
2020-12-23 07:52:36 +0100 <Genius123> theres no limit in theory
2020-12-23 07:54:04 +0100 <Genius123> int-e, me? no but I never thought about virtualization hm
2020-12-23 07:54:36 +0100 <Genius123> i guess that is another abstraction of software in a way
2020-12-23 07:54:54 +0100 <Genius123> but still technically software
2020-12-23 07:55:04 +0100 <int-e> Genius123: What I'm trying to say is that it's well possible that "software" as a term will just grow to encompass anything replicable and remotely related to computers.
2020-12-23 07:55:13 +0100xff0x_(~fox@2001:1a81:53e9:2700:dda4:db:6894:1544) (Ping timeout: 272 seconds)
2020-12-23 07:55:48 +0100xff0x_(~fox@2001:1a81:53e9:2700:db3b:366e:c891:aec7)
2020-12-23 07:56:10 +0100 <int-e> Instead of there being a new level that is perceived as a distinct enough leap forward to get a different name attached.
2020-12-23 07:56:27 +0100nurupo(~nurupo.ga@unaffiliated/nurupo)
2020-12-23 07:56:35 +0100 <pjb> basically, in this universe, we have matter energy and information. They're equivalent. E=mc², and E=hf
2020-12-23 07:58:10 +0100 <hololeap> bartosz milewski posits that mathematics is the highest abstraction we have, which programming languages are slowly trying to reach. i think he has a good point
2020-12-23 07:58:14 +0100 <Genius123> what if the "next level" is matter
2020-12-23 07:58:27 +0100 <pjb> Information is emergent in the mathematical universe, like energy emerges in the physical universe from fluctuations of the vacuum. If you're asking for a higher level concept that would motivate the emergence of information, I'd say it's love.
2020-12-23 07:58:31 +0100 <Genius123> like you write a program thats so abstract when you look at it, you cant tell difference between it and a real thing
2020-12-23 07:58:44 +0100 <Genius123> youve written a physical thing into existence
2020-12-23 07:58:55 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 07:58:56 +0100 <hololeap> Genius123: computers _are_ physical so you already have
2020-12-23 07:59:19 +0100 <Genius123> true
2020-12-23 07:59:25 +0100 <pjb> Lambda calculus and Turing Machines are not physical.
2020-12-23 07:59:27 +0100 <Genius123> maybe ive been looking at it in reverse
2020-12-23 07:59:40 +0100 <Genius123> and the computer is actually the abstraction not software
2020-12-23 08:00:18 +0100 <hololeap> i guess if you start with programming, the physical computer would be the abstraction
2020-12-23 08:00:47 +0100 <hololeap> i suppose abstractions could have "duals"
2020-12-23 08:04:02 +0100 <Genius123> <hololeap> i guess if you start with programming, the physical computer would be the abstraction
2020-12-23 08:04:05 +0100 <Genius123> mind = blown
2020-12-23 08:04:22 +0100 <Genius123> begs the question though then if the brain is the computer (abstraction)
2020-12-23 08:04:25 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-12-23 08:04:37 +0100 <Genius123> what was the lower abstraction it emerged from (the dual)
2020-12-23 08:04:45 +0100hololeapisn't touching that one
2020-12-23 08:04:46 +0100 <Genius123> what is dual of mind
2020-12-23 08:08:28 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-12-23 08:09:31 +0100Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 246 seconds)
2020-12-23 08:09:40 +0100 <MarcelineVQ> the gestalt my dude
2020-12-23 08:10:17 +0100 <hololeap> you could look at all of biology as a sort of computer, but i'm not convinced the mind springs solely from biology
2020-12-23 08:10:29 +0100hololeaphides
2020-12-23 08:11:08 +0100 <MarcelineVQ> watch out, someone will wask you to define what mind means
2020-12-23 08:11:37 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 264 seconds)
2020-12-23 08:12:24 +0100hololeapstays hidden
2020-12-23 08:14:24 +0100 <Genius123> mind is just self organizing matter
2020-12-23 08:14:37 +0100 <Genius123> self organizing computer
2020-12-23 08:14:53 +0100 <Genius123> one that isnt so rigid as a von neumann type computer
2020-12-23 08:15:02 +0100 <Genius123> but has "plasticity"
2020-12-23 08:15:15 +0100 <Genius123> ok i guess thats the "dual" of mind, brain
2020-12-23 08:15:19 +0100 <Genius123> but they arent same
2020-12-23 08:15:24 +0100 <Genius123> thatd be like saying software is same as hardware
2020-12-23 08:16:00 +0100 <Genius123> so mind must exists independently
2020-12-23 08:16:33 +0100 <Genius123> if they are "duals"
2020-12-23 08:17:25 +0100 <Genius123> which still begs question wtf is it?
2020-12-23 08:17:37 +0100 <hololeap> you would have to define what the "compiler" is
2020-12-23 08:17:56 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2020-12-23 08:18:37 +0100Feuermagier(~Feuermagi@213.178.26.41) (Read error: Connection reset by peer)
2020-12-23 08:20:41 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 08:24:21 +0100tzlil(~tzlil@unaffiliated/tzlil) (Ping timeout: 272 seconds)
2020-12-23 08:25:05 +0100 <Genius123> nature
2020-12-23 08:25:07 +0100 <Genius123> the 'god process'
2020-12-23 08:25:32 +0100 <Genius123> ok im done this is getting too deep
2020-12-23 08:25:32 +0100tzlil(~tzlil@unaffiliated/tzlil)
2020-12-23 08:25:44 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 272 seconds)
2020-12-23 08:26:36 +0100jespada(~jespada@90.254.245.49) (Ping timeout: 240 seconds)
2020-12-23 08:26:39 +0100 <hololeap> yeah, good luck defining the thing you inhabit every moment you are conscious
2020-12-23 08:27:01 +0100ActinalWhomp(ad49c9f8@pool-173-73-201-248.washdc.fios.verizon.net)
2020-12-23 08:27:15 +0100 <hololeap> but... science...
2020-12-23 08:28:05 +0100 <hololeap> the very thing that makes defining something possible. it's all. so. meta.
2020-12-23 08:28:25 +0100jespada(~jespada@90.254.245.49)
2020-12-23 08:29:25 +0100qwerty(~tema@217.118.92.215)
2020-12-23 08:31:28 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 08:34:32 +0100zaquest(~notzaques@5.128.210.178)
2020-12-23 08:36:28 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2020-12-23 08:37:41 +0100ADG1089__(~aditya@223.235.77.1)
2020-12-23 08:42:13 +0100 <sshine> I wonder if prettyprinter-1.7.0 will be made available on Stackage.
2020-12-23 08:43:10 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 08:46:50 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 264 seconds)
2020-12-23 08:49:10 +0100petersen(~petersen@redhat/juhp) (Ping timeout: 272 seconds)
2020-12-23 08:49:57 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 08:51:54 +0100vilpan(~0@212.117.1.172)
2020-12-23 08:56:24 +0100 <iqubic> How do I print the contents of an IOUArray?
2020-12-23 08:57:35 +0100pjb(~t@2a01cb04063ec500c04af862aff5caa7.ipv6.abo.wanadoo.fr) (Ping timeout: 258 seconds)
2020-12-23 09:00:40 +0100proteusguy(~proteusgu@cm-58-10-154-202.revip7.asianet.co.th) (Ping timeout: 268 seconds)
2020-12-23 09:02:18 +0100_ht(~quassel@82-169-194-8.biz.kpn.net)
2020-12-23 09:03:22 +0100 <int-e> iqubic: unsafeFreeze and print?
2020-12-23 09:03:49 +0100 <iqubic> Even better: "getAssocs arr >>= print"
2020-12-23 09:03:55 +0100 <int-e> Oh.
2020-12-23 09:04:38 +0100 <int-e> what else have I missed in MArray, hmm
2020-12-23 09:05:36 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 09:05:47 +0100nhs(~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
2020-12-23 09:05:55 +0100 <int-e> Oh well, not much.
2020-12-23 09:05:55 +0100sakirious(~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: Ping timeout (120 seconds))
2020-12-23 09:06:02 +0100nhs(~nhs@c-67-180-177-103.hsd1.ca.comcast.net)
2020-12-23 09:06:13 +0100sakirious(~sakirious@c-71-197-191-137.hsd1.wa.comcast.net)
2020-12-23 09:06:59 +0100cfricke(~cfricke@unaffiliated/cfricke)
2020-12-23 09:08:30 +0100ADG1089__(~aditya@223.235.77.1) (Remote host closed the connection)
2020-12-23 09:10:07 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 09:11:50 +0100jpcooper(~user@unaffiliated/jpcooper)
2020-12-23 09:13:34 +0100proteusguy(~proteusgu@cm-58-10-154-202.revip7.asianet.co.th)
2020-12-23 09:14:10 +0100asheshambasta(~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be)
2020-12-23 09:14:13 +0100 <jpcooper> Hello. Could anyone explain why I'm getting a "Number of parameters must match family declaration; expected 1" when defining an associated type at https://gist.github.com/jpcooper/6ba52c5bc1fbd79bc7adef6720851109? As far as I understand from the GMap examples at https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/type-families.html, this should be possible
2020-12-23 09:17:58 +0100 <sMuNiX> jpcooper: try, type T Int = m Int instead?
2020-12-23 09:18:22 +0100 <int-e> or T m = m Int
2020-12-23 09:18:38 +0100 <int-e> or maybe the type family needs an additional argument?
2020-12-23 09:18:59 +0100 <int-e> "T t m" doesn't really make sense in connection with the declaration
2020-12-23 09:19:33 +0100 <int-e> type T t :: (* -> *) -> *
2020-12-23 09:19:35 +0100 <int-e> oops
2020-12-23 09:19:47 +0100 <int-e> maybe it should be type T t m :: * -> (* -> *) -> *
2020-12-23 09:20:16 +0100 <int-e> oh wait
2020-12-23 09:20:28 +0100 <jpcooper> All named type arguments must appear in the parameters to the class
2020-12-23 09:20:33 +0100 <int-e> Sorry, I'm misreading the declaration
2020-12-23 09:20:56 +0100 <jpcooper> Basically I'm trying to understand how my definition differs to the GMap definition in the link
2020-12-23 09:21:04 +0100 <int-e> But for that instantiation to work out you need to have type T (t :: *) (m :: * -> *) :: *
2020-12-23 09:21:34 +0100 <jpcooper> m cannot be named in the associated type definition in the class definition, because it is not a parameter to the class
2020-12-23 09:22:12 +0100 <jpcooper> Or have I misunderstood the docs? This is also highly possible
2020-12-23 09:22:50 +0100 <int-e> But there are no type level lambdas... and what you want to do looks suspiciously like you'd need one.
2020-12-23 09:23:33 +0100ADG1089__(~aditya@223.235.77.1)
2020-12-23 09:23:53 +0100 <jpcooper> Does my definition differ particularly from the definition of GMap at 7.7.4.1 at https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/type-families.html, apart from the fact that my definition expects a (* -> *), and not a (*)?
2020-12-23 09:24:06 +0100 <int-e> jpcooper: well, type T t (m :: * -> *) is accepted there.
2020-12-23 09:24:37 +0100MOSCOS(~MOSCOS@152.32.70.55)
2020-12-23 09:24:59 +0100 <int-e> (as it should be, because the association of type families is on a syntactic level more than the semantic level)
2020-12-23 09:25:56 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 09:26:46 +0100 <jpcooper> I stand corrected: "The type parameters must all be type variables, of course, and some (but not necessarily all) of then can be the class parameters. Each class parameter may only be used at most once per associated type"
2020-12-23 09:27:01 +0100 <jpcooper> I would like m to remain free, though. Just like the (*) parameter in GMap
2020-12-23 09:27:13 +0100 <int-e> jpcooper: the difference is that the GMap uses a data instance, and data type constructors *can* be partially applied
2020-12-23 09:27:30 +0100 <jpcooper> Ahah!
2020-12-23 09:27:45 +0100Mikagami(~MOSCOS@122.54.107.175) (Ping timeout: 240 seconds)
2020-12-23 09:28:14 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 09:28:18 +0100 <jpcooper> I believe you and would like to learn more. Do you have a source for this at https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/type-families.html or elsewhere which details this distinction?
2020-12-23 09:28:34 +0100 <int-e> is there a reason why we're looking at the 7.6.3 docs?
2020-12-23 09:28:55 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12)
2020-12-23 09:28:56 +0100 <jpcooper> There is no reason
2020-12-23 09:29:45 +0100MOSCOS(~MOSCOS@152.32.70.55) (Ping timeout: 240 seconds)
2020-12-23 09:30:38 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 264 seconds)
2020-12-23 09:31:03 +0100 <sMuNiX> jpcooper: TBH, I'd used data type families instead. I've posted an example at https://gist.github.com/jpcooper/6ba52c5bc1fbd79bc7adef6720851109
2020-12-23 09:31:18 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 09:31:36 +0100 <jpcooper> Thanks, sMuNiX
2020-12-23 09:31:42 +0100 <int-e> jpcooper: Hmm is the linked wiki page useful?
2020-12-23 09:32:43 +0100 <jpcooper> int-e: Sorry, which wiki page?
2020-12-23 09:33:05 +0100 <jpcooper> sMuNiX: I was hoping to use a type, but this clearly isn't possible
2020-12-23 09:33:30 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12) (Ping timeout: 272 seconds)
2020-12-23 09:33:37 +0100 <int-e> jpcooper: https://wiki.haskell.org/GHC/Indexed_types (which is linked just before section 7.7.1 in the 7.6.3 version of the documentation)
2020-12-23 09:34:21 +0100 <jpcooper> Thanks. Will read
2020-12-23 09:35:47 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2020-12-23 09:36:45 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 240 seconds)
2020-12-23 09:38:22 +0100 <int-e> jpcooper: The wiki page links data family to data type definitions, and type families to type synonyms. So your problem translates to the one that type synonyms cannot be partially applied, because the Core language (increasingly loosely based on System F) has no type-level lambda.
2020-12-23 09:40:24 +0100kritzefitz(~kritzefit@fw-front.credativ.com)
2020-12-23 09:41:43 +0100 <jpcooper> This is a shame, but makes sense
2020-12-23 09:43:04 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12)
2020-12-23 09:43:34 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-12-23 09:45:18 +0100ADG1089__(~aditya@223.235.77.1) (Quit: Konversation terminated!)
2020-12-23 09:45:59 +0100m0rphism(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
2020-12-23 09:46:16 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 09:47:46 +0100nyd(~nyd@unaffiliated/elysian)
2020-12-23 09:47:47 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12) (Ping timeout: 256 seconds)
2020-12-23 09:48:42 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 272 seconds)
2020-12-23 09:49:53 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2020-12-23 09:51:14 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 268 seconds)
2020-12-23 09:55:37 +0100heatsink(~heatsink@2600:1700:bef1:5e10:e906:26f8:b4d1:f41d) (Remote host closed the connection)
2020-12-23 09:56:16 +0100Kaiepi(~Kaiepi@47.54.252.148)
2020-12-23 09:56:45 +0100ADG1089__(~aditya@223.235.77.1)
2020-12-23 09:57:51 +0100ron3(~ron@s91904426.blix.com) (Remote host closed the connection)
2020-12-23 09:59:36 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85)
2020-12-23 10:00:50 +0100Cerise(~jerry@unaffiliated/cerise) (Quit: :qa!)
2020-12-23 10:00:52 +0100devalot(~ident@mail.pmade.com) (Quit: ZNC - http://znc.in)
2020-12-23 10:00:56 +0100wowi42(~wowi42@51.15.249.183) (Remote host closed the connection)
2020-12-23 10:00:57 +0100mawk(mawk@serveur.io) (Quit: ZNC - https://znc.in)
2020-12-23 10:01:12 +0100mawk(mawk@serveur.io)
2020-12-23 10:01:13 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl)
2020-12-23 10:01:16 +0100devalot(~ident@mail.pmade.com)
2020-12-23 10:01:40 +0100wowi42(~wowi42@51.15.249.183)
2020-12-23 10:02:14 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 10:02:25 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-12-23 10:03:16 +0100Franciman(~francesco@host-82-49-79-73.retail.telecomitalia.it)
2020-12-23 10:04:15 +0100Cerise(~jerry@natsumi.devzero.info)
2020-12-23 10:04:15 +0100Cerise(~jerry@natsumi.devzero.info) (Changing host)
2020-12-23 10:04:15 +0100Cerise(~jerry@unaffiliated/cerise)
2020-12-23 10:04:22 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85) (Ping timeout: 260 seconds)
2020-12-23 10:04:41 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 10:07:18 +0100danso(~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
2020-12-23 10:07:20 +0100wonko7(~wonko7@2a01:e35:2ffb:7040:4535:f480:7dff:b3b5)
2020-12-23 10:07:45 +0100Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2020-12-23 10:08:59 +0100heatsink(~heatsink@2600:1700:bef1:5e10:f1a7:76cd:a0f1:d0b7)
2020-12-23 10:09:28 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 256 seconds)
2020-12-23 10:13:42 +0100heatsink(~heatsink@2600:1700:bef1:5e10:f1a7:76cd:a0f1:d0b7) (Ping timeout: 260 seconds)
2020-12-23 10:13:43 +0100philopsos(~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
2020-12-23 10:14:11 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12)
2020-12-23 10:17:03 +0100pmxb0t(~pmxb0t@185.204.1.185)
2020-12-23 10:18:40 +0100philopsos(~caecilius@gateway/tor-sasl/caecilius)
2020-12-23 10:21:34 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 10:22:26 +0100neiluj(~jco@91-167-203-101.subs.proxad.net)
2020-12-23 10:22:39 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85)
2020-12-23 10:26:53 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2020-12-23 10:27:13 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85) (Ping timeout: 272 seconds)
2020-12-23 10:27:19 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 10:30:06 +0100ActinalWhomp(ad49c9f8@pool-173-73-201-248.washdc.fios.verizon.net) (Remote host closed the connection)
2020-12-23 10:30:29 +0100magma(~magma@host-79-22-138-220.retail.telecomitalia.it)
2020-12-23 10:30:55 +0100ADG1089__(~aditya@223.235.77.1) (Quit: Konversation terminated!)
2020-12-23 10:30:59 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 10:31:25 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85)
2020-12-23 10:35:12 +0100jamm(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-12-23 10:35:30 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 10:36:50 +0100wonko7(~wonko7@2a01:e35:2ffb:7040:4535:f480:7dff:b3b5) (Quit: See You Space Cowboy..)
2020-12-23 10:37:19 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 10:40:58 +0100ADG1089__(~aditya@223.235.77.1)
2020-12-23 10:44:05 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 10:45:26 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 10:46:29 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 10:47:55 +0100iqubic(~user@2601:602:9500:4870:e949:f050:eec9:86cb) (Remote host closed the connection)
2020-12-23 10:48:28 +0100sdx23(~sdx23@unaffiliated/sdx23) (Remote host closed the connection)
2020-12-23 10:48:42 +0100sdx23(~sdx23@unaffiliated/sdx23)
2020-12-23 10:49:25 +0100iqubic(~user@2601:602:9500:4870:224c:ee6c:f171:d2ab)
2020-12-23 10:49:59 +0100hackagegitlab-haskell 0.2.4 - A Haskell library for the GitLab web API https://hackage.haskell.org/package/gitlab-haskell-0.2.4 (RobStewart)
2020-12-23 10:51:17 +0100aidecoe(~aidecoe@unaffiliated/aidecoe) (Remote host closed the connection)
2020-12-23 10:51:19 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 260 seconds)
2020-12-23 10:51:31 +0100aidecoe(~aidecoe@unaffiliated/aidecoe)
2020-12-23 10:52:16 +0100cosimone(~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
2020-12-23 10:53:23 +0100philopsos(~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
2020-12-23 10:54:11 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-12-23 10:56:43 +0100hnOsmium0001(uid453710@gateway/web/irccloud.com/x-kgydrswmdfhxhpyo) (Quit: Connection closed for inactivity)
2020-12-23 10:56:57 +0100aveltras(uid364989@gateway/web/irccloud.com/x-swdjdvvylpuvvuuw)
2020-12-23 10:58:52 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2020-12-23 11:00:45 +0100Rudd0(~Rudd0@185.189.115.108)
2020-12-23 11:08:45 +0100jpcooper(~user@unaffiliated/jpcooper) (Ping timeout: 240 seconds)
2020-12-23 11:09:04 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85) (Ping timeout: 258 seconds)
2020-12-23 11:09:34 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 11:10:35 +0100wei2912(~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
2020-12-23 11:13:46 +0100majjoha(5fae4106@95.174.65.6)
2020-12-23 11:16:34 +0100cosimone(~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
2020-12-23 11:16:54 +0100cosimone(~cosimone@93-47-228-249.ip115.fastwebnet.it)
2020-12-23 11:17:29 +0100jamm(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-12-23 11:20:56 +0100shatriff(~vitaliish@176-52-216-242.irishtelecom.com)
2020-12-23 11:23:50 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 11:26:00 +0100hackageZ-YAML 0.1.0.0 - YAML tools https://hackage.haskell.org/package/Z-YAML-0.1.0.0 (winterland)
2020-12-23 11:26:03 +0100livvy(~livvy@gateway/tor-sasl/livvy)
2020-12-23 11:27:09 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 11:29:09 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 11:29:48 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 11:33:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
2020-12-23 11:34:05 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds)
2020-12-23 11:36:32 +0100p-core(~Thunderbi@koleje-wifi-0045.koleje.cuni.cz) (Ping timeout: 260 seconds)
2020-12-23 11:38:26 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 11:38:32 +0100justan0theruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 268 seconds)
2020-12-23 11:40:20 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Client Quit)
2020-12-23 11:40:40 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 11:54:09 +0100shatriff(~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
2020-12-23 11:54:18 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-12-23 11:58:23 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Remote host closed the connection)
2020-12-23 11:58:46 +0100shatriff(~vitaliish@176-52-216-242.irishtelecom.com)
2020-12-23 12:00:14 +0100mounty(~mounty@210.1.196.133)
2020-12-23 12:02:39 +0100ADG1089__(~aditya@223.235.77.1) (Remote host closed the connection)
2020-12-23 12:03:04 +0100ADG1089__(~aditya@223.235.77.1)
2020-12-23 12:03:28 +0100ADG1089__(~aditya@223.235.77.1) (Remote host closed the connection)
2020-12-23 12:03:56 +0100Mikagami(~MOSCOS@122.54.107.175) (Remote host closed the connection)
2020-12-23 12:04:26 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 12:05:26 +0100Mikagami(~MOSCOS@122.54.107.175) (Remote host closed the connection)
2020-12-23 12:05:51 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 12:06:16 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 240 seconds)
2020-12-23 12:06:17 +0100kuribas(~user@ptr-25vy0i8vujxag7jvv73.18120a2.ip6.access.telenet.be)
2020-12-23 12:06:59 +0100 <kuribas> I've been reading about clojure transducers, and it seems they are the CPS transformed version of Kleisli over a List transformer (done right).
2020-12-23 12:07:26 +0100Mikagami(~MOSCOS@122.54.107.175) (Remote host closed the connection)
2020-12-23 12:07:31 +0100 <kuribas> They also do side effects to handle state...
2020-12-23 12:07:51 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 12:09:40 +0100majjoha(5fae4106@95.174.65.6) (Ping timeout: 245 seconds)
2020-12-23 12:10:30 +0100heatsink(~heatsink@2600:1700:bef1:5e10:f1a7:76cd:a0f1:d0b7)
2020-12-23 12:11:22 +0100 <kuribas> since forall r .(r -> b -> m r) -> (r -> a -> m r) ~= a -> (m r -> b -> m r) -> r -> m r ~= a -> ListT m b
2020-12-23 12:11:37 +0100 <kuribas> so transducer composition is >=>
2020-12-23 12:12:07 +0100ezzieyguywuf(~Unknown@unaffiliated/ezzieyguywuf) (Read error: Connection reset by peer)
2020-12-23 12:12:53 +0100 <kuribas> mapping f = pure . f
2020-12-23 12:13:13 +0100kam1(~kam1@24.231.108.143)
2020-12-23 12:14:38 +0100kam1(~kam1@24.231.108.143) (Remote host closed the connection)
2020-12-23 12:15:02 +0100heatsink(~heatsink@2600:1700:bef1:5e10:f1a7:76cd:a0f1:d0b7) (Ping timeout: 264 seconds)
2020-12-23 12:15:06 +0100 <kuribas> filtering p = \a -> if p a then ListT (pure Nil) else pure a
2020-12-23 12:15:45 +0100 <kuribas> then "taking" would use an IOref to count the number of elements taken so far.
2020-12-23 12:17:54 +0100 <kuribas> I suppose haskells streamly library is the closest thing to clojure transducers
2020-12-23 12:18:06 +0100hexfive(~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Ping timeout: 256 seconds)
2020-12-23 12:19:05 +0100__monty__(~toonn@unaffiliated/toonn)
2020-12-23 12:20:33 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 12:20:42 +0100heatsink(~heatsink@2600:1700:bef1:5e10:cc9a:202:e3b8:f08c)
2020-12-23 12:21:02 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Remote host closed the connection)
2020-12-23 12:22:19 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 12:23:53 +0100plutoniix(~q@184.82.194.64)
2020-12-23 12:24:00 +0100plutoniix(~q@184.82.194.64) (Max SendQ exceeded)
2020-12-23 12:24:06 +0100ggVGc(~ggVGc@a.lowtech.earth) (Changing host)
2020-12-23 12:24:06 +0100ggVGc(~ggVGc@unaffiliated/walt)
2020-12-23 12:24:28 +0100plutoniix(~q@184.82.194.64)
2020-12-23 12:24:37 +0100lassulus_(~lassulus@NixOS/user/lassulus)
2020-12-23 12:24:49 +0100lassulus_(~lassulus@NixOS/user/lassulus) (Client Quit)
2020-12-23 12:25:24 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Ping timeout: 268 seconds)
2020-12-23 12:25:32 +0100heatsink(~heatsink@2600:1700:bef1:5e10:cc9a:202:e3b8:f08c) (Ping timeout: 260 seconds)
2020-12-23 12:27:10 +0100lassulus_(~lassulus@NixOS/user/lassulus)
2020-12-23 12:27:13 +0100majjoha(majjohamat@gateway/shell/matrix.org/x-nfknmskoomgvvhht)
2020-12-23 12:27:20 +0100lassulus_(~lassulus@NixOS/user/lassulus) (Client Quit)
2020-12-23 12:27:57 +0100jamm(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-12-23 12:29:18 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de)
2020-12-23 12:32:45 +0100lassulus(~lassulus@NixOS/user/lassulus) (Quit: WeeChat 2.9)
2020-12-23 12:33:02 +0100kam1(~kam1@24.231.108.143)
2020-12-23 12:33:55 +0100lassulus(~lassulus@NixOS/user/lassulus)
2020-12-23 12:37:24 +0100vilpan(~0@212.117.1.172) ()
2020-12-23 12:40:43 +0100kam1(~kam1@24.231.108.143) (Remote host closed the connection)
2020-12-23 12:42:01 +0100kam1(~kam1@24.231.108.143)
2020-12-23 12:45:12 +0100justan0theruser(~justanoth@unaffiliated/justanotheruser)
2020-12-23 12:49:16 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 12:53:08 +0100 <kuribas> so clojure transducers are fairly simple actually, not some super novel construct that can be only done using dynamic typing :)
2020-12-23 12:53:59 +0100hackageapecs-physics 0.4.5 - 2D physics for apecs https://hackage.haskell.org/package/apecs-physics-0.4.5 (jonascarpay)
2020-12-23 12:55:01 +0100rayyyy(~nanoz@gateway/tor-sasl/nanoz)
2020-12-23 12:55:23 +0100hacxman(~hexo@gateway/tor-sasl/hexo)
2020-12-23 12:55:59 +0100fendor(~fendor@178.165.130.57.wireless.dyn.drei.com)
2020-12-23 12:56:23 +0100hexo(~hexo@gateway/tor-sasl/hexo) (Ping timeout: 240 seconds)
2020-12-23 12:56:24 +0100hacxmanhexo
2020-12-23 12:57:47 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 12:59:38 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 13:00:18 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 13:00:24 +0100hexfive(~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
2020-12-23 13:02:03 +0100 <kuribas> so then the transduce function applies the transducer to each element, concatenates the results, and folds them.
2020-12-23 13:04:54 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 260 seconds)
2020-12-23 13:04:58 +0100Synthetica(uid199651@gateway/web/irccloud.com/x-arxbcjhlstycoeub)
2020-12-23 13:05:28 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-12-23 13:08:37 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Ping timeout: 264 seconds)
2020-12-23 13:09:03 +0100cosimone_(~cosimone@5.170.240.2)
2020-12-23 13:10:20 +0100dftxbs3e(~dftxbs3e@unaffiliated/dftxbs3e) (Remote host closed the connection)
2020-12-23 13:12:44 +0100cosimone(~cosimone@93-47-228-249.ip115.fastwebnet.it) (Ping timeout: 265 seconds)
2020-12-23 13:12:45 +0100cosimone_cosimone
2020-12-23 13:15:10 +0100vsiddharth(~user@c-73-15-251-38.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2020-12-23 13:15:45 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 13:17:09 +0100notzmv(~user@unaffiliated/zmv)
2020-12-23 13:21:07 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 13:21:29 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 13:21:36 +0100heatsink(~heatsink@2600:1700:bef1:5e10:cc9a:202:e3b8:f08c)
2020-12-23 13:21:37 +0100christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-12-23 13:22:38 +0100qwerty(~tema@217.118.92.215) (Read error: Connection reset by peer)
2020-12-23 13:23:28 +0100 <merijn> kuribas: transducers are just a mix of streaming libs like conduit and something like Tekmo's foldl library
2020-12-23 13:24:06 +0100unlink2(~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-12-23 13:24:53 +0100qwerty(~tema@217.118.92.215)
2020-12-23 13:25:10 +0100 <kuribas> except that the inner state seems to be done by a side effect in clojure
2020-12-23 13:25:19 +0100 <kuribas> for example (take 5).
2020-12-23 13:25:49 +0100 <kuribas> it uses an mutable ref to count the number of elements.
2020-12-23 13:25:55 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2020-12-23 13:25:56 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
2020-12-23 13:25:58 +0100unlink2(~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de)
2020-12-23 13:26:05 +0100 <kuribas> so the foldl library would be a *clean* version of transducers :-)
2020-12-23 13:26:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:cc9a:202:e3b8:f08c) (Ping timeout: 264 seconds)
2020-12-23 13:26:33 +0100christo(~chris@81.96.113.213)
2020-12-23 13:29:11 +0100Stanley00(~stanley00@unaffiliated/stanley00) ()
2020-12-23 13:30:16 +0100sMuNiX(~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca) (Read error: Connection reset by peer)
2020-12-23 13:30:36 +0100christo(~chris@81.96.113.213) (Ping timeout: 240 seconds)
2020-12-23 13:32:26 +0100sMuNiX(~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca)
2020-12-23 13:34:05 +0100Tario(~Tario@201.192.165.173)
2020-12-23 13:36:42 +0100knupfer(~Thunderbi@mue-88-130-61-079.dsl.tropolys.de)
2020-12-23 13:40:25 +0100 <tomsmeding> is there a way to load an entire project in ghci, focus on a particular set of modules, and _keep that set intact_ on :reload ?
2020-12-23 13:40:47 +0100 <kuribas> merijn: transducers are also CPS transformed, like the van laarhoven lens representation.
2020-12-23 13:41:08 +0100 <merijn> tomsmeding: Define "entire project"
2020-12-23 13:41:20 +0100 <tomsmeding> all modules in the main library of a cabal project
2020-12-23 13:41:20 +0100 <merijn> tomsmeding: i.e. does that involve multiple components/packages?
2020-12-23 13:41:21 +0100 <tomsmeding> in my case
2020-12-23 13:41:23 +0100 <tomsmeding> nope
2020-12-23 13:41:32 +0100 <tomsmeding> (well, stack project, but I _hope_ that doesn't matter)
2020-12-23 13:41:41 +0100 <merijn> Then cabal repl should already reload it
2020-12-23 13:41:45 +0100 <merijn> oh, stack
2020-12-23 13:41:52 +0100 <kuribas> so they a specific form of traversal. The stream representation is basically the un-CPSed version.
2020-12-23 13:41:54 +0100 <merijn> Stack uses ugly hacks to make multi-component ghci work
2020-12-23 13:41:58 +0100 <tomsmeding> also starting up the repl takes like a minute so I'd like :r to work
2020-12-23 13:42:01 +0100 <merijn> I have no clue how that may interfere
2020-12-23 13:43:00 +0100 <tomsmeding> "Then cabal repl should already reload it" -- does that work well with :reload? i.e. if I do :reload, will it suddenly focus an arbitrary module instead of the one I had focused?
2020-12-23 13:44:49 +0100 <kuribas> tomsmeding: by focus you mean :load?
2020-12-23 13:45:15 +0100 <tomsmeding> :m
2020-12-23 13:45:32 +0100 <tomsmeding> :l reloads the entire repl, :m doesn't
2020-12-23 13:45:42 +0100geekosaur(ac3a3bc9@172.58.59.201)
2020-12-23 13:45:54 +0100dftxbs3e(~dftxbs3e@unaffiliated/dftxbs3e)
2020-12-23 13:45:55 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2020-12-23 13:46:08 +0100 <tomsmeding> but I'll try to reproduce on a non-stack project, it'll be easier to talk about what happens then
2020-12-23 13:47:06 +0100arybczak(~unknown@2a02:a312:c83d:7800:bb7f:5c00:4f48:cc5c)
2020-12-23 13:47:55 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 13:47:59 +0100FreeBirdLjj(~freebirdl@101.87.168.174)
2020-12-23 13:48:30 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85)
2020-12-23 13:49:23 +0100 <__monty__> Hmm, :m only adds modules to the context, no focusing afaik? And doesn't GHCi always keep those loaded?
2020-12-23 13:49:44 +0100 <__monty__> Pretty sure if you want to unload those from the context you have to explicitly `:m - Module`
2020-12-23 13:50:02 +0100 <tomsmeding> pure cabal project, single executable: https://paste.tomsmeding.com/tfS7EZaH
2020-12-23 13:50:13 +0100 <tomsmeding> why does it re-focus main? I'd like to keep my module list the same
2020-12-23 13:50:32 +0100 <tomsmeding> __monty__: indeed I can :m -Main, but then :r re-adds Main
2020-12-23 13:50:50 +0100 <tomsmeding> pretty sure that is because it is the "top-level module" that's being loaded in ghci, but I couldn't care less about that :p
2020-12-23 13:51:33 +0100 <merijn> I mean, what exactly is the problem?
2020-12-23 13:52:05 +0100 <merijn> I have the module list disabled entirely, tbh
2020-12-23 13:52:11 +0100 <tomsmeding> the problem, in the paste I linked, is that after :r I'm suddenly in the context of Main, which adds things to the scope that I might not want to be in scope
2020-12-23 13:52:13 +0100 <merijn> Pointless waste of space >.>
2020-12-23 13:52:22 +0100FreeBirdLjj(~freebirdl@101.87.168.174) (Ping timeout: 265 seconds)
2020-12-23 13:52:27 +0100 <tomsmeding> here in pastebin-haskell it's not really an issue, but in another project there are significant name clashes between moduls
2020-12-23 13:52:41 +0100 <tomsmeding> meaning that adding another module means lots of things are now suddenly ambiguous
2020-12-23 13:52:42 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 13:53:01 +0100olligobber(~olligobbe@unaffiliated/olligobber) (Ping timeout: 264 seconds)
2020-12-23 13:53:47 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz)
2020-12-23 13:54:20 +0100 <__monty__> tomsmeding: I think the closest thing to what you want is to just start GHCi for each module you want to look at. Configure it to use -fobject-code to keep from having to interpret everything every time?
2020-12-23 13:54:47 +0100Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2020-12-23 13:55:35 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85) (Ping timeout: 272 seconds)
2020-12-23 13:55:56 +0100solonarv(~solonarv@adijon-656-1-25-229.w90-13.abo.wanadoo.fr)
2020-12-23 13:56:41 +0100aveltras(uid364989@gateway/web/irccloud.com/x-swdjdvvylpuvvuuw) (Quit: Connection closed for inactivity)
2020-12-23 13:56:52 +0100plutoniix(~q@184.82.194.64) (Quit: Leaving)
2020-12-23 13:57:00 +0100 <tomsmeding> __monty__: what do you mean exactly? Pass the modules I want as command-line arguments to ghci?
2020-12-23 13:57:32 +0100 <tomsmeding> with stack I seem to be able to do that with --ghci-options, but I'm not sure how to do that with cabal
2020-12-23 13:57:51 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 13:58:14 +0100Varis(~Tadas@unaffiliated/varis)
2020-12-23 13:58:42 +0100 <tomsmeding> also when I tried that with stack, it chose one of the two modules I passed as command-line arguments as the "main module" that it *-focuses after the reload (it always chooses the same one, ordering doesn't matter) -- and that happens to be the one I do _not_ want to have focused :p
2020-12-23 13:58:49 +0100 <tomsmeding> (because I want that one imported qualified)
2020-12-23 13:59:17 +0100 <__monty__> Then you can't pass it I think.
2020-12-23 13:59:23 +0100 <tomsmeding> but probably most people don't want that precise control over the scope as I do
2020-12-23 13:59:24 +0100 <__monty__> Add it afterwards.
2020-12-23 13:59:25 +0100_deepfire(~user@80.92.100.69)
2020-12-23 13:59:45 +0100 <tomsmeding> with :l you mean?
2020-12-23 13:59:57 +0100 <__monty__> No, import or :m.
2020-12-23 14:00:05 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de)
2020-12-23 14:00:22 +0100 <tomsmeding> it's not a dependency of the other module, so it doesn't get loaded by default so I can't import it
2020-12-23 14:00:33 +0100jmchael(~jmchael@81.174.205.210)
2020-12-23 14:00:39 +0100 <tomsmeding> does that make sense? :p
2020-12-23 14:01:17 +0100 <tomsmeding> I have two modules, A and B, and neither imports the other; I want A imported unqualified and B imported qualified in my repl, but if I pass A and B as command-line args then B is arbitrarily (?) chosen as the main module
2020-12-23 14:01:34 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 14:01:51 +0100 <tomsmeding> passing only A or B as an argument prevents me from importing the other, because ghci only loads what is actually used
2020-12-23 14:02:03 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 14:02:30 +0100 <tomsmeding> it's so frustrating because all would be fixed if ghci wouldn't re-focus its "top-level" module upon :reload :p
2020-12-23 14:02:51 +0100 <tomsmeding> but I'll stop complaining
2020-12-23 14:04:04 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 14:04:18 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 14:04:42 +0100 <__monty__> I think the assumption is what you're doing doesn't really make sense. If they don't import each other there's no way for the code to be used together. So if you want to experiment with both simultaneously you must logically have another module which does import both.
2020-12-23 14:04:55 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 14:05:22 +0100 <tomsmeding> > If they don't import each other there's no way for the code to be used together.
2020-12-23 14:05:25 +0100 <lambdabot> <hint>:1:15: error:
2020-12-23 14:05:25 +0100 <lambdabot> <hint>:1:15: error: parse error on input ‘import’
2020-12-23 14:05:26 +0100 <tomsmeding> disagree :p
2020-12-23 14:05:47 +0100 <__monty__> Do tell?
2020-12-23 14:05:52 +0100 <tomsmeding> the real project that I'm talking about (not pastebin-haskell) is a library
2020-12-23 14:06:12 +0100 <tomsmeding> libraries can have exported modules A and B, neither importing the other, but still being quite useful to have them together
2020-12-23 14:06:31 +0100 <__monty__> Yeah but only in other modules which import *both*.
2020-12-23 14:06:32 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Ping timeout: 268 seconds)
2020-12-23 14:07:21 +0100 <tomsmeding> if I load the entire project in ghci, which I can easily do with 'stack repl' or 'cabal repl', and then run :m A B, then I have exactly the setup I want
2020-12-23 14:07:39 +0100 <tomsmeding> is that not an intended usage of ghci?
2020-12-23 14:08:01 +0100 <tomsmeding> can be, just asking
2020-12-23 14:08:09 +0100 <__monty__> The only way you can do it in GHCi is if the modules are part of a package GHCi knows about.
2020-12-23 14:08:25 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 14:08:47 +0100mastarija(~mastarija@93-138-112-136.adsl.net.t-com.hr)
2020-12-23 14:09:46 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 265 seconds)
2020-12-23 14:10:30 +0100 <__monty__> That's what cabal repl does I believe add the entire package of the current project to the scope.
2020-12-23 14:10:47 +0100 <merijn> It adds 1 component of the current package to the scope
2020-12-23 14:11:02 +0100 <tomsmeding> and that's what I want! Except that also registers some sort of top-level module that it always re-adds to the in-scope modules upon reload
2020-12-23 14:11:07 +0100 <tomsmeding> __monty__: https://paste.tomsmeding.com/zTZK933s
2020-12-23 14:11:26 +0100 <tomsmeding> neither DB nor RecentList import any other modules from my project, only external deps
2020-12-23 14:11:29 +0100 <__monty__> Right, not the scope, but it tells GHCi about the package.
2020-12-23 14:12:42 +0100 <__monty__> tomsmeding: Maybe you want `cabal repl library:pastebin-haskell`?
2020-12-23 14:12:51 +0100ericsagnes(~ericsagne@2405:6580:0:5100:9fad:af1d:1031:f5b2)
2020-12-23 14:13:04 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 258 seconds)
2020-12-23 14:13:59 +0100 <tomsmeding> __monty__: like this? https://paste.tomsmeding.com/ft7fhpvG
2020-12-23 14:15:39 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 14:16:11 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 14:16:24 +0100ericsagn1(~ericsagne@2405:6580:0:5100:9938:b754:b7e6:63d5) (Ping timeout: 268 seconds)
2020-12-23 14:16:31 +0100 <kuribas> merijn: actually, the clojure transducer model with side effects would be more like: type Transducer = IO (a -> ListT IO b)
2020-12-23 14:16:59 +0100 <kuribas> as state is a done using a mutable reference.
2020-12-23 14:17:20 +0100 <kuribas> the foldl library is much cleaner of course.
2020-12-23 14:17:37 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2020-12-23 14:17:43 +0100 <merijn> kuribas: Hence why I said foldl *and* streaming libraries (like conduit, etc.)
2020-12-23 14:17:55 +0100 <kuribas> right
2020-12-23 14:18:40 +0100 <kuribas> the explanation on the clojure reference page is also confusing...
2020-12-23 14:18:49 +0100 <tomsmeding> __monty__ merijn: I'm just going to do this: :def rr Prelude.const (Prelude.return ":r\n:m -The.Offending.Main.Module\n")
2020-12-23 14:21:28 +0100 <__monty__> tomsmeding: No, you're loading the exe component which has a main module. `cabal repl library`.
2020-12-23 14:22:01 +0100 <tomsmeding> okay fair point this test project is an executable, not a library. I'll tell you however, for a library it will just choose an arbitrary module
2020-12-23 14:22:08 +0100 <tomsmeding> let me look on my system for a suitable test cabal project
2020-12-23 14:23:36 +0100tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net) ()
2020-12-23 14:23:38 +0100coot_(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl)
2020-12-23 14:23:39 +0100guest1222(~user@49.5.6.87) (Remote host closed the connection)
2020-12-23 14:23:48 +0100guest1222(~user@49.5.6.87)
2020-12-23 14:24:05 +0100cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0)
2020-12-23 14:24:18 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-12-23 14:24:18 +0100coot_coot
2020-12-23 14:26:29 +0100 <tomsmeding> __monty__: https://paste.tomsmeding.com/dOdetwPi
2020-12-23 14:26:57 +0100 <tomsmeding> I would like 'a' not to get in scope after :r
2020-12-23 14:27:12 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Remote host closed the connection)
2020-12-23 14:27:51 +0100 <tomsmeding> (and 'cabal repl lib:test' has exactly the same behaviour as 'cabal repl' in this case)
2020-12-23 14:30:05 +0100 <__monty__> tomsmeding: Yeah, out of ideas then : /
2020-12-23 14:31:19 +0100Lycurgus(~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
2020-12-23 14:31:36 +0100 <tomsmeding> I'll go the ugly :def way :p
2020-12-23 14:31:41 +0100mastarija_(~mastarija@93-136-165-235.adsl.net.t-com.hr)
2020-12-23 14:31:58 +0100tomsmedingis lucky the arbitrary top-level module is not one I want imported qualified
2020-12-23 14:32:03 +0100 <kuribas> merijn: but the fold itself is just the transduce function, right?
2020-12-23 14:32:23 +0100Guest2398(~daniel@pd95628ab.dip0.t-ipconnect.de)
2020-12-23 14:32:56 +0100justan0theruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds)
2020-12-23 14:33:22 +0100 <kuribas> merijn: because a fold cannot do filter or map.
2020-12-23 14:33:36 +0100 <kuribas> or a transducer is a traversal over a fold...
2020-12-23 14:35:36 +0100mastarija(~mastarija@93-138-112-136.adsl.net.t-com.hr) (Ping timeout: 272 seconds)
2020-12-23 14:36:55 +0100justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-12-23 14:38:15 +0100son0p(~son0p@181.136.122.143)
2020-12-23 14:39:22 +0100ADG1089__(~aditya@122.163.225.112)
2020-12-23 14:41:14 +0100gremax(znc@torba.club)
2020-12-23 14:42:42 +0100Guest2398(~daniel@pd95628ab.dip0.t-ipconnect.de) (Quit: Lost terminal)
2020-12-23 14:44:08 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-12-23 14:45:16 +0100mrchampion(~mrchampio@38.18.109.23) (Ping timeout: 240 seconds)
2020-12-23 14:45:20 +0100Ariakenom(~Ariakenom@2001:9b1:efb:fc00:85c1:dfba:129c:d7ca)
2020-12-23 14:45:30 +0100pavonia(~user@unaffiliated/siracusa) (Quit: Bye!)
2020-12-23 14:45:48 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 14:46:12 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 14:47:48 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 14:49:45 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
2020-12-23 14:50:04 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
2020-12-23 14:52:13 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl)
2020-12-23 14:52:33 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Ping timeout: 258 seconds)
2020-12-23 14:53:24 +0100vs^(vs@ip98-184-89-2.mc.at.cox.net)
2020-12-23 14:54:06 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 14:54:17 +0100Tops2(~Tobias@dyndsl-095-033-020-064.ewe-ip-backbone.de)
2020-12-23 14:54:25 +0100justanotheruser(~justanoth@unaffiliated/justanotheruser) (Read error: Connection reset by peer)
2020-12-23 14:54:29 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 14:55:09 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2020-12-23 14:55:33 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2020-12-23 14:55:47 +0100 <majjoha> Hi all. I've been trying to improve my Haskell chops lately, and I am currently working my way through Haskell Programming From First Principles. To use my newly acquired knowledge, I've built a small app that generates passphrases using EFF's wordlist, and I would really appreciate any feedback on how I can improve my code. In total, we are talking under 50 lines of code, and it can be found here:
2020-12-23 14:55:48 +0100 <majjoha> https://github.com/majjoha/passphrase/tree/main/src/Passphrase. Any suggestions?
2020-12-23 14:56:36 +0100notzmv(~user@unaffiliated/zmv) (Remote host closed the connection)
2020-12-23 14:57:14 +0100ezzieyguywuf(~Unknown@unaffiliated/ezzieyguywuf)
2020-12-23 14:57:37 +0100mrchampion(~mrchampio@38.18.109.23)
2020-12-23 14:59:37 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
2020-12-23 15:00:39 +0100 <ADG1089__> is there a way to parse do blocks in pointfree
2020-12-23 15:01:10 +0100 <merijn> majjoha: Looks mostly fine
2020-12-23 15:01:12 +0100 <geekosaur> no, but you can switch to using >> and >>= instead of do
2020-12-23 15:01:26 +0100 <ADG1089__> i thought the same
2020-12-23 15:01:44 +0100urodna(~urodna@unaffiliated/urodna)
2020-12-23 15:01:45 +0100 <ADG1089__> any utility to do that already or will have to do manually or write one?
2020-12-23 15:01:49 +0100 <merijn> majjoha: I'd probably move the "(+) . (*10)" in the fold in Dice.hs out into a named where block
2020-12-23 15:02:16 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 15:02:47 +0100 <geekosaur> don't know if there's a standalone version of lambdabot's @undo
2020-12-23 15:03:18 +0100 <geekosaur> @undo do { x <- a; b x }
2020-12-23 15:03:19 +0100 <lambdabot> a >>= \ x -> b x
2020-12-23 15:03:25 +0100nyd(~nyd@unaffiliated/elysian) (Ping timeout: 240 seconds)
2020-12-23 15:03:54 +0100 <geekosaur> @. pl undo do { x <- a; b x }
2020-12-23 15:03:55 +0100 <lambdabot> b =<< a
2020-12-23 15:04:34 +0100 <majjoha> merijn: Thanks for the suggestion. It would probably be good for improving the readability.
2020-12-23 15:04:39 +0100 <geekosaur> (had to fight with my client a bit, it really wants @ to refer to nicks :( )
2020-12-23 15:06:06 +0100 <ADG1089__> i installed lamdabot locally
2020-12-23 15:06:09 +0100 <ADG1089__> that should help
2020-12-23 15:06:34 +0100 <solonarv> geekosaur: ghc -ddump-ds ;)
2020-12-23 15:07:07 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Ping timeout: 260 seconds)
2020-12-23 15:07:26 +0100 <geekosaur> I'd also point out that pointfree does little for readability
2020-12-23 15:07:51 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 15:08:46 +0100 <ADG1089__> i wrote something in very verbose manner
2020-12-23 15:08:53 +0100 <ADG1089__> i think it can be simplified so asking
2020-12-23 15:09:01 +0100 <kuribas> majjoha: I tend to inline variables that are used only once.
2020-12-23 15:09:10 +0100 <geekosaur> verbose is not necessarily bad
2020-12-23 15:09:13 +0100 <kuribas> majjoha: also, use foldl', never use foldl :-)
2020-12-23 15:09:48 +0100 <ADG1089__> this is what i am talking about: https://hastebin.com/ivulotupuq.sql
2020-12-23 15:09:51 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Read error: Connection reset by peer)
2020-12-23 15:09:53 +0100 <geekosaur> the general rule is to write so it can be read by humans
2020-12-23 15:10:04 +0100 <ADG1089__> lot of dos and forMs
2020-12-23 15:10:25 +0100kritzefitz(~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-12-23 15:10:31 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 15:10:42 +0100 <ADG1089__> let me know if it is good as it is
2020-12-23 15:10:46 +0100 <kuribas> ADG1089__: you can use guards with let
2020-12-23 15:10:55 +0100mrchampion(~mrchampio@38.18.109.23) (Ping timeout: 246 seconds)
2020-12-23 15:10:57 +0100 <kuribas> let formattedName | window == currentWindow = ...
2020-12-23 15:11:30 +0100 <kuribas> :t for
2020-12-23 15:11:31 +0100 <lambdabot> (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
2020-12-23 15:11:33 +0100 <kuribas> :t forM
2020-12-23 15:11:35 +0100 <lambdabot> (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
2020-12-23 15:11:59 +0100 <kuribas> ADG1089__: use for instead of forM
2020-12-23 15:12:01 +0100Darwin226(5fa878fa@95.168.120.250)
2020-12-23 15:12:25 +0100 <kuribas> and pure instead of return
2020-12-23 15:12:44 +0100 <majjoha> kuribas: I'd normally do the same but I thought that it might be easier to reason about the code if they were extracted to variables. In the REPL, it seems that foldl and foldl' have the same type signatures. Can you elaborate on how they differ? :-)
2020-12-23 15:13:00 +0100 <Darwin226> Does anyone know what the current timeline for GHC 9 looks like? Wiki says a final release is planned for tomorrow. Have there already been release candidates?
2020-12-23 15:13:01 +0100 <fuzzypixelz> I've been looking for Megaparsec tutorials for a few hours now and almost all of them are outdated
2020-12-23 15:13:02 +0100 <kuribas> majjoha: foldl' is strict in the accumulator
2020-12-23 15:13:20 +0100kritzefitz(~kritzefit@fw-front.credativ.com)
2020-12-23 15:13:22 +0100 <merijn> kuribas: That's foldl from RIO, not sure if that one is lazy or strict
2020-12-23 15:13:25 +0100 <fuzzypixelz> Everything is fine and dandy until I have to use their imports
2020-12-23 15:13:49 +0100 <fuzzypixelz> apparently there was a Text.Megaparsec.String but not anymore
2020-12-23 15:13:51 +0100 <merijn> oh, RIO also has lazy foldl, that's dumb
2020-12-23 15:14:11 +0100Feuermagier(~Feuermagi@213.178.26.41)
2020-12-23 15:14:14 +0100 <kuribas> indeed
2020-12-23 15:14:16 +0100 <merijn> Darwin226: There have been candidates, but I wouldn't hold my breath for tomorrow :p
2020-12-23 15:14:40 +0100 <kuribas> majjoha: foldl is lazy in the accumulator which is never what you want
2020-12-23 15:14:46 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 246 seconds)
2020-12-23 15:14:59 +0100 <Darwin226> merijn: Cool. If you had to guess, when would you expect a release?
2020-12-23 15:15:36 +0100 <majjoha> I just checked the RIO documentation and it seems to have both so I should probably consider replacing it with foldl'. Thanks for the suggestion, kuribas.
2020-12-23 15:15:55 +0100mrchampion(~mrchampio@38.18.109.23)
2020-12-23 15:18:27 +0100 <merijn> Darwin226: Anywhere between now and May? xD
2020-12-23 15:18:28 +0100ij(~ij@NixOS/user/siers)
2020-12-23 15:18:47 +0100bitmapper(uid464869@gateway/web/irccloud.com/x-smcwgzrhebufmvup)
2020-12-23 15:19:00 +0100zzaaqq(3de72001@61-231-32-1.dynamic-ip.hinet.net)
2020-12-23 15:19:03 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 15:19:04 +0100 <ij> I need a constant size NxN matrix with fast lookup and mutations – what data type should I use? it's going to be a maze solver
2020-12-23 15:19:05 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 240 seconds)
2020-12-23 15:20:07 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 15:20:32 +0100hiroaki(~hiroaki@2a02:810b:c63f:eea0::3) (Ping timeout: 268 seconds)
2020-12-23 15:20:47 +0100 <kuribas> ij: matrix? https://hackage.haskell.org/package/matrices
2020-12-23 15:21:05 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-12-23 15:21:43 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:438:f47:3e76:14d7) (Ping timeout: 272 seconds)
2020-12-23 15:22:17 +0100Lycurgus(~niemand@cpe-45-46-137-210.buffalo.res.rr.com) (Quit: Exeunt)
2020-12-23 15:22:31 +0100exodrifter(~exodrifte@cpe-173-172-173-93.tx.res.rr.com)
2020-12-23 15:23:19 +0100 <ij> I was looking at this package, but I'm not sure whether the mutation API is simple enough
2020-12-23 15:23:43 +0100 <ij> I actually need copies, I don't want to mutate in place. I guess that is the wrong word to use then
2020-12-23 15:24:06 +0100jamm(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-12-23 15:24:52 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 15:25:00 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Ping timeout: 272 seconds)
2020-12-23 15:25:43 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 15:26:21 +0100exodrifter(~exodrifte@cpe-173-172-173-93.tx.res.rr.com) (Client Quit)
2020-12-23 15:26:42 +0100exodrifter(~exodrifte@cpe-173-172-173-93.tx.res.rr.com)
2020-12-23 15:26:53 +0100 <kuribas> ij: you could also consider using a Map instead.
2020-12-23 15:27:12 +0100 <kuribas> Map (Int, Int) Wathever
2020-12-23 15:27:15 +0100okad(~okad@ec2-18-135-78-237.eu-west-2.compute.amazonaws.com)
2020-12-23 15:27:58 +0100gawen(~gawen@movzbl.root.sx) (Quit: cya)
2020-12-23 15:28:27 +0100gawen(~gawen@movzbl.root.sx)
2020-12-23 15:28:48 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:5526:7bff:8975:9331)
2020-12-23 15:29:17 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 15:29:22 +0100 <Rembane> ij: What to choose depends on how sparse or dense the matrix is.
2020-12-23 15:30:00 +0100 <ij> all rows filled, it's going to be NxM (sorry, not NxN as said previously :/)
2020-12-23 15:30:06 +0100Darwin226(5fa878fa@95.168.120.250) (Remote host closed the connection)
2020-12-23 15:30:27 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2020-12-23 15:31:03 +0100 <kuribas> if you need fast incremental update, a map can be still useful.
2020-12-23 15:31:32 +0100 <ij> maybe, but I know it will have to solve big mazes after it tackles the small ones
2020-12-23 15:31:57 +0100 <kuribas> ij: anyway, the matrices packages support immutable matrices as well.
2020-12-23 15:32:10 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 15:33:05 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl)
2020-12-23 15:33:15 +0100 <ij> but it seems like I have to create a new one with each update – there's not going to be any sharing then, is there?
2020-12-23 15:33:52 +0100 <ij> Data.Matrix from package `matrix' has a set function, so maybe I'll try that
2020-12-23 15:36:24 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-12-23 15:37:53 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-euoarczklgynbawz)
2020-12-23 15:42:04 +0100ddellacosta(dd@gateway/vpn/mullvad/ddellacosta)
2020-12-23 15:42:19 +0100hiroaki(~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
2020-12-23 15:45:14 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 15:47:55 +0100 <solonarv> it does have a 'set' function but that one will copy the entire matrix
2020-12-23 15:48:20 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
2020-12-23 15:48:44 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net)
2020-12-23 15:49:58 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Ping timeout: 260 seconds)
2020-12-23 15:50:00 +0100geekosaur(ac3a3bc9@172.58.59.201) (Remote host closed the connection)
2020-12-23 15:53:25 +0100zzaaqq(3de72001@61-231-32-1.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2020-12-23 15:54:08 +0100justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-12-23 15:54:18 +0100leothrix(~leothrix@elastic/staff/leothrix) (Quit: ZNC 1.7.5 - https://znc.in)
2020-12-23 15:56:17 +0100leothrix(~leothrix@elastic/staff/leothrix)
2020-12-23 15:56:27 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-12-23 15:56:49 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 16:00:30 +0100nyd(~nyd@unaffiliated/elysian)
2020-12-23 16:01:15 +0100son0p(~son0p@181.136.122.143) (Quit: leaving)
2020-12-23 16:01:57 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
2020-12-23 16:03:01 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 16:03:42 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 16:04:27 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 16:04:45 +0100ridcully(~ridcully@pd951f4de.dip0.t-ipconnect.de) (Quit: server update)
2020-12-23 16:05:32 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 16:06:11 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 16:07:04 +0100superstar64(6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net)
2020-12-23 16:07:09 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de)
2020-12-23 16:07:40 +0100 <superstar64> is it possible to use scott encoding with linear types?
2020-12-23 16:08:01 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Ping timeout: 268 seconds)
2020-12-23 16:08:20 +0100 <superstar64> for sum types, in a way that `\x -> f (\ .. x) (\ ... x)` works
2020-12-23 16:09:15 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net)
2020-12-23 16:09:32 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:268a:d573:fb76:8521) (Ping timeout: 260 seconds)
2020-12-23 16:10:25 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds)
2020-12-23 16:11:43 +0100ddellacosta(dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
2020-12-23 16:11:52 +0100bthom(~bthom@2601:184:4700:b89:abdc:f6d7:f8b7:16e2) (Ping timeout: 260 seconds)
2020-12-23 16:14:41 +0100SeasonsBeatingsgrumble
2020-12-23 16:15:25 +0100jespada(~jespada@90.254.245.49) (Ping timeout: 240 seconds)
2020-12-23 16:16:41 +0100boothead(25192c87@37.25.44.135)
2020-12-23 16:17:06 +0100jespada(~jespada@90.254.245.49)
2020-12-23 16:17:17 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
2020-12-23 16:17:31 +0100 <boothead> nh2 are you still working on static-haskell-nix? (Hi by the way) :-)
2020-12-23 16:18:20 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.0)
2020-12-23 16:21:03 +0100plutoniix(~q@node-uov.pool-125-24.dynamic.totinternet.net)
2020-12-23 16:22:42 +0100fendor_(~fendor@178.165.130.229.wireless.dyn.drei.com)
2020-12-23 16:24:13 +0100sgibber2018(~arch-gibb@208.85.237.137) (Ping timeout: 264 seconds)
2020-12-23 16:25:34 +0100fendor(~fendor@178.165.130.57.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2020-12-23 16:27:04 +0100al3x27(~plovs@85.254.75.199) (Quit: WeeChat 2.9)
2020-12-23 16:27:12 +0100chang(~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
2020-12-23 16:27:22 +0100al3x27(~plovs@85.254.75.199)
2020-12-23 16:28:21 +0100Entertainment(~entertain@104.246.132.210)
2020-12-23 16:28:41 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-12-23 16:29:14 +0100vikfret(~vikfret@2806:2f0:90e1:6afe:d1fc:fdcb:aaa3:aab6) (Read error: Connection reset by peer)
2020-12-23 16:30:14 +0100toorevitimirp(~tooreviti@117.182.182.252) (Remote host closed the connection)
2020-12-23 16:31:44 +0100ridcully(~ridcully@pd951f4de.dip0.t-ipconnect.de)
2020-12-23 16:33:10 +0100nbloomf(~nbloomf@ip68-110-248-64.ks.ks.cox.net)
2020-12-23 16:33:35 +0100nyaominnyaomi
2020-12-23 16:33:56 +0100justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds)
2020-12-23 16:36:05 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 240 seconds)
2020-12-23 16:37:41 +0100devalot(~ident@mail.pmade.com) ("ERC (IRC client for Emacs 27.1)")
2020-12-23 16:37:53 +0100robotmay(~beepboop@2001:8b0:7af0:2580:a48c:ccf9:aef1:cb86) (Remote host closed the connection)
2020-12-23 16:38:06 +0100jonatanb(~jonatanb@83.24.25.27.ipv4.supernova.orange.pl)
2020-12-23 16:39:12 +0100robotmay(~beepboop@2001:8b0:7af0:2580:9553:dae8:6cf1:18d0)
2020-12-23 16:43:12 +0100berberman_(~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in)
2020-12-23 16:43:14 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2020-12-23 16:43:33 +0100berberman(~berberman@unaffiliated/berberman)
2020-12-23 16:44:44 +0100berberman(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2020-12-23 16:45:33 +0100berberman(~berberman@unaffiliated/berberman)
2020-12-23 16:46:26 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-12-23 16:47:03 +0100chang(~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 16:47:52 +0100fuzzypixelz(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2020-12-23 16:47:58 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 16:48:03 +0100gxt(~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
2020-12-23 16:48:47 +0100gxt(~gxt@gateway/tor-sasl/gxt)
2020-12-23 16:50:44 +0100hseg(~gesh@IGLD-84-228-238-87.inter.net.il)
2020-12-23 16:51:37 +0100hseg(~gesh@IGLD-84-228-238-87.inter.net.il) (Client Quit)
2020-12-23 16:53:05 +0100jonatanb(~jonatanb@83.24.25.27.ipv4.supernova.orange.pl) (Quit: Leaving...)
2020-12-23 16:53:18 +0100nbloomf(~nbloomf@ip68-110-248-64.ks.ks.cox.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 16:55:37 +0100xff0x_(~fox@2001:1a81:53e9:2700:db3b:366e:c891:aec7) (Ping timeout: 260 seconds)
2020-12-23 16:55:59 +0100eacameron(uid256985@gateway/web/irccloud.com/x-xmnchykalzjujusu)
2020-12-23 16:56:02 +0100xff0x_(~fox@2001:1a81:53e9:2700:9d00:b502:3966:f8c0)
2020-12-23 16:57:48 +0100petersen(~petersen@redhat/juhp)
2020-12-23 16:58:23 +0100exodrifter(~exodrifte@cpe-173-172-173-93.tx.res.rr.com) (Quit: Leaving.)
2020-12-23 17:01:06 +0100shaprreads the Map, but is still lost
2020-12-23 17:01:35 +0100 <Rembane> shapr: Are you perhaps too Set in your ways?
2020-12-23 17:01:52 +0100 <shapr> not sure if I approve of this Sequence of jokes
2020-12-23 17:02:03 +0100rayyyy(~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds)
2020-12-23 17:02:35 +0100 <Rembane> If you want to, I can List them instead.
2020-12-23 17:03:21 +0100 <shapr> I fold, this is getting too silly.
2020-12-23 17:03:38 +0100 <xerox_> this got close to be de-Void of an end
2020-12-23 17:03:43 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 17:04:05 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 17:04:08 +0100 <sm[m]> don't give up, you'll be Vectorious in the end
2020-12-23 17:04:13 +0100shaprlaughs
2020-12-23 17:04:37 +0100ADG1089__(~aditya@122.163.225.112) (Remote host closed the connection)
2020-12-23 17:04:39 +0100petersen(~petersen@redhat/juhp) (Ping timeout: 260 seconds)
2020-12-23 17:04:48 +0100 <Rembane> I can see an Array of hope!
2020-12-23 17:05:23 +0100 <shapr> this is one way to Reduce the seriousness of this channel.
2020-12-23 17:05:33 +0100 <xerox_> I was wrong, there seem to be no Endo in sight
2020-12-23 17:05:35 +0100rayyyy(~nanoz@gateway/tor-sasl/nanoz)
2020-12-23 17:06:12 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 17:06:23 +0100 <shapr> Is there some Alternative to these jokes?
2020-12-23 17:06:37 +0100 <xerox_> maybe not Type-ing them
2020-12-23 17:06:40 +0100danso(~dan@69-165-210-185.cable.teksavvy.com)
2020-12-23 17:06:44 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 17:06:55 +0100 <tomsmeding> but that would mean Return'ing to normality
2020-12-23 17:07:02 +0100 <tomsmeding> which is Pure nonsense
2020-12-23 17:07:07 +0100cosimone(~cosimone@5.170.240.2) (Ping timeout: 246 seconds)
2020-12-23 17:07:08 +0100 <shapr> I guess this is a Symbol of our humor.
2020-12-23 17:07:28 +0100 <sm[m]> I think we're just String-ing this along
2020-12-23 17:07:42 +0100 <xerox_> it's not the First nor the Last time this happens
2020-12-23 17:08:01 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-12-23 17:08:27 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Ping timeout: 268 seconds)
2020-12-23 17:08:50 +0100 <xerox_> did y'all finish your TypeRep ertoire?
2020-12-23 17:09:26 +0100hseg(~gesh@IGLD-84-228-238-87.inter.net.il)
2020-12-23 17:09:34 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Ping timeout: 265 seconds)
2020-12-23 17:09:40 +0100boxscape(4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)
2020-12-23 17:10:16 +0100qwerty(~tema@217.118.92.215) (Ping timeout: 240 seconds)
2020-12-23 17:10:20 +0100 <xerox_> Either it's de Functor someone will come up with another
2020-12-23 17:10:24 +0100boxscape(4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Client Quit)
2020-12-23 17:10:35 +0100boxscape(4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)
2020-12-23 17:10:39 +0100borne(~fritjof@200116b86409cb00c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-12-23 17:10:54 +0100acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-12-23 17:11:01 +0100 <shapr> I'm using humor to curry favor.
2020-12-23 17:11:16 +0100saep(~saep@94.31.86.216)
2020-12-23 17:11:39 +0100 <boxscape> I saw in a mailing list tail defined in terms of foldr as `tail' l = foldr (\_ _ (_:ys) -> ys) id l l`. That seems like cheating though - it's using \(_:ys) -> ys, which is basically tails defined in terms of pattern matching. So this wouldn't work if you only had access to the church encoding of lists. Is there a way to do this without using
2020-12-23 17:11:40 +0100 <boxscape> pattern matching?
2020-12-23 17:11:44 +0100 <tomsmeding> some of these jokes are Confusing
2020-12-23 17:11:48 +0100 <boxscape> s/tails/tail
2020-12-23 17:11:55 +0100 <sm[m]> I think we've made a Hash of this
2020-12-23 17:11:55 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 272 seconds)
2020-12-23 17:11:58 +0100 <tomsmeding> have to View them through the Right Lens
2020-12-23 17:12:19 +0100 <Rembane> I wonder if there are any puns Left now.
2020-12-23 17:12:29 +0100 <sm[m]> the Optics are bad
2020-12-23 17:12:33 +0100 <xerox_> hahah
2020-12-23 17:13:43 +0100 <superstar64> boxscape, maybe try scott encoding if you can instead
2020-12-23 17:14:22 +0100 <superstar64> then it would be `tail list = list (error "lol') (\_ xs -> xs)`
2020-12-23 17:14:45 +0100 <boxscape> superstar64 this started because I was trying to figure out how to write the scott encoding in terms of the church encoding, which seems very similar to defining tail
2020-12-23 17:14:55 +0100 <superstar64> oh
2020-12-23 17:15:12 +0100 <dolio> boxscape: There are ways, but they either involve weird types or don't perform very well.
2020-12-23 17:15:22 +0100 <boxscape> dolio I'm okay with that :)
2020-12-23 17:16:13 +0100 <superstar64> are there any papers that compare linearity on the arrow vs linearity on the kind?
2020-12-23 17:16:20 +0100 <superstar64> and uniqueness types vs linear types?
2020-12-23 17:16:25 +0100magma(~magma@host-79-22-138-220.retail.telecomitalia.it) (Quit: bye)
2020-12-23 17:16:33 +0100 <sm[m]> xerox_++, "... de Functor ..." 😆
2020-12-23 17:16:34 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-12-23 17:17:03 +0100cosimone(~cosimone@93-47-228-249.ip115.fastwebnet.it)
2020-12-23 17:17:10 +0100 <superstar64> is linearity on the kind and uniqueness types the same thing?
2020-12-23 17:17:23 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38)
2020-12-23 17:17:26 +0100 <dolio> boxscape: The way without weird types is to rebuild the entire list with one less element.
2020-12-23 17:17:38 +0100 <superstar64> the linear haskell paper has a small section on this, but i'm wondering if there's any more
2020-12-23 17:18:05 +0100 <dolio> Uniqueness types are not the same as any kind of linearity.
2020-12-23 17:18:52 +0100 <hseg> hi. context is http://ix.io/2Jhn. trying to keep only keys k s.t. embed p k is in keysSet (ds p), mapping k to embed p k for the minimal p for which this is true
2020-12-23 17:19:34 +0100o1lo01ol1o(~o1lo01ol1@92.250.37.12) (Remote host closed the connection)
2020-12-23 17:19:44 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 17:19:45 +0100 <dolio> boxscape: The other possibility is to come with some non-strictly positive type to fold into. But I don't know what exactly it should look like for tail.
2020-12-23 17:19:55 +0100 <hseg> unfortunately, the implementation i give expands such k to (`embed` k) <$> [p..w'] for such p
2020-12-23 17:20:01 +0100 <superstar64> dolio what's the difference then?
2020-12-23 17:20:16 +0100 <hseg> help getting this into shape?
2020-12-23 17:20:20 +0100 <boxscape> dolio I see. I think I figured out the first way.. tail' l = fst $ foldr (\x (_, xs) -> (xs, x:xs)) (error "no", []) l
2020-12-23 17:20:36 +0100 <dolio> The non-strictly positive one might be able to avoid rebuilding the list.
2020-12-23 17:20:59 +0100 <boxscape> what is a strictly positive type?
2020-12-23 17:22:17 +0100tomboy64(~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection)
2020-12-23 17:22:24 +0100 <dolio> Strictly positive means that the type being defined only occurs to the right of arrows in its fields' types.
2020-12-23 17:22:31 +0100 <boxscape> I see
2020-12-23 17:23:30 +0100 <dolio> So, like, `newtype Hyper a b = H ((Hyper a b -> b) -> a)` is positive, because it occurs to the left of two nested arrows, but not strictly positive.
2020-12-23 17:23:59 +0100shf(~sheaf@2a01:cb19:80cc:7e00:a9e0:e776:ec99:db91) (Read error: Connection reset by peer)
2020-12-23 17:24:09 +0100 <hseg> hrm.. in fact, it seems what i want is a mapKeysMaybe :: (k -> Maybe l) -> Map k v -> Map l v
2020-12-23 17:24:15 +0100 <boxscape> okay
2020-12-23 17:25:08 +0100 <tomsmeding> hseg: Data.Map.Strict.alter ?
2020-12-23 17:25:11 +0100christo(~chris@81.96.113.213)
2020-12-23 17:25:12 +0100 <boxscape> sounds like.. a type that is covariant in all of its parameters would be strictly positive
2020-12-23 17:25:17 +0100 <tomsmeding> oh sorry keys
2020-12-23 17:25:25 +0100 <hseg> yeah...
2020-12-23 17:25:38 +0100 <hseg> once i have such a combinator the rest is pretty easy
2020-12-23 17:25:43 +0100 <tomsmeding> you aren't going to be able to do that any more performantly than going via a list though
2020-12-23 17:25:53 +0100 <tomsmeding> unless you know that your k -> Maybe l function is monotonic
2020-12-23 17:26:30 +0100 <tomsmeding> (meaning that x <= y <-> f x <= f y)
2020-12-23 17:26:30 +0100 <solonarv> boxscape: other way around. a strictly positive type must be covariant, but e.g. 'newtype Cont r a = Cont ((a -> r) -> r)' is not strictly positive but still covariant
2020-12-23 17:26:31 +0100 <dolio> boxscape: No.
2020-12-23 17:26:35 +0100fradet(~pi@216.252.75.247) (Read error: Connection reset by peer)
2020-12-23 17:26:53 +0100 <boxscape> oh, okay
2020-12-23 17:26:54 +0100 <hseg> ... not really -- it finds the minimal p such that embed p k `elem` keysSet (ds p) and maps k to embed p k
2020-12-23 17:27:00 +0100 <dolio> boxscape: A 'positive' type is a fixed point of a covariant functor. Strictly positive is an even stronger condition than covariant.
2020-12-23 17:27:09 +0100 <boxscape> I see
2020-12-23 17:27:16 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 17:27:21 +0100 <tomsmeding> hseg: I'm talking about that mapKeysMaybe you proposed
2020-12-23 17:28:04 +0100 <hseg> yeah... i'm saying that under these constraints, I wouldn't be able to use mapKeysMaybe
2020-12-23 17:28:21 +0100 <justsomeguy> (Please ignore that -- wrong channel.)
2020-12-23 17:29:00 +0100 <tomsmeding> :t \f -> M.fromList . catMaybes . map (\(k,v) -> (,v) <$> f k) . M.assocs
2020-12-23 17:29:02 +0100 <lambdabot> Ord k => (t -> Maybe k) -> M.Map t a -> M.Map k a
2020-12-23 17:29:08 +0100 <tomsmeding> ¯\_(ツ)_/¯
2020-12-23 17:29:37 +0100christo(~chris@81.96.113.213) (Ping timeout: 256 seconds)
2020-12-23 17:29:47 +0100 <hseg> hrm. for hashmaps this might be doable
2020-12-23 17:29:51 +0100 <tomsmeding> hseg: if you knew f was monotonic, you could use fromAscList instead of fromList there
2020-12-23 17:30:01 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2020-12-23 17:30:34 +0100 <hseg> and considering that i don't really care about accessing keys in order, hashmaps might work for my usecase
2020-12-23 17:31:09 +0100tomboy64(~tomboy64@gateway/tor-sasl/tomboy64)
2020-12-23 17:31:54 +0100 <justsomeguy> hyiltiz: Nevermind; I'll make it work. Sorry for the trouble.
2020-12-23 17:32:34 +0100Ariakenom_(~Ariakenom@2001:9b1:efb:fc00:e4fe:4113:e091:bcc)
2020-12-23 17:35:05 +0100ulidtko|k(~ulidtko@194.54.80.38) (Ping timeout: 240 seconds)
2020-12-23 17:35:17 +0100 <boxscape> okay I managed to do the scott encoding, too -- scott cons nil l = snd . foldr (\x (xs, _) -> (x:xs, cons x xs)) ([], nil)
2020-12-23 17:35:28 +0100 <boxscape> (the inefficient version, anyway)
2020-12-23 17:36:36 +0100 <dolio> I'm not really certain there is an efficient version, even with weird types.
2020-12-23 17:36:37 +0100Ariakenom(~Ariakenom@2001:9b1:efb:fc00:85c1:dfba:129c:d7ca) (Quit: Leaving)
2020-12-23 17:37:20 +0100 <dolio> There might be an efficient version with an actual Church encoding.
2020-12-23 17:37:24 +0100hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-12-23 17:37:42 +0100ulidtko|k(~ulidtko@193.111.48.79)
2020-12-23 17:38:44 +0100 <dolio> If you're realizing to lists, though, there's not as much room to play tricks.
2020-12-23 17:39:08 +0100 <boxscape> hm, okay
2020-12-23 17:39:49 +0100ulidtko|kk(~ulidtko@194.54.80.38)
2020-12-23 17:41:23 +0100 <boxscape> solonarv isn't Cont only covariant in a, not in r?
2020-12-23 17:41:43 +0100hekkaidekapus](~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-12-23 17:42:22 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 268 seconds)
2020-12-23 17:42:26 +0100ulidtko|k(~ulidtko@193.111.48.79) (Ping timeout: 265 seconds)
2020-12-23 17:43:33 +0100justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
2020-12-23 17:43:33 +0100justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
2020-12-23 17:43:33 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-12-23 17:43:46 +0100 <solonarv> boxscape: yes, I meant to specify "in a" but forgot
2020-12-23 17:44:08 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.7.1)
2020-12-23 17:44:16 +0100 <boxscape> solonarv it seems like that wouldn't be a counter-example to what I said, then, since I said "covariant in *all* of its parameters"
2020-12-23 17:44:27 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net)
2020-12-23 17:44:43 +0100 <solonarv> I could easily have replaced 'r' with, say, 'Int' or whatever
2020-12-23 17:45:20 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 17:45:21 +0100 <boxscape> hmm
2020-12-23 17:45:28 +0100kritzefitz(~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-12-23 17:45:49 +0100bitmagie(~Thunderbi@200116b806efa400c8baafc3789c3ca0.dip.versatel-1u1.de)
2020-12-23 17:45:52 +0100 <boxscape> right I confused recursive use of the type with use of a type parameter
2020-12-23 17:45:56 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Client Quit)
2020-12-23 17:46:05 +0100 <dolio> Anyhow, the thing I'm familiar with is doing zip more efficiently, and that is worse than tail in itself, because what happens there is that you need to do repeated rebuilds of one list based on the other, I think. The weird type solves that.
2020-12-23 17:46:34 +0100 <boxscape> ok
2020-12-23 17:46:58 +0100 <dolio> So it might be more like thinking about how to do `drop` efficiently on both a Church numeral and a Church list.
2020-12-23 17:47:08 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 17:47:21 +0100 <dolio> And tail can't really be significantly more efficient.
2020-12-23 17:47:38 +0100geekosaur(42d52137@66.213.33.55)
2020-12-23 17:47:45 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 17:47:45 +0100 <boxscape> I see
2020-12-23 17:47:58 +0100 <dolio> It's only sequences of tails that could be.
2020-12-23 17:48:19 +0100justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
2020-12-23 17:48:19 +0100justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
2020-12-23 17:48:19 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-12-23 17:48:32 +0100 <fuzzypixelz> https://markkarpov.com/tutorial/megaparsec.html
2020-12-23 17:48:48 +0100 <fuzzypixelz> Is an exellent Megaparsec tutorial
2020-12-23 17:49:04 +0100 <dolio> Because the 'rebuild' strategy makes n tails do n² work.
2020-12-23 17:49:10 +0100 <fuzzypixelz> Huge thanks to the author
2020-12-23 17:49:22 +0100 <boxscape> yeah that makes sense
2020-12-23 17:49:29 +0100 <gentauro> I wish somebody renamed MegaParsec to MegaTron
2020-12-23 17:49:41 +0100 <gentauro> and the GHC Marge-Bot to Bot-tom
2020-12-23 17:50:03 +0100 <gentauro> Bot-Tom is the correct name
2020-12-23 17:50:31 +0100kam1(~kam1@24.231.108.143)
2020-12-23 17:52:12 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 256 seconds)
2020-12-23 17:56:04 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.0)
2020-12-23 17:57:09 +0100elisper(uid468625@gateway/web/irccloud.com/x-gymqncrzgoacrejr)
2020-12-23 17:57:13 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 17:57:29 +0100 <ocharles> Does anyone know if it's possible to use Cabal's "mixins" to rename a signature? I want to `build-depends: monad-signature` and then `mixins: monad-signature (Control.Monad.Sig as MyMonad)`, but Cabal complains there's no exposed module called Control.Monad.Sig (correct, it's a signature, not a module)
2020-12-23 17:58:19 +0100 <ocharles> I want to do this because I might want to duplicate a signature into two places - e.g., MyMonad1 and MyMonad2 are both the same as Control.Monad.Sig
2020-12-23 17:59:48 +0100 <ocharles> Ah! You use "requires" to rename signatures
2020-12-23 18:00:11 +0100cybersyn(~user@115.79.31.1)
2020-12-23 18:00:17 +0100cybersyn(~user@115.79.31.1) (Quit: ERC (IRC client for Emacs 27.1))
2020-12-23 18:00:21 +0100 <dcoutts> ocharles: I'm glad you figured it out, 'coz I've no idea! :-)
2020-12-23 18:00:27 +0100 <ocharles> :)
2020-12-23 18:00:50 +0100 <dcoutts> but I'm glad to see you're exercising the feature :-)
2020-12-23 18:01:33 +0100 <ocharles> Trying to see if I can squeeze out a little Christmas blog post in the next few days - everyone likes a bit of Backpack stuff
2020-12-23 18:01:48 +0100 <dcoutts> nice
2020-12-23 18:02:04 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2020-12-23 18:03:33 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 18:05:58 +0100 <fuzzypixelz> ok bear with me, why do we need Functors when we can just bind to a function
2020-12-23 18:06:38 +0100superstar64(6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection)
2020-12-23 18:06:41 +0100concept2(~concept2@unaffiliated/tubo) (Quit: See ya later!)
2020-12-23 18:06:57 +0100 <fuzzypixelz> certainly the function we will use with Functor is going to have a different type sig than the one we use with bind
2020-12-23 18:07:27 +0100 <fuzzypixelz> a -> b vs. a -> m b
2020-12-23 18:07:57 +0100 <dcoutts> fuzzypixelz: you mean why do we have fmap f x, when we could just use x >>= return . f ?
2020-12-23 18:08:01 +0100 <geekosaur> there are more Functors than Monads
2020-12-23 18:08:03 +0100 <fuzzypixelz> dcoutts: yes
2020-12-23 18:08:11 +0100 <dcoutts> ok, then what geekosaur said
2020-12-23 18:08:21 +0100 <bitmapper> agh i don't have the free disk space to use stack
2020-12-23 18:08:23 +0100kupi(uid212005@gateway/web/irccloud.com/x-ejbvangncrpxemxc)
2020-12-23 18:08:53 +0100matryoshka(~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 268 seconds)
2020-12-23 18:08:55 +0100 <dcoutts> All instances of Monad are in Functor, but not the other way around. There are things that are functors but are not monads (or even Applicative).
2020-12-23 18:09:24 +0100 <kupi> which is more widely use in the Haskell community? & and >>> from vanilla haskell or |> and .> from the flow package?
2020-12-23 18:09:34 +0100 <dcoutts> fuzzypixelz: it's one of these hierarchy of abstraction things
2020-12-23 18:09:43 +0100matryoshka(~matryoshk@184.75.223.227)
2020-12-23 18:09:52 +0100 <geekosaur> this might be a good time to recommend the Typeclassopedia
2020-12-23 18:10:03 +0100 <merijn> kupi: I've never even heard of the flow package, tbh :p
2020-12-23 18:10:32 +0100 <merijn> kupi: & is used with lens a lot, >>> basically never
2020-12-23 18:10:38 +0100 <kupi> merijn: i have never seen & and >>> used besides in my code tbh :D
2020-12-23 18:10:45 +0100matryoshka(~matryoshk@184.75.223.227) (Client Quit)
2020-12-23 18:11:19 +0100 <boxscape> & is used a lot with lens
2020-12-23 18:11:30 +0100concept2(~concept2@unaffiliated/tubo)
2020-12-23 18:11:32 +0100 <boxscape> oh
2020-12-23 18:11:32 +0100matryoshka(~matryoshk@184.75.223.227)
2020-12-23 18:11:36 +0100 <boxscape> merijn already said as much
2020-12-23 18:11:41 +0100 <kupi> also there is <&> so getting used to & pays off well
2020-12-23 18:11:48 +0100 <dcoutts> kupi: I've been writing Haskell for 20 years and I think never used any of those.
2020-12-23 18:12:23 +0100matryoshka(~matryoshk@184.75.223.227) (Client Quit)
2020-12-23 18:12:31 +0100ddellacosta(dd@gateway/vpn/mullvad/ddellacosta)
2020-12-23 18:12:37 +0100 <kupi> so I should get used to right to left composition and write code that way?
2020-12-23 18:12:47 +0100matryoshka(~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
2020-12-23 18:13:04 +0100 <merijn> kupi: Probably, because you'll encounter a lot like that :)
2020-12-23 18:13:11 +0100 <c_wraith> It's not so hard to get used to the identifiers being in the exact same order as they would be otherwise
2020-12-23 18:13:13 +0100 <kupi> it's really weird for me i have to read the function names from right to left but the read the calls from left to right
2020-12-23 18:13:30 +0100 <c_wraith> Is it hard to read foo (bar (baz x))?
2020-12-23 18:13:41 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 18:13:58 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2020-12-23 18:14:28 +0100 <kupi> c_wraith: compared to "x & baz & bar & foo" and "baz >>> bar >>> foo" i think yes
2020-12-23 18:14:36 +0100 <c_wraith> also... in Haskell, foo is the first function called there anyway. bar is only called if foo analyzes its argument
2020-12-23 18:15:00 +0100 <dcoutts> kupi: yes, it's worth just getting used to. Don't think about order of "doing calls", but what is being computed.
2020-12-23 18:15:10 +0100 <merijn> kupi: I think you'll find a lot of people confused by that style :)
2020-12-23 18:15:23 +0100 <kupi> i know that's not the case because of lazy evaluation
2020-12-23 18:15:37 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl)
2020-12-23 18:16:01 +0100 <tomsmeding> I find myself reading (.) pipelines from right to left too
2020-12-23 18:16:04 +0100 <tomsmeding> you get used to it :p
2020-12-23 18:16:55 +0100 <tomsmeding> the fact that lazy evaluation reverses things somewhat is irrelevant to getting an understanding of what the code is intending to do, except for the most obscure special cases where the laziness matters in this
2020-12-23 18:18:04 +0100 <c_wraith> that doesn't seem obscure to me...
2020-12-23 18:18:07 +0100kritzefitz(~kritzefit@212.86.56.80)
2020-12-23 18:18:32 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl) (Remote host closed the connection)
2020-12-23 18:18:38 +0100 <c_wraith> The #1 way to prevent laziness from being a non-local problem is to pay attention to it locally.
2020-12-23 18:18:56 +0100erisco(~erisco@104-195-141-253.cpe.teksavvy.com)
2020-12-23 18:19:05 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl)
2020-12-23 18:19:30 +0100 <fuzzypixelz> dcoutts: so it's Monad < Functor < Applicative ?
2020-12-23 18:19:59 +0100 <dcoutts> fuzzypixelz: nearly, Applicative comes between Functor and Monad
2020-12-23 18:20:18 +0100 <tomsmeding> c_wraith: just ~1 hour ago I posted this function composition here: \f -> M.fromList . catMaybes . map (\(k,v) -> (,v) <$> f k) . M.assocs
2020-12-23 18:20:43 +0100 <tomsmeding> there I definitely read right-to-left, and laziness certainly doesn't matter here in any important way
2020-12-23 18:20:47 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 18:20:57 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 18:21:04 +0100 <c_wraith> Import Data.Bifunctor, please!
2020-12-23 18:21:07 +0100 <c_wraith> :P
2020-12-23 18:21:07 +0100 <tomsmeding> this is the usual situation in my experience, but then the code I write is very computational :p
2020-12-23 18:21:11 +0100juuandyy(~juuandyy@90.166.144.65)
2020-12-23 18:21:30 +0100 <tomsmeding> as opposed to e.g. code that dives into the kmettiverse
2020-12-23 18:22:28 +0100 <tomsmeding> c_wraith: I honestly don't see how 'bimap' makes that code shorter, since there's the <$>
2020-12-23 18:22:35 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 18:22:43 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl) (Remote host closed the connection)
2020-12-23 18:22:49 +0100 <c_wraith> If you're not considering laziness there, that's very dangerous. The code happens to behave well, but you really should *know* that instead of getting lucky.
2020-12-23 18:22:56 +0100 <fuzzypixelz> Ah, then when people say "Applicative Functor" they just mean Applicative right?
2020-12-23 18:22:59 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl)
2020-12-23 18:23:10 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 18:23:29 +0100 <hseg> hrm. so hashmaps *could* help in my scenario, except unordered-containers provides no api for modifiying the keys. Though, if from/toList are fusable, could just implement my function in terms of [(k,v)] and wrap it in a hashmap iso
2020-12-23 18:23:29 +0100 <boxscape> fuzzypixelz yeah there's a lot of `<adjective> functor` classes that are just called `<adjective>`
2020-12-23 18:23:31 +0100 <c_wraith> `Applicative' is the type class for the idea of applicative functors
2020-12-23 18:23:36 +0100 <tomsmeding> c_wraith: there's a reason I use Data.Map.Strict, I guess?
2020-12-23 18:23:56 +0100encod3(~encod3@45-154-157-94.ftth.glasoperator.nl) (Client Quit)
2020-12-23 18:23:57 +0100 <tomsmeding> and Data.Map.Lazy only for, well, up until now only advent of code :p
2020-12-23 18:24:00 +0100 <c_wraith> tomsmeding: that's irrelevant
2020-12-23 18:24:09 +0100 <boxscape> or.. some, anyway
2020-12-23 18:24:27 +0100 <c_wraith> tomsmeding: that code functions identically with either.
2020-12-23 18:24:47 +0100 <c_wraith> Which is... again... one of those things you should know, rather than get lucky with
2020-12-23 18:24:53 +0100 <tomsmeding> fair point
2020-12-23 18:25:21 +0100 <boxscape> hm does "Biapplicative" stand for "biapplicative functor" or "biapplicative bifunctor"?
2020-12-23 18:25:40 +0100 <boxscape> oh I should just read the docs
2020-12-23 18:25:47 +0100 <boxscape> it says "biapplicative bifunctors"
2020-12-23 18:26:45 +0100 <c_wraith> tomsmeding: as to your other point... I can actually read it either way. "create a map from by removing the elements filtered out by this transformation on the keys"
2020-12-23 18:26:54 +0100 <c_wraith> -from
2020-12-23 18:27:35 +0100 <c_wraith> It sort of feels more operational to read right-to-left
2020-12-23 18:28:04 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 260 seconds)
2020-12-23 18:28:13 +0100 <tomsmeding> true; also this is very subjective :) In this case I find the operational reading helpful in understanding what the intention is. If I'd want to analyse how it actually performs, I'd I guess read left-to-right
2020-12-23 18:29:03 +0100 <tomsmeding> but point taken about laziness, I generally am aware of what I'm doing but I could be more aware :p
2020-12-23 18:29:29 +0100hackagepandoc-plot 1.0.1.0 - A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice. https://hackage.haskell.org/package/pandoc-plot-1.0.1.0 (LaurentRDC)
2020-12-23 18:30:00 +0100 <c_wraith> I did recently find a laziness thing that surprised me
2020-12-23 18:30:12 +0100CitizenSnips(~CitizenSn@irc.refl.club) (Quit: ZNC 1.8.2 - https://znc.in)
2020-12-23 18:30:50 +0100 <c_wraith> Mostly because I wrote the code, it worked, then I realized what that implied.
2020-12-23 18:30:53 +0100 <c_wraith> (lazy reasoning!)
2020-12-23 18:32:07 +0100 <c_wraith> The way containers does the lazy/strict split where the same type is used for both, the only difference is the behavior of the functions you import? Doesn't actually work with functions defined in a class
2020-12-23 18:33:36 +0100 <c_wraith> I used traverse over an IntMap, knowing I wanted it to be non-strict in the values. So I had imported Data.IntMap.Lazy. Only after it worked did I realize the import couldn't change the behavior of traverse as long as the types were the same
2020-12-23 18:35:18 +0100berberman_(~berberman@unaffiliated/berberman)
2020-12-23 18:35:43 +0100livvy(~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
2020-12-23 18:36:09 +0100berberman(~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2020-12-23 18:36:12 +0100 <tomsmeding> heh yes that's a nice trip-up, and an interesting conundrum if you actually wanted the strict behaviour
2020-12-23 18:36:29 +0100berberman_(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2020-12-23 18:36:56 +0100berberman(~berberman@unaffiliated/berberman)
2020-12-23 18:38:52 +0100jespada(~jespada@90.254.245.49) (Quit: Leaving)
2020-12-23 18:39:03 +0100ADG1089__(~aditya@122.163.225.112)
2020-12-23 18:39:47 +0100 <fuzzypixelz> I'm following along in a Megaparsec tutorial, and I found this expression: `(,,) <$> char 'a' <*> char 'b' <*> char 'c'` here char 'a' is of type Identity Char, question is: how does operator precedence work here?
2020-12-23 18:40:10 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 18:40:11 +0100 <c_wraith> all the operators are infixl 4
2020-12-23 18:40:21 +0100CitizenSnips(~CitizenSn@irc.refl.club)
2020-12-23 18:40:56 +0100 <c_wraith> basically, all the applicative sequencing operators are infixl 4, and that's important for understanding applicative parsers :)
2020-12-23 18:41:16 +0100 <fuzzypixelz> infixl 4 ?
2020-12-23 18:41:43 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 18:41:57 +0100 <c_wraith> ah. when you define an operator in Haskell, you can also define its associativity and precedence
2020-12-23 18:42:34 +0100 <c_wraith> infixl means they associate so the nesting is on the left. 4 is the precedence.
2020-12-23 18:43:26 +0100 <c_wraith> you can mix different operators with the same precedence as long as they associate the same direction
2020-12-23 18:44:38 +0100 <c_wraith> so that is parsed as (((,,) <$> char 'a') <*> char 'b') <*> char 'c'
2020-12-23 18:44:42 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Ping timeout: 260 seconds)
2020-12-23 18:45:04 +0100 <fuzzypixelz> c_wraith: oh I was just about to ask for parentheses :D
2020-12-23 18:45:34 +0100 <c_wraith> yeah, I knew they were important. just a bit slow to type on my phone :)
2020-12-23 18:46:07 +0100Franciman(~francesco@host-82-49-79-73.retail.telecomitalia.it) (Quit: Leaving)
2020-12-23 18:46:24 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-12-23 18:46:58 +0100cosimone(~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
2020-12-23 18:47:56 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-12-23 18:48:02 +0100Forlorn(~Forlorn@unaffiliated/forlorn) (Ping timeout: 264 seconds)
2020-12-23 18:48:29 +0100 <hseg> hrm. annoyingly, (,)'s functor/foldable/etc instances apply to its second parameter, so there's no convenient way of golfing (a -> Maybe b) -> (a,c) -> Maybe (b,c)
2020-12-23 18:49:54 +0100 <fuzzypixelz> Now I get it the first nested expression is of type m (Char -> Char -> (Char, Char, Char)) the next is m (Char -> (Char, Char, Char)) and the entire thing is indeed m (Char, Char, Char)
2020-12-23 18:50:40 +0100 <c_wraith> fwiw, these are what I think of as the applicative sequencing operators: (<$), (<$>), (<*>), (<*), and (*>). the first 4 are pretty common for me to chain together when writing an applicative parser. the last one is a sort of special case, and not usually used in big chains without parenthesis
2020-12-23 18:51:17 +0100 <ephemient> I end up with <$ or $> a good chunk of the time too
2020-12-23 18:51:39 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.7.1)
2020-12-23 18:51:51 +0100 <c_wraith> my list started with <$ :P
2020-12-23 18:52:24 +0100 <fuzzypixelz> right now I only know about <$> and <*>
2020-12-23 18:52:47 +0100 <c_wraith> those are the most important ones.
2020-12-23 18:52:58 +0100 <c_wraith> the others are just shortcuts for special cases
2020-12-23 18:53:08 +0100livvy(~livvy@gateway/tor-sasl/livvy)
2020-12-23 18:53:09 +0100 <boxscape> hseg use its Bifunctor and Bifoldable instances?
2020-12-23 18:53:25 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 18:54:13 +0100juuandyy(~juuandyy@90.166.144.65) (Ping timeout: 264 seconds)
2020-12-23 18:54:32 +0100ulidtko|k(~ulidtko@194.54.80.38)
2020-12-23 18:54:37 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 256 seconds)
2020-12-23 18:54:48 +0100Forlorn(~Forlorn@unaffiliated/forlorn)
2020-12-23 18:55:07 +0100mastarija_(~mastarija@93-136-165-235.adsl.net.t-com.hr) (Quit: Leaving)
2020-12-23 18:55:13 +0100ulidtko|kk(~ulidtko@194.54.80.38) (Read error: Connection reset by peer)
2020-12-23 18:56:04 +0100juuandyy(~juuandyy@90.166.144.65)
2020-12-23 18:57:43 +0100 <lyxia> that's biapplicative
2020-12-23 18:58:10 +0100 <lyxia> er, bitraversable
2020-12-23 18:58:30 +0100hackagebglib 3.0.0.0 - Implementation of the BGAPI serial protocol https://hackage.haskell.org/package/bglib-3.0.0.0 (tamasFabian)
2020-12-23 18:58:41 +0100 <boxscape> I suppose I should have said bifunctor/bifoldable/etc to stay with the pattern
2020-12-23 18:59:00 +0100 <hseg> ah, forgot about that, checking
2020-12-23 19:00:04 +0100geekosaur(42d52137@66.213.33.55) (Ping timeout: 245 seconds)
2020-12-23 19:00:48 +0100 <boxscape> % :t \(f :: a -> Maybe b) (p :: (a, c)) -> bitraverse f pure p
2020-12-23 19:00:48 +0100 <yahb> boxscape: (a -> Maybe b) -> (a, c) -> Maybe (b, c)
2020-12-23 19:01:25 +0100shf(~sheaf@2a01:cb19:80cc:7e00:2de3:1260:1cbd:fa3e)
2020-12-23 19:01:34 +0100 <boxscape> % :t bitraverse ?? pure
2020-12-23 19:01:34 +0100 <yahb> boxscape: (Bitraversable t, Applicative f) => (a1 -> f c) -> t a1 a2 -> f (t c a2)
2020-12-23 19:02:13 +0100 <boxscape> ^ hseg
2020-12-23 19:02:27 +0100jamm(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-12-23 19:02:31 +0100 <hseg> ty
2020-12-23 19:02:33 +0100 <fuzzypixelz> why is <*> only available to Applicatives?
2020-12-23 19:02:48 +0100 <fuzzypixelz> shouldn't functors also have it?
2020-12-23 19:03:09 +0100 <boxscape> fuzzypixelz there are functors that can't do it
2020-12-23 19:03:29 +0100 <fuzzypixelz> to me, it doesn't seem like <$> isn't much different than <*>
2020-12-23 19:04:06 +0100 <boxscape> apparently `data Const a b = Const a` is an example, I think
2020-12-23 19:04:45 +0100 <glguy> instance Monoid m => Applicative (Const m)
2020-12-23 19:05:06 +0100 <boxscape> ah, well, at least least for non-monoids then :)
2020-12-23 19:06:05 +0100jamm(~jamm@unaffiliated/jamm)
2020-12-23 19:06:13 +0100 <boxscape> fuzzypixelz this thread may be interesting to you https://stackoverflow.com/questions/7220436/good-examples-of-not-a-functor-functor-applicative-monad
2020-12-23 19:06:14 +0100 <fuzzypixelz> I take it it's simply the way the hierarchy was constructed? I mean, Functors _can_ contain functions?
2020-12-23 19:06:34 +0100 <tomsmeding> Is there a standard list of Functors-that-are-not-Applicatives, Applicatives-that-are-not-Monads, Foldables-that-are-not-Traversables, etc?
2020-12-23 19:06:58 +0100 <boxscape> fuzzypixelz yes, although the "container" point of view doesn't necessarily make sense for all functors
2020-12-23 19:07:38 +0100 <boxscape> fuzzypixelz `Const Int` for example is a functor, but a value `Const Int String` doesn't contain a String
2020-12-23 19:07:45 +0100 <boxscape> s/value/value of
2020-12-23 19:07:57 +0100 <hseg> hrm. examples there all fail Applicative due to not being able to write pure
2020-12-23 19:07:58 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-12-23 19:08:20 +0100 <hseg> but Apply lacks it -- does anyone have an example of a non-Apply?
2020-12-23 19:08:23 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 19:08:31 +0100 <fuzzypixelz> the way I see it: if they can "contain" functions then I should be able to use <*> on them
2020-12-23 19:08:42 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
2020-12-23 19:08:56 +0100nineonine(~nineonine@S01061cabc0b095f3.vf.shawcable.net)
2020-12-23 19:09:11 +0100 <boxscape> fuzzypixelz I wouldn't be surprised if all functors for which the "container" metaphor makes sense are, in fact, applicative functors
2020-12-23 19:09:26 +0100 <hseg> that is true - they're all representable
2020-12-23 19:09:57 +0100 <hseg> all "container" functors are isomorphic to a functor ((->) s) for s some type of shapes
2020-12-23 19:10:14 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net)
2020-12-23 19:10:28 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 272 seconds)
2020-12-23 19:10:36 +0100 <hseg> ... wait, no, that's wrong. mixing up intuitions
2020-12-23 19:10:38 +0100jamm(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2020-12-23 19:10:38 +0100 <tomsmeding> For what s is [] isomorphic to ((->) s) ?
2020-12-23 19:10:48 +0100 <hseg> exactly, misspoke
2020-12-23 19:10:50 +0100 <fuzzypixelz> but don't functors already have <$>? Doesn't that require the "container metaphor"?
2020-12-23 19:11:38 +0100 <tomsmeding> newtype Const a b = Const a ; instance Functor (Const a) where fmap _ x = x -- fuzzypixelz
2020-12-23 19:12:01 +0100 <hseg> not really. your type index can always be phantom (i.e. point to nothing)
2020-12-23 19:12:03 +0100 <tomsmeding> Okay no, fmap _ (Const a) = Const a
2020-12-23 19:12:06 +0100 <hseg> cf tomsmeding's example
2020-12-23 19:12:14 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Remote host closed the connection)
2020-12-23 19:13:48 +0100 <boxscape> it's also somewhat questionable if a function a -> b is really a container of bs
2020-12-23 19:13:51 +0100Foritus(~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Quit: ლ(ಠ益ಠლ) .:. <Ashley> my porn is hidden in a folder called "BBC Micro Emulator")
2020-12-23 19:14:02 +0100 <boxscape> though from a certain point of view, it is
2020-12-23 19:15:47 +0100 <tomsmeding> Random thought: the container analogy doesn't really work always. (a -> Bool) is a set in a very real sense, but it's not a functor (not even with any Ord shenanigans)
2020-12-23 19:16:19 +0100 <boxscape> right but that's contravariant in a
2020-12-23 19:16:27 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 19:16:40 +0100 <boxscape> the container thing applies to covariant functors, typically, no?
2020-12-23 19:16:49 +0100 <hseg> yeah, but that's because there's two powerset functors, one covariant the other contravariant
2020-12-23 19:16:56 +0100 <hseg> a -> Bool is the contravariant one
2020-12-23 19:17:04 +0100 <boxscape> oh or do you mean...
2020-12-23 19:17:14 +0100 <boxscape> even though it's a container it's not a covariant functor?
2020-12-23 19:17:23 +0100 <tomsmeding> Yes that's what I meant
2020-12-23 19:17:26 +0100 <boxscape> I see
2020-12-23 19:17:37 +0100Foritus(~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
2020-12-23 19:17:37 +0100xff0x_(~fox@2001:1a81:53e9:2700:9d00:b502:3966:f8c0) (Ping timeout: 260 seconds)
2020-12-23 19:17:44 +0100 <monochrom> "container" is so intuitive it's going to violate every mathematical definition.
2020-12-23 19:18:00 +0100 <hseg> yup
2020-12-23 19:18:00 +0100 <monochrom> (That's a stab on intuition, btw)
2020-12-23 19:18:13 +0100xff0x_(~fox@2001:1a81:53e9:2700:a9f9:6cd7:9a2:daa4)
2020-12-23 19:18:15 +0100 <tomsmeding> Also Const is a bad example because it's weird, (a,) is also a non-applicative functor if a is not a monoid
2020-12-23 19:18:29 +0100 <hseg> or a push for a research programme into clarifying this intuition
2020-12-23 19:18:37 +0100 <tomsmeding> Credits 3rd answer to the SE link posted a while ago
2020-12-23 19:19:03 +0100 <tomsmeding> Is (a,b) a container of b's?
2020-12-23 19:19:08 +0100 <tomsmeding> 🤷‍♂️
2020-12-23 19:19:35 +0100 <boxscape> hm
2020-12-23 19:20:07 +0100 <fuzzypixelz> I'm already lost
2020-12-23 19:20:23 +0100 <hseg> yeah. so basically, functor counterexamples are due to variance, pointed counterexamples are due to positive unpointed types, ...
2020-12-23 19:20:46 +0100 <hseg> not sure about the apply and monad counterexamples
2020-12-23 19:21:18 +0100 <boxscape> @src ap
2020-12-23 19:21:18 +0100 <lambdabot> ap = liftM2 id
2020-12-23 19:21:33 +0100 <hseg> what's the intuition behind (a^Int + a^String) not being an apply instance?
2020-12-23 19:21:57 +0100 <tomsmeding> fuzzypixelz: different way of looking at it: functors are exactly those types for which <$> exists, and you can't define <*> in terms of <$>
2020-12-23 19:22:05 +0100knupfer(~Thunderbi@mue-88-130-61-079.dsl.tropolys.de) (Ping timeout: 240 seconds)
2020-12-23 19:22:19 +0100kam1(~kam1@24.231.108.143)
2020-12-23 19:22:23 +0100carthia(~carthia@gateway/tor-sasl/carthia)
2020-12-23 19:22:25 +0100 <tomsmeding> the fact that there are types for which <$> exists but <*> doesn't justifies the fact that we look at functors as a separate thing
2020-12-23 19:23:13 +0100 <hseg> fuzzypixelz: <$> allows you to push $ under the functor. <*> allows you to push (,)
2020-12-23 19:23:27 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f) (Remote host closed the connection)
2020-12-23 19:23:39 +0100 <hseg> currying means that <$> + <*> allows you to apply any number of parameters to a function
2020-12-23 19:23:59 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-12-23 19:24:53 +0100lassulus_(~lassulus@NixOS/user/lassulus)
2020-12-23 19:25:00 +0100 <monochrom> I add that some things use just fmap. For example "data FreeMonad f a = U a | C (f (FreeMonad f a))", to make FreeMonad F a monad, we just need F to be a functor.
2020-12-23 19:25:11 +0100 <boxscape> you can't define <$> in terms of <*> without pure, right?
2020-12-23 19:25:48 +0100lassulus(~lassulus@NixOS/user/lassulus) (Ping timeout: 260 seconds)
2020-12-23 19:26:11 +0100lassulus_lassulus
2020-12-23 19:26:22 +0100 <monochrom> Actually even that is too advanced as an example.
2020-12-23 19:27:36 +0100 <monochrom> "newtype Mu f a = Mu (f (Mu f a))" the catamorphism for Mu F just needs F to be a functor.
2020-12-23 19:28:26 +0100 <monochrom> Actually why do I need "a" there? Heh
2020-12-23 19:28:42 +0100 <monochrom> "newtype Mu f = Mu (f (Mu f))"
2020-12-23 19:29:54 +0100 <hseg> yup - initial algebra for a functor
2020-12-23 19:30:07 +0100geekosaur(42d52137@66.213.33.55)
2020-12-23 19:30:09 +0100 <boxscape> I'm wondering if there are types for which <*> exists but <$> doesn't, but considering the <*> laws use <$>, that might be a meaningless questoin
2020-12-23 19:30:14 +0100 <c_wraith> boxscape: correct. the types don't even come close without pure
2020-12-23 19:30:22 +0100 <boxscape> right
2020-12-23 19:30:38 +0100christo(~chris@81.96.113.213)
2020-12-23 19:31:04 +0100 <hseg> hrm. would it make sense to have a monoidal endomap on Hask that isn't functorial?
2020-12-23 19:31:28 +0100 <hseg> i.e. f s.t. you have () -> f (), (f a, f b) -> f (a,b) and nothing else
2020-12-23 19:32:16 +0100nyd(~nyd@unaffiliated/elysian) (Ping timeout: 240 seconds)
2020-12-23 19:32:31 +0100heatsink(~heatsink@2600:1700:bef1:5e10:19ea:e852:616:ff9f)
2020-12-23 19:34:04 +0100justsomeguy(~justsomeg@216.186.218.241)
2020-12-23 19:34:04 +0100justsomeguy(~justsomeg@216.186.218.241) (Changing host)
2020-12-23 19:34:04 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-12-23 19:35:19 +0100 <hseg> ok, it seems the non-apply example in the SO post comes from requiring that a functor sum_s f(s) with s pointed must have f(s) monoidal
2020-12-23 19:36:04 +0100 <hseg> or wait, no
2020-12-23 19:36:10 +0100 <hseg> that's overcomplicating things
2020-12-23 19:36:27 +0100ulidtko|kulidtko
2020-12-23 19:36:38 +0100 <boxscape> it seems like there must be examples that don't involve pointedness considering you can't implement <*> without <$>, ignoring pure
2020-12-23 19:36:44 +0100 <boxscape> er
2020-12-23 19:36:51 +0100 <boxscape> s/without/in terms of
2020-12-23 19:37:01 +0100 <boxscape> kind of a big difference :)
2020-12-23 19:40:07 +0100juuandyy(~juuandyy@90.166.144.65) (Ping timeout: 272 seconds)
2020-12-23 19:42:53 +0100 <hseg> for an example of an unpointed applicative, consider all "finite map" types - their pure should be const, but that is defined at infinitely many values
2020-12-23 19:43:18 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-12-23 19:44:55 +0100 <boxscape> I mean an example of a functor for which you can say that it cannot be an applicative without invoking pure
2020-12-23 19:45:03 +0100 <boxscape> i.e. a Functor which isn't an instance of Apply
2020-12-23 19:45:48 +0100 <hseg> oh wait. what about monoidal contravariant type
2020-12-23 19:46:16 +0100 <solonarv> (co)yoneda f is a functor but nothing else, assuming f is at most a functor
2020-12-23 19:46:34 +0100 <boxscape> hm I see
2020-12-23 19:46:57 +0100 <boxscape> but wait
2020-12-23 19:47:06 +0100 <boxscape> solonarv you just pushed the problem onto f
2020-12-23 19:47:08 +0100nitrixnitrix-mas
2020-12-23 19:47:18 +0100 <boxscape> that's only an example if such an f exists
2020-12-23 19:47:23 +0100 <hseg> (flip (->) m) should work, no?
2020-12-23 19:47:28 +0100 <solonarv> f can be literally anything of kind Type -> Type
2020-12-23 19:47:43 +0100 <hseg> i.e. type MonoidEval m a = a -> m
2020-12-23 19:47:54 +0100 <solonarv> hseg: that's not a Functor though
2020-12-23 19:48:05 +0100 <hseg> that's the point, we're looking for Apply-Functor
2020-12-23 19:48:08 +0100 <boxscape> solonarv oh are you saying Yoneda f is a functor even if f isn't?
2020-12-23 19:48:13 +0100 <solonarv> exactly!
2020-12-23 19:48:16 +0100 <boxscape> I see
2020-12-23 19:48:24 +0100 <boxscape> that is an example then, true
2020-12-23 19:49:08 +0100 <hseg> nm my example, got some wires crossed
2020-12-23 19:49:11 +0100 <erisco> if you have a category with fixed points what sort of category do you have?
2020-12-23 19:50:05 +0100 <hseg> what, all maps have fixed points?
2020-12-23 19:50:37 +0100 <erisco> I am not sure, what sort of categorical interpretations of fixpoints are there?
2020-12-23 19:50:46 +0100 <monochrom> It is best to require continuous partial orders before you ask for fixed points.
2020-12-23 19:50:46 +0100 <hseg> https://ncatlab.org/nlab/show/fixed+point
2020-12-23 19:50:50 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Remote host closed the connection)
2020-12-23 19:51:46 +0100Foritus(~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Remote host closed the connection)
2020-12-23 19:51:49 +0100 <monochrom> And so, have an O-category (every homset is a continuous partial order), then it has fixed points, and the fixed points are actually usable because they come from the continuous partial orders.
2020-12-23 19:52:01 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt)
2020-12-23 19:52:40 +0100 <monochrom> Indeed, fixed points in programming are usable because they come from continuous partial orders, not because they are merely axiomatized to exist out of the blue.
2020-12-23 19:53:07 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 19:53:14 +0100 <monochrom> Because, for example, you need the partial order to even have fixed-point fusion.
2020-12-23 19:55:24 +0100hnOsmium0001(uid453710@gateway/web/irccloud.com/x-puqqxfwctkhqhqmf)
2020-12-23 19:55:45 +0100Foritus(~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
2020-12-23 19:56:25 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 240 seconds)
2020-12-23 19:56:45 +0100 <ezzieyguywuf> why does this order matter? `./setup build; ./setup haddock; ./setup test` -> doctests fail. `./setup haddock; ./setup build; ./setup test` -> doctests pass
2020-12-23 19:56:53 +0100 <ezzieyguywuf> I've been using machines-0.7.1 to investigate
2020-12-23 19:57:36 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Remote host closed the connection)
2020-12-23 19:57:46 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 265 seconds)
2020-12-23 19:57:49 +0100cheater(~user@unaffiliated/cheater) (Ping timeout: 264 seconds)
2020-12-23 19:59:15 +0100philopsos(~caecilius@gateway/tor-sasl/caecilius)
2020-12-23 19:59:58 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com)
2020-12-23 20:02:00 +0100kam1(~kam1@24.231.108.143) (Remote host closed the connection)
2020-12-23 20:02:25 +0100kam1(~kam1@24.231.108.143)
2020-12-23 20:03:31 +0100berberman_(~berberman@unaffiliated/berberman)
2020-12-23 20:04:13 +0100 <erisco> so the category of types, for all morphisms f : T ↝ T there is the fixpoint Mu f : T yes? because f (Mu f) = Mu f
2020-12-23 20:04:49 +0100berberman(~berberman@unaffiliated/berberman) (Ping timeout: 268 seconds)
2020-12-23 20:05:05 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 20:05:11 +0100 <erisco> if you have such a category, where all morphisms have fixpoints, is there any particular name for that?
2020-12-23 20:05:59 +0100 <fuzzypixelz> is `void m a` he same as `_ <- m a` ?
2020-12-23 20:06:03 +0100asheshambasta(~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be) (Ping timeout: 268 seconds)
2020-12-23 20:06:10 +0100 <monochrom> Yes.
2020-12-23 20:06:19 +0100 <merijn> Define "same" :p
2020-12-23 20:06:23 +0100 <monochrom> void (m a)
2020-12-23 20:06:38 +0100kam1(~kam1@24.231.108.143) (Remote host closed the connection)
2020-12-23 20:06:46 +0100 <erisco> one is an expression and the other is a syntax fragment
2020-12-23 20:07:15 +0100kam1(~kam1@24.231.108.143)
2020-12-23 20:07:17 +0100 <monochrom> I wouldn't be anal about that.
2020-12-23 20:08:01 +0100kuribas(~user@ptr-25vy0i8vujxag7jvv73.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2020-12-23 20:08:03 +0100 <merijn> also, expressions are arguably also "syntax fragments", so...
2020-12-23 20:08:50 +0100 <erisco> can you REPL it
2020-12-23 20:08:54 +0100 <monochrom> I would save my anality for, for example, "I got a type error, what should I do?", and even after being pressed to post actual code, only a screenshot is posted.
2020-12-23 20:09:12 +0100 <fuzzypixelz> I asking because the tutorial I'm reading says `void :: Functor f => f a -> f () is used to explicitly discard the result to parsing, without we would get warnings about unused values from GHC.`
2020-12-23 20:09:27 +0100 <fuzzypixelz> but I don't think GHC will complain if I use _
2020-12-23 20:09:35 +0100 <monochrom> And for "does Traversable mean container?"
2020-12-23 20:10:00 +0100CitizenSnips(~CitizenSn@irc.refl.club) (Remote host closed the connection)
2020-12-23 20:10:05 +0100 <monochrom> Some authors assume -Wall, mind you.
2020-12-23 20:10:13 +0100 <Ariakenom_> the program is the same if you replace them, morally. syntax errors are clearly immoral
2020-12-23 20:10:32 +0100 <monochrom> In haskell-cafe we just had a small discussion again on whether -Wall should be always on.
2020-12-23 20:11:22 +0100 <erisco> but deliberation hit a wall
2020-12-23 20:11:32 +0100 <fuzzypixelz> oh I see, I always forget to turn it on
2020-12-23 20:12:09 +0100 <boxscape> fuzzypixelz I think the point is that it would complain if you don't use _
2020-12-23 20:12:12 +0100 <fuzzypixelz> also, "we need to wrap the argument of optional with try because it is a composite parser, not a primitive." What on Earth does this mean? I assume y'all are familiar with megaparsec
2020-12-23 20:12:24 +0100 <boxscape> i.e. if you just used `m a` instead of `_ <- m a`
2020-12-23 20:12:30 +0100 <merijn> fuzzypixelz: A simpler question is to disable that specific warning ;)
2020-12-23 20:12:47 +0100 <solonarv> fuzzypixelz: using _ is another way of explicitly saying "I don't care about this value" (as other people already pointed out)
2020-12-23 20:12:53 +0100 <merijn> fuzzypixelz: I always use "-Wall -Wno-unused-do-binds", because I personally feel unused-do-binds is a pointless warning
2020-12-23 20:13:35 +0100 <merijn> fuzzypixelz: *especially* in the context of parser combinators :p
2020-12-23 20:13:53 +0100 <monochrom> "(a >> b) <|> (a >> c)" for example, if you input makes "a" consume some input and is successful, then that code commits to "a >> b", will not consider "a >> c".
2020-12-23 20:14:19 +0100 <monochrom> "try (a >> b) <|> (a >> c)" will consider "a >> c".
2020-12-23 20:15:08 +0100CitizenSnips(~CitizenSn@irc.refl.club)
2020-12-23 20:15:18 +0100cheater(~user@unaffiliated/cheater)
2020-12-23 20:15:44 +0100glguy(x@freenode/staff/haskell.developer.glguy) (Read error: Connection reset by peer)
2020-12-23 20:15:49 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 264 seconds)
2020-12-23 20:15:55 +0100glguy(x@freenode/staff/haskell.developer.glguy)
2020-12-23 20:16:10 +0100 <monochrom> So parsec and megaparsec kills backtracking whenever a simple criterion is true, but you can opt-in for preserving backtracking with "try".
2020-12-23 20:16:32 +0100erisco_(~erisco@104-195-141-253.cpe.teksavvy.com)
2020-12-23 20:16:47 +0100 <boxscape> fuzzypixels `optional` is defined outside of megaparsec, and if you use it in this context it combines parsers from megaparsec, hence `composite`. Since it's defined outside of megaparsec, megaparsec can't explicitly control its backtracking behavior, so you have to wrap it manually with try
2020-12-23 20:17:09 +0100 <boxscape> whoops I misspelled your name
2020-12-23 20:18:04 +0100erisco_(~erisco@104-195-141-253.cpe.teksavvy.com) (Client Quit)
2020-12-23 20:18:21 +0100erisco_(~erisco@104-195-141-253.cpe.teksavvy.com)
2020-12-23 20:18:21 +0100erisco(~erisco@104-195-141-253.cpe.teksavvy.com) (Disconnected by services)
2020-12-23 20:18:22 +0100Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
2020-12-23 20:18:38 +0100 <boxscape> s/wrap it/wrap its argument
2020-12-23 20:18:40 +0100 <fuzzypixelz> boxscape: no worries, _It is I_ who misspelled it first ;)
2020-12-23 20:18:45 +0100Franciman(~francesco@host-82-49-79-73.retail.telecomitalia.it)
2020-12-23 20:18:46 +0100 <boxscape> heh, fair :)
2020-12-23 20:18:51 +0100nyd(~nyd@unaffiliated/elysian)
2020-12-23 20:19:59 +0100 <fuzzypixelz> % optional p = (Just <$> p) <|> pure Nothing
2020-12-23 20:19:59 +0100 <yahb> fuzzypixelz:
2020-12-23 20:20:02 +0100erisco_erisco
2020-12-23 20:20:14 +0100 <fuzzypixelz> This is how the athor defined `optional`
2020-12-23 20:20:22 +0100 <boxscape> that is also how it's defined in base
2020-12-23 20:21:18 +0100knupfer(~Thunderbi@200116b82ccd3500b0a727fffee2224e.dip.versatel-1u1.de)
2020-12-23 20:21:18 +0100knupfer(~Thunderbi@200116b82ccd3500b0a727fffee2224e.dip.versatel-1u1.de) (Client Quit)
2020-12-23 20:21:31 +0100knupfer(~Thunderbi@mue-88-130-61-079.dsl.tropolys.de)
2020-12-23 20:22:46 +0100eacameron(uid256985@gateway/web/irccloud.com/x-xmnchykalzjujusu) (Quit: Connection closed for inactivity)
2020-12-23 20:23:12 +0100bisickcor(~username@117.202.60.218)
2020-12-23 20:24:47 +0100Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
2020-12-23 20:25:26 +0100 <fuzzypixelz> boxscape: the sentence I posted gives me the impression that there is something wrong with the types, but you're saying that optional just won't be able to backtrack? So if it fails on the first alternative it will just return Nothing and leave?
2020-12-23 20:25:50 +0100pmxb0t(~pmxb0t@185.204.1.185) (Remote host closed the connection)
2020-12-23 20:25:56 +0100 <merijn> boxscape: optional isn't in base, is it?
2020-12-23 20:26:05 +0100 <merijn> oh, heh, it is
2020-12-23 20:26:09 +0100 <merijn> When'd that happen
2020-12-23 20:26:37 +0100iekfkk(~username@117.200.13.21) (Ping timeout: 264 seconds)
2020-12-23 20:26:41 +0100 <boxscape> it's one of the few functions where the docs don't say since when it's in base
2020-12-23 20:28:14 +0100 <fuzzypixelz> boxscape: did I miss anything?
2020-12-23 20:28:32 +0100 <boxscape> fuzzypixelz I think if you tried something like `optional threeDigitNumber <|> twoDigitNumber`, without wrapping the argument in try, if you ran it on an input like "45", threeDigitNumber would consume both digits and then fail. Then twoDigitNumber would fail, as well, since "45" is already consumed. Whereas if you wrap `threeDigitNumber` in `try`,
2020-12-23 20:28:33 +0100 <boxscape> `twoDigitNumber` sees the "45" and can parse it
2020-12-23 20:29:27 +0100 <boxscape> erm
2020-12-23 20:29:46 +0100 <boxscape> I suppose that should really be something like `optional threeDigitNumber *> twoDigitNumber`
2020-12-23 20:30:03 +0100 <fuzzypixelz> I get that, but why did he talk about "composite parser" and "primitive"
2020-12-23 20:30:27 +0100 <fuzzypixelz> https://markkarpov.com/tutorial/megaparsec.html
2020-12-23 20:30:48 +0100 <boxscape> fuzzypixelz because optional isn't a primitive defined by megaparsec, it's combines the primitives from megaparsec, i.e. pure and <|> and <$>
2020-12-23 20:30:51 +0100 <geekosaur> because optional is not a parser, it's an external function combining two parsers
2020-12-23 20:30:56 +0100 <solonarv> a "composite" parser is one that's built by putting together other parsers
2020-12-23 20:31:24 +0100rayyyy(~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving)
2020-12-23 20:31:35 +0100 <geekosaur> actualmodifies a parser
2020-12-23 20:31:43 +0100 <geekosaur> guh
2020-12-23 20:31:44 +0100 <erisco> fuzzypixelz, probably it is a lookahead-1 parser, not backtracking (by default)
2020-12-23 20:32:04 +0100 <geekosaur> ok, between misspeaking and then my laptop acting up, I'm backing away...
2020-12-23 20:33:40 +0100 <erisco> there are different notions of what it means to fail
2020-12-23 20:33:55 +0100 <erisco> it is simpler with general parsers and the notion of failure is the same
2020-12-23 20:34:55 +0100 <__monty__> Looking at mutable arrays/vectors for the first time. What are the pros/cons of IOVector and STVector?
2020-12-23 20:35:44 +0100 <solonarv> they are the same (to be precise, STVector = MVector and IOVector = MVector RealWorld)
2020-12-23 20:35:46 +0100 <merijn> __monty__: You can get "out of" ST, but not IO?
2020-12-23 20:35:54 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e) (Remote host closed the connection)
2020-12-23 20:36:10 +0100 <boxscape> i.e. you can define something with STVectors inside a pure function
2020-12-23 20:36:54 +0100 <solonarv> ST is, if you will, an "IO-lite" where you can't mess with the outside world (the only IO-ish thing you can do is mutating previously-allocated mutable data structures, such as STVector, or allocate new ones)
2020-12-23 20:37:38 +0100 <boxscape> it's IO without input and output? :)
2020-12-23 20:37:44 +0100 <solonarv> and there is 'runST :: (forall s. ST s a) -> a' which allows you to run ST things inside a pure computation; and it's safe, unlike unsafePerformIO
2020-12-23 20:37:49 +0100 <merijn> boxscape: And without concurrency
2020-12-23 20:37:56 +0100 <boxscape> ah, right
2020-12-23 20:38:13 +0100 <solonarv> and without manual memory management (no pointers), for another example
2020-12-23 20:38:20 +0100 <__monty__> Hmm, so when would you use IOVector?
2020-12-23 20:38:31 +0100 <merijn> __monty__: When you're already in IO anyway?
2020-12-23 20:38:39 +0100 <merijn> __monty__: When you need concurrent updates?
2020-12-23 20:38:44 +0100 <solonarv> when I want a mutable vector and I'm already in IO, yeah
2020-12-23 20:39:03 +0100 <__monty__> Ok, TIL. Thank you.
2020-12-23 20:40:44 +0100 <solonarv> note that up to a newtype wrapper, IO = ST RealWorld, too. The underlying implementation is the same, the difference is in the types and in the API you get
2020-12-23 20:41:08 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:a017:afb:342e:7f38) (Remote host closed the connection)
2020-12-23 20:41:15 +0100 <erisco> you start with ST because you want to be principled, and you end with using IO because you want to get it done
2020-12-23 20:41:23 +0100 <geekosaur> heh
2020-12-23 20:41:37 +0100 <solonarv> that's basically how my intcode interpreter started for last year's advent of code :p
2020-12-23 20:41:45 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:e463:afa6:5cdc:b260)
2020-12-23 20:41:45 +0100 <merijn> Same ;)
2020-12-23 20:41:45 +0100axeman-(~axeman_@2a02:8109:86c0:1f98:b552:2bd4:45ad:9d0e)
2020-12-23 20:42:13 +0100 <solonarv> I went back to State though, rather than plunging into IO
2020-12-23 20:42:28 +0100 <merijn> I went to IO instead :p
2020-12-23 20:42:42 +0100 <glguy> I stayed pure
2020-12-23 20:42:58 +0100 <glguy> made it easy to backtrack on search problems
2020-12-23 20:42:59 +0100 <merijn> glguy: So did I :)
2020-12-23 20:43:51 +0100Vulfe_(~vulfe@2600:1702:31b0:34e0:cb3:d92b:1c86:1704)
2020-12-23 20:45:01 +0100jyri-matti(uid479350@gateway/web/irccloud.com/x-lridfrkvuwkcrpku)
2020-12-23 20:45:01 +0100seaLne1(~seaLne@185.204.1.185)
2020-12-23 20:45:48 +0100Vulfe_(~vulfe@2600:1702:31b0:34e0:cb3:d92b:1c86:1704) (Remote host closed the connection)
2020-12-23 20:45:55 +0100Vulfe_(~vulfe@2600:1702:31b0:34e0:cb3:d92b:1c86:1704)
2020-12-23 20:46:18 +0100Vulfe(~vulfe@2600:1702:31b0:34e0:e463:afa6:5cdc:b260) (Ping timeout: 260 seconds)
2020-12-23 20:47:59 +0100chang(~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
2020-12-23 20:48:19 +0100xiinotulp(~q@node-ufm.pool-125-24.dynamic.totinternet.net)
2020-12-23 20:48:20 +0100 <monochrom> I have the opposite view. ST gets IO done, not for principle.
2020-12-23 20:48:58 +0100 <monochrom> Note that RealWorld is a phantom type and does nothing other than blocking undesirable code re-ordering.
2020-12-23 20:49:48 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 20:50:10 +0100 <fuzzypixelz> where is void defined?
2020-12-23 20:50:34 +0100 <Rembane> :i void
2020-12-23 20:50:43 +0100 <geekosaur> @index void
2020-12-23 20:50:43 +0100 <lambdabot> Foreign.Marshal.Error, Foreign.Marshal, Foreign, Foreign.Safe, Foreign.Marshal.Safe, Data.Functor, Control.Monad
2020-12-23 20:51:22 +0100 <fuzzypixelz> oh that's very useful! Google kept showing me Data.Void
2020-12-23 20:51:32 +0100 <monochrom> Heh, Foreign.Marshal.Error's is IO()->IO() and says "deprecated, use void instead".
2020-12-23 20:51:36 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:9505:a9d7:865a:34e1)
2020-12-23 20:51:54 +0100plutoniix(~q@node-uov.pool-125-24.dynamic.totinternet.net) (Ping timeout: 265 seconds)
2020-12-23 20:52:20 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt)
2020-12-23 20:53:05 +0100 <boxscape> Control.Monad is the one you want
2020-12-23 20:53:34 +0100 <boxscape> or I guess Data.Functor, I imagine those are the same?
2020-12-23 20:53:53 +0100 <erisco> so given two types x:T, y:T there is the type x → y : T
2020-12-23 20:54:11 +0100 <boxscape> yeah Control.Monad reexports from Data.Functor
2020-12-23 20:54:43 +0100 <erisco> but also there is a morphism (→) : T × T ↝ T yes? I think I am getting tripped up because these are not distinguished in Haskell
2020-12-23 20:55:22 +0100 <ADG1089__> It says `instance (LayoutClass l a, LayoutClass r a) => LayoutClass (Choose l r) a` so why can't `x :: l1 ||| l2 ||| l3 ... ||| ln` have type `x :: LayoutClass l a => l a`?
2020-12-23 20:55:41 +0100 <erisco> so, the morphism → sends the objects x, y to the object x → y
2020-12-23 20:57:02 +0100 <erisco> and then also confounding is that x → y in this context is not an exponential :P
2020-12-23 20:57:56 +0100 <erisco> but → could be curried to make an exponential, for example… am I getting this right, category theorists?
2020-12-23 21:00:26 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-12-23 21:01:11 +0100 <merijn> erisco: Why do you think "x → y" is an object?
2020-12-23 21:01:26 +0100 <erisco> because it is a type, and this is the category of types
2020-12-23 21:01:40 +0100 <merijn> oh, Haskell as category
2020-12-23 21:01:49 +0100 <merijn> That's an ill-defined mess
2020-12-23 21:02:09 +0100 <erisco> that's so immoral
2020-12-23 21:02:37 +0100 <erisco> I guess I should be saying → is a homset
2020-12-23 21:02:45 +0100 <boxscape> hm, interesting. split's keepDelimsL and keepDelimsR do the opposite of what I would have expected. I though they would keep the delimiters to the left/right of where they were, but they attach them to the left/right end of adjacent chunks, which is.. the opposite
2020-12-23 21:02:55 +0100 <erisco> because it is parameterised by objects... it isn't just one morphism
2020-12-23 21:03:22 +0100 <hseg> wish ghc's pattern match checker could be taught exhaustiveness axioms
2020-12-23 21:03:25 +0100geekosaur(42d52137@66.213.33.55) (Ping timeout: 245 seconds)
2020-12-23 21:03:40 +0100 <hseg> eg that testing /= and == covers everything
2020-12-23 21:04:33 +0100 <erisco> the time has come where there may be a practical reason to know what they're mummering about, finally
2020-12-23 21:04:38 +0100 <merijn> hseg: Eh...pretty sure that's considerably harder than that single sentence makes it seem :p
2020-12-23 21:04:41 +0100 <fuzzypixelz> what is the applicative syntax for `void p`?
2020-12-23 21:04:57 +0100Mikagami(~MOSCOS@122.54.107.175) (Remote host closed the connection)
2020-12-23 21:05:01 +0100 <boxscape> it could be feasible to extend the COMPLETE pragma to allow functions rather than just patterns
2020-12-23 21:05:07 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
2020-12-23 21:05:09 +0100 <hseg> of course. the imagination is remarkably uncreative at finding difficulties for itself
2020-12-23 21:05:10 +0100 <boxscape> but then again, it might not be
2020-12-23 21:05:22 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 21:05:38 +0100 <merijn> you can already do that via patternsyonyms
2020-12-23 21:05:40 +0100 <hseg> ... actually, boxscape, that might be a solution here
2020-12-23 21:05:52 +0100 <monochrom> fuzzypixelz: No change, void p, unless you mean you're looking for *> and <*
2020-12-23 21:06:11 +0100 <boxscape> merijn can you encode == and /= as pattern synonyms though? last time I tried something similar I failed
2020-12-23 21:06:30 +0100 <merijn> you can encode view patterns, so yes
2020-12-23 21:06:49 +0100 <fuzzypixelz> for example I want p = do (,) <$> pWord <*> pWord to parse two words but I need to add a space in between
2020-12-23 21:07:53 +0100 <monochrom> (,) <$> (pWord <* space) <*> pWord
2020-12-23 21:08:05 +0100juuandyy(~juuandyy@90.166.144.65)
2020-12-23 21:08:12 +0100 <monochrom> (,) <$> pWord <*> (space *> pWord)
2020-12-23 21:08:13 +0100 <__monty__> Hmm, to get an MVector from a list I have to thaw . fromList? I.e., I'm not just blind and there is no MVector.fromList?
2020-12-23 21:08:28 +0100 <hseg> merijn: how? pattern Eq x y <- ((x,y) -> x == y -> True) ?
2020-12-23 21:08:50 +0100 <merijn> Something like that
2020-12-23 21:08:53 +0100 <xerox_> (,) <$> pWord <* space *> pWord -- by symmetry?
2020-12-23 21:08:53 +0100 <monochrom> You are not blind.
2020-12-23 21:09:41 +0100 <monochrom> @type \x y -> x <* y *> x
2020-12-23 21:09:43 +0100 <lambdabot> Applicative f => f b1 -> f b2 -> f b1
2020-12-23 21:09:53 +0100 <xerox_> drats
2020-12-23 21:10:31 +0100xff0x_(~fox@2001:1a81:53e9:2700:a9f9:6cd7:9a2:daa4) (Ping timeout: 258 seconds)
2020-12-23 21:10:46 +0100 <monochrom> For real symmetry I would do liftA3 (\x _ z -> (x,z)) pWord space pWord
2020-12-23 21:11:11 +0100cosimone(~cosimone@2001:b07:ae5:db26:1fb3:ef3f:ece2:c6f8)
2020-12-23 21:11:16 +0100 <monochrom> Only probably is this doesn't scale when I need liftA10
2020-12-23 21:11:23 +0100 <monochrom> s/probably/problem/
2020-12-23 21:11:25 +0100xff0x_(~fox@2001:1a81:53e9:2700:bff:aece:1b85:7d44)
2020-12-23 21:11:42 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Remote host closed the connection)
2020-12-23 21:12:55 +0100 <erisco> you know what will scale?
2020-12-23 21:13:10 +0100 <erisco> oh you are making tuples, never mind :P
2020-12-23 21:13:23 +0100 <monochrom> vectors
2020-12-23 21:13:33 +0100 <fuzzypixelz> monochrom: `(,) <$> (pWord <* space) <*> pWord` is the same as `(,) <$> (pWord <* space) <*> pWord` no? Someone told me earlier about infixl
2020-12-23 21:13:43 +0100 <monochrom> vectors scale because a vector space has a "multiply by scalar" operation.
2020-12-23 21:13:46 +0100 <fuzzypixelz> I mean `(,) <$> pWord <* space <*> pWord`
2020-12-23 21:13:49 +0100 <erisco> well one reason I made the foldapp package was for this use
2020-12-23 21:14:28 +0100 <monochrom> I forgot the left/right associativity. But the two are the same after doing a proof using associative laws of <*> etc.
2020-12-23 21:14:40 +0100 <hololeap> :t \x s y -> (,) <$> x <* s <*> y
2020-12-23 21:14:42 +0100 <lambdabot> Applicative f => f a1 -> f b -> f a2 -> f (a1, a2)
2020-12-23 21:14:44 +0100 <erisco> mostly a joke but also because when you're tinkering with parser combinators, changing arity with collecting parse results is annoying
2020-12-23 21:15:57 +0100 <monochrom> Err, I misread.
2020-12-23 21:16:08 +0100 <hololeap> :t \s x y z -> (,,) <$> x <* s <*> y <* s <*> z
2020-12-23 21:16:11 +0100 <lambdabot> Applicative f => f b -> f a1 -> f a2 -> f a3 -> f (a1, a2, a3)
2020-12-23 21:16:14 +0100 <monochrom> I forgot the left/right associativity, so I put in parentheses to be clear.
2020-12-23 21:20:21 +0100 <hseg> hrmph. don't see how to make this work that's clearer than case p x of True ->; False;
2020-12-23 21:20:35 +0100 <hseg> by which point it's esaier to just use an if statement
2020-12-23 21:20:52 +0100hiroaki(~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
2020-12-23 21:20:57 +0100 <monochrom> I would use if-then-else, yes. :)
2020-12-23 21:21:02 +0100 <hseg> except that's not as nice visually as guard patterns
2020-12-23 21:21:07 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-12-23 21:21:26 +0100 <hseg> welp
2020-12-23 21:21:39 +0100 <hseg> pragmatics over aesthetics
2020-12-23 21:21:49 +0100 <monochrom> Or at least "x==0 = ... | otherwise = ..."
2020-12-23 21:21:49 +0100 <boxscape> hseg you can always use multiway if instead of if-then-else
2020-12-23 21:21:56 +0100 <boxscape> or sometimes bool
2020-12-23 21:22:10 +0100dftxbs3e(~dftxbs3e@unaffiliated/dftxbs3e) (Remote host closed the connection)
2020-12-23 21:23:09 +0100 <monochrom> But since there is a raging war over "should you have a catch-all wildcard pattern as your final pattern?", I expect it to carry over to "| otherwise" too.
2020-12-23 21:23:31 +0100 <hseg> yeah, but multi-way if isn't understood by the exhaustiveness checker
2020-12-23 21:24:05 +0100 <erisco> I feel like these implicit equivalencies we are used to are the most difficult part for understanding CT
2020-12-23 21:24:15 +0100 <monochrom> My perspective is much more pragmatic than even exhaustiveness checking. Computing both x==0 and x/=0 is pointless.
2020-12-23 21:24:29 +0100 <hseg> ... fair
2020-12-23 21:24:35 +0100 <erisco> it happens again with data constructors, where Just takes a value x and gives you the value Just x
2020-12-23 21:25:04 +0100 <erisco> but also Just is a value (a function) of type ∀ a. a → Maybe a
2020-12-23 21:25:05 +0100 <boxscape> monochrom arguably if ghc knew about the exhaustiveness there it could optimize away the x /= 0 call
2020-12-23 21:25:10 +0100 <hseg> sniped
2020-12-23 21:25:24 +0100 <erisco> these are different things in category theory but the same to us
2020-12-23 21:25:27 +0100 <monochrom> | dream
2020-12-23 21:25:42 +0100 <hololeap> it's not that mentally taxing to remember what the two options for Bool are, so no reason to be explicit with the second choice
2020-12-23 21:25:43 +0100 <boxscape> might be more complicated when you take into account bottoms though
2020-12-23 21:27:06 +0100 <boxscape> hm `if | x== 0 -> 1 | x /= 0 -> 2` does in fact have different behavior from `if | x== 0 -> 1 | otherwise -> 2` if x is undefined, I suppose
2020-12-23 21:27:13 +0100 <boxscape> no
2020-12-23 21:27:14 +0100 <boxscape> never mind
2020-12-23 21:27:17 +0100 <monochrom> matching for True, even if it doesn't match, already rules out bottom.
2020-12-23 21:27:28 +0100 <boxscape> yeah
2020-12-23 21:28:23 +0100 <monochrom> "x==0" is unlikely to have a different strictness from "x/=0".
2020-12-23 21:28:38 +0100 <boxscape> yeah true
2020-12-23 21:28:45 +0100 <monochrom> "x>y" can have a different strictness from "x==y", though.
2020-12-23 21:29:53 +0100 <monochrom> But only for pathological types such as "let's use unary representation ADT for natural numbers and glorify it as Peano Natural so it sounds profound aesthetic and fundamental"
2020-12-23 21:30:43 +0100 <monochrom> completely ignoring that even by the low standards of big-O, it takes exponential time and space.
2020-12-23 21:31:14 +0100 <monochrom> I am not a performance junky, but I am an asymptotic junky.
2020-12-23 21:31:43 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2020-12-23 21:31:45 +0100 <__monty__> Could someone help me understand why thaw someVector has type `MVector () (MVector (PrimState (MVector ())) Int)`?
2020-12-23 21:32:31 +0100 <monochrom> Insufficient context.
2020-12-23 21:32:40 +0100 <monochrom> I'm pretty sure the explanation is in the context.
2020-12-23 21:33:04 +0100 <monochrom> For now, thaw has always worked fine for me.
2020-12-23 21:33:12 +0100ADG1089_(~aditya@122.163.225.112)
2020-12-23 21:33:12 +0100chang(~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 21:33:36 +0100 <solonarv> > Nothing > undefined -- monochrom
2020-12-23 21:33:39 +0100 <lambdabot> *Exception: Prelude.undefined
2020-12-23 21:33:44 +0100 <monochrom> I wrote my own random shuffling code, it thaws then shuffles then freezes, works fine.
2020-12-23 21:33:49 +0100ADG1089__(~aditya@122.163.225.112) (Read error: Connection reset by peer)
2020-12-23 21:33:53 +0100 <solonarv> hm, interesting. That one actually could be non-bottom.
2020-12-23 21:34:36 +0100hiroaki(~hiroaki@ip4d16fa3b.dynamic.kabel-deutschland.de)
2020-12-23 21:35:14 +0100raoulb(~weechat@2a02:169:5:a:fd81:f2d9:5f88:bf8b)
2020-12-23 21:35:35 +0100geekosaur(42d52137@66.213.33.55)
2020-12-23 21:35:55 +0100raoulb(~weechat@2a02:169:5:a:fd81:f2d9:5f88:bf8b) (Client Quit)
2020-12-23 21:36:01 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net)
2020-12-23 21:36:39 +0100juuandyy(~juuandyy@90.166.144.65) (Quit: Konversation terminated!)
2020-12-23 21:36:58 +0100dftxbs3e(~dftxbs3e@unaffiliated/dftxbs3e)
2020-12-23 21:38:17 +0100lkurusa(~lkurusa@fedora/Levex) (Quit: leaving)
2020-12-23 21:38:22 +0100 <fuzzypixelz> :i some
2020-12-23 21:38:42 +0100 <monochrom> Do you want @index some ?
2020-12-23 21:38:42 +0100 <Rembane> @info some
2020-12-23 21:38:42 +0100 <lambdabot> some
2020-12-23 21:38:44 +0100 <fuzzypixelz> @index some
2020-12-23 21:38:44 +0100 <lambdabot> Control.Applicative
2020-12-23 21:39:01 +0100 <monochrom> If you want :info, use yahb.
2020-12-23 21:40:29 +0100 <fuzzypixelz> Control.Applicative and Text.Megaparsec both import `some` :/
2020-12-23 21:40:40 +0100 <merijn> The're the same
2020-12-23 21:41:18 +0100 <monochrom> s/import/export/
2020-12-23 21:41:29 +0100 <solonarv> actually they might not be
2020-12-23 21:41:38 +0100 <fuzzypixelz> oh yes but ghc complains about the ambiguous reference
2020-12-23 21:41:52 +0100 <monochrom> Then hide one of them.
2020-12-23 21:41:59 +0100 <solonarv> megaparsec reexports a bunch of things from parser-combinators, which has monadic versions of some combinators (including 'some')
2020-12-23 21:42:07 +0100 <solonarv> % :i Text.Megaparsec.some
2020-12-23 21:42:07 +0100 <yahb> solonarv: ; <interactive>:1:1: error: Not in scope: `Text.Megaparsec.some'
2020-12-23 21:42:11 +0100 <solonarv> bah!
2020-12-23 21:42:26 +0100 <fuzzypixelz> what
2020-12-23 21:42:30 +0100 <monochrom> % cabal install --lib megaparsec
2020-12-23 21:42:30 +0100 <yahb> monochrom: ; <interactive>:14:1: error: Variable not in scope: cabal :: t0 -> t; <interactive>:14:7: error: Variable not in scope: install
2020-12-23 21:42:50 +0100 <fuzzypixelz> isn;t it cabal-install?
2020-12-23 21:42:54 +0100 <solonarv> % import Text.Megaparsec
2020-12-23 21:42:55 +0100 <yahb> solonarv: ; <no location info>: error:; Could not find module `Text.Megaparsec'; It is not a module in the current program, or in any known package.
2020-12-23 21:43:02 +0100 <solonarv> nope not there I guess
2020-12-23 21:43:24 +0100 <monochrom> ooohhhh....
2020-12-23 21:43:27 +0100 <fuzzypixelz> I'd better hide the Applicative one?
2020-12-23 21:43:28 +0100 <monochrom> % :! ls
2020-12-23 21:43:29 +0100 <yahb> monochrom: A; A.hi; A.hs; A.o; tmp
2020-12-23 21:43:34 +0100 <solonarv> well, the docs also point this out: https://hackage.haskell.org/package/megaparsec-9.0.1/docs/Text-Megaparsec.html#g:1
2020-12-23 21:43:38 +0100 <monochrom> % :! cabal --help
2020-12-23 21:43:39 +0100 <yahb> monochrom: Command line interface to the Haskell Cabal infrastructure.; See http://www.haskell.org/cabal/ for more information.; Usage: cabal [GLOBAL FLAGS] [COMMAND [FLAGS]]; Commands:; [global]; update Updates list of known packages.; install Install packages.; help Help about commands.; info Display detailed information about a particular package.; list
2020-12-23 21:43:44 +0100 <solonarv> re-exports 'Control.Monad.Combinators'
2020-12-23 21:43:54 +0100 <solonarv> in there you find: https://hackage.haskell.org/package/parser-combinators-1.2.1/docs/Control-Monad-Combinators.html#v…
2020-12-23 21:43:57 +0100 <monochrom> % :! cabal install --lib --dry-run megaparsec
2020-12-23 21:43:58 +0100 <yahb> monochrom: Warning: Caught exception during _mirrors lookup:res_query: permission denied; (Operation not permitted); Warning: No mirrors found for http://hackage.haskell.org/; dieVerbatim: user error (cabal: Couldn't establish HTTP connection. Possible cause: HTTP proxy server; is down.; )
2020-12-23 21:44:06 +0100 <__monty__> I have a list, which I want to turn into a mutable vector. Figured I'd use `thaw . fromList` but the types don't line up and I don't understand why. Currently trying `MVector () Int` as the type (because I don't know what to pass for the State parameter).
2020-12-23 21:44:08 +0100 <xerox_> dieVerbatim
2020-12-23 21:44:27 +0100 <fuzzypixelz> I just realized something very nasty! I was looking at the megaparsec 4 documentation T_T
2020-12-23 21:44:29 +0100 <monochrom> That's a relief actually :)
2020-12-23 21:44:38 +0100 <solonarv> fuzzypixelz: oh, that's also happened to me a few times
2020-12-23 21:44:48 +0100 <merijn> __monty__: Well, which fromList?
2020-12-23 21:45:10 +0100 <merijn> __monty__: Oh, wait, did you do this in ghci?
2020-12-23 21:45:58 +0100 <solonarv> fuzzypixelz: this is a different version of 'some' than the one exported from Control.Applicative; this different version exists because it's more efficient to use with megaparsec's Parsec type
2020-12-23 21:46:19 +0100 <__monty__> No it's in code. Specifically trying with Data.Vector.Unboxed.thaw/fromList.
2020-12-23 21:46:41 +0100 <__monty__> I meant compiled code as opposed to GHCi.
2020-12-23 21:47:02 +0100knupfer(~Thunderbi@mue-88-130-61-079.dsl.tropolys.de) (Ping timeout: 256 seconds)
2020-12-23 21:47:18 +0100 <merijn> __monty__: You don't pass anything as state parameter or your vector is useless
2020-12-23 21:47:26 +0100 <merijn> ST requires a polymorphic state parameter
2020-12-23 21:48:15 +0100 <solonarv> oh, I think I know what the issue is. something led GHC to infer that you want 'thaw x :: MVector () _'
2020-12-23 21:48:21 +0100 <fuzzypixelz> from my tutorial "The parser-combinators package provides quite a few abstract combinators built on the concepts of Applicative and Alternative. The Text.Megaparsec module re-exports them from Control.Applicative.Combinators"
2020-12-23 21:48:31 +0100 <fuzzypixelz> talking about many and some
2020-12-23 21:48:35 +0100 <merijn> solonarv: No, I just reread and he said he's passing () as state
2020-12-23 21:48:40 +0100 <solonarv> fuzzypixelz: it is possible for tutorials to be outdated. It looks like this one is.
2020-12-23 21:48:47 +0100 <solonarv> merijn: that's an additional mistake, yes
2020-12-23 21:48:48 +0100 <fuzzypixelz> yes!
2020-12-23 21:49:05 +0100 <fuzzypixelz> https://markkarpov.com/tutorial/megaparsec.html
2020-12-23 21:49:17 +0100 <fuzzypixelz> last updated September 21, 2020
2020-12-23 21:49:22 +0100 <solonarv> if you look at the type that's being inferred, GHC is matching 'm ~ MVector ()' (the 'm' from the type of 'thaw')
2020-12-23 21:49:59 +0100knupfer(~Thunderbi@200116b82ccd3500a4b860c02e178792.dip.versatel-1u1.de)
2020-12-23 21:50:07 +0100 <solonarv> fuzzypixelz: aha, perhaps that was missed when the author updated their post.
2020-12-23 21:50:36 +0100saep(~saep@94.31.86.216) (Remote host closed the connection)
2020-12-23 21:50:58 +0100 <__monty__> So I can't hide that s in my newtype?
2020-12-23 21:51:25 +0100 <solonarv> well, you can hide it if you are okay with tying yourself to IO
2020-12-23 21:51:29 +0100 <solonarv> otherwise, no, you cannot hide it
2020-12-23 21:52:11 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 21:53:14 +0100a3Dman(~3Dman@unaffiliated/a3dman) (Quit: Leaving...)
2020-12-23 21:54:22 +0100 <glguy> It's not a "state" parameter so much as a way to link it back to a particular runST use
2020-12-23 21:54:29 +0100a3Dman(~3Dman@unaffiliated/a3dman)
2020-12-23 21:54:41 +0100 <merijn> See also the "Lazy Functional State Threads" paper
2020-12-23 21:55:20 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Client Quit)
2020-12-23 21:56:07 +0100lassulus_(~lassulus@NixOS/user/lassulus)
2020-12-23 21:58:25 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
2020-12-23 21:59:31 +0100lassulus(~lassulus@NixOS/user/lassulus) (Ping timeout: 268 seconds)
2020-12-23 21:59:31 +0100lassulus_lassulus
2020-12-23 22:02:49 +0100thc202(~thc202@unaffiliated/thc202) (Quit: thc202)
2020-12-23 22:03:30 +0100urek(~urek@2804:7f1:e10a:f71b:d9c2:a76e:bc50:3b53)
2020-12-23 22:04:53 +0100urek(~urek@2804:7f1:e10a:f71b:d9c2:a76e:bc50:3b53) (Client Quit)
2020-12-23 22:05:05 +0100bwe_bwe
2020-12-23 22:05:12 +0100bwe(~bwe@2a01:4f8:1c1c:4878::2) (Changing host)
2020-12-23 22:05:12 +0100bwe(~bwe@unaffiliated/bwe)
2020-12-23 22:05:26 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:9505:a9d7:865a:34e1) (Ping timeout: 264 seconds)
2020-12-23 22:07:32 +0100Kronic(~Kronic___@84.203.96.46)
2020-12-23 22:08:20 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-12-23 22:08:58 +0100 <Kronic> So, I've a question, I've been wrapping an API I wanna use with Servant and so far the experience has been very good. I am just not sure what to do with the functions I'm exposing. The functions that I have are parameterized by quite a few Maybes (Query parameters) - is there a pattern I can use to deal with this ?
2020-12-23 22:09:41 +0100lkurusa(~lkurusa@fedora/Levex)
2020-12-23 22:11:10 +0100dandart(~Thunderbi@host86-185-55-80.range86-185.btcentralplus.com) (Ping timeout: 256 seconds)
2020-12-23 22:12:30 +0100 <__monty__> So I want to be using runST rather than execState? Because with the latter I do have to pass an explicit value of type `s` no?
2020-12-23 22:13:10 +0100 <geekosaur> if you're using STVector then you must use runST, not State
2020-12-23 22:13:12 +0100 <merijn> __monty__: What
2020-12-23 22:13:15 +0100_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2020-12-23 22:13:23 +0100 <merijn> __monty__: State has 0 to do with ST
2020-12-23 22:13:24 +0100 <geekosaur> the similarity of names is unfortunate but they're very different things
2020-12-23 22:13:38 +0100stef204(~stef204@unaffiliated/stef-204/x-384198)
2020-12-23 22:13:58 +0100DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-12-23 22:14:11 +0100 <monochrom> You can't name them differently because both talk about states.
2020-12-23 22:15:37 +0100 <monochrom> But programmers have long learned that two unrelated things, or worse, two opposite things, can have the same name, this happens all the time, don't trust names, right? right?
2020-12-23 22:17:49 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:69a4:dccb:26c7:addf)
2020-12-23 22:21:55 +0100 <__monty__> > :t Data.Vector.thaw (Data.Vector.fromList ([1..3] :: [Int]))
2020-12-23 22:21:57 +0100 <lambdabot> <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘:’
2020-12-23 22:22:03 +0100 <__monty__> :t Data.Vector.thaw (Data.Vector.fromList ([1..3] :: [Int]))
2020-12-23 22:22:05 +0100 <lambdabot> Control.Monad.Primitive.PrimMonad m => m (Data.Vector.Mutable.MVector (Control.Monad.Primitive.PrimState m) Int)
2020-12-23 22:22:17 +0100kam1(~kam1@24.231.108.143) (Ping timeout: 265 seconds)
2020-12-23 22:22:19 +0100bitmagie(~Thunderbi@200116b806efa400c8baafc3789c3ca0.dip.versatel-1u1.de) (Quit: bitmagie)
2020-12-23 22:22:34 +0100sand_dull(~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 256 seconds)
2020-12-23 22:23:23 +0100hnOsmium0001(uid453710@gateway/web/irccloud.com/x-puqqxfwctkhqhqmf) (Quit: Connection closed for inactivity)
2020-12-23 22:23:38 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2020-12-23 22:27:44 +0100star_cloud(~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
2020-12-23 22:28:20 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-12-23 22:30:12 +0100Guest_93(019dd2bc@1.157.210.188)
2020-12-23 22:30:27 +0100Guest_93(019dd2bc@1.157.210.188) (Remote host closed the connection)
2020-12-23 22:31:19 +0100 <fuzzypixelz> In megaparsec how can say something like manyTill asciiChar (digitChar <|> eof)? Because this doesn't compile, because <|> can't combine parsers of different types apparently
2020-12-23 22:31:54 +0100 <fuzzypixelz> as in, "just keep consuming ascii chars until you hit a digit or eof"
2020-12-23 22:32:08 +0100Lycurgus(~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
2020-12-23 22:33:03 +0100 <fuzzypixelz> I tried "((skipManyTill asciiChar digitChar) <* eof :: Parser Char)" but it still complains about unexpected eof
2020-12-23 22:33:14 +0100 <__monty__> takewhile1P Nothing isNotDigitOrEol
2020-12-23 22:34:07 +0100xcmw(~textual@c-76-120-183-86.hsd1.pa.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-12-23 22:34:43 +0100matryoshka(~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in)
2020-12-23 22:34:54 +0100 <merijn> fuzzypixelz: Or just find a way to make the types of digitChar and eof the same? :)
2020-12-23 22:35:05 +0100matryoshka(~matryoshk@184.75.223.227)
2020-12-23 22:35:22 +0100 <erisco> so there seems to be another notion of "apply" you need… given an object x in the homset domain, and a morphism f from that homset, f x should be an object… but what is this apply called?
2020-12-23 22:35:46 +0100 <__monty__> I keep running into this type `MVector s (MVector (PrimState (MVector s)) Int)` while what I'm after is `MVector s Int`. What's up with this nested MVector business?
2020-12-23 22:36:09 +0100 <merijn> __monty__: code or it didn't happen :p
2020-12-23 22:36:33 +0100 <erisco> right, so if I have an object x, and I have a morphism f from that object, I should be able to refer to the object f is to as f x
2020-12-23 22:36:58 +0100 <erisco> but this isn't "apply" in the sense of exponentials
2020-12-23 22:38:22 +0100kderme(2eb0d7c7@ppp046176215199.access.hol.gr)
2020-12-23 22:38:31 +0100 <__monty__> merijn: http://ix.io/2Jjz
2020-12-23 22:38:55 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 246 seconds)
2020-12-23 22:39:18 +0100dandart(~Thunderbi@2a00:23c7:f5a6:d001:6cf9:1173:9e2a:3c85)
2020-12-23 22:39:32 +0100 <__monty__> Missing the Megaparsec imports.
2020-12-23 22:40:44 +0100ADG1089_(~aditya@122.163.225.112) (Remote host closed the connection)
2020-12-23 22:41:08 +0100ADG1089__(~aditya@122.163.225.112)
2020-12-23 22:42:18 +0100 <monochrom> "code or it didn't happen" finally
2020-12-23 22:42:23 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt)
2020-12-23 22:45:12 +0100 <monochrom> I don't think you should do this inside a parser at all.
2020-12-23 22:46:09 +0100 <__monty__> I'd like to understand why.
2020-12-23 22:46:20 +0100 <monochrom> Or rather, if anything, include runST, don't let the Parser monad see ST or PrimState.
2020-12-23 22:47:03 +0100 <__monty__> include runST in the parser?
2020-12-23 22:47:06 +0100o1lo01ol1o(~o1lo01ol1@bl8-213-81.dsl.telepac.pt) (Ping timeout: 256 seconds)
2020-12-23 22:47:12 +0100 <monochrom> Separation of concerns?
2020-12-23 22:47:49 +0100lassulus(~lassulus@NixOS/user/lassulus) (Remote host closed the connection)
2020-12-23 22:47:55 +0100 <__monty__> So far I've been doing basic data transformation in my parsers. If they can return a list they can return a vector is my thinking.
2020-12-23 22:48:23 +0100 <monochrom> "Parser (m (Cups (PrimState m)))" says that you are not returning anything remotely close to a vector at all.
2020-12-23 22:48:38 +0100ADG1089__(~aditya@122.163.225.112) (Remote host closed the connection)
2020-12-23 22:48:49 +0100 <monochrom> It says you are returning, assuming you will do "m = ST s", an ST program that returns a vector.
2020-12-23 22:49:16 +0100 <monochrom> This is also why you had the XY problem of trying to shoehorn ST s into your newtype.
2020-12-23 22:49:39 +0100 <__monty__> Parser (Cups s) was my first attempt but doesn't work.
2020-12-23 22:49:52 +0100geekosaur(42d52137@66.213.33.55) (Remote host closed the connection)
2020-12-23 22:51:00 +0100 <monochrom> Because you haven't considered "(\xs -> runST ( (thaw . whatever . freeze) xs)) <$> ... "
2020-12-23 22:51:30 +0100 <monochrom> err
2020-12-23 22:51:49 +0100 <monochrom> (\xs -> runST ( (freeze . whatever . thaw) xs)) <$> ...
2020-12-23 22:52:37 +0100MidAutumnHotaru(~MidAutumn@154.91.197.93) (Ping timeout: 256 seconds)
2020-12-23 22:52:59 +0100 <__monty__> But I don't want to freeze the vector? I want to work on the mutable vector after parsing it.
2020-12-23 22:53:39 +0100 <monochrom> Then you have to level-up to ParserT
2020-12-23 22:54:36 +0100MidAutumnHotaru(~MidAutumn@154.91.197.93)
2020-12-23 22:55:18 +0100lassulus(~lassulus@NixOS/user/lassulus)
2020-12-23 22:57:23 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-12-23 22:57:43 +0100 <merijn> and just use IO :p
2020-12-23 22:58:18 +0100 <merijn> __monty__: You wanna just parse and return a immutable vector and thaw that in the end/where you start using it
2020-12-23 22:58:36 +0100L29Ah(~L29Ah@unaffiliated/l29ah) (Ping timeout: 240 seconds)
2020-12-23 22:58:42 +0100 <merijn> Trying to have it thawed from the start is a recipe for pain like "can't store it in anything without parameterising over 's'"
2020-12-23 22:59:14 +0100 <monochrom> I would do that. Separation of concerns.
2020-12-23 22:59:29 +0100 <monochrom> But one can always refute "you don't know the actual AoC problem".
2020-12-23 23:00:50 +0100 <monochrom> In fact, the parser return a vanilla list. Change over to mutable vector later.
2020-12-23 23:01:30 +0100 <__monty__> I'm trying to figure out `thaw <$> (whatever :: Parsed (Vector Int))` but running similar type errors involving PrimState.
2020-12-23 23:01:33 +0100 <__monty__> *into
2020-12-23 23:02:02 +0100 <monochrom> The type error is genuine. Wrong monad.
2020-12-23 23:02:47 +0100ulidtko|k(~ulidtko@193.111.48.79)
2020-12-23 23:03:40 +0100rprije(~rprije@202.168.43.92) (Remote host closed the connection)
2020-12-23 23:03:46 +0100erisco(~erisco@104-195-141-253.cpe.teksavvy.com) (Ping timeout: 246 seconds)
2020-12-23 23:05:00 +0100 <__monty__> How do I turn a list into a mutable vector to be used in a function MVector s Int -> MVector s Int?
2020-12-23 23:05:08 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:69a4:dccb:26c7:addf) (Ping timeout: 258 seconds)
2020-12-23 23:05:57 +0100ulidtko(~ulidtko@194.54.80.38) (Ping timeout: 272 seconds)
2020-12-23 23:06:01 +0100L29Ah(~L29Ah@unaffiliated/l29ah)
2020-12-23 23:07:23 +0100 <merijn> __monty__: PrimState require's an 'm' that is PrimMonad
2020-12-23 23:07:32 +0100 <merijn> __monty__: Parsed (presumably) is not
2020-12-23 23:07:51 +0100 <merijn> Since the only default PrimMonad are IO/ST s and transformers over those
2020-12-23 23:09:05 +0100abitibien(~abitibien@51.194.80.91) (Ping timeout: 240 seconds)
2020-12-23 23:09:43 +0100 <merijn> Anyway, I still recommend reading the "Lazy Functional State Threads" paper I mentioned a while back
2020-12-23 23:10:32 +0100 <merijn> Or simpler, just parse a frozen Vector and only thaw it when you're gonna do something with it
2020-12-23 23:10:39 +0100bandali(bandali@fsf/interns/bandali) (Changing host)
2020-12-23 23:10:39 +0100bandali(bandali@fsf/emeritus/bandali)
2020-12-23 23:10:47 +0100 <merijn> Vectors, like food, are easier kept and transported when frozen
2020-12-23 23:10:48 +0100 <fuzzypixelz> I freaking love functional parsing
2020-12-23 23:11:15 +0100 <__monty__> I'm trying to get the absolute minimum knowledge I need to use MVector. Do I really need to read a paper for this?
2020-12-23 23:11:19 +0100Mikagami(~MOSCOS@122.54.107.175) (Read error: Connection reset by peer)
2020-12-23 23:11:23 +0100 <__monty__> I am parsing a regular vector now though.
2020-12-23 23:11:33 +0100 <monochrom> <merijn> Or simpler, just parse a frozen Vector and only thaw it when you're gonna do something with it
2020-12-23 23:11:42 +0100 <__monty__> Hence trying to fmap thaw into the Either.
2020-12-23 23:11:43 +0100Mikagami(~MOSCOS@122.54.107.175)
2020-12-23 23:11:55 +0100 <__monty__> So I can then call the function that wants an MVector.
2020-12-23 23:12:10 +0100 <merijn> __monty__: thaw doesn't give you an MVector
2020-12-23 23:12:18 +0100 <merijn> It gives you an *action* that returns an MVector
2020-12-23 23:12:58 +0100 <monochrom> Don't even fmap into the Either, until after you understand the elementary solution: just use pattern matching on Left and Right.
2020-12-23 23:13:39 +0100 <merijn> __monty__: See my solution for last year: https://github.com/merijn/AdventOfCode2019/blob/master/Day2.hs
2020-12-23 23:13:58 +0100 <merijn> You don't thaw until the moment you start actually running something mutable
2020-12-23 23:14:10 +0100 <merijn> Because 1) it just makes your life difficult and 2) it has no benefits
2020-12-23 23:14:35 +0100notzmv(~user@unaffiliated/zmv)
2020-12-23 23:14:54 +0100 <monochrom> And you slap your runST on to the smallest minimal scope possible.
2020-12-23 23:15:45 +0100fradet(~pi@216.252.75.247)
2020-12-23 23:16:18 +0100son0p(~son0p@181.136.122.143)
2020-12-23 23:16:43 +0100fradet(~pi@216.252.75.247) (Client Quit)
2020-12-23 23:17:26 +0100Deide(~Deide@217.155.19.23)
2020-12-23 23:17:42 +0100nyd(~nyd@unaffiliated/elysian) (Ping timeout: 260 seconds)
2020-12-23 23:17:54 +0100sw1nn(~sw1nn@2a00:23c6:2385:3a00:70f5:3f58:1132:aff0)
2020-12-23 23:18:21 +0100fradet(~pi@216.252.75.247)
2020-12-23 23:20:58 +0100 <fuzzypixelz> up until now I've been using parseTest inside GHCi, now what?
2020-12-23 23:21:21 +0100 <merijn> Anyway, night!
2020-12-23 23:21:34 +0100 <fuzzypixelz> do I just use bind to get the tokens?
2020-12-23 23:24:24 +0100iekfkk(~username@117.200.2.100)
2020-12-23 23:26:44 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-12-23 23:27:37 +0100bisickcor(~username@117.202.60.218) (Ping timeout: 260 seconds)
2020-12-23 23:34:47 +0100neiluj(~jco@91-167-203-101.subs.proxad.net) (Ping timeout: 265 seconds)
2020-12-23 23:35:37 +0100Franciman(~francesco@host-82-49-79-73.retail.telecomitalia.it) (Quit: Leaving)
2020-12-23 23:41:17 +0100xcmw(~textual@2601:541:4404:bb5c:e16e:dd8f:7929:2608)
2020-12-23 23:42:44 +0100knupfer(~Thunderbi@200116b82ccd3500a4b860c02e178792.dip.versatel-1u1.de) (Quit: knupfer)
2020-12-23 23:42:53 +0100knupfer(~Thunderbi@200116b82ccd3500f45b060487e69f4e.dip.versatel-1u1.de)
2020-12-23 23:43:27 +0100machinedgod(~machinedg@24.105.81.50)
2020-12-23 23:43:49 +0100 <solonarv> you use 'parse', or 'parseMaybe' if you don't care about the error message
2020-12-23 23:43:58 +0100bitmagie(~Thunderbi@200116b806efa4000d3e16972e0f16a6.dip.versatel-1u1.de)
2020-12-23 23:44:21 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
2020-12-23 23:45:34 +0100coot(~coot@37.30.50.187.nat.umts.dynamic.t-mobile.pl)
2020-12-23 23:46:00 +0100hackagealgebraic-graphs-io 0.1.5.0 - I/O utilities for algebraic-graphs https://hackage.haskell.org/package/algebraic-graphs-io-0.1.5.0 (ocramz)
2020-12-23 23:46:10 +0100matryoshka(~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in)
2020-12-23 23:46:29 +0100matryoshka(~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
2020-12-23 23:48:10 +0100mputz(~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz)
2020-12-23 23:53:43 +0100vs^(vs@ip98-184-89-2.mc.at.cox.net) ()
2020-12-23 23:54:33 +0100recursion_ninja(ad4dccaf@pool-173-77-204-175.nycmny.fios.verizon.net)
2020-12-23 23:54:41 +0100Synthetica(uid199651@gateway/web/irccloud.com/x-arxbcjhlstycoeub) (Quit: Connection closed for inactivity)
2020-12-23 23:56:26 +0100 <recursion_ninja> Hey, I'm trying to build my Haskell project by running "cabal install" but I get the error message "ghc: no input files." Funnily, "cabal build" works perfectly fine. Does anyone have any idea how to debug this... less than informative error message? My project is pretty complicated so I'm just looking for pointers for isolating the issue.
2020-12-23 23:56:30 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-12-23 23:57:53 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-12-23 23:59:02 +0100 <shapr> Is there a good name for foo :: [a -> b] -> a -> [b] ?