2020/10/21

2020-10-21 00:01:39 +0200nineonin_(~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 00:01:49 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2020-10-21 00:02:16 +0200eedgit2(~chat.free@95.179.237.21) (Remote host closed the connection)
2020-10-21 00:02:42 +0200eedgit2(~chat.free@95.179.237.21)
2020-10-21 00:04:03 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 00:05:09 +0200caef^(caef@ip98-184-89-2.mc.at.cox.net) ()
2020-10-21 00:05:25 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 00:08:36 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 00:09:28 +0200 <monochrom> HasCallStack is implemented by being an alias of an implicit parameter constraint.
2020-10-21 00:10:41 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-21 00:10:55 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
2020-10-21 00:11:50 +0200 <monochrom> Because of ContraintKinds, it can be coded as a type alias, "type HasCallStack = ?callstack :: CallStack" and then you just write "f :: HasCallStack => Int" it simply expands to "f :: (?callStack :: CallStack) => Int"
2020-10-21 00:13:57 +0200hackageantiope-sqs 7.5.2 - Please see the README on Github at <https://github.com/arbor/antiope#readme> https://hackage.haskell.org/package/antiope-sqs-7.5.2 (arbornetworks)
2020-10-21 00:14:58 +0200hackageantiope-es 7.5.2, antiope-dynamodb 7.5.2, antiope-core 7.5.2, antiope-s3 7.5.2, antiope-shell 7.5.2, antiope-messages 7.5.2, antiope-athena 7.5.2, antiope-sns 7.5.2, antiope-contract 7.5.2, antiope-optparse-applicative 7.5.2 (arbornetworks)
2020-10-21 00:15:33 +0200dhouthoo(~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
2020-10-21 00:15:40 +0200ndbtpo^(ndbtpo@ip98-184-89-2.mc.at.cox.net)
2020-10-21 00:15:41 +0200 <hpc> if that was anything but HasCallStack, that trick would make code unreadable with terrifying ease
2020-10-21 00:17:00 +0200LKoen(~LKoen@lstlambert-657-1-123-43.w92-154.abo.wanadoo.fr) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2020-10-21 00:18:03 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
2020-10-21 00:18:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 00:22:25 +0200sagax(~sagax_nb@213.138.71.146) (Ping timeout: 244 seconds)
2020-10-21 00:23:18 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 00:31:09 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 00:32:45 +0200isovector1(~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Quit: Leaving)
2020-10-21 00:33:16 +0200jsynacek(~jsynacek@ip-185-149-130-112.kmenet.cz) (Ping timeout: 246 seconds)
2020-10-21 00:36:49 +0200Guest88073(~lep@94.31.83.149) (Read error: Connection reset by peer)
2020-10-21 00:36:49 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-10-21 00:36:55 +0200lep-delete(~lep@94.31.83.149)
2020-10-21 00:39:34 +0200son0p(~son0p@181.136.122.143) (Quit: leaving)
2020-10-21 00:40:42 +0200nineonin_(~textual@216.81.48.202)
2020-10-21 00:41:17 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 00:42:14 +0200ensyde(~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd)
2020-10-21 00:42:34 +0200babygnu(~robert@gateway/tor-sasl/babygnu) (Quit: Leaving)
2020-10-21 00:42:48 +0200babygnu(~robert@gateway/tor-sasl/babygnu)
2020-10-21 00:46:03 +0200jedws(~jedws@121.209.161.98)
2020-10-21 00:46:19 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds)
2020-10-21 00:46:21 +0200irc_user(uid423822@gateway/web/irccloud.com/x-jjpkvgqppresuvbx) (Quit: Connection closed for inactivity)
2020-10-21 00:46:32 +0200karanlikmadde(~karanlikm@2a01:c23:5c46:6a00:1cbf:1cb4:cff6:749e) (Quit: karanlikmadde)
2020-10-21 00:46:38 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-21 00:51:06 +0200Alleria_(~AllahuAkb@2604:2000:1484:26:4c41:7084:aa7f:3802) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 00:55:39 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 260 seconds)
2020-10-21 00:55:48 +0200heatsink(~heatsink@107.136.5.69)
2020-10-21 00:56:48 +0200babygnu(~robert@gateway/tor-sasl/babygnu) (Quit: Leaving)
2020-10-21 00:58:00 +0200Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2020-10-21 01:00:10 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
2020-10-21 01:00:39 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 01:02:00 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
2020-10-21 01:02:02 +0200irc_user(uid423822@gateway/web/irccloud.com/x-ccinjvlcbfblsfxt)
2020-10-21 01:02:07 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 01:02:44 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
2020-10-21 01:06:37 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 265 seconds)
2020-10-21 01:06:40 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-21 01:06:42 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 01:07:55 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 246 seconds)
2020-10-21 01:08:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 01:09:54 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
2020-10-21 01:10:05 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
2020-10-21 01:10:39 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-10-21 01:12:02 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 256 seconds)
2020-10-21 01:12:18 +0200scratchy_beard(~doug@cpc110383-king13-2-0-cust408.19-1.cable.virginm.net) (Ping timeout: 260 seconds)
2020-10-21 01:18:24 +0200nullheroes(~danielvu@168.235.66.22) (Quit: WeeChat 2.9)
2020-10-21 01:18:26 +0200Amras(~Amras@unaffiliated/amras0000) (Remote host closed the connection)
2020-10-21 01:20:14 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
2020-10-21 01:21:02 +0200Amras(~Amras@unaffiliated/amras0000)
2020-10-21 01:21:09 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 01:24:47 +0200acidjnk_new(~acidjnk@p200300d0c723787960581240d4a66b7e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 01:26:07 +0200p8m(p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 246 seconds)
2020-10-21 01:32:34 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699)
2020-10-21 01:32:43 +0200ystael(~ystael@209.6.50.55) (Ping timeout: 265 seconds)
2020-10-21 01:33:51 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2020-10-21 01:34:54 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-21 01:35:13 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-21 01:35:46 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 01:37:11 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 01:37:55 +0200jedws(~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 01:38:55 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 01:40:36 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
2020-10-21 01:43:29 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-10-21 01:43:50 +0200p8m(p8m@gateway/vpn/protonvpn/p8m)
2020-10-21 01:44:15 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-21 01:46:19 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 01:46:46 +0200jedws(~jedws@121.209.161.98)
2020-10-21 01:48:16 +0200jedws(~jedws@121.209.161.98) (Client Quit)
2020-10-21 01:49:58 +0200heatsink(~heatsink@107.136.5.69) (Remote host closed the connection)
2020-10-21 01:51:11 +0200p8m(p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 258 seconds)
2020-10-21 01:53:42 +0200borne(~fritjof@200116b8645a73005f17201290692466.dip.versatel-1u1.de) (Ping timeout: 246 seconds)
2020-10-21 01:54:01 +0200jedws(~jedws@121.209.161.98)
2020-10-21 01:54:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 01:56:39 +0200jedws(~jedws@121.209.161.98) (Client Quit)
2020-10-21 01:58:45 +0200Alleria_(~AllahuAkb@2604:2000:1484:26:9062:c31d:ffbb:9534)
2020-10-21 02:00:00 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Ping timeout: 246 seconds)
2020-10-21 02:00:02 +0200cassier(~cassier@195.206.169.184) ()
2020-10-21 02:00:31 +0200dansho(~dansho@ip68-108-167-185.lv.lv.cox.net)
2020-10-21 02:00:59 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds)
2020-10-21 02:01:51 +0200ulidtko(~ulidtko@193.111.48.79) (Remote host closed the connection)
2020-10-21 02:02:09 +0200ulidtko(~ulidtko@193.111.48.79)
2020-10-21 02:05:58 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2020-10-21 02:07:05 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 02:10:25 +0200p8m(p8m@gateway/vpn/protonvpn/p8m)
2020-10-21 02:10:26 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
2020-10-21 02:10:52 +0200nados(~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving)
2020-10-21 02:12:30 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 02:13:24 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-21 02:15:01 +0200 <koz_> @pl \x -> (x, x)
2020-10-21 02:15:02 +0200 <lambdabot> join (,)
2020-10-21 02:17:20 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
2020-10-21 02:17:46 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-10-21 02:18:16 +0200nullheroes(~danielvu@168.235.66.22)
2020-10-21 02:19:20 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 02:23:27 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 02:25:37 +0200 <MarcelineVQ> dup
2020-10-21 02:26:24 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24)
2020-10-21 02:28:18 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 02:29:22 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 02:29:52 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 02:32:42 +0200jedws(~jedws@121.209.161.98)
2020-10-21 02:33:38 +0200arw(~arw@impulse.informatik.uni-erlangen.de) (Ping timeout: 260 seconds)
2020-10-21 02:33:40 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2020-10-21 02:34:25 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds)
2020-10-21 02:38:25 +0200reppertj(~textual@pool-96-246-209-59.nycmny.fios.verizon.net)
2020-10-21 02:39:49 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 02:40:22 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 02:42:57 +0200ensyde(~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) (Quit: WeeChat 2.9)
2020-10-21 02:43:28 +0200jedws(~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 02:43:30 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net)
2020-10-21 02:44:07 +0200jedws(~jedws@121.209.161.98)
2020-10-21 02:44:22 +0200howdoi(uid224@gateway/web/irccloud.com/x-jhjfudcxbbzyovpj) (Quit: Connection closed for inactivity)
2020-10-21 02:44:52 +0200jedws(~jedws@121.209.161.98) (Client Quit)
2020-10-21 02:45:40 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 02:46:52 +0200maerwald_(~maerwald@5.45.98.221)
2020-10-21 02:47:27 +0200jedws(~jedws@121.209.161.98)
2020-10-21 02:47:45 +0200maerwald(~maerwald@mail.hasufell.de) (Ping timeout: 240 seconds)
2020-10-21 02:49:13 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 02:50:02 +0200jedws(~jedws@121.209.161.98) (Client Quit)
2020-10-21 02:50:02 +0200codygman(~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
2020-10-21 02:50:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 02:50:47 +0200codygman(~codygman@47-184-107-46.dlls.tx.frontiernet.net)
2020-10-21 02:53:01 +0200ukari(~ukari@unaffiliated/ukari)
2020-10-21 02:55:23 +0200howdoi(uid224@gateway/web/irccloud.com/x-tsohuehqbugpkvfg)
2020-10-21 02:56:56 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
2020-10-21 02:57:25 +0200dhil(~dhil@195.213.192.122) (Ping timeout: 240 seconds)
2020-10-21 02:59:22 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-21 03:02:00 +0200supercoven_(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
2020-10-21 03:02:33 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
2020-10-21 03:04:05 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 240 seconds)
2020-10-21 03:05:45 +0200shatriff_(~vitaliish@176.52.219.10)
2020-10-21 03:05:51 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 03:06:29 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 03:06:43 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-21 03:08:33 +0200christo(~chris@81.96.113.213)
2020-10-21 03:08:39 +0200shatriff(~vitaliish@176.52.219.10) (Ping timeout: 260 seconds)
2020-10-21 03:09:58 +0200plutoniix(~q@ppp-27-55-76-45.revip3.asianet.co.th)
2020-10-21 03:10:25 +0200Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 240 seconds)
2020-10-21 03:10:32 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 03:10:45 +0200worc3131(~quassel@2a02:c7f:c026:9500:a0d2:b9d1:42a4:69b4) (Ping timeout: 272 seconds)
2020-10-21 03:10:57 +0200ericsagnes(~ericsagne@2405:6580:0:5100:1c6c:f39a:cdd0:9852) (Ping timeout: 260 seconds)
2020-10-21 03:11:01 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 03:11:51 +0200puffnfresh(~puffnfres@180-150-38-83.b49626.bne.nbn.aussiebb.net)
2020-10-21 03:13:12 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 03:13:18 +0200Chi1thangoo(~Chi1thang@87.112.60.168) (Remote host closed the connection)
2020-10-21 03:13:42 +0200Chi1thangoo(~Chi1thang@87.112.60.168)
2020-10-21 03:14:51 +0200xiinotulp(~q@ppp-27-55-74-146.revip3.asianet.co.th)
2020-10-21 03:14:53 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 03:17:51 +0200plutoniix(~q@ppp-27-55-76-45.revip3.asianet.co.th) (Read error: Connection reset by peer)
2020-10-21 03:19:43 +0200Chi1thangoo(~Chi1thang@87.112.60.168) (Ping timeout: 260 seconds)
2020-10-21 03:20:36 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-10-21 03:21:16 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
2020-10-21 03:22:25 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
2020-10-21 03:22:45 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
2020-10-21 03:23:01 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2020-10-21 03:23:27 +0200christo(~chris@81.96.113.213)
2020-10-21 03:23:49 +0200ericsagnes(~ericsagne@2405:6580:0:5100:5d5:9ab8:7a96:b021)
2020-10-21 03:23:59 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 03:24:30 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus)
2020-10-21 03:26:55 +0200texasmynsted(~texasmyns@62.182.99.148)
2020-10-21 03:28:34 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
2020-10-21 03:32:10 +0200 <texasmynsted> hello
2020-10-21 03:32:13 +0200oisdk(~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Ping timeout: 244 seconds)
2020-10-21 03:33:07 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Read error: Connection reset by peer)
2020-10-21 03:33:44 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-21 03:34:03 +0200oisdk(~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f)
2020-10-21 03:35:45 +0200danso(~dan@69-165-210-185.cable.teksavvy.com)
2020-10-21 03:38:42 +0200darjeeli1(~darjeelin@122.245.211.155) (Ping timeout: 260 seconds)
2020-10-21 03:38:51 +0200nineonin_(~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 03:43:08 +0200 <ghoulguy> hi
2020-10-21 03:45:02 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 03:46:18 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-10-21 03:47:47 +0200 <koz_> Sup?
2020-10-21 03:47:53 +0200 <koz_> :t dup
2020-10-21 03:47:54 +0200 <lambdabot> error: Variable not in scope: dup
2020-10-21 03:54:51 +0200xff0x_(~fox@2001:1a81:529c:a900:bce5:4c81:f65e:145e)
2020-10-21 03:56:29 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 03:57:02 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 260 seconds)
2020-10-21 03:58:04 +0200xff0x(~fox@port-92-195-83-98.dynamic.as20676.net) (Ping timeout: 258 seconds)
2020-10-21 04:00:16 +0200 <texasmynsted> anybody up for making a suggestion on improving a small block of simple code?
2020-10-21 04:00:49 +0200taurux(~taurux@net-93-146-7-193.cust.vodafonedsl.it) (Ping timeout: 246 seconds)
2020-10-21 04:01:33 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-10-21 04:01:40 +0200 <texasmynsted> heh
2020-10-21 04:01:43 +0200taurux(~taurux@net-188-152-111-153.cust.dsl.teletu.it)
2020-10-21 04:03:46 +0200 <texasmynsted> The lets look like something I should be able to remove. https://gist.github.com/mmynsted/b6df6c87056ab5582f82b8b329e39cac
2020-10-21 04:04:48 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 04:07:43 +0200lagothrix(~lagothrix@unaffiliated/lagothrix) (Killed (tepper.freenode.net (Nickname regained by services)))
2020-10-21 04:07:48 +0200lagothrix(~lagothrix@unaffiliated/lagothrix)
2020-10-21 04:09:06 +0200shatriff_(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 04:09:23 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 04:09:31 +0200 <dsal> `(,) bad good` is a funny way to write `(bad, good)`
2020-10-21 04:09:54 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 04:10:12 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 04:10:43 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 04:11:02 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 04:11:15 +0200 <dsal> `f (_, v) = V.toList $ V.map redirectMapToPair v` looks a lot like `V.toList . map redirectrMapToPair . snd`
2020-10-21 04:11:28 +0200 <dsal> But why are you making a pair if you just want the second part? Just don't make the tuple.
2020-10-21 04:11:31 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 04:11:51 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 04:12:19 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 04:13:37 +0200 <dsal> Something like: `loadUrlMap bs = V.toList . V.map f <$> decodeByNameWith myOptions bs where f (RedirectMap _ good) = good`
2020-10-21 04:13:42 +0200 <dsal> But I don't know what all that stuff does.
2020-10-21 04:15:21 +0200 <texasmynsted> ah well. because I am applying f to the Right of an Either. The Right of the Either has a tuple where I only want the snd bit, which is a vector...
2020-10-21 04:15:54 +0200 <texasmynsted> I will try your suggestions. I think they are more readable in any case
2020-10-21 04:17:39 +0200urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2020-10-21 04:17:53 +0200alp(~alp@2a01:e0a:58b:4920:b909:f1ee:7d69:ad6b) (Ping timeout: 272 seconds)
2020-10-21 04:18:01 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-21 04:18:08 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 04:18:25 +0200 <texasmynsted> THank you
2020-10-21 04:18:30 +0200theDon(~td@94.134.91.48) (Ping timeout: 265 seconds)
2020-10-21 04:18:33 +0200etherealemb(602910b8@096-041-016-184.res.spectrum.com)
2020-10-21 04:19:46 +0200 <dsal> > let f (_, v) = show v in f <$> Right (1,2)
2020-10-21 04:19:48 +0200 <lambdabot> Right "2"
2020-10-21 04:19:54 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 04:19:58 +0200 <dsal> > show . snd <$> Right (1,2)
2020-10-21 04:20:01 +0200 <lambdabot> Right "2"
2020-10-21 04:20:08 +0200theDon(~td@94.134.91.5)
2020-10-21 04:20:28 +0200 <dsal> (of course if you don't want the tuple, it's easier to just never have one)
2020-10-21 04:20:37 +0200 <etherealemb> Which Haskell GraphQL framework would you guys suggest?
2020-10-21 04:21:23 +0200 <dsal> > fmap show <$> Right (1,2)
2020-10-21 04:21:25 +0200 <lambdabot> Right (1,"2")
2020-10-21 04:22:25 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
2020-10-21 04:25:10 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 04:25:46 +0200 <texasmynsted> Okay I updated the gist with a comment, taking your suggestions. The ones I undestood.
2020-10-21 04:26:04 +0200 <dsal> Oh, if that's vector, V.map is just fmap. And V.toList is in Foldable. You don't need the V. My brain keeps trying to remove stuff you don't need there. You may not even need Either. heh
2020-10-21 04:26:36 +0200 <dsal> IMO, you should really use `where` instead of `let`. I don't think `let` is helping you here.
2020-10-21 04:26:52 +0200 <texasmynsted> okay
2020-10-21 04:27:10 +0200 <dsal> What is `decodeByNameWith` ? I think that's part of what's confusing me. I'm making assumptions.
2020-10-21 04:27:22 +0200xerox_(~xerox@unaffiliated/xerox) (Ping timeout: 260 seconds)
2020-10-21 04:27:43 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
2020-10-21 04:27:53 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Client Quit)
2020-10-21 04:28:01 +0200etherealemb(602910b8@096-041-016-184.res.spectrum.com) (Remote host closed the connection)
2020-10-21 04:28:15 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
2020-10-21 04:30:28 +0200hackageeve 0.1.9.0 - An extensible event framework https://hackage.haskell.org/package/eve-0.1.9.0 (ChrisPenner)
2020-10-21 04:30:48 +0200emb(602910b8@096-041-016-184.res.spectrum.com)
2020-10-21 04:31:49 +0200 <texasmynsted> oh that is from cassava
2020-10-21 04:31:52 +0200 <texasmynsted> decodeByNameWith :: FromNamedRecord a => DecodeOptions -> ByteString -> Either String (Header, Vector a)
2020-10-21 04:32:05 +0200jedws(~jedws@121.209.161.98)
2020-10-21 04:32:40 +0200 <texasmynsted> it gives me the pair on the happy path and I do do not need the Header
2020-10-21 04:33:08 +0200 <dsal> Ah, OK. Yeah. I thought something like that was happening, but it was kind of weird with the pair you were processing.
2020-10-21 04:33:34 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
2020-10-21 04:33:47 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 04:34:13 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2020-10-21 04:34:27 +0200 <dsal> `fmap.fmap` will let you give an `(a -> b)` to make that a `Either String (Header, Vector a) -> Either String (Header, Vector b)`
2020-10-21 04:34:39 +0200 <dsal> But you might as well throw away the header.
2020-10-21 04:35:03 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net) (Remote host closed the connection)
2020-10-21 04:35:48 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net)
2020-10-21 04:36:25 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Ping timeout: 240 seconds)
2020-10-21 04:36:29 +0200 <dsal> You could also write: `good :: RedirectMap -> String; good (RedirectMap _ g) = g` and then `loadUrlMap = toList . ((fmap.fmap) good) . decodeByNameWith myOptions`
2020-10-21 04:37:11 +0200 <dsal> I probalby missed something there, but that might be a bit easier to read. Unless you don't like doublefmaps, but (I put too many parens in). In either case, separating out the function for getting goodness from RedirectMap makes it a good deal cleaner.
2020-10-21 04:38:20 +0200 <dsal> This would be easier if I started up a GHCI
2020-10-21 04:39:14 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-21 04:39:18 +0200emb(602910b8@096-041-016-184.res.spectrum.com) (Remote host closed the connection)
2020-10-21 04:39:33 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-10-21 04:39:47 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 04:39:54 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-21 04:40:41 +0200crestfallen(~jvw@135-180-15-188.fiber.dynamic.sonic.net)
2020-10-21 04:41:41 +0200christo(~chris@81.96.113.213)
2020-10-21 04:44:19 +0200 <dsal> You could also avoid having to write `decodeByNameWith myOptions` and then worrying about the `snd`ing by making `decode :: FromNamedRecord a => ByteString -> Either String (Vector a); decode = fmap snd . decodeByNameWith myOptions`.
2020-10-21 04:45:00 +0200crestfallen(~jvw@135-180-15-188.fiber.dynamic.sonic.net) (Client Quit)
2020-10-21 04:45:46 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
2020-10-21 04:48:47 +0200 <sm[m]> how best to configure stack ghci --ghci-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple as my default ?
2020-10-21 04:49:42 +0200 <sm[m]> I can put :set -package pretty-simple and :set -interactive-print=Text.Pretty.Simple.pPrint in ~/.ghci, but it only works in projects where I have installed the pretty-simple package, unlike stack's --package which installs it if missing
2020-10-21 04:50:12 +0200ddellacosta(~dd@86.106.121.168) (Ping timeout: 256 seconds)
2020-10-21 04:50:34 +0200 <sm[m]> I wondered if there's a way other than alias stack-ghci='stack ghci --ghci-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple'
2020-10-21 04:53:08 +0200 <sm[m]> by the way, this is from https://github.com/cdepillabout/pretty-simple readme and seems pretty great - auto pretty printing of values in ghci
2020-10-21 04:54:00 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
2020-10-21 04:54:19 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 04:56:28 +0200hackageselections 0.3.0.0 - Combinators for operating with selections over an underlying functor https://hackage.haskell.org/package/selections-0.3.0.0 (ChrisPenner)
2020-10-21 04:57:14 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2020-10-21 05:00:28 +0200hackagelens-filesystem 0.1.0.0 - Lens interface for your filesystem; still a bit experimental https://hackage.haskell.org/package/lens-filesystem-0.1.0.0 (ChrisPenner)
2020-10-21 05:00:50 +0200 <texasmynsted> actually what I need is a mapping of bad url to good url. So the (bad, good) pair is what I am after. A list of them.
2020-10-21 05:01:45 +0200 <texasmynsted> The strange part is that cassava is giving me (Header, Vector), I then drop the Header, and parse out the Vector to get the bad/good pair.
2020-10-21 05:02:26 +0200 <texasmynsted> :-) Lots of good advice. Thank you so much dsal!
2020-10-21 05:02:54 +0200 <dsal> Oh. That's just `Map.fromList`
2020-10-21 05:04:20 +0200thiross(~user@161.129.40.8)
2020-10-21 05:05:12 +0200dansho(~dansho@ip68-108-167-185.lv.lv.cox.net) (Quit: Leaving)
2020-10-21 05:06:33 +0200thiross(~user@161.129.40.8) ()
2020-10-21 05:08:00 +0200 <dsal> I got super distracted by a twitch stream...
2020-10-21 05:08:25 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-10-21 05:10:59 +0200 <dsal> So if you have `(a -> (k,v))` and you want `(Either String (Header, Vector a)` -> `Either String (Map k v))` then that's something like `fmap (Map.fromList . toList . fmap convert)` (But, again, I don't have a ghci so my faulty brain is guessing.
2020-10-21 05:11:00 +0200 <dsal> )
2020-10-21 05:12:07 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 05:14:44 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl) (Ping timeout: 258 seconds)
2020-10-21 05:16:50 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
2020-10-21 05:17:25 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
2020-10-21 05:18:21 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 05:19:24 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 265 seconds)
2020-10-21 05:20:27 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 05:21:36 +0200Amras(~Amras@unaffiliated/amras0000) (Ping timeout: 246 seconds)
2020-10-21 05:29:30 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 05:30:58 +0200 <dsal> texasmynsted: finally got my ghci running and can confirm: https://www.irccloud.com/pastebin/IV3jl2bc/conv.hs
2020-10-21 05:31:57 +0200oisdk(~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Quit: oisdk)
2020-10-21 05:32:23 +0200 <dsal> texasmynsted: with decode as mentioned above: https://www.irccloud.com/pastebin/w46VHMk2/
2020-10-21 05:32:45 +0200 <texasmynsted> :-)
2020-10-21 05:32:53 +0200oisdk(~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f)
2020-10-21 05:33:40 +0200christo(~chris@81.96.113.213)
2020-10-21 05:34:58 +0200 <dsal> Does that make sense?
2020-10-21 05:35:13 +0200 <dsal> (my brain is feeling kind of sluggish tonight, so I'm surprised that typechecked)
2020-10-21 05:35:19 +0200Saukk(~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
2020-10-21 05:35:54 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 05:36:22 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 05:40:55 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2020-10-21 05:42:53 +0200gnumonic(~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
2020-10-21 05:43:25 +0200jespada(~jespada@90.254.245.15) (Ping timeout: 240 seconds)
2020-10-21 05:43:34 +0200m0rphism(~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 265 seconds)
2020-10-21 05:45:59 +0200 <dsal> The one in the middle might look a little complicated, but it works with all Foldables, not just Vector. Partially confusing because I didn't apply it to the `got` variable that I'd defined for that purpose: https://www.irccloud.com/pastebin/0Gcm62uR/got.hs
2020-10-21 05:46:21 +0200jespada(~jespada@90.254.245.15)
2020-10-21 05:49:10 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
2020-10-21 05:52:16 +0200 <Squarism> Someimes i feel ghci ":info class" gets too much with all instances listed. Isnt there just a command showing the class?
2020-10-21 05:52:44 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 05:52:45 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 246 seconds)
2020-10-21 05:54:56 +0200bitmagie(~Thunderbi@200116b806c15c00bd70654fe0e81318.dip.versatel-1u1.de)
2020-10-21 05:56:06 +0200Sheilong(uid293653@gateway/web/irccloud.com/x-ftxlshtfjorkikim) ()
2020-10-21 05:58:52 +0200PotatoHatsue[Q]PotatoHatsue|T
2020-10-21 06:00:10 +0200ph88(~ph88@ip5f5af0cc.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
2020-10-21 06:01:11 +0200 <ghoulguy> Not that I know of
2020-10-21 06:01:28 +0200hackagelens-filesystem 0.1.0.1 - Lens interface for your filesystem; still a bit experimental https://hackage.haskell.org/package/lens-filesystem-0.1.0.1 (ChrisPenner)
2020-10-21 06:04:59 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
2020-10-21 06:05:04 +0200jsomedon(~jsomedon@111.197.237.160)
2020-10-21 06:05:13 +0200nek0(~nek0@2a01:4f8:222:2b41::12) (Quit: ZNC 1.7.5 - https://znc.in)
2020-10-21 06:05:40 +0200nek0(~nek0@mail.nek0.eu)
2020-10-21 06:06:21 +0200irc_user(uid423822@gateway/web/irccloud.com/x-ccinjvlcbfblsfxt) (Quit: Connection closed for inactivity)
2020-10-21 06:06:29 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 06:06:39 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
2020-10-21 06:06:41 +0200Saukk(~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
2020-10-21 06:06:54 +0200bartemius(~bartemius@109.252.19.142)
2020-10-21 06:08:22 +0200burg_philo(~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Client Quit)
2020-10-21 06:08:48 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 06:10:21 +0200Rudd0(~Rudd0@185.189.115.103)
2020-10-21 06:10:43 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 06:10:54 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
2020-10-21 06:11:19 +0200gnumonic(~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
2020-10-21 06:14:58 +0200huluobo(8024078d@128.36.7.141)
2020-10-21 06:15:42 +0200huluobo(8024078d@128.36.7.141) (Remote host closed the connection)
2020-10-21 06:16:00 +0200evanjs(~evanjs@075-129-188-019.res.spectrum.com) (Quit: ZNC 1.8.1 - https://znc.in)
2020-10-21 06:16:27 +0200hackagedhall-lsp-server 1.0.11 - Language Server Protocol (LSP) server for Dhall https://hackage.haskell.org/package/dhall-lsp-server-1.0.11 (GabrielGonzalez)
2020-10-21 06:17:11 +0200texasmynsted(~texasmyns@62.182.99.148) (Remote host closed the connection)
2020-10-21 06:17:25 +0200evanjs(~evanjs@075-129-188-019.res.spectrum.com)
2020-10-21 06:17:28 +0200hackagedhall-json 1.7.3 - Convert between Dhall and JSON or YAML https://hackage.haskell.org/package/dhall-json-1.7.3 (GabrielGonzalez)
2020-10-21 06:18:27 +0200hackagedhall-yaml 1.2.3 - Convert between Dhall and YAML https://hackage.haskell.org/package/dhall-yaml-1.2.3 (GabrielGonzalez)
2020-10-21 06:19:28 +0200hackagedhall-bash 1.0.34 - Compile Dhall to Bash https://hackage.haskell.org/package/dhall-bash-1.0.34 (GabrielGonzalez)
2020-10-21 06:21:08 +0200xff0x_(~fox@2001:1a81:529c:a900:bce5:4c81:f65e:145e) (Ping timeout: 260 seconds)
2020-10-21 06:22:01 +0200xff0x_(~fox@2001:1a81:529c:a900:9ed:6089:168f:4946)
2020-10-21 06:23:44 +0200jsomedon(~jsomedon@111.197.237.160) (Quit: jsomedon)
2020-10-21 06:24:16 +0200solonarv(~solonarv@astrasbourg-552-1-23-6.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds)
2020-10-21 06:24:58 +0200hackagedhall-nix 1.1.18 - Dhall to Nix compiler https://hackage.haskell.org/package/dhall-nix-1.1.18 (GabrielGonzalez)
2020-10-21 06:25:57 +0200hackagedhall-nixpkgs 1.0.2 - Convert Dhall projects to Nix packages https://hackage.haskell.org/package/dhall-nixpkgs-1.0.2 (GabrielGonzalez)
2020-10-21 06:26:04 +0200jamm_(~jamm@unaffiliated/jamm)
2020-10-21 06:26:29 +0200xiinotulp(~q@ppp-27-55-74-146.revip3.asianet.co.th) (Quit: Leaving)
2020-10-21 06:26:57 +0200hackagedhall 1.36.0 - A configuration language guaranteed to terminate https://hackage.haskell.org/package/dhall-1.36.0 (GabrielGonzalez)
2020-10-21 06:27:57 +0200hackagedhall-docs 1.0.2 - Generate HTML docs from a dhall package https://hackage.haskell.org/package/dhall-docs-1.0.2 (GabrielGonzalez)
2020-10-21 06:31:13 +0200scar451(~scar45@185.163.110.116)
2020-10-21 06:32:21 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 06:43:01 +0200day_(~Unknown@unaffiliated/day)
2020-10-21 06:44:18 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-10-21 06:44:41 +0200nek0(~nek0@mail.nek0.eu) (Quit: ZNC 1.7.5 - https://znc.in)
2020-10-21 06:46:50 +0200day(~Unknown@unaffiliated/day) (Ping timeout: 272 seconds)
2020-10-21 06:46:50 +0200day_day
2020-10-21 06:50:11 +0200phaul(~phaul@ruby/staff/phaul) (Ping timeout: 258 seconds)
2020-10-21 06:51:33 +0200Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-10-21 06:52:28 +0200Tario(~Tario@201.192.165.173)
2020-10-21 06:54:13 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 06:58:43 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 06:59:38 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 256 seconds)
2020-10-21 07:00:25 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 07:02:25 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
2020-10-21 07:02:36 +0200thunderrd(~thunderrd@183.182.110.178) (Remote host closed the connection)
2020-10-21 07:02:54 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
2020-10-21 07:04:06 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
2020-10-21 07:04:16 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 07:04:34 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
2020-10-21 07:04:34 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus)
2020-10-21 07:05:12 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 272 seconds)
2020-10-21 07:06:32 +0200bartemius(~bartemius@109.252.19.142) (Remote host closed the connection)
2020-10-21 07:06:49 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 264 seconds)
2020-10-21 07:06:51 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-21 07:07:16 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
2020-10-21 07:07:18 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se)
2020-10-21 07:07:40 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
2020-10-21 07:07:53 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2020-10-21 07:08:57 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 07:09:41 +0200jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-10-21 07:10:06 +0200jamm_(~jamm@unaffiliated/jamm)
2020-10-21 07:11:08 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-10-21 07:13:45 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 07:18:45 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-10-21 07:20:23 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-10-21 07:20:56 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 07:23:03 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
2020-10-21 07:24:27 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 07:35:47 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 07:37:53 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2020-10-21 07:39:10 +0200shafox(~shafox@106.51.234.111)
2020-10-21 07:41:35 +0200ggole(~ggole@2001:8003:8119:7200:b1ad:260c:cc33:2a8d)
2020-10-21 07:41:51 +0200bartemius(~bartemius@109.252.19.142)
2020-10-21 07:42:25 +0200reppertj(~textual@pool-96-246-209-59.nycmny.fios.verizon.net) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-21 07:45:28 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
2020-10-21 07:50:49 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz)
2020-10-21 07:51:53 +0200 <sim590> I have this code: https://paste.debian.net/1168059/ and I'm getting this error: https://paste.debian.net/1168060/. Why ?
2020-10-21 07:52:09 +0200 <sim590> I don't understand what I'm missing nor what the message tries to tell me.
2020-10-21 07:52:12 +0200polyrain_(~polyrain@2001:8003:e501:6901:900f:a04:c6e9:3caa)
2020-10-21 07:52:35 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz) (Client Quit)
2020-10-21 07:53:03 +0200 <sim590> The message is related to DHComputable, but I don't understand why I don't get any error for the usage of dhEchange and I get a message about exponentiate..
2020-10-21 07:53:37 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 07:54:26 +0200polyrain(~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Ping timeout: 240 seconds)
2020-10-21 07:54:33 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 07:54:37 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
2020-10-21 07:55:20 +0200 <shafox> I am on ghcup, with ghc-8.10.2, cabal 3.2, and this is my xmonad project that I am creating. https://github.com/shadow-fox/foxmonad however when i do cabal build, i get this error: https://gist.github.com/shadow-fox/3cb1d3639395548dc091b0b2c73df8ac
2020-10-21 07:55:23 +0200chele(~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
2020-10-21 07:56:14 +0200jsynacek(~jsynacek@ip-185-149-130-112.kmenet.cz)
2020-10-21 07:57:28 +0200asheshambasta(~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be)
2020-10-21 07:57:51 +0200 <sim590> (The issue is about the line 24 in the pastebin)
2020-10-21 07:59:04 +0200isovector1(~isovector@172.103.216.166.cable.tpia.cipherkey.com)
2020-10-21 07:59:06 +0200 <shafox> Don't know what is wrong.
2020-10-21 07:59:23 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds)
2020-10-21 07:59:57 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-21 07:59:58 +0200Foritus(~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) (Read error: Connection reset by peer)
2020-10-21 08:00:02 +0200scar451(~scar45@185.163.110.116) ()
2020-10-21 08:00:32 +0200Foritus(~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net)
2020-10-21 08:00:42 +0200 <c_wraith> sim590: well, that error is referring to a line number not in the paste....
2020-10-21 08:01:54 +0200 <sim590> c_wraith: yes. I didn't want to include confusing content.
2020-10-21 08:02:13 +0200 <c_wraith> sim590: anyway... the problem is that it can't tell what instance of DHComputable you want
2020-10-21 08:02:46 +0200 <c_wraith> sim590: an indicator comment on line 24 saying that it was the line the error was talking about would have been kind
2020-10-21 08:02:51 +0200phaul(~phaul@ruby/staff/phaul)
2020-10-21 08:03:10 +0200 <sim590> Yes. True. Sorry about that.
2020-10-21 08:03:15 +0200Sanchayan(~Sanchayan@171.61.92.239)
2020-10-21 08:03:22 +0200 <sim590> So, I'm not using classes correctly here.
2020-10-21 08:03:37 +0200 <sim590> Is that it?
2020-10-21 08:03:51 +0200 <c_wraith> sim590: the DHComputable instance is chosen based on both v and b. It can infer v from the input to exponentiate, but it has no idea what to pick for b
2020-10-21 08:04:08 +0200 <sim590> Oh
2020-10-21 08:04:19 +0200nurupo(~nurupo.ga@unaffiliated/nurupo) (Ping timeout: 244 seconds)
2020-10-21 08:04:33 +0200 <c_wraith> sim590: if you used parent_pk, it might be able to infer the type
2020-10-21 08:04:57 +0200 <c_wraith> sim590: otherwise you could use the ScopedTypeVariables to talk about types from the signature.
2020-10-21 08:05:18 +0200 <shafox> the xmonad-extras I believe what is failing to build.
2020-10-21 08:05:31 +0200 <sim590> "talk about types from the signature". I assumed it was the case by default? I'm very surprised.
2020-10-21 08:05:50 +0200 <c_wraith> by default, type variables in expressions are considered to be fresh types.
2020-10-21 08:06:14 +0200 <c_wraith> So it will rename them internally by sticking numbers on to them
2020-10-21 08:08:47 +0200 <sim590> OK, but in practice, it seems to me that it's infeasible for dhExchange to take variables v and b while exponentiate would take v0 as a type. Is it?
2020-10-21 08:09:21 +0200 <c_wraith> sim590: one other thought - I'm not sure v and b should be independent in the class. Does it make sense that the two types can be chosen independently?
2020-10-21 08:09:49 +0200 <c_wraith> Or will the choice of one always require a particular choice for the other?
2020-10-21 08:10:34 +0200 <sim590> Yes, I think that it makes sense since v stands for "private key" and b stands for "public key" and it could be implemented with this function for example: https://hackage.haskell.org/package/cryptonite-0.27/docs/Crypto-PubKey-DH.html#v:getShared
2020-10-21 08:10:36 +0200nurupo(~nurupo.ga@unaffiliated/nurupo)
2020-10-21 08:11:08 +0200fxg(~fxg@unaffiliated/fxg)
2020-10-21 08:11:13 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 08:11:22 +0200 <c_wraith> That sounds like it doesn't make sense to select them independently. It makes no sense to choose a ECDH public key and an RSA private key
2020-10-21 08:11:23 +0200 <sim590> c_wraith: Well. Yes, the choice of one implies the other type.
2020-10-21 08:11:41 +0200 <c_wraith> ok, good
2020-10-21 08:11:44 +0200 <sim590> Yeah. So, I should change the signature?
2020-10-21 08:11:51 +0200 <c_wraith> Then you can modify the class definition a little bit
2020-10-21 08:12:24 +0200 <c_wraith> If you enable the FunctionalDependencies extension, you can tell ghc that choices of one type determine the other type.
2020-10-21 08:12:39 +0200 <sim590> Interesting.
2020-10-21 08:12:42 +0200SanchayanM(~Sanchayan@122.181.211.206)
2020-10-21 08:12:45 +0200SanchayanM(~Sanchayan@122.181.211.206) (Remote host closed the connection)
2020-10-21 08:12:48 +0200 <c_wraith> I think in this particular case, they only come in pairs, right? Either type specifies the other one?
2020-10-21 08:13:29 +0200 <c_wraith> In that case, you would change it to class DHComputable v b | v -> b, b -> v where ...
2020-10-21 08:13:45 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 08:13:47 +0200 <c_wraith> that extra part from | to the where are the functional dependency
2020-10-21 08:14:06 +0200 <c_wraith> It says that for any particular choice of type v, there can only be one b, and vice versa
2020-10-21 08:14:10 +0200Sanchayan(~Sanchayan@171.61.92.239) (Ping timeout: 260 seconds)
2020-10-21 08:14:29 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 08:14:51 +0200 <c_wraith> The combination of those things tells ghc not to allow instances that would violate that rule, and that it can use that rule to infer types
2020-10-21 08:15:01 +0200 <sim590> c_wraith: Yeah, so if you specify the private key type, then a public key type would correspond and vice versa I guess.
2020-10-21 08:15:04 +0200alp(~alp@2a01:e0a:58b:4920:214e:c6f7:dc70:92ac)
2020-10-21 08:15:44 +0200 <sim590> That's very nice.
2020-10-21 08:16:34 +0200 <c_wraith> That should solve the issue you're running into, and be safer (it can catch cases where you mix things up while writing instances)
2020-10-21 08:17:47 +0200raoulb(~weechat@stateless.vsos.ethz.ch) (Ping timeout: 260 seconds)
2020-10-21 08:17:48 +0200 <sim590> I'm continuously learning. I have never really created classes for concrete use cases. I must admit that I don't master the technique for defining classes properly. Would you say that FunctionalDependencies is quite common pattern ?
2020-10-21 08:17:53 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-21 08:18:09 +0200 <c_wraith> It is relatively common with multiparameter classes
2020-10-21 08:18:22 +0200 <sim590> c_wraith: I guess that this is a good benefit for the library I'm writing.
2020-10-21 08:18:23 +0200christo(~chris@81.96.113.213)
2020-10-21 08:18:54 +0200 <sim590> Right. This is the first time I use multiparameter classes so that's why I discover this now.
2020-10-21 08:19:26 +0200 <c_wraith> like, you're using MonadState there. class Monad m => MonadState s m | m -> s where ...
2020-10-21 08:19:34 +0200fxg(~fxg@unaffiliated/fxg) (Quit: Leaving)
2020-10-21 08:19:59 +0200 <c_wraith> That only goes one direction. The monad type must always specify the state type, but you can have multiple different monad types specify the same state type
2020-10-21 08:20:05 +0200 <sim590> Ohhh. So that's what that part (m -> s) meant in the documentation.
2020-10-21 08:20:11 +0200raoulb(~weechat@stateless.vsos.ethz.ch)
2020-10-21 08:20:14 +0200 <c_wraith> yep!
2020-10-21 08:20:21 +0200 <sim590> Nice
2020-10-21 08:20:30 +0200Andy2011Zoe(~Andy2011Z@217.146.82.202)
2020-10-21 08:20:51 +0200 <sim590> Thanks for all those explanations!
2020-10-21 08:20:55 +0200 <c_wraith> you're welcome
2020-10-21 08:22:01 +0200bitmagie(~Thunderbi@200116b806c15c00bd70654fe0e81318.dip.versatel-1u1.de) (Quit: bitmagie)
2020-10-21 08:22:25 +0200christo(~chris@81.96.113.213) (Ping timeout: 240 seconds)
2020-10-21 08:24:22 +0200howdoi(uid224@gateway/web/irccloud.com/x-tsohuehqbugpkvfg) (Quit: Connection closed for inactivity)
2020-10-21 08:26:22 +0200echoreply(~echoreply@unaffiliated/echoreply) (Quit: WeeChat 1.9.1)
2020-10-21 08:26:47 +0200dhouthoo(~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
2020-10-21 08:26:49 +0200echoreply(~echoreply@unaffiliated/echoreply)
2020-10-21 08:29:01 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-10-21 08:30:02 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 08:30:18 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-21 08:32:10 +0200xerox_(~xerox@unaffiliated/xerox)
2020-10-21 08:34:49 +0200danso(~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
2020-10-21 08:35:31 +0200andyo(~andyo@63.228.117.102) (Quit: ZNC 1.7.2 - https://znc.in)
2020-10-21 08:39:00 +0200lep-deleteGuest88073
2020-10-21 08:39:28 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-10-21 08:41:25 +0200britva(~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b)
2020-10-21 08:43:48 +0200andyo(~andyo@63.228.117.102)
2020-10-21 08:46:45 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-21 08:46:45 +0200taurux(~taurux@net-188-152-111-153.cust.dsl.teletu.it) (Ping timeout: 265 seconds)
2020-10-21 08:48:38 +0200taurux(~taurux@net-188-216-37-204.cust.vodafonedsl.it)
2020-10-21 08:48:45 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 08:49:23 +0200britva(~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b) (Quit: This computer has gone to sleep)
2020-10-21 08:50:58 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-21 08:53:22 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
2020-10-21 08:55:00 +0200polyrain_(~polyrain@2001:8003:e501:6901:900f:a04:c6e9:3caa) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 08:56:17 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 08:56:27 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 08:56:37 +0200ph88(~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140)
2020-10-21 08:58:27 +0200xff0x_(~fox@2001:1a81:529c:a900:9ed:6089:168f:4946) (Ping timeout: 272 seconds)
2020-10-21 08:59:12 +0200xff0x_(~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d)
2020-10-21 09:00:18 +0200Varis(~Tadas@unaffiliated/varis)
2020-10-21 09:00:55 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 09:01:25 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2020-10-21 09:01:41 +0200int-e(~noone@int-e.eu) (Remote host closed the connection)
2020-10-21 09:02:37 +0200int-e(~noone@int-e.eu)
2020-10-21 09:03:56 +0200ffviewer(3dded63f@61-222-214-63.HINET-IP.hinet.net)
2020-10-21 09:04:44 +0200 <dminuoso> % :t indexed
2020-10-21 09:04:44 +0200 <yahb> dminuoso: Indexable i p => p a b -> i -> a -> b
2020-10-21 09:04:46 +0200lambdabot(~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
2020-10-21 09:05:15 +0200lambdabot(~lambdabot@silicon.int-e.eu)
2020-10-21 09:05:15 +0200lambdabot(~lambdabot@silicon.int-e.eu) (Changing host)
2020-10-21 09:05:15 +0200lambdabot(~lambdabot@haskell/bot/lambdabot)
2020-10-21 09:05:51 +0200 <dminuoso> "Build a function from an indexed function."
2020-10-21 09:05:58 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-10-21 09:06:22 +0200 <dminuoso> I've been staring at this for a while now, can someone give me a hint how to make sense of this?
2020-10-21 09:07:00 +0200 <dminuoso> Given the instances, this seems to be an overloading for both `const` or `runIndexed`, how is const an indexed function?
2020-10-21 09:07:41 +0200 <c_wraith> it returns a function that ignores the index
2020-10-21 09:08:17 +0200 <c_wraith> Don't worry about that class much. treat it as internal to how indexed optics work
2020-10-21 09:08:42 +0200 <dminuoso> Heh, Im intentionally worrying about the internals, since Ive been diving in to port some functionality over to optics
2020-10-21 09:08:54 +0200 <c_wraith> It's just how it provides a uniform interface between Indexed i a b and (a -> b)
2020-10-21 09:09:27 +0200ph88(~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140) (Ping timeout: 246 seconds)
2020-10-21 09:09:58 +0200 <dminuoso> Perhaps I should rephrase the question then.
2020-10-21 09:10:03 +0200 <dminuoso> withIndex :: (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t)
2020-10-21 09:10:11 +0200 <dminuoso> withIndex f = Indexed $ \i a -> snd <$> indexed f i (i, a)
2020-10-21 09:10:30 +0200 <dminuoso> In what instance is this called with a function rather than Indexed?
2020-10-21 09:10:34 +0200 <dminuoso> (This is sort of hard to grep for)
2020-10-21 09:10:58 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-10-21 09:11:04 +0200 <dminuoso> (I guess the question applies to any Indexable optic, not just withIndex)
2020-10-21 09:13:13 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 09:13:19 +0200 <dminuoso> Phrased differently, when would you eliminate an Indexable optic with a function?
2020-10-21 09:13:29 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 09:13:29 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 09:13:29 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 09:13:34 +0200 <c_wraith> you can use it to fake an index, I suppose.
2020-10-21 09:14:47 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 09:15:09 +0200raichoo(~raichoo@213.240.178.58)
2020-10-21 09:16:29 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-10-21 09:17:07 +0200unlink2(~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 09:17:27 +0200unlink2(~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de)
2020-10-21 09:18:11 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 09:19:09 +0200berberman_t(berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx)
2020-10-21 09:21:06 +0200cfricke(~cfricke@unaffiliated/cfricke)
2020-10-21 09:21:11 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 09:21:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 09:21:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 09:21:27 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 09:24:48 +0200kuribas(~user@ptr-25vy0i9s82bgras1pw6.18120a2.ip6.access.telenet.be)
2020-10-21 09:25:34 +0200borne(~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
2020-10-21 09:25:36 +0200 <dminuoso> c_wraith: How would that even work?
2020-10-21 09:25:51 +0200 <dminuoso> I mean if I look at const, Id rather think its about *dropping* the index
2020-10-21 09:26:04 +0200isovector1(~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Remote host closed the connection)
2020-10-21 09:26:12 +0200 <dminuoso> maybe this is for allowing indexable optics as a non-indexed optics?
2020-10-21 09:26:14 +0200tzh(~tzh@2601:448:c500:5300::19b0) (Quit: zzz)
2020-10-21 09:28:18 +0200 <dminuoso> Because the choice of whether f is Indexed or (->) is done at the elimination site, not the optics definition
2020-10-21 09:28:45 +0200 <c_wraith> actually, if you chase the arrows around enough... *most* uses of withIndex will be using the (->) instance
2020-10-21 09:29:04 +0200 <dminuoso> Do you have an example? Im chasing ghosts here in lens.
2020-10-21 09:30:27 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 09:32:50 +0200jedws(~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 09:34:01 +0200 <dminuoso> Aha, I think Im getting somewhere
2020-10-21 09:34:29 +0200 <dminuoso> % let v l = getConst . l Const
2020-10-21 09:34:29 +0200 <yahb> dminuoso: ; <interactive>:123:5: warning: [-Wname-shadowing] This binding for `v' shadows the existing binding defined at <interactive>:122:5
2020-10-21 09:35:08 +0200 <c_wraith> I mean, the first example in the docs...
2020-10-21 09:35:23 +0200 <c_wraith> > [10, 20, 30] ^.. ifolded . withIndex @_ @(->) [(0,10),(1,20),(2,30)]
2020-10-21 09:35:26 +0200 <lambdabot> <hint>:1:28: error:
2020-10-21 09:35:26 +0200 <lambdabot> <hint>:1:28: error:
2020-10-21 09:35:26 +0200 <lambdabot> Pattern syntax in expression context: withIndex@_
2020-10-21 09:35:32 +0200 <c_wraith> hah. oops.
2020-10-21 09:35:39 +0200 <dminuoso> % :set -XTypeApplications
2020-10-21 09:35:40 +0200 <yahb> dminuoso:
2020-10-21 09:35:44 +0200 <dminuoso> % [10, 20, 30] ^.. ifolded . withIndex @_ @(->)
2020-10-21 09:35:45 +0200 <yahb> dminuoso: ; <interactive>:127:1: warning: [-Wtype-defaults]; * Defaulting the following constraints to type `Integer'; (Show a0) arising from a use of `print' at <interactive>:127:1-45; (Num a0) arising from a use of `it' at <interactive>:127:1-45; * In a stmt of an interactive GHCi command: print it; [(0,10),(1,20),(2,30)]
2020-10-21 09:35:52 +0200 <c_wraith> anyway.
2020-10-21 09:36:14 +0200 <c_wraith> The first example in the docs is using the (->) instance for Indexable
2020-10-21 09:36:53 +0200 <dminuoso> c_wraith: Right! So Im right after all.
2020-10-21 09:36:56 +0200britva(~britva@51.154.14.117)
2020-10-21 09:37:07 +0200 <dminuoso> It's (^..) that demands (->) here
2020-10-21 09:37:19 +0200britva(~britva@51.154.14.117) (Client Quit)
2020-10-21 09:37:28 +0200 <c_wraith> yes.
2020-10-21 09:37:44 +0200 <c_wraith> compare to... [10, 20, 30] ^.. ifolded . withIndex @_ @(Indexed Int) . withIndex @_ @(->)
2020-10-21 09:37:47 +0200 <dminuoso> So itoListOf would pick Indexed, and toListOf would just force a regular van laarhoven functor arrow in there
2020-10-21 09:37:57 +0200britva(~britva@51.154.14.117)
2020-10-21 09:38:11 +0200Sanchayan(~Sanchayan@122.181.211.206)
2020-10-21 09:39:02 +0200 <dminuoso> ifoldrOf l f z = flip appEndo z . getConst #. l (Const #. Endo #. Indexed f)
2020-10-21 09:39:17 +0200 <dminuoso> foldrOf l f z = flip appEndo z . foldMapOf l (Endo #. f)
2020-10-21 09:39:32 +0200whald(~trem@2a02:810a:8100:11a6:a51d:28a2:1c9:853d) (Remote host closed the connection)
2020-10-21 09:39:59 +0200 <dminuoso> err
2020-10-21 09:40:01 +0200 <dminuoso> foldMapOf l f = getConst #. l (Const #. f)
2020-10-21 09:40:03 +0200 <dminuoso> There.
2020-10-21 09:40:50 +0200 <dminuoso> c_wraith: My difficulty was just chasing the code with all these coerces in place. :(
2020-10-21 09:40:59 +0200 <dminuoso> Thanks, I think this helped
2020-10-21 09:41:56 +0200 <kuribas> couldn't coerce make an invalid datatype? For example, of you change the Ord instance in a Map, the Map could become invalid?
2020-10-21 09:42:33 +0200 <merijn> kuribas: Not if you set roles correctly
2020-10-21 09:42:38 +0200xff0x_(~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d) (Quit: xff0x_)
2020-10-21 09:42:38 +0200 <dminuoso> kuribas: That's not coerces fault, if you rewrapped manually with newtype the same thing would happen.
2020-10-21 09:42:47 +0200xff0x(~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d)
2020-10-21 09:42:59 +0200 <merijn> dminuoso: Coerce handes that correctly if you set roles correctly
2020-10-21 09:43:00 +0200 <kuribas> merijn: so you cannot coerce a Map?
2020-10-21 09:43:30 +0200 <merijn> kuribas: If the key type is nominal(not 100% I got that role right) as it should be, that's right?
2020-10-21 09:43:40 +0200 <merijn> kuribas: Or rather, you can only coerce the values, not the keys
2020-10-21 09:43:54 +0200 <merijn> Although they fucked it up by making the default role unsafe
2020-10-21 09:44:05 +0200 <kuribas> merijn: right. Does ghc infer it, or do you need to manually specify roles?
2020-10-21 09:44:16 +0200xerox_(~xerox@unaffiliated/xerox) (Quit: leaving)
2020-10-21 09:44:27 +0200bliminse(~bliminse@host109-158-54-87.range109-158.btcentralplus.com) (Quit: leaving)
2020-10-21 09:45:03 +0200 <merijn> You need to manually specify them to be safe
2020-10-21 09:45:09 +0200 <merijn> The inferred roles are unsafe
2020-10-21 09:45:13 +0200 <merijn> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html#roles
2020-10-21 09:45:14 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 09:45:33 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 09:45:33 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 09:45:33 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 09:45:36 +0200 <kuribas> right, thanks
2020-10-21 09:47:07 +0200bliminse(~bliminse@host109-158-54-87.range109-158.btcentralplus.com)
2020-10-21 09:47:08 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 256 seconds)
2020-10-21 09:47:20 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2020-10-21 09:51:50 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 09:53:31 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
2020-10-21 09:53:39 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se)
2020-10-21 09:56:39 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 09:56:56 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 09:56:56 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 09:56:56 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 10:00:51 +0200xerox_(~xerox@unaffiliated/xerox)
2020-10-21 10:01:35 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz)
2020-10-21 10:03:23 +0200berberman_(~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
2020-10-21 10:03:48 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 10:06:13 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
2020-10-21 10:06:15 +0200berberman(~berberman@unaffiliated/berberman)
2020-10-21 10:09:44 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-21 10:13:01 +0200kritzefitz(~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de)
2020-10-21 10:14:12 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Quit: Leaving)
2020-10-21 10:16:28 +0200shafox(~shafox@106.51.234.111) (Remote host closed the connection)
2020-10-21 10:16:53 +0200shafox(~shafox@106.51.234.111)
2020-10-21 10:18:15 +0200redeemed(~rd@79.115.163.113)
2020-10-21 10:19:37 +0200polyrain(~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c)
2020-10-21 10:20:48 +0200Franciman(~francesco@host-82-48-166-25.retail.telecomitalia.it)
2020-10-21 10:24:11 +0200cods(~fred@unaffiliated/cods) (Ping timeout: 240 seconds)
2020-10-21 10:24:24 +0200MarcelineVQ(~anja@198.254.202.72) (Ping timeout: 260 seconds)
2020-10-21 10:25:25 +0200 <Cale> If it helps any, that is entirely equivalent to replicate 100 (product (map (*3) (zipWith max [1,2,3,4,5] [4,5,6,7,8])))
2020-10-21 10:25:32 +0200ericsagnes(~ericsagne@2405:6580:0:5100:5d5:9ab8:7a96:b021) (Ping timeout: 260 seconds)
2020-10-21 10:25:33 +0200 <Cale> oops
2020-10-21 10:25:44 +0200 <Cale> Apparently I was scrolled all the way to the top of my buffer
2020-10-21 10:25:50 +0200 <merijn> Cale: Can I buy your time machine? :D
2020-10-21 10:26:26 +0200thunderrd(~thunderrd@183.182.115.160)
2020-10-21 10:27:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 10:27:45 +0200jonathanx(~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-10-21 10:28:49 +0200babygnu(~robert@gateway/tor-sasl/babygnu)
2020-10-21 10:29:40 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 10:30:47 +0200invaser(~Thunderbi@31.148.23.125)
2020-10-21 10:30:49 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 264 seconds)
2020-10-21 10:32:51 +0200 <dminuoso> merijn: Wrong tense. Will I have bought your time machine? Cale can find out.
2020-10-21 10:33:42 +0200 <merijn> ;)
2020-10-21 10:33:53 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
2020-10-21 10:34:01 +0200Lycurgus(~niemand@98.4.96.235)
2020-10-21 10:34:51 +0200cristi_(~cristi@82.76.158.82)
2020-10-21 10:35:23 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 10:37:08 +0200Lycurgusdeplores the apparent disappearance of configurable pc vendors
2020-10-21 10:37:29 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 10:37:32 +0200ericsagnes(~ericsagne@2405:6580:0:5100:a175:4dc7:93af:b055)
2020-10-21 10:37:52 +0200 <Cale> "One of the major problems encountered in time travel is not that of becoming your own father or mother. There is no problem in becoming your own father or mother that a broad-minded and well-adjusted family can't cope with. There is no problem with changing the course of history—the course of history does not change because it all fits together like a jigsaw. All the important changes have happened before th
2020-10-21 10:37:52 +0200 <Cale> e things they were supposed to change and it all sorts itself out in the end.
2020-10-21 10:37:52 +0200 <Cale> The major problem is simply one of grammar, and the main work to consult in this matter is Dr. Dan Streetmentioner's Time Traveler's Handbook of 1001 Tense Formations. It will tell you, for instance, how to describe something that was about to happen to you in the past before you avoided it by time-jumping forward two days in order to avoid it. The event will be descibed differently according to whether you are
2020-10-21 10:37:55 +0200 <Cale> talking about it from the standpoint of your own natural time, from a time in the further future, or a time in the further past and is futher complicated by the possibility of conducting conversations while you are actually traveling from one time to another with the intention of becoming your own mother or father.
2020-10-21 10:38:01 +0200 <Cale> Most readers get as far as the Future Semiconditionally Modified Subinverted Plagal Past Subjunctive Intentional before giving up; and in fact in later aditions of the book all pages beyond this point have been left blank to save on printing costs."
2020-10-21 10:38:06 +0200 <int-e> Hitchhiker :)
2020-10-21 10:38:49 +0200whald(~trem@2a02:810a:8100:11a6:7c7b:3b69:546:296f)
2020-10-21 10:39:49 +0200 <Lycurgus> the problem with time travel per se is its nonsense (literally) because time as a concept is just one thing AFTER another
2020-10-21 10:39:58 +0200 <Lycurgus> *it's
2020-10-21 10:40:38 +0200 <Lycurgus> events running backward makes sense in the mind due to its facility with concepts
2020-10-21 10:41:03 +0200 <Lycurgus> but the notion of actually doing it is an abuse of thought
2020-10-21 10:41:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-21 10:41:45 +0200 <Lycurgus> another case (like truth) of important concepts fuddled
2020-10-21 10:41:49 +0200Chi1thangoo(~Chi1thang@87.112.60.168)
2020-10-21 10:42:31 +0200hnOsmium0001(uid453710@gateway/web/irccloud.com/x-uufhwubdezwfmvks) (Quit: Connection closed for inactivity)
2020-10-21 10:42:59 +0200 <Lycurgus> because goedel in one case, einstein/GR/SR in the other
2020-10-21 10:43:23 +0200 <Rembane> So good
2020-10-21 10:44:01 +0200francesco_(~francesco@host-82-54-10-114.retail.telecomitalia.it)
2020-10-21 10:44:24 +0200Franciman(~francesco@host-82-48-166-25.retail.telecomitalia.it) (Disconnected by services)
2020-10-21 10:44:28 +0200francesco_Franciman
2020-10-21 10:50:28 +0200 <Lycurgus> (in contrast to differential forward time travel at relativistic speeds, which makes perfect sense)
2020-10-21 10:51:19 +0200ishutin_(~Ishutin@80-95-94-59.pool.digikabel.hu) (Remote host closed the connection)
2020-10-21 10:51:26 +0200ishutin(~Ishutin@80-95-94-59.pool.digikabel.hu)
2020-10-21 10:51:42 +0200jedws(~jedws@121.209.161.98)
2020-10-21 10:52:05 +0200 <Lycurgus> any opinions on Control.Monad.Logic as a (pure) prolog?
2020-10-21 10:52:34 +0200Chi1thangoo(~Chi1thang@87.112.60.168) (Ping timeout: 272 seconds)
2020-10-21 10:52:40 +0200MarcelineVQ(~anja@198.254.202.72)
2020-10-21 10:55:16 +0200Echosolace(~Echosolac@p790105-ipngn4101hiraide.tochigi.ocn.ne.jp)
2020-10-21 10:55:27 +0200Chi1thangoo(~Chi1thang@87.112.60.168)
2020-10-21 10:55:45 +0200fendor(~fendor@91.141.2.147.wireless.dyn.drei.com)
2020-10-21 10:56:21 +0200jedws(~jedws@121.209.161.98) (Ping timeout: 256 seconds)
2020-10-21 10:56:23 +0200 <Echosolace> I'm having some trouble with basic level understanding. Can someone check my thought process here?
2020-10-21 10:56:29 +0200 <Echosolace> Function in question:
2020-10-21 10:56:31 +0200 <Echosolace> search :: (Eq a) => [a] -> [a] -> Bool
2020-10-21 10:56:32 +0200 <Echosolace> search needle haystack =
2020-10-21 10:56:32 +0200 <Echosolace> let nlen = length needle
2020-10-21 10:56:32 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 10:56:46 +0200 <lortabac> Lycurgus: I am not too familiar with Control.Monad.Logic, but I suppose you also need something like unification-fd to make a Prolog
2020-10-21 10:57:13 +0200 <Echosolace> So, from the top... We define the typeclass of the function we just named, search.
2020-10-21 10:57:23 +0200 <Lycurgus> it has unification i believe but just getting acquainted
2020-10-21 10:57:42 +0200 <Echosolace> It has typeclass of equateable. It takes two lists as parameters and returns a boolean.
2020-10-21 10:57:49 +0200 <Echosolace> Is that a fair enough understanding so far?
2020-10-21 10:57:50 +0200 <Lycurgus> just breaks a lot of commonly used stuff
2020-10-21 10:58:18 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 10:58:32 +0200ishutin(~Ishutin@80-95-94-59.pool.digikabel.hu) (Ping timeout: 256 seconds)
2020-10-21 10:58:48 +0200 <Lycurgus> but i'm guessing you were referring to dependent types
2020-10-21 10:59:17 +0200 <lortabac> Echosolace: 'Eq a =>' is not a type class definition. It is a constraint on type 'a'
2020-10-21 11:00:01 +0200Andy2011Zoe(~Andy2011Z@217.146.82.202) ()
2020-10-21 11:00:03 +0200 <Echosolace> Interesting. Ok.
2020-10-21 11:00:16 +0200 <lortabac> Echosolace: you can read this type as: '[a] -> [a] -> Bool' where 'a' is an instance of 'Eq'
2020-10-21 11:00:30 +0200 <Echosolace> Thank you thank you.
2020-10-21 11:01:00 +0200 <ski> Echosolace : you can use a logical operation, instead of the `if'-`then'-`else'
2020-10-21 11:01:04 +0200 <Echosolace> Moving down, search needle haystack =
2020-10-21 11:01:19 +0200ph88(~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140)
2020-10-21 11:01:26 +0200 <Echosolace> search then parameter 1 and then parameter 2 =
2020-10-21 11:01:39 +0200 <Echosolace> I hear "and then" is a bad way to phrase it..
2020-10-21 11:02:11 +0200 <Echosolace> Anyways, I believe I'm correct in that we are just naming the parameters there..
2020-10-21 11:02:18 +0200 <ski> yes
2020-10-21 11:02:22 +0200dyniec[m](dyniecmatr@gateway/shell/matrix.org/x-gjzsseikahzwfhmv) (Quit: Idle for 30+ days)
2020-10-21 11:02:24 +0200vaibhavsagar(vaibhavsag@gateway/shell/matrix.org/x-ynipythrsvdyajlm) (Quit: Idle for 30+ days)
2020-10-21 11:02:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-21 11:02:30 +0200jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-10-21 11:03:33 +0200 <Echosolace> let nlen = length needle - This is predefining a function before an in call I guess. Taking the length of the predefined needle variable.
2020-10-21 11:03:39 +0200berberman_t(berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx) ("User left")
2020-10-21 11:03:48 +0200 <merijn> Echosolace: You can think of typeclass constraints as conditional/prerequisites of types. So "foo :: Eq a => a -> a -> Bool" can be read as "IF 'a' is an instance of Eq THEN 'foo :: a -> a -> Bool' ELSE type error"
2020-10-21 11:04:22 +0200 <ski> Echosolace : not defining a function, but a integer (in this case). yes, it's locally defined
2020-10-21 11:04:32 +0200thc202(~thc202@unaffiliated/thc202)
2020-10-21 11:04:50 +0200Chi1thangoo(~Chi1thang@87.112.60.168) (Ping timeout: 256 seconds)
2020-10-21 11:04:52 +0200 <Echosolace> And now the meat:
2020-10-21 11:04:53 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 11:05:13 +0200berberman_t(berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx)
2020-10-21 11:05:27 +0200hackagengx-export-tools 0.4.9.0 - Extra tools for Nginx haskell module https://hackage.haskell.org/package/ngx-export-tools-0.4.9.0 (lyokha)
2020-10-21 11:05:36 +0200ishutin(~Ishutin@91-83-11-216.pool.digikabel.hu)
2020-10-21 11:05:43 +0200cristi_(~cristi@82.76.158.82) (Quit: cristi_)
2020-10-21 11:06:03 +0200 <Echosolace> in foldl (moving from left of the array.., adding to an accumulator..., needs a first instance which is defined as False after the )
2020-10-21 11:06:34 +0200 <Echosolace> I'm having trouble verbalizing ->
2020-10-21 11:06:50 +0200cristi_(~cristi@82.76.158.82)
2020-10-21 11:07:21 +0200 <Echosolace> x is the head of the list in this situation?
2020-10-21 11:07:28 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 246 seconds)
2020-10-21 11:07:51 +0200 <ski> `x' stands for each element of the list, in turn
2020-10-21 11:08:00 +0200 <Echosolace> Thank you.
2020-10-21 11:08:37 +0200 <ski> you can read `->' here as "maps to". so `\acc x -> ..acc..x..' is "the function that, when given two parameters, call them `acc' and `x', maps them to `..acc..x..'"
2020-10-21 11:08:50 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699)
2020-10-21 11:09:06 +0200 <Echosolace> I'll run that through my head a bit, thanks.
2020-10-21 11:09:19 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:715c:4cac:e6ca:b78)
2020-10-21 11:09:37 +0200 <ski> (`acc' is the "current result so far" (before taking `x' into account). `..acc.x..' is the "updated result (having taken `x' into account)")
2020-10-21 11:10:18 +0200berberman_t(berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx) ("User left")
2020-10-21 11:11:20 +0200knupfer(~Thunderbi@dynamic-046-114-151-226.46.114.pool.telefonica.de)
2020-10-21 11:12:53 +0200 <ski> > foldl (\str n -> "(" ++ str ++ " * " ++ showsPrec 10 n "" ++ ")") "1" [2,3,5,7]
2020-10-21 11:12:55 +0200 <lambdabot> "((((1 * 2) * 3) * 5) * 7)"
2020-10-21 11:12:58 +0200jamm_(~jamm@unaffiliated/jamm)
2020-10-21 11:14:20 +0200ishutin_(~Ishutin@94-21-82-21.pool.digikabel.hu)
2020-10-21 11:14:25 +0200ishutin(~Ishutin@91-83-11-216.pool.digikabel.hu) (Ping timeout: 240 seconds)
2020-10-21 11:14:28 +0200StoneToad(~StoneToad@199-167-119-239.ppp.storm.ca) (Ping timeout: 256 seconds)
2020-10-21 11:14:48 +0200Lycurgus(~niemand@98.4.96.235) (Quit: Exeunt)
2020-10-21 11:14:48 +0200knupfer(~Thunderbi@dynamic-046-114-151-226.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2020-10-21 11:15:04 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 258 seconds)
2020-10-21 11:15:34 +0200StoneToad(~StoneToad@199-167-119-239.ppp.storm.ca)
2020-10-21 11:15:48 +0200CourtneyNZ(~CourtneyN@ec2-52-63-156-37.ap-southeast-2.compute.amazonaws.com)
2020-10-21 11:16:04 +0200dexterfoo(dexter@2a01:7e00::f03c:91ff:fe86:59ec) (K-Lined)
2020-10-21 11:16:04 +0200nh(NextHendri@unaffiliated/nexthendrix) (K-Lined)
2020-10-21 11:16:04 +0200Jon(jon@dow.land) (K-Lined)
2020-10-21 11:16:04 +0200Takumo(takumo@unaffiliated/takumokatekari) (K-Lined)
2020-10-21 11:17:29 +0200nh(~NextHendr@finickitively.co.uk)
2020-10-21 11:17:53 +0200nhGuest73576
2020-10-21 11:18:03 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Quit: ZNC 1.7.5 - https://znc.in)
2020-10-21 11:18:13 +0200jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-10-21 11:18:24 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 11:18:53 +0200Takumo(takumo@unaffiliated/takumokatekari)
2020-10-21 11:19:21 +0200dexterfoo(dexter@2a01:7e00::f03c:91ff:fe86:59ec)
2020-10-21 11:19:52 +0200Guest73576NextHendrix
2020-10-21 11:19:52 +0200NextHendrix(~NextHendr@finickitively.co.uk) (Changing host)
2020-10-21 11:19:52 +0200NextHendrix(~NextHendr@unaffiliated/nexthendrix)
2020-10-21 11:21:11 +0200jmtd(jon@dow.land)
2020-10-21 11:21:42 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se)
2020-10-21 11:21:43 +0200tlockney(~tlockney@185.204.1.185)
2020-10-21 11:22:13 +0200alp(~alp@2a01:e0a:58b:4920:214e:c6f7:dc70:92ac) (Ping timeout: 272 seconds)
2020-10-21 11:23:36 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-21 11:24:22 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-21 11:25:01 +0200jmtdJon
2020-10-21 11:27:07 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 11:27:17 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-21 11:27:17 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-21 11:27:17 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 11:27:31 +0200ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
2020-10-21 11:28:26 +0200Chi1thangoo(~Chi1thang@87.112.60.168)
2020-10-21 11:28:29 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 11:32:01 +0200 <Echosolace> I can't get this code to (compile? Is that even the right word?) compile. From LYAH:
2020-10-21 11:32:02 +0200 <Echosolace> search :: (Eq a) => [a] -> [a] -> Bool
2020-10-21 11:32:03 +0200 <Echosolace> search needle haystack =
2020-10-21 11:32:03 +0200 <Echosolace> let nlen = length needle
2020-10-21 11:32:03 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 11:32:05 +0200arw(~arw@impulse.informatik.uni-erlangen.de)
2020-10-21 11:32:18 +0200 <Echosolace> First error suggesting that I change tails to tail...
2020-10-21 11:32:25 +0200 <Echosolace> When I do that, more errors.
2020-10-21 11:32:43 +0200 <Echosolace> Just wanting to play with that function so I can try to get a better understanding of how it works.
2020-10-21 11:33:30 +0200 <Echosolace> Anybody have a suggestion?
2020-10-21 11:33:44 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-21 11:34:27 +0200 <ski> @type let search :: Eq a => [a] -> [a] -> Bool; search needle haystack = let nlen = length needle in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack) in search
2020-10-21 11:34:28 +0200 <lambdabot> Eq a => [a] -> [a] -> Bool
2020-10-21 11:34:41 +0200 <ski> what's the (first) error you get ?
2020-10-21 11:34:58 +0200 <Echosolace> <interactive>:7:78: error:
2020-10-21 11:34:58 +0200 <Echosolace> * Variable not in scope: tails :: [a] -> t0 [a]
2020-10-21 11:34:58 +0200 <Echosolace> * Perhaps you meant `tail' (imported from Prelude)
2020-10-21 11:35:04 +0200 <ski> @index tails
2020-10-21 11:35:05 +0200 <lambdabot> GHC.OldList, Data.List, Data.ByteString.Lazy, Data.ByteString.Lazy.Char8, Data.ByteString, Data.ByteString.Char8, Data.Sequence
2020-10-21 11:35:09 +0200 <Echosolace> After fixing this is the second error:
2020-10-21 11:35:12 +0200 <ski> use
2020-10-21 11:35:15 +0200 <int-e> import Data.List
2020-10-21 11:35:15 +0200 <ski> import Data.List
2020-10-21 11:35:23 +0200 <Echosolace> Oohhhhhh
2020-10-21 11:35:27 +0200 <Echosolace> Yeah that makes sense...
2020-10-21 11:35:30 +0200__monty__(~toonn@unaffiliated/toonn)
2020-10-21 11:35:38 +0200 <int-e> Don't follow ghc's suggestions blindly, it has almost no clue.
2020-10-21 11:36:16 +0200 <int-e> > tails "abc"
2020-10-21 11:36:18 +0200 <lambdabot> ["abc","bc","c",""]
2020-10-21 11:36:23 +0200 <int-e> > tail "abc"
2020-10-21 11:36:25 +0200 <lambdabot> "bc"
2020-10-21 11:36:56 +0200 <int-e> (that's a huge difference)
2020-10-21 11:36:58 +0200 <Echosolace> Domo
2020-10-21 11:38:07 +0200 <Echosolace> I'm attempting this...
2020-10-21 11:38:08 +0200 <Echosolace> Prelude> :{
2020-10-21 11:38:08 +0200 <Echosolace> Prelude| import Data.list
2020-10-21 11:38:08 +0200 <Echosolace> Prelude| search :: (Eq a) => [a] -> [a] -> Bool
2020-10-21 11:38:08 +0200 <Echosolace> Prelude| search needle haystack =
2020-10-21 11:38:08 +0200 <Echosolace> Prelude| let nlen = length needle
2020-10-21 11:38:09 +0200 <Echosolace> Prelude| in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 11:38:11 +0200 <Echosolace> Prelude| :}
2020-10-21 11:38:22 +0200 <ski> Echosolace : anyway, you should use a logical operator, instead of an `if'-`then'-`else' with `True' or `False' as one (or both) branches
2020-10-21 11:38:48 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 11:39:04 +0200 <Echosolace> Just trying to still wrap my head around this stuff. I'm still working on understanding the in part of that function.
2020-10-21 11:39:16 +0200 <Echosolace> But I still can't run it. Getting a parse error on input 'Data.list'
2020-10-21 11:39:20 +0200 <Echosolace> Did I import wrong?
2020-10-21 11:39:29 +0200 <ski> Echosolace : it might also be nice to put definitions in a source file (using your favorite text editor), and then (after saving) (re)load that file into the interactor
2020-10-21 11:39:33 +0200 <ski> should be `Data.List'
2020-10-21 11:39:43 +0200 <Echosolace> Ok thanks.
2020-10-21 11:39:43 +0200 <merijn> Echosolace: tbh, I would recommend not trying to write large definitions in ghci, just write it in a file and ":load" it
2020-10-21 11:40:01 +0200 <Echosolace> Ok, I'll do that.
2020-10-21 11:41:52 +0200st8less(~st8less@2603:a060:11fd:0:149e:8518:62e1:ca1b) (Quit: WeeChat 2.7.1)
2020-10-21 11:42:38 +0200nlhowell(~nlhowell@89.20.140.186)
2020-10-21 11:42:39 +0200lemmih(~lemmih@2406:3003:2072:44:508f:7862:5b0d:296) (Read error: Connection reset by peer)
2020-10-21 11:42:47 +0200 <ski> > "abc" `isPrefixOf` "abdef"
2020-10-21 11:42:49 +0200 <lambdabot> False
2020-10-21 11:42:59 +0200lemmih(~lemmih@2406:3003:2072:44:b4a2:1d9:b4d8:a595)
2020-10-21 11:43:01 +0200 <Echosolace> Ok, now that I've got the search function loaded in my new sandbox.hs file into GHCI, I figure I could run search of "apple" over a list of fruits.
2020-10-21 11:43:03 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-10-21 11:43:26 +0200 <ski> > "abc" `isPrefixOf` "abcdef"
2020-10-21 11:43:28 +0200 <lambdabot> True
2020-10-21 11:44:22 +0200 <Echosolace> The meat of this function is:
2020-10-21 11:44:23 +0200 <Echosolace> foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 11:45:12 +0200 <Echosolace> nlen is the length of the word apple, which is why I wonder if this search function could apply...
2020-10-21 11:45:28 +0200CourtneyNZ(~CourtneyN@ec2-52-63-156-37.ap-southeast-2.compute.amazonaws.com) (Quit: Leaving)
2020-10-21 11:45:35 +0200shatriff(~vitaliish@176.52.219.10) (Ping timeout: 265 seconds)
2020-10-21 11:45:49 +0200 <ski> if `take nlen x == needle' is true, then we give `True', else we give `acc'
2020-10-21 11:46:14 +0200 <int-e> any (needle `isPrefixOf`) (tails haystack) <-- what I might write if I didn't know about `isInfixOf`.
2020-10-21 11:46:22 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 11:46:28 +0200 <ski> so `if take nlen x == needle then True else acc' is true if (and only if) ... ? (something about `take nlen x == needle' and `acc')
2020-10-21 11:46:37 +0200 <ski> Echosolace : can you fill in the "..." ?
2020-10-21 11:47:03 +0200 <Echosolace> ... to the search function.
2020-10-21 11:47:12 +0200 <Echosolace> Err wait... disregard
2020-10-21 11:47:42 +0200 <Echosolace> nlen of apple is 5.
2020-10-21 11:48:50 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 11:48:58 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2020-10-21 11:49:08 +0200 <Echosolace> Oh man, I need some more time... Nevermind.
2020-10-21 11:49:56 +0200alp(~alp@2a01:e0a:58b:4920:785c:23a0:93c6:f784)
2020-10-21 11:53:09 +0200ffviewer(3dded63f@61-222-214-63.HINET-IP.hinet.net) (Remote host closed the connection)
2020-10-21 11:53:34 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 11:56:46 +0200scav(sid309693@gateway/web/irccloud.com/x-thdromwvanysldso) ()
2020-10-21 11:57:07 +0200scav(sid309693@gateway/web/irccloud.com/x-zlttbvsvkfeaapza)
2020-10-21 11:57:11 +0200Tario(~Tario@201.192.165.173) (Ping timeout: 265 seconds)
2020-10-21 11:57:21 +0200 <Echosolace> My search of my fruit over my fruitlist was successful, but my understanding about how the meat of the function progresses is where I am confused... For reference again:
2020-10-21 11:57:23 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 11:57:37 +0200 <Echosolace> So, foldl is a binomial function.
2020-10-21 11:58:03 +0200Tario(~Tario@201.192.165.173)
2020-10-21 11:58:43 +0200 <Echosolace> From LYAH: The binary function is applied between the starting value and the head of the list.
2020-10-21 11:59:04 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 11:59:13 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
2020-10-21 11:59:15 +0200 <Echosolace> So foldl is applying this function to the head of the list:
2020-10-21 11:59:16 +0200 <Echosolace> (\acc x -> if take nlen x == needle then True else acc
2020-10-21 11:59:25 +0200 <Echosolace> )
2020-10-21 11:59:38 +0200 <Echosolace> is that correct?
2020-10-21 12:00:01 +0200 <ski> Echosolace : not "binomial". you could say "binary", yes
2020-10-21 12:00:09 +0200 <Echosolace> Oops
2020-10-21 12:00:11 +0200 <Echosolace> Binary.
2020-10-21 12:00:23 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 12:00:27 +0200 <ski> yes, it's first applied to the initial accumulator, and the first element of the list. producing the next version of the accumulator
2020-10-21 12:00:56 +0200 <ski> then it's applied again, to that accumulator, and the next element of the list, and so on. final version/value of the accumulator is the overall result
2020-10-21 12:01:10 +0200Lord_of_Life_(~Lord@46.217.218.115)
2020-10-21 12:01:14 +0200dhil(~dhil@195.213.192.122)
2020-10-21 12:01:27 +0200 <Echosolace> Ok... so at first the function is applied to the initial value of False?
2020-10-21 12:01:29 +0200 <ski> (a binomial is a kind of polynomial)
2020-10-21 12:01:41 +0200 <ski> yes
2020-10-21 12:01:47 +0200 <Echosolace> Huh... ok.
2020-10-21 12:02:06 +0200ffviewer(1bf6c255@27-246-194-85.adsl.fetnet.net)
2020-10-21 12:02:46 +0200 <ski> take this example
2020-10-21 12:02:55 +0200 <Echosolace> O god.
2020-10-21 12:03:00 +0200 <Echosolace> Be gentle.
2020-10-21 12:03:25 +0200 <ski> you can compare with the implementation of `foldl'
2020-10-21 12:03:28 +0200 <ski> @src foldl
2020-10-21 12:03:28 +0200 <lambdabot> foldl f z [] = z
2020-10-21 12:03:28 +0200 <lambdabot> foldl f z (x:xs) = foldl f (f z x) xs
2020-10-21 12:03:47 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 12:04:06 +0200Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 246 seconds)
2020-10-21 12:04:10 +0200Lord_of_Life_Lord_of_Life
2020-10-21 12:04:19 +0200 <ski> and remember that `[2,3,5,7]' is syntactic sugar for `2:3:5:7:[]' (which means / is parsed as `2:(3:(5:(7:[])))', because `:' is specified as an "right-associative" infix operator)
2020-10-21 12:04:37 +0200 <Echosolace> I got that last bit at least.
2020-10-21 12:04:39 +0200 <ski> so, consider a definition like
2020-10-21 12:04:50 +0200jamm_(~jamm@unaffiliated/jamm)
2020-10-21 12:04:50 +0200rprije(~rprije@110-175-117-18.tpgi.com.au) (Ping timeout: 256 seconds)
2020-10-21 12:04:54 +0200jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-10-21 12:04:56 +0200 <ski> sum = foldl (\acc n -> acc + n) 0
2020-10-21 12:05:01 +0200 <ski> which could even be abbreviated as
2020-10-21 12:05:04 +0200Tario(~Tario@201.192.165.173) (Ping timeout: 256 seconds)
2020-10-21 12:05:06 +0200 <ski> sum = foldl (+) 0
2020-10-21 12:05:16 +0200 <ski> now, the example
2020-10-21 12:05:21 +0200 <Echosolace> Following.
2020-10-21 12:05:34 +0200 <ski> sum [2,3,5,7]
2020-10-21 12:05:45 +0200 <ski> = sum (2:3:5:7:[])
2020-10-21 12:05:54 +0200 <ski> = foldl (+) 0 (2:3:5:7:[])
2020-10-21 12:06:04 +0200zaquest(~notzaques@5.128.210.178) (Quit: Leaving)
2020-10-21 12:06:08 +0200 <ski> = foldl (+) (0 + 2) (3:5:7:[])
2020-10-21 12:06:17 +0200Tario(~Tario@201.192.165.173)
2020-10-21 12:06:23 +0200 <ski> = foldl (+) 2 (3:5:7:[])
2020-10-21 12:06:31 +0200 <ski> = foldl (+) (2 + 3) (5:7:[])
2020-10-21 12:06:33 +0200 <Echosolace> Then 2 + 3 and then the next iteration
2020-10-21 12:06:35 +0200 <Echosolace> Yep
2020-10-21 12:06:36 +0200 <ski> = foldl (+) 5 (5:7:[])
2020-10-21 12:06:43 +0200 <ski> = foldl (+) (5 + 5) (7:[])
2020-10-21 12:06:49 +0200 <ski> = foldl (+) 10 (7:[])
2020-10-21 12:06:56 +0200 <ski> = foldl (+) (10 + 7) []
2020-10-21 12:07:01 +0200 <ski> = foldl (+) 17 []
2020-10-21 12:07:04 +0200 <ski> = 17
2020-10-21 12:07:15 +0200zaquest(~notzaques@5.128.210.178)
2020-10-21 12:07:20 +0200 <Echosolace> Thanks. Although what's tripping me up is involving False as the accumulator.
2020-10-21 12:07:28 +0200 <Echosolace> (\acc x -> if take nlen x == needle then True else acc)
2020-10-21 12:07:44 +0200 <ski> so, you're working your way, from the left to the right, combining the initial "seed" / accumulator, with one element at a time, until you've gone through them all
2020-10-21 12:07:48 +0200 <ski> well
2020-10-21 12:08:13 +0200 <ski> <ski> if `take nlen x == needle' is true, then we give `True', else we give `acc'
2020-10-21 12:08:16 +0200 <ski> <ski> so `if take nlen x == needle then True else acc' is true if (and only if) ... ? (something about `take nlen x == needle' and `acc')
2020-10-21 12:08:19 +0200 <ski> ski> Echosolace : can you fill in the "..." ?
2020-10-21 12:08:58 +0200 <Echosolace> ?
2020-10-21 12:09:05 +0200 <Echosolace> Oh
2020-10-21 12:09:09 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 12:09:12 +0200 <ski> there is a relatively simple way to express it
2020-10-21 12:09:30 +0200 <Echosolace> I know there's probably a better way to do it, but I'm trying to follow LYAH.
2020-10-21 12:10:38 +0200arguapacha(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca) (Read error: Connection reset by peer)
2020-10-21 12:10:59 +0200 <ski> well .. i was intending to try to show what happens with the accumulator, in your case
2020-10-21 12:11:05 +0200arguapacha(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca)
2020-10-21 12:11:13 +0200 <Echosolace> I think I am approaching an understanding.
2020-10-21 12:11:19 +0200 <ski> but i think it's be easier to follow, with a more concise expression of the accumulating function
2020-10-21 12:11:31 +0200waskell(~quassel@d66-183-124-7.bchsia.telus.net) (Read error: Connection reset by peer)
2020-10-21 12:11:47 +0200waskell(~quassel@d66-183-124-7.bchsia.telus.net)
2020-10-21 12:11:52 +0200 <idnar> does something like `[Async a] -> IO (Async a)` exist?
2020-10-21 12:11:59 +0200 <idnar> err
2020-10-21 12:12:08 +0200ambiso9(~ambiso@209.182.239.205) (Quit: Ping timeout (120 seconds))
2020-10-21 12:12:14 +0200 <idnar> I mean `[Async a] -> IO (Async [a])`
2020-10-21 12:12:26 +0200 <ski> you could still do the above "reduction/evaluation trace", for your `if'-`then'-`else' case .. but it'll be a little bit more cluttered
2020-10-21 12:12:26 +0200ambiso9(~ambiso@209.182.239.205)
2020-10-21 12:12:46 +0200conal_(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 12:13:07 +0200 <idnar> `traverse wait` is close but I'd like to fail fast
2020-10-21 12:13:16 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-10-21 12:14:28 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Ping timeout: 256 seconds)
2020-10-21 12:15:24 +0200Guest88073lep-delete
2020-10-21 12:15:26 +0200lep-deleteGuest88073
2020-10-21 12:15:27 +0200Guest88073lep-delete
2020-10-21 12:15:28 +0200lep-deleteGuest88073
2020-10-21 12:17:23 +0200 <Echosolace> Ok ok I think I've got it. My only wonder is why tails haystack gets called?
2020-10-21 12:17:26 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 12:17:53 +0200 <ski> it produces a list of successive tails of the hay stack
2020-10-21 12:17:57 +0200 <merijn> > tails [1..5]
2020-10-21 12:17:59 +0200 <lambdabot> [[1,2,3,4,5],[2,3,4,5],[3,4,5],[4,5],[5],[]]
2020-10-21 12:18:00 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 12:18:00 +0200 <ski> > tails "haystack"
2020-10-21 12:18:04 +0200 <lambdabot> ["haystack","aystack","ystack","stack","tack","ack","ck","k",""]
2020-10-21 12:18:25 +0200 <merijn> It is, tbh, a rather inefficient way of doing things, but hey
2020-10-21 12:18:42 +0200 <ski> then, checking whether such a tail starts with the needle, amounts to checking whether they hay stack contains the needle somewhere
2020-10-21 12:19:55 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
2020-10-21 12:22:25 +0200 <Echosolace> I need to play around some more.
2020-10-21 12:24:44 +0200michalrus(m@michalrus.com) (Ping timeout: 265 seconds)
2020-10-21 12:25:33 +0200 <Echosolace> If I have fruitlist = ["strawberry","green apple","red apple","apple granny"]
2020-10-21 12:25:45 +0200 <Echosolace> and I search for ["apple"]
2020-10-21 12:25:52 +0200 <Echosolace> I get False.
2020-10-21 12:26:13 +0200 <Echosolace> I think this is because:
2020-10-21 12:26:17 +0200 <Echosolace> take nlen x == needle
2020-10-21 12:26:37 +0200 <Echosolace> We are taking the length of needle's worth of element x...
2020-10-21 12:26:50 +0200 <Echosolace> But... I'm kinda surprised.
2020-10-21 12:27:07 +0200 <Echosolace> nlen of apple is 5.
2020-10-21 12:27:09 +0200 <merijn> Echosolace: That does a different thing
2020-10-21 12:27:13 +0200 <merijn> Echosolace: no
2020-10-21 12:27:16 +0200 <Echosolace> Oh...
2020-10-21 12:27:22 +0200 <merijn> Echosolace: Or rather, yes, but that's not what you're doing
2020-10-21 12:27:33 +0200 <merijn> You're taking the length of ["apple"], which is 1
2020-10-21 12:27:42 +0200 <Echosolace> Ah.
2020-10-21 12:27:48 +0200 <merijn> It's a list containing one string
2020-10-21 12:27:48 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 12:27:56 +0200 <Echosolace> Ok I need to go back and rethink a lot one sec.
2020-10-21 12:28:08 +0200 <merijn> and then you're checking if any of the strings in your other list match "apple" (to which the answer is "no")
2020-10-21 12:28:11 +0200stefan-__(~cri@42dots.de)
2020-10-21 12:28:19 +0200jol(~jol@jol.dev) (Ping timeout: 246 seconds)
2020-10-21 12:28:25 +0200 <merijn> Echosolace: Consider the type of search
2020-10-21 12:28:37 +0200 <merijn> "Eq a => [a] -> [a] -> Bool"
2020-10-21 12:28:50 +0200 <ski> @let search :: Eq a => [a] -> [a] -> Bool; search needle haystack = foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack) where nlen = length needle
2020-10-21 12:28:50 +0200 <merijn> it's checking whether the first list appears inside the second one
2020-10-21 12:28:51 +0200 <lambdabot> Defined.
2020-10-21 12:28:53 +0200cristi_(~cristi@82.76.158.82) (Quit: cristi_)
2020-10-21 12:28:58 +0200bartemius(~bartemius@109.252.19.142) (Remote host closed the connection)
2020-10-21 12:29:03 +0200 <merijn> Does the list ["apple"] occur inside your second list? No
2020-10-21 12:29:11 +0200 <ski> > search ["apple"] ["strawberry","green apple","red apple","apple granny"]
2020-10-21 12:29:12 +0200cyberlard(~cyberlard@unaffiliated/jludwig) (Ping timeout: 256 seconds)
2020-10-21 12:29:13 +0200 <lambdabot> False
2020-10-21 12:29:23 +0200 <ski> > search ["green apple"] ["strawberry","green apple","red apple","apple granny"]
2020-10-21 12:29:24 +0200 <Echosolace> I see that. Thanks.
2020-10-21 12:29:26 +0200 <lambdabot> True
2020-10-21 12:29:27 +0200 <merijn> Echosolace: 'search "apple" "apple granny"' otoh should work
2020-10-21 12:29:34 +0200michalrus(m@michalrus.com)
2020-10-21 12:29:36 +0200 <ski> > search ["green apple","red apple"] ["strawberry","green apple","red apple","apple granny"]
2020-10-21 12:29:37 +0200 <lambdabot> True
2020-10-21 12:29:57 +0200 <ski> > search "apple" "apple granny"
2020-10-21 12:30:00 +0200 <lambdabot> True
2020-10-21 12:30:29 +0200cyberlard(~cyberlard@unaffiliated/jludwig)
2020-10-21 12:30:43 +0200 <lortabac> idnar: if your purpose is running multiple actions concurrently you can use the Applicative instance of Concurrently
2020-10-21 12:30:58 +0200m0rphism(~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de)
2020-10-21 12:31:44 +0200nicknick(75d746c7@117.215.70.199)
2020-10-21 12:34:40 +0200worc3131(~quassel@2a02:c7f:c026:9500:a0d2:b9d1:42a4:69b4)
2020-10-21 12:34:49 +0200jol(~jol@jol.dev)
2020-10-21 12:34:52 +0200 <Echosolace> Ok I've got that main function body figured out, but in the case of fruitlist = ["strawberry","apple","orange","banana"], I wonder if I search for apple why it wouldn't eventually return false, because after iterating to orange or banana, the accumulator would turn False.
2020-10-21 12:35:21 +0200 <Echosolace> Right?
2020-10-21 12:35:53 +0200 <Echosolace> Or wait...
2020-10-21 12:36:01 +0200 <Echosolace> Once it turns true it's always true.
2020-10-21 12:37:06 +0200 <Echosolace> I still don't see where tails haystack is called.
2020-10-21 12:37:12 +0200 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
2020-10-21 12:37:28 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 12:37:38 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 12:38:30 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 12:38:51 +0200Lord_of_Life(~Lord@46.217.218.115) (Read error: Connection reset by peer)
2020-10-21 12:39:03 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 12:39:18 +0200Lord_of_Life(~Lord@46.217.218.115)
2020-10-21 12:39:18 +0200Lord_of_Life(~Lord@46.217.218.115) (Changing host)
2020-10-21 12:39:18 +0200Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362)
2020-10-21 12:40:31 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 12:40:52 +0200bliminse(~bliminse@host109-158-54-87.range109-158.btcentralplus.com) (Ping timeout: 272 seconds)
2020-10-21 12:40:52 +0200 <nicknick> Is there any bot here who can solve this?
2020-10-21 12:40:54 +0200 <nicknick> f :: Num a => a -> a -> a
2020-10-21 12:41:01 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 12:41:11 +0200 <nicknick> I need to convert f :: Num a => a -> a -> a to function.
2020-10-21 12:41:23 +0200alp(~alp@2a01:e0a:58b:4920:785c:23a0:93c6:f784) (Ping timeout: 272 seconds)
2020-10-21 12:41:36 +0200 <ski> f x y = x
2020-10-21 12:41:39 +0200 <ski> how about that ?
2020-10-21 12:42:06 +0200 <nicknick> What if it is more complex?
2020-10-21 12:42:07 +0200 <nicknick> f :: Num a => (a -> a -> a) -> a -> [a] -> [a]
2020-10-21 12:42:18 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 12:42:25 +0200 <ski> f _ _ _ = []
2020-10-21 12:42:52 +0200 <nicknick> Ikea rocks :)
2020-10-21 12:42:58 +0200 <nicknick> Are you God or a bot?
2020-10-21 12:43:05 +0200 <Echosolace> That's exactly what I was thinking.
2020-10-21 12:43:10 +0200 <ski> Echosolace : `tails haystack' is called in the last actual parameter of that `foldl' call
2020-10-21 12:43:26 +0200 <Echosolace> Right, I got that from my most recent error after deleting that segment.
2020-10-21 12:43:36 +0200 <Echosolace> Thanks.
2020-10-21 12:43:39 +0200babygnu(~robert@gateway/tor-sasl/babygnu) (Quit: Leaving)
2020-10-21 12:43:42 +0200 <ski> (it literally says `tails haystack', there)
2020-10-21 12:43:46 +0200 <Echosolace> >:t foldl
2020-10-21 12:43:52 +0200 <ski> @type foldl
2020-10-21 12:43:53 +0200 <lambdabot> Foldable t => (b -> a -> b) -> b -> t a -> b
2020-10-21 12:44:13 +0200 <Echosolace> Ok that I have major trouble understanding.
2020-10-21 12:44:14 +0200 <ski> @type foldl :: (s -> a -> s) -> s -> [a] -> s
2020-10-21 12:44:15 +0200 <lambdabot> (s -> a -> s) -> s -> [a] -> s
2020-10-21 12:44:34 +0200 <ski> `s' is the type of the accumulator state. `a' is the element type of the list
2020-10-21 12:45:00 +0200 <ski> (the version with `Foldable' is more general, in that it can also work over other ordered collections than lists)
2020-10-21 12:45:23 +0200sleepingisfun(~sleepingi@168.235.93.188) (Quit: hewwo)
2020-10-21 12:45:47 +0200 <nicknick> How can I use lambdabot to solve this? f :: Num a => (a -> a -> a) -> a -> [a] -> [a]
2020-10-21 12:46:31 +0200 <ski> no
2020-10-21 12:46:42 +0200bliminse(~bliminse@host109-158-26-29.range109-158.btcentralplus.com)
2020-10-21 12:46:49 +0200 <nicknick> Sad :(
2020-10-21 12:47:00 +0200 <ski> @djinn (a -> (b,c)) -> (a -> b,a -> c)
2020-10-21 12:47:01 +0200 <lambdabot> f a =
2020-10-21 12:47:01 +0200 <lambdabot> (\ b ->
2020-10-21 12:47:01 +0200 <lambdabot> case a b of
2020-10-21 12:47:01 +0200 <lambdabot> (c, _) -> c,
2020-10-21 12:47:01 +0200 <lambdabot> \ d ->
2020-10-21 12:47:03 +0200 <lambdabot> case a d of
2020-10-21 12:47:05 +0200 <lambdabot> (_, e) -> e)
2020-10-21 12:47:29 +0200 <ski> but Djinn doesn't know `Num', nor does it understand recursive data types like `[]'
2020-10-21 12:47:39 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 12:48:07 +0200 <ski> @djinn (a -> a -> a) -> Maybe a -> Maybe a
2020-10-21 12:48:07 +0200 <lambdabot> f a b =
2020-10-21 12:48:07 +0200 <lambdabot> case b of
2020-10-21 12:48:08 +0200 <lambdabot> Nothing -> Nothing
2020-10-21 12:48:10 +0200 <lambdabot> Just c -> Just (a c c)
2020-10-21 12:48:33 +0200 <nicknick> I see.
2020-10-21 12:48:34 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 12:48:52 +0200stefan-__(~cri@42dots.de)
2020-10-21 12:49:23 +0200p-core(~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
2020-10-21 12:49:56 +0200 <nicknick> How can I solve f :: Num a => (a -> a -> c) -> [a] -> [a] -> [c] ? Is that hard?
2020-10-21 12:50:12 +0200 <olligobber> :t zip
2020-10-21 12:50:13 +0200 <lambdabot> [a] -> [b] -> [(a, b)]
2020-10-21 12:50:18 +0200 <olligobber> :t zipWith
2020-10-21 12:50:19 +0200 <lambdabot> (a -> b -> c) -> [a] -> [b] -> [c]
2020-10-21 12:50:39 +0200 <nicknick> :t zip or :t zipWith
2020-10-21 12:50:40 +0200 <lambdabot> error:
2020-10-21 12:50:40 +0200 <lambdabot> • Couldn't match expected type ‘[a]’
2020-10-21 12:50:40 +0200 <lambdabot> with actual type ‘t0 Bool -> Bool’
2020-10-21 12:50:47 +0200 <nicknick> Which is better?
2020-10-21 12:50:57 +0200 <olligobber> zipWith does what you asked for
2020-10-21 12:51:00 +0200 <ski> better for what ?
2020-10-21 12:51:04 +0200 <olligobber> I just forgot that zip doesn't
2020-10-21 12:51:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-21 12:51:53 +0200 <Echosolace> @type foldl
2020-10-21 12:51:54 +0200 <lambdabot> Foldable t => (b -> a -> b) -> b -> t a -> b
2020-10-21 12:52:20 +0200 <Echosolace> Breaking this down, how many parameters are here?
2020-10-21 12:52:23 +0200 <ski> > zipWith (+) [0,1,2] [30,40,50]
2020-10-21 12:52:25 +0200 <lambdabot> [30,41,52]
2020-10-21 12:52:34 +0200 <Echosolace> Is (b -> a -> b) a parameter?
2020-10-21 12:52:35 +0200 <ski> > liftA2 (+) [0,1,2] [30,40,50]
2020-10-21 12:52:36 +0200 <lambdabot> [30,40,50,31,41,51,32,42,52]
2020-10-21 12:52:44 +0200 <ski> Echosolace : it's the type of the first parameter, yes
2020-10-21 12:52:53 +0200Sanchayan(~Sanchayan@122.181.211.206) (Quit: leaving)
2020-10-21 12:53:00 +0200 <olligobber> oh yeah, liftA2 also works
2020-10-21 12:53:17 +0200 <Echosolace> but b is the first parameter, no?
2020-10-21 12:53:22 +0200 <ski> no
2020-10-21 12:53:26 +0200 <Echosolace> Crap.
2020-10-21 12:53:26 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 12:53:34 +0200 <Echosolace> Where do you see the first parameter?
2020-10-21 12:53:39 +0200 <nicknick> I think guys didn't understand :) I need a function which satisfies this type signature f :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:53:40 +0200stefan-__(~cri@42dots.de)
2020-10-21 12:53:46 +0200 <ski> consider
2020-10-21 12:53:50 +0200 <ski> foldl (+) 0 (2:3:5:7:[])
2020-10-21 12:54:03 +0200 <Echosolace> Yep.
2020-10-21 12:54:11 +0200 <olligobber> nicknick, zipWith and liftA2 both have that type signature
2020-10-21 12:54:16 +0200 <Echosolace> Oh.
2020-10-21 12:54:22 +0200 <olligobber> well, a supertype of that type signature
2020-10-21 12:54:36 +0200 <ski> `(+)' has type corrersponding to `b -> a -> b', `0' has type corresponding to `b', and `2:3:5:7:[]' has type corresponding to `t a' (or `[a]' more specifically). result has type `b'
2020-10-21 12:55:02 +0200 <ski> @type zipWith :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:55:03 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:55:07 +0200 <ski> @type liftA2 :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:55:08 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:55:25 +0200 <olligobber> but there are other functions with that type signature
2020-10-21 12:55:27 +0200 <ski> nicknick : both of the offered functions does satisfy that signature
2020-10-21 12:55:45 +0200 <ski> (but they're more general, does also satisfy other signatures, as well)
2020-10-21 12:55:56 +0200 <nicknick> What if I have to write |custom| function?
2020-10-21 12:55:58 +0200 <olligobber> @type (\_ _ _->[]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:55:59 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:56:06 +0200 <ski> nicknick : then write a custom function ?
2020-10-21 12:56:13 +0200 <ski> e.g. the one olligobber suggested
2020-10-21 12:57:01 +0200 <olligobber> @type (\f x y -> f (sum x) (sum y))
2020-10-21 12:57:02 +0200 <lambdabot> (Foldable t1, Foldable t2, Num t3, Num t4) => (t3 -> t4 -> t5) -> t1 t3 -> t2 t4 -> t5
2020-10-21 12:57:20 +0200alp(~alp@2a01:e0a:58b:4920:f968:6025:1be8:4fb9)
2020-10-21 12:57:20 +0200 <ski> @type let customFunction :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]; customFunction f xs ys = zipWith f ys xs in customFunction
2020-10-21 12:57:22 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:57:29 +0200 <olligobber> ^
2020-10-21 12:57:47 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 12:58:08 +0200 <ski> nicknick : there's many different such functions, having the given signature
2020-10-21 12:58:08 +0200 <olligobber> @type (\f x y -> [f (sum x) (sum y)]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:58:09 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:58:30 +0200 <olligobber> there are infinitely many functions with that type
2020-10-21 12:58:41 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 12:58:42 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 12:59:04 +0200 <ski> Echosolace : in that example, `b' would be `Integer', and `a' would also be `Integer'. in your earlier example, however, `b' would be `Bool'
2020-10-21 12:59:39 +0200 <olligobber> @type (\f _ _ -> [f 0 0]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:59:40 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 12:59:47 +0200 <Echosolace> Ski: Got an ADA address I can tip?
2020-10-21 13:00:13 +0200 <ski> dunno what that is
2020-10-21 13:00:13 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2020-10-21 13:00:48 +0200 <Echosolace> It's a crypto thing. Based on haskell. Big player in the space.
2020-10-21 13:00:54 +0200 <ski> i see
2020-10-21 13:01:04 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz)
2020-10-21 13:01:11 +0200 <Echosolace> daedaluswallet.io
2020-10-21 13:01:55 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-10-21 13:02:51 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 13:03:31 +0200 <olligobber> @type (\f _ _ -> f <$> [0..] <*> [0..]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 13:03:33 +0200 <lambdabot> error:
2020-10-21 13:03:33 +0200 <lambdabot> • Could not deduce (Enum a1)
2020-10-21 13:03:33 +0200 <lambdabot> arising from the arithmetic sequence ‘0 .. ’
2020-10-21 13:03:37 +0200 <olligobber> -_-
2020-10-21 13:03:57 +0200 <olligobber> @type (\f _ _ -> f <$> fromInteger [0..] <*> fromInteger [0..]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 13:03:58 +0200hackagehaskoin-core 0.17.0 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.0 (jprupp)
2020-10-21 13:03:58 +0200 <lambdabot> error:
2020-10-21 13:03:58 +0200 <lambdabot> • Couldn't match expected type ‘Integer’ with actual type ‘[a0]’
2020-10-21 13:03:58 +0200 <lambdabot> • In the first argument of ‘fromInteger’, namely ‘[0 .. ]’
2020-10-21 13:04:00 +0200 <siraben> Are there haskell packages that can help me write an LLVM backend?
2020-10-21 13:04:20 +0200Amras(~Amras@unaffiliated/amras0000)
2020-10-21 13:04:28 +0200 <olligobber> @type (\f _ _ -> f <$> (fromInteger <$> [0..]) <*> (fromInteger <$> [0..])) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 13:04:29 +0200 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
2020-10-21 13:05:11 +0200 <nicknick> Okay okay :D
2020-10-21 13:05:16 +0200 <nicknick> You guys rock
2020-10-21 13:05:26 +0200Velpoman(~Velpoman@159.65.76.124) (Remote host closed the connection)
2020-10-21 13:05:34 +0200 <dminuoso> siraben: What exactly are your intentions?
2020-10-21 13:06:03 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 13:06:19 +0200 <nicknick> But what is things are simple? Like what is I need a function implementation for type signature f :: Num a => a -> [a] -> a
2020-10-21 13:06:31 +0200 <nicknick> is = if
2020-10-21 13:06:34 +0200 <nicknick> if = is
2020-10-21 13:06:36 +0200 <siraben> dminuoso: I'd like to create an LLVM backend for the https://trigraph.net/powdertoy/R216/manual.md computer
2020-10-21 13:06:36 +0200 <siraben> Or a simpler arch, just to learn
2020-10-21 13:06:46 +0200 <olligobber> :t const :: Num a => a -> [a] -> a
2020-10-21 13:06:47 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:06:50 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
2020-10-21 13:07:05 +0200 <olligobber> :t const (const 0) :: Num a => a -> [a] -> a
2020-10-21 13:07:06 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:07:23 +0200 <siraben> nicknick: you can easily find functions that exhibit a given type (provided it's possible to do so), but these functions may not be equivalent
2020-10-21 13:07:34 +0200random(~random@185.219.70.106)
2020-10-21 13:07:35 +0200 <olligobber> :t (\_ -> sum) :: Num a => a -> [a] -> a
2020-10-21 13:07:36 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:07:57 +0200 <olligobber> siraben, it's always possible to
2020-10-21 13:08:03 +0200 <olligobber> :t undefined :: a -> b
2020-10-21 13:08:04 +0200 <lambdabot> a -> b
2020-10-21 13:08:11 +0200 <siraben> lol
2020-10-21 13:08:12 +0200raichoo(~raichoo@213.240.178.58) (Quit: Lost terminal)
2020-10-21 13:08:26 +0200 <random> hey guys
2020-10-21 13:08:31 +0200 <random> what was the name of that monad tutorial
2020-10-21 13:08:39 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
2020-10-21 13:08:39 +0200 <random> where you did like 5 examples
2020-10-21 13:08:45 +0200 <random> and eventually you arrived at monads in the end
2020-10-21 13:08:54 +0200alx741(~alx741@186.178.110.244) (Ping timeout: 260 seconds)
2020-10-21 13:09:23 +0200 <nicknick> Can we do better than onst (const 0)
2020-10-21 13:09:33 +0200 <nicknick> Better than const (const 0)
2020-10-21 13:09:38 +0200Clintsquints.
2020-10-21 13:09:54 +0200 <siraben> nicknick: what is your intention here? you just want any function that has that type?
2020-10-21 13:09:56 +0200 <olligobber> what makes one function better than another?
2020-10-21 13:09:56 +0200 <ski> can you qualify "better" more ?
2020-10-21 13:10:04 +0200 <nicknick> Any fucntion
2020-10-21 13:10:12 +0200 <nicknick> Should look like a gentleman
2020-10-21 13:10:19 +0200 <siraben> ?
2020-10-21 13:10:26 +0200 <siraben> :t undefined :: Num a => a → [a] → a
2020-10-21 13:10:28 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:10:29 +0200 <ski> then `const (const undefined)' should suffice, right ?
2020-10-21 13:10:33 +0200 <olligobber> :t (\_ _ -> sum $ fromInteger <$> [0..]) :: Num a => a -> [a] -> a
2020-10-21 13:10:34 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:10:34 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 256 seconds)
2020-10-21 13:10:38 +0200Wuzzy(~Wuzzy@p5790ef06.dip0.t-ipconnect.de)
2020-10-21 13:10:56 +0200 <siraben> dminuoso: did that clarify my intentions?
2020-10-21 13:11:18 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2020-10-21 13:11:36 +0200 <siraben> :t (\x y → x <$ y) :: Num a => a → [a] → a
2020-10-21 13:11:37 +0200 <lambdabot> error:
2020-10-21 13:11:37 +0200 <lambdabot> • Occurs check: cannot construct the infinite type: a1 ~ [a1]
2020-10-21 13:11:37 +0200 <lambdabot> • In the expression: x <$ y
2020-10-21 13:11:54 +0200xerox_(~xerox@unaffiliated/xerox) (Ping timeout: 272 seconds)
2020-10-21 13:12:06 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus)
2020-10-21 13:12:19 +0200 <olligobber> :t (\x y -> sum $ x <$ y) :: Num a => a -> [a] -> a
2020-10-21 13:12:21 +0200 <lambdabot> Num a => a -> [a] -> a
2020-10-21 13:12:25 +0200 <siraben> Of course.
2020-10-21 13:13:28 +0200Tario(~Tario@201.192.165.173) (Ping timeout: 246 seconds)
2020-10-21 13:14:23 +0200Tario(~Tario@201.192.165.173)
2020-10-21 13:14:37 +0200 <nicknick> How can I get a step-by-step solution for \f x y -> [f (sum x) (sum y)]
2020-10-21 13:14:51 +0200 <ski> what do you mean ?
2020-10-21 13:15:04 +0200ffviewer(1bf6c255@27-246-194-85.adsl.fetnet.net) (Ping timeout: 245 seconds)
2020-10-21 13:15:30 +0200 <olligobber> what is a solution?
2020-10-21 13:15:40 +0200 <nicknick> Like
2020-10-21 13:15:45 +0200 <nicknick> How we arrived at this?
2020-10-21 13:16:07 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2020-10-21 13:16:58 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 272 seconds)
2020-10-21 13:17:01 +0200 <ski> we have two lists of numbers of type `a'. we want a list of `c's. `f' can turn two `a's into a `c'. if we sum the two lists, and pass the sums to `f', we get a `c', which we can put in a list so that we get something of the appropriate/expected result type
2020-10-21 13:18:23 +0200 <ski> of course, we could have taken the product instead, or something else entirely ..
2020-10-21 13:18:28 +0200hackagehaskoin-node 0.17.0 - P2P library for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-node-0.17.0 (jprupp)
2020-10-21 13:19:22 +0200kritzefitz(~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 13:23:20 +0200 <nicknick> How can we justify that const (const undefined) satisfies Num a => a -> [a] -> a?
2020-10-21 13:24:15 +0200polyrain(~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 13:24:34 +0200 <ski> `const' has type `a -> ([a] -> a)' and `undefined' has type `a', so `const undefined' has type `[a] -> a'
2020-10-21 13:25:09 +0200Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 265 seconds)
2020-10-21 13:25:11 +0200 <ski> `const' also has type `([a] -> a) -> (a -> [a] -> a)', so `const (const undefined)' has type `a -> [a] -> a'
2020-10-21 13:25:45 +0200 <ski> further, we can always add more (unused/useless) constraints on type variables, so `const (const undefined)' also has type `Num a => a -> [a] -> a'
2020-10-21 13:27:15 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 13:27:38 +0200Tario(~Tario@201.192.165.173) (Ping timeout: 256 seconds)
2020-10-21 13:28:01 +0200Tario(~Tario@201.192.165.173)
2020-10-21 13:28:11 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 13:29:53 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:715c:4cac:e6ca:b78) (Quit: karanlikmadde)
2020-10-21 13:31:34 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699)
2020-10-21 13:32:26 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds)
2020-10-21 13:32:40 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 13:32:55 +0200kritzefitz(~kritzefit@2003:5b:203b:200::10:49)
2020-10-21 13:33:50 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 13:33:57 +0200 <nicknick> If we apply some (but not all)of the arguments to a function, what kind of function do we get as a result?
2020-10-21 13:34:55 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
2020-10-21 13:35:04 +0200 <ski> all functions in Haskell take exactly one input parameter/argument
2020-10-21 13:35:54 +0200 <nicknick> What if it is a custom function?
2020-10-21 13:35:58 +0200hackagedirichlet 0.1.0.0 - Multivariate dirichlet distribution https://hackage.haskell.org/package/dirichlet-0.1.0.0 (dschrempf)
2020-10-21 13:36:08 +0200 <ski> so e.g. `take :: Int -> [a] -> [a]' really means `take :: Int -> ([a] -> [a])', and `take 3 "abcdefgh"' really means `(take 3) "abcdefgh"'
2020-10-21 13:36:14 +0200 <ski> doesn't matter
2020-10-21 13:36:27 +0200 <ski> > take 3 "abcdefgh"
2020-10-21 13:36:29 +0200 <lambdabot> "abc"
2020-10-21 13:36:35 +0200 <ski> > map (take 3) (tails "abcdefgh")
2020-10-21 13:36:38 +0200 <lambdabot> ["abc","bcd","cde","def","efg","fgh","gh","h",""]
2020-10-21 13:36:45 +0200machinedgod(~machinedg@24.105.81.50)
2020-10-21 13:37:16 +0200 <ski> `take 3' is a function that, when given a list as input, will give the list of the first three elements of that list (or less, if there wasn't three elements available)
2020-10-21 13:37:16 +0200 <nicknick> If we apply some (but not all)of the arguments to a function, what kind of function do we get as a result? ONE WORD ANSWER?
2020-10-21 13:37:39 +0200 <nicknick> what kind of function?
2020-10-21 13:38:12 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 13:38:22 +0200 <ski> one sometimes says that one gets a "partially applied" function. but that's not a property of the function itself, but rather of the way one arrived at it
2020-10-21 13:39:38 +0200 <ski> > elem 'c' "abcd"
2020-10-21 13:39:40 +0200 <lambdabot> True
2020-10-21 13:39:42 +0200 <ski> > elem 'e' "abcd"
2020-10-21 13:39:45 +0200 <lambdabot> False
2020-10-21 13:40:08 +0200 <ski> @let elemAbcd x = elem x "abcd"
2020-10-21 13:40:09 +0200 <lambdabot> Defined.
2020-10-21 13:40:16 +0200 <ski> > elemAbcd 'b'
2020-10-21 13:40:19 +0200 <lambdabot> True
2020-10-21 13:40:33 +0200 <ski> one could claim that `elemAbcd' is a partial application of `elem'
2020-10-21 13:42:56 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 13:46:15 +0200polyrain(~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c)
2020-10-21 13:46:51 +0200nicknick(75d746c7@117.215.70.199) (Remote host closed the connection)
2020-10-21 13:48:32 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 13:51:24 +0200totallynotnatenotnatebtw
2020-10-21 13:51:27 +0200borne(~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-10-21 13:51:49 +0200borne(~fritjof@muedsl-82-207-207-196.citykom.de)
2020-10-21 13:51:59 +0200danvet(~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453)
2020-10-21 13:52:11 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 13:52:35 +0200danvet(~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453) (Client Quit)
2020-10-21 13:52:35 +0200bartemius(~bartemius@109-252-19-142.nat.spd-mgts.ru)
2020-10-21 13:53:00 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-10-21 13:57:38 +0200haasn(~nand@mpv/developer/haasn) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2020-10-21 13:57:59 +0200haasn(~nand@mpv/developer/haasn)
2020-10-21 13:58:42 +0200cristi_(~cristi@82.76.158.82)
2020-10-21 13:58:43 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 13:59:03 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24)
2020-10-21 13:59:25 +0200geekosaur(ac3a3eb0@172.58.62.176)
2020-10-21 13:59:34 +0200cristi_(~cristi@82.76.158.82) (Remote host closed the connection)
2020-10-21 14:00:02 +0200tlockney(~tlockney@185.204.1.185) ()
2020-10-21 14:01:00 +0200whatisRT(~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Ping timeout: 246 seconds)
2020-10-21 14:01:27 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Quit: Leaving)
2020-10-21 14:02:07 +0200Echosolace(~Echosolac@p790105-ipngn4101hiraide.tochigi.ocn.ne.jp) (Ping timeout: 246 seconds)
2020-10-21 14:03:13 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2020-10-21 14:04:40 +0200urodna(~urodna@unaffiliated/urodna)
2020-10-21 14:06:49 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 14:06:49 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 14:06:49 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-21 14:08:01 +0200darjeeli1(~darjeelin@122.245.123.118)
2020-10-21 14:08:16 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
2020-10-21 14:08:29 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl)
2020-10-21 14:09:15 +0200ixlun(~matthew@213.205.241.94)
2020-10-21 14:10:26 +0200 <ixlun> Hi all, I was wondering if anyone knew of a way of making an equivalent of swapMVar, swapMVar_ :: MVar a -> a -> IO ()
2020-10-21 14:10:37 +0200 <ixlun> I tried `void . swapMVar'
2020-10-21 14:10:58 +0200 <ixlun> but that ends up somehow getting rid of the IO monad
2020-10-21 14:11:10 +0200 <ixlun> :t void . swapMVar
2020-10-21 14:11:11 +0200 <lambdabot> error:
2020-10-21 14:11:11 +0200 <lambdabot> Variable not in scope: swapMVar :: a -> f a0
2020-10-21 14:11:15 +0200 <merijn> ixlun: Yes, because swapMVar takes two arguments, not 1
2020-10-21 14:11:25 +0200nicknick(75d746c7@117.215.70.199)
2020-10-21 14:11:28 +0200 <[exa]> ixlun: you need the magical (.).(.) operator
2020-10-21 14:11:32 +0200 <merijn> ixlun: So it's inferring that you're using the Monad instance of functions
2020-10-21 14:11:40 +0200iMonad(1bf6c255@27-246-194-85.adsl.fetnet.net)
2020-10-21 14:11:46 +0200 <nicknick> I need an explanation for a0 n xs = foldr (^) n xs
2020-10-21 14:11:48 +0200 <merijn> or just, you know, using a variable name
2020-10-21 14:12:07 +0200 <[exa]> merijn: so pointful
2020-10-21 14:12:17 +0200 <merijn> nicknick: You should probably start by saying where you get confused :)
2020-10-21 14:12:24 +0200 <nicknick> What is a0 n xs = foldr (^) n xs doing?
2020-10-21 14:12:50 +0200 <ski> @type ((() <$) .) . Control.Concurrent.MVar.swapMVar
2020-10-21 14:12:51 +0200 <lambdabot> GHC.MVar.MVar b -> b -> IO ()
2020-10-21 14:13:13 +0200 <ixlun> merijn: What's the magical operator you mention above? I can't seem to hoogle that one
2020-10-21 14:13:32 +0200 <nicknick> Please tell me: What is a0 n xs = foldr (^) n xs doing?
2020-10-21 14:13:42 +0200raichoo(~raichoo@dslb-084-062-114-218.084.062.pools.vodafone-ip.de)
2020-10-21 14:13:49 +0200 <ski> nicknick : `a0 2 [3,4,5] = 3 ^ (4 ^ (5 ^ 2))'
2020-10-21 14:14:16 +0200random(~random@185.219.70.106) (Quit: Leaving)
2020-10-21 14:14:23 +0200coot_(~coot@37.30.49.141.nat.umts.dynamic.t-mobile.pl)
2020-10-21 14:14:29 +0200 <ski> @let infixr 9 .:; (.:) :: (c0 -> c1) -> (a -> b -> c0) -> (a -> b -> c1); (.:) = (.) . (.)
2020-10-21 14:14:31 +0200 <lambdabot> Defined.
2020-10-21 14:14:43 +0200 <merijn> ixlun: I didn't mention it and you shouldn't use it, tbh
2020-10-21 14:14:47 +0200 <ski> @type (() <$) .: Control.Concurrent.MVar.swapMVar
2020-10-21 14:14:48 +0200 <lambdabot> GHC.MVar.MVar b -> b -> IO ()
2020-10-21 14:15:41 +0200 <[exa]> ixlun: take a look at type of (.) and compare with (.).(.) (or with the one that ski just defined)
2020-10-21 14:15:50 +0200coot(~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds)
2020-10-21 14:15:51 +0200coot_coot
2020-10-21 14:17:46 +0200 <ixlun> :t (.) . (.)
2020-10-21 14:17:47 +0200 <lambdabot> (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c
2020-10-21 14:17:56 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-21 14:18:13 +0200 <iMonad> hi, guys. I have a trouble with monad transformer.
2020-10-21 14:18:23 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
2020-10-21 14:18:34 +0200 <iMonad> I am following the wikibook MaybeT example
2020-10-21 14:18:42 +0200 <iMonad> newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) }
2020-10-21 14:18:49 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 14:18:57 +0200 <iMonad> instance Monad m => Monad (MaybeT m) where return = MaybeT . return . Just
2020-10-21 14:18:59 +0200coot_(~coot@37.30.51.114.nat.umts.dynamic.t-mobile.pl)
2020-10-21 14:19:12 +0200 <iMonad> but it can't compile
2020-10-21 14:19:39 +0200 <iMonad> it says
2020-10-21 14:19:40 +0200 <iMonad> • Could not deduce (Applicative (MaybeT m)) arising from the superclasses of an instance declaration from the context: Monad m bound by the instance declaration at main.hs:4:10-36 • In the instance declaration for ‘Monad (MaybeT m)’ |4 | instance Monad m => Monad (MaybeT m) where
2020-10-21 14:19:53 +0200 <[exa]> iMonad: please pastebin the longer messages
2020-10-21 14:20:13 +0200 <ski> you need to make an `Applicative' (and a `Functor') instance, as well
2020-10-21 14:20:14 +0200Stanley00(~stanley00@unaffiliated/stanley00) ()
2020-10-21 14:20:41 +0200 <[exa]> ixlun: anyway, your composed function has 2 parameters, which in the type here have types 'a1' and 'a2'.
2020-10-21 14:20:45 +0200skithought that wasn't too bad
2020-10-21 14:20:46 +0200 <geekosaur> this is a ghc-specific chaneg from standard Haskell, which is why the wikibook doesn't tlk about it
2020-10-21 14:22:02 +0200kyprizel(~kyprizel@185.204.1.185)
2020-10-21 14:22:14 +0200 <ski> iMonad : for the time being, if you don't want to bother with it right now, you could just make empty instances
2020-10-21 14:22:22 +0200coot(~coot@37.30.49.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds)
2020-10-21 14:23:02 +0200 <ski> instance Monad m => Functor (MaybeT m)
2020-10-21 14:23:04 +0200 <ski> where
2020-10-21 14:23:11 +0200 <ski> fmap = liftM
2020-10-21 14:23:23 +0200 <ski> instance Monad m => Applicative (MaybeT m)
2020-10-21 14:23:25 +0200 <ski> where
2020-10-21 14:23:29 +0200 <ski> pure = return
2020-10-21 14:23:34 +0200 <ski> (<*>) = ap
2020-10-21 14:23:38 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-10-21 14:23:49 +0200 <ski> would also work, as default implementations, in terms of your `Monad' instance
2020-10-21 14:24:36 +0200coot_(~coot@37.30.51.114.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 265 seconds)
2020-10-21 14:24:55 +0200 <ski> (however, it would be better to have `Functor f => Functor (MaybeT f)' and `Applicative i => Applicative (MaybeT i)'. but that requires you to do the work of actually implementing those instances "properly", rather than just deferring to the `Monad' instance)
2020-10-21 14:24:59 +0200 <ski> iMonad ^
2020-10-21 14:25:43 +0200 <ski> (to clarify, by "empty instances", i mean just skipping the `where', and the method implementation(s) after it)
2020-10-21 14:27:09 +0200 <iMonad> @ski what is "ap" comes from ?
2020-10-21 14:27:09 +0200 <lambdabot> Maybe you meant: wiki src ask
2020-10-21 14:27:23 +0200nicknick(75d746c7@117.215.70.199) (Remote host closed the connection)
2020-10-21 14:27:30 +0200 <iMonad> My ghc complain that is not in scope
2020-10-21 14:27:34 +0200 <ski> @index ap
2020-10-21 14:27:35 +0200 <lambdabot> Control.Monad
2020-10-21 14:27:56 +0200 <ski> it (and `liftM') is defined in terms of `return' and `(>>=)'
2020-10-21 14:27:58 +0200hackagehaskoin-store-data 0.38.0 - Data for Haskoin Store https://hackage.haskell.org/package/haskoin-store-data-0.38.0 (jprupp)
2020-10-21 14:28:09 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-21 14:28:28 +0200 <ski> so, by defining `(<*>)' as `ap', that makes it call your `return' and `(>>=)' implementations, in your `Monad (MaybeT m)' instance
2020-10-21 14:28:37 +0200 <iMonad> Oh, it works
2020-10-21 14:28:57 +0200hackagehaskoin-store 0.38.0 - Storage and index for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-store-0.38.0 (jprupp)
2020-10-21 14:29:01 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-21 14:29:07 +0200 <ski> iMonad : now for `(>>=)' ?
2020-10-21 14:29:26 +0200taurux(~taurux@net-188-216-37-204.cust.vodafonedsl.it) (Ping timeout: 265 seconds)
2020-10-21 14:30:19 +0200 <iMonad> wiki example works
2020-10-21 14:30:24 +0200 <ixlun> Out of interest, what's people's opinion on what's better: `foo . bar . baz $ a' or `foo $ bar $ baz a'?
2020-10-21 14:30:51 +0200cods(~fred@tuxee.net)
2020-10-21 14:30:57 +0200 <merijn> ixlun: THe former is better
2020-10-21 14:30:58 +0200 <ski> ixlun : the former
2020-10-21 14:30:58 +0200 <geekosaur> the former
2020-10-21 14:31:08 +0200 <merijn> Because repeated . is more easily refactored
2020-10-21 14:31:12 +0200cods(~fred@tuxee.net) (Changing host)
2020-10-21 14:31:12 +0200cods(~fred@unaffiliated/cods)
2020-10-21 14:31:16 +0200 <ski> ixlun : or `(foo . bar . baz) a' or `foo (bar (baz a))'
2020-10-21 14:31:24 +0200taurux(~taurux@net-188-218-229-119.cust.vodafonedsl.it)
2020-10-21 14:31:36 +0200 <ski> (i'd prefer any of those three, to the latter you mentioned)
2020-10-21 14:31:41 +0200 <iMonad> if i understand correctly, monad transformer is just combine multiple monad into single one
2020-10-21 14:32:15 +0200 <ski> iMonad : it takes a(ny) monad and adds another (specific) "monad capability" to it
2020-10-21 14:32:40 +0200 <ski> (it does not combine any two arbitrary monads)
2020-10-21 14:33:03 +0200 <ixlun> Cool, I'll start to write in that method - coming from an imperative background it takes a while to rewire the brain!
2020-10-21 14:33:19 +0200 <ski> it does, but it's worth it :)
2020-10-21 14:34:00 +0200 <ski> it's only to expected that learning a new programming paradigm takes more time than learning yet another language in a paradigm one knows. it's a bit more like learning to program from scratch all over again
2020-10-21 14:35:03 +0200 <iMonad> @ski thanks for you explanation
2020-10-21 14:35:03 +0200 <lambdabot> Maybe you meant: wiki src ask
2020-10-21 14:35:03 +0200 <ski> (imho it helps to set aside what you know abour programming, so far. you can compare later, when you have some more solid foundations under your belt. unlearning old habits and trains of thought can take time / be tricky)
2020-10-21 14:36:15 +0200 <ski> iMonad : no problem :)
2020-10-21 14:36:19 +0200 <iMonad> but why we need to instance other types here ? it is not enouth to just instance a monad ?
2020-10-21 14:36:21 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 14:36:35 +0200 <ixlun> ski: agreed - that's why I think so far I've enjoyed learning Haskell more than another language. It's a completely new way to think about things
2020-10-21 14:36:58 +0200 <ski> because the type class `Monad' was changed to have `Applicative' as superclass. so every instance of `Monad' is required to already be an instance of `Applicative' (which in turn requires `Functor')
2020-10-21 14:37:25 +0200 <ski> however (as you saw), it's possible to use default implementations of `Applicative' (and `Functor') in terms of the `Monad' instance you're writing
2020-10-21 14:38:08 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
2020-10-21 14:38:16 +0200 <ski> (if one only wants to write an `Applicative' instance, where `Monad' is undesirable or not sensible, one can use `fmap = liftA' for the `Functor' instance, to make it defer to the `Applicative' instance, instead)
2020-10-21 14:38:28 +0200xerox_(~xerox@unaffiliated/xerox)
2020-10-21 14:39:54 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
2020-10-21 14:40:04 +0200Lowl3v3l(~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
2020-10-21 14:40:31 +0200 <ixlun> I've always found that the best way to learn something new is to write it too, I'm not one for reading a whole book and then diving in.
2020-10-21 14:40:42 +0200 <ixlun> I like to learn as I go
2020-10-21 14:40:45 +0200Guest88073lep-delete
2020-10-21 14:41:18 +0200 <ski> iMonad : btw, fwiw, it's not IRC convention/custom to adorn nicknames by sigils (like `@'). if you want to refer to, or address, someone, simply mention their nickname. in the latter case, e.g. by starting the message with the nickname, followed by a comma or a colon, and then the bulk of the message
2020-10-21 14:42:18 +0200 <iMonad> oh, sorry about that
2020-10-21 14:42:24 +0200 <iMonad> I am every new to irc
2020-10-21 14:42:33 +0200 <iMonad> *very*
2020-10-21 14:42:54 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
2020-10-21 14:42:56 +0200 <ski> many IRC clients will highlight/alert the user, in case their nickname is mentioned, first thing in a message. (not as many will, i think, highlight when it's mentioned anywhere else in a message). so, if you place `@' in front, then the nickname is not the first thing, and highlight might not happen
2020-10-21 14:43:27 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 14:43:40 +0200 <ski> (also, `@' means something else, on IRC, namely that someone is a channel operator. however, i'd not suggest referring to operators by prefixing their names by `@', either)
2020-10-21 14:43:48 +0200 <ski> iMonad : no worry, just informing you
2020-10-21 14:44:24 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 14:44:32 +0200ericsagnes(~ericsagne@2405:6580:0:5100:a175:4dc7:93af:b055) (Ping timeout: 260 seconds)
2020-10-21 14:44:44 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
2020-10-21 14:45:19 +0200 <ixlun> Where would people suggest is the best place to look for critique on a project that I'm writing?
2020-10-21 14:46:41 +0200 <[exa]> ixlun: users! :D
2020-10-21 14:46:42 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-21 14:47:35 +0200 <[exa]> ixlun: nevermind users, if you can extract something short enough, kindof self-contained, and pastebin it, you can get a lot of feedback from #haskell
2020-10-21 14:47:36 +0200cristi(~cristi@82.76.158.82)
2020-10-21 14:48:30 +0200ski(~ski@nc-2504-30.studat.chalmers.se) (Ping timeout: 260 seconds)
2020-10-21 14:48:51 +0200cristi(~cristi@82.76.158.82) (Remote host closed the connection)
2020-10-21 14:49:14 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 14:49:43 +0200nlhowell(~nlhowell@89.20.140.186) (Ping timeout: 246 seconds)
2020-10-21 14:50:27 +0200ski(~ski@nc-2504-30.studat.chalmers.se)
2020-10-21 14:51:00 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 14:51:24 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 14:53:24 +0200notnatebtw(~nate@110.138.18.157) (Client Quit)
2020-10-21 14:53:48 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 14:53:48 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 14:54:11 +0200stefan-__(~cri@42dots.de)
2020-10-21 14:56:35 +0200ericsagnes(~ericsagne@2405:6580:0:5100:3856:125a:3130:f979)
2020-10-21 14:56:37 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 14:56:47 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-21 14:56:47 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-21 14:56:48 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 14:57:01 +0200notnatebtw(~nate@110.138.18.157) (Client Quit)
2020-10-21 14:57:23 +0200hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2020-10-21 14:57:28 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 15:04:12 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 15:04:33 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 15:08:29 +0200Sanchayan(~Sanchayan@122.181.211.206)
2020-10-21 15:09:38 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 15:11:33 +0200Deide(~Deide@217.155.19.23)
2020-10-21 15:11:55 +0200 <hyperisco> wher am I supposed to put my cradle config? I have it in the root of my project and the IDE does not find it
2020-10-21 15:12:04 +0200shafox(~shafox@106.51.234.111) (Ping timeout: 256 seconds)
2020-10-21 15:13:04 +0200 <Uniaika> ah well that's a proble
2020-10-21 15:13:06 +0200 <Uniaika> *problem
2020-10-21 15:13:25 +0200 <Uniaika> hyperisco: note that if you don't require anything fancy/weird, the new HLS uses implicit-hie to generate a cradle config for you
2020-10-21 15:14:12 +0200 <hyperisco> I keep getting warnings over and over that it is using implicit cradle
2020-10-21 15:14:16 +0200 <hyperisco> I just want those warnings to go away
2020-10-21 15:17:48 +0200shafox(~shafox@106.51.234.111)
2020-10-21 15:19:14 +0200carlomagno1(~cararell@148.87.23.6) (Remote host closed the connection)
2020-10-21 15:22:31 +0200 <ixlun> [exa]: Yeah I may paste it on here at some point when it's ready. It probably won't fit into a paste bin though; I've got it up on GitHub
2020-10-21 15:23:57 +0200Buntspecht(~user@unaffiliated/siracusa) (Quit: Bye!)
2020-10-21 15:24:31 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 15:24:39 +0200 <[exa]> even links to github projects got good comments (biased by the readme&docs though :] )
2020-10-21 15:24:53 +0200 <[exa]> btw what's the project about?
2020-10-21 15:25:34 +0200 <ixlun> It's a chess engine - I've been working on it for about a month
2020-10-21 15:25:58 +0200 <ixlun> I've just got it to the point where I can now play against it
2020-10-21 15:26:18 +0200 <ixlun> I'm now looking at trying to improve it's strength
2020-10-21 15:26:27 +0200kritzefitz(~kritzefit@2003:5b:203b:200::10:49) (Remote host closed the connection)
2020-10-21 15:28:19 +0200 <hyperisco> just had the thought this morning that programs have more interesting terms than types because programs are more interested in how than what
2020-10-21 15:28:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-21 15:28:47 +0200 <[exa]> hyperisco: you need how-types
2020-10-21 15:29:04 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds)
2020-10-21 15:29:09 +0200 <[exa]> ixlun: that's cool, what kind of AI is there?
2020-10-21 15:29:23 +0200nyaomi(~naomi@cpe-74-75-6-125.maine.res.rr.com) (Excess Flood)
2020-10-21 15:29:40 +0200 <[exa]> (need to disappear for ~2 hours, teaching)
2020-10-21 15:29:52 +0200knupfer(~Thunderbi@200116b82c30ba006c535bfffe9504ba.dip.versatel-1u1.de)
2020-10-21 15:29:53 +0200knupfer(~Thunderbi@200116b82c30ba006c535bfffe9504ba.dip.versatel-1u1.de) (Client Quit)
2020-10-21 15:30:00 +0200 <ixlun> For now just alpha-beta search
2020-10-21 15:30:08 +0200 <ixlun> cool, have fun!
2020-10-21 15:30:09 +0200knupfer(~Thunderbi@i59F7FF96.versanet.de)
2020-10-21 15:31:27 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 15:31:27 +0200 <hyperisco> we need what-programs
2020-10-21 15:31:48 +0200 <hyperisco> though they wouldn't really be programs
2020-10-21 15:31:57 +0200kaychaks_riot(kaychaksma@gateway/shell/matrix.org/x-ytbtoyjbxfietmdi)
2020-10-21 15:32:49 +0200nyaomi(~naomi@cpe-74-75-6-125.maine.res.rr.com)
2020-10-21 15:35:09 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 15:36:16 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2020-10-21 15:36:56 +0200kish(~oracle@unaffiliated/oracle) (Remote host closed the connection)
2020-10-21 15:39:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-10-21 15:39:45 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds)
2020-10-21 15:39:56 +0200alx741(~alx741@181.196.68.73)
2020-10-21 15:40:34 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 15:41:29 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 258 seconds)
2020-10-21 15:46:59 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 15:46:59 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 15:46:59 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-21 15:47:14 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 258 seconds)
2020-10-21 15:48:28 +0200fendor_(~fendor@91.141.3.69.wireless.dyn.drei.com)
2020-10-21 15:49:33 +0200 <jophish> Why doesn't Setup.hs seem to support v2 commands?
2020-10-21 15:50:14 +0200 <jophish> (using defaultMain from Distribution.Simple)
2020-10-21 15:50:28 +0200 <merijn> jophish: Because v2- is part of cabal-install, Setup.hs is not
2020-10-21 15:50:36 +0200 <merijn> Setup.hs is part of Cabal
2020-10-21 15:50:58 +0200fendor(~fendor@91.141.2.147.wireless.dyn.drei.com) (Ping timeout: 246 seconds)
2020-10-21 15:51:00 +0200ystael(~ystael@209.6.50.55)
2020-10-21 15:51:13 +0200 <merijn> IOW, that's "working as intended"
2020-10-21 15:51:38 +0200 <merijn> jophish: Setup.hs commands don't do the same thing as the (pre-v2) cabal-install commands either
2020-10-21 15:52:29 +0200waterquarks(b306d9a1@179.6.217.161)
2020-10-21 15:52:40 +0200geekosaur(ac3a3eb0@172.58.62.176) (Remote host closed the connection)
2020-10-21 15:52:56 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Read error: Connection reset by peer)
2020-10-21 15:53:16 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-21 15:53:24 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds)
2020-10-21 15:53:45 +0200waterquarks(b306d9a1@179.6.217.161) (Remote host closed the connection)
2020-10-21 15:54:58 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 15:55:28 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-10-21 15:56:55 +0200jamm_(~jamm@unaffiliated/jamm)
2020-10-21 15:56:57 +0200hackageeffet 0.3.0.2 - An Effect System based on Type Classes https://hackage.haskell.org/package/effet-0.3.0.2 (MichaelSzvetits)
2020-10-21 15:57:41 +0200carlomagno(~cararell@148.87.23.9)
2020-10-21 15:59:37 +0200xff0x(~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d) (Ping timeout: 272 seconds)
2020-10-21 15:59:44 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-21 16:00:04 +0200xff0x(~fox@2001:1a81:529c:a900:6b08:6f66:959:4c93)
2020-10-21 16:01:17 +0200jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2020-10-21 16:01:59 +0200 <jophish> so I'm finding out!
2020-10-21 16:02:04 +0200 <jophish> thanks, merijn
2020-10-21 16:03:42 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 16:03:47 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-21 16:05:08 +0200 <merijn> jophish: You should probably just use cabal-install unless you have a very good reason not too :p
2020-10-21 16:05:30 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 16:05:33 +0200coot(~coot@37.30.52.15.nat.umts.dynamic.t-mobile.pl)
2020-10-21 16:06:49 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-10-21 16:06:56 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-21 16:07:10 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 258 seconds)
2020-10-21 16:07:14 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-vawwmlggjqdnzjxh) (Quit: Connection closed for inactivity)
2020-10-21 16:07:22 +0200 <jophish> merijn: this is taking place inside a nix derivation, where cabal-install is not available
2020-10-21 16:08:57 +0200texasmynsted(~texasmyns@104.140.52.83)
2020-10-21 16:09:16 +0200 <merijn> ah
2020-10-21 16:09:16 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 16:09:32 +0200texasmyn_(~texasmyns@104.140.52.83)
2020-10-21 16:09:40 +0200stefan-__(~cri@42dots.de)
2020-10-21 16:09:41 +0200texasmynsted(~texasmyns@104.140.52.83) (Read error: Connection reset by peer)
2020-10-21 16:09:42 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-21 16:09:52 +0200 <merijn> You'd have to reverse engineer how v2-build calls Setup.hs
2020-10-21 16:09:59 +0200 <merijn> (because that's what's happening)
2020-10-21 16:10:04 +0200iMonad(1bf6c255@27-246-194-85.adsl.fetnet.net) (Remote host closed the connection)
2020-10-21 16:10:06 +0200 <merijn> But...uh...good luck with that :p
2020-10-21 16:10:52 +0200 <jophish> yeah :) O
2020-10-21 16:11:06 +0200 <jophish> I'm not gonna do that, I'll make do with the commands here :)
2020-10-21 16:11:35 +0200christo(~chris@81.96.113.213)
2020-10-21 16:12:27 +0200 <merijn> jophish: Naah, my point was that (eventually) v2- commands end up just calling into the Setup.hs with specific arguments
2020-10-21 16:12:40 +0200 <merijn> So you should be able to mimic the v2- commands
2020-10-21 16:13:11 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr)
2020-10-21 16:14:21 +0200conal_(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 16:16:30 +0200knupfer(~Thunderbi@i59F7FF96.versanet.de) (Quit: knupfer)
2020-10-21 16:16:33 +0200knupfer1(~Thunderbi@200116b82c30ba00dc0ee51bcc5b4ee2.dip.versatel-1u1.de)
2020-10-21 16:16:49 +0200danso(~dan@69-165-210-185.cable.teksavvy.com)
2020-10-21 16:16:55 +0200ulidtko(~ulidtko@193.111.48.79) (Remote host closed the connection)
2020-10-21 16:17:20 +0200cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-10-21 16:17:32 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 16:18:56 +0200knupfer1knupfer
2020-10-21 16:19:30 +0200polyrain_(~polyrain@58.161.83.164)
2020-10-21 16:19:47 +0200deadk(e@freenode/staff/spy.edk) (Quit: edk)
2020-10-21 16:20:09 +0200polyrain_(~polyrain@58.161.83.164) (Read error: Connection reset by peer)
2020-10-21 16:20:49 +0200invaser(~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
2020-10-21 16:21:47 +0200Klumben(Nsaiswatch@gateway/shell/panicbnc/x-qfyvvmfvccqnqxdf) (Ping timeout: 272 seconds)
2020-10-21 16:22:25 +0200polyrain(~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c) (Ping timeout: 240 seconds)
2020-10-21 16:22:54 +0200xacktm(xacktm@gateway/shell/panicbnc/x-rthkywgvxahgrnnf) (Ping timeout: 244 seconds)
2020-10-21 16:23:08 +0200SolarAquarion(SolarAquar@gateway/shell/panicbnc/x-wdutgpsghohoucfq) (Ping timeout: 260 seconds)
2020-10-21 16:23:45 +0200knupfer1(~Thunderbi@i59F7FF96.versanet.de)
2020-10-21 16:23:51 +0200st8less(~st8less@2603:a060:11fd:0:dd24:d259:2e39:f97e)
2020-10-21 16:25:07 +0200polyrain(~polyrain@2001:8003:e501:6901:5473:8418:3e33:a31a)
2020-10-21 16:28:20 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 16:28:23 +0200knupfer(~Thunderbi@200116b82c30ba00dc0ee51bcc5b4ee2.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-10-21 16:28:23 +0200knupfer1knupfer
2020-10-21 16:29:06 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 16:31:24 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
2020-10-21 16:31:51 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 16:32:21 +0200 <texasmyn_> Maybe I am misremembering or perhaps wishful thinking, but I thought there was a way to tell hlint to give more advice. Is there?
2020-10-21 16:32:26 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 16:33:52 +0200texasmyn_(~texasmyns@104.140.52.83) ()
2020-10-21 16:34:11 +0200texasmynsted(~texasmyns@104.140.52.83)
2020-10-21 16:34:34 +0200shafox(~shafox@106.51.234.111) (Ping timeout: 256 seconds)
2020-10-21 16:35:11 +0200 <texasmynsted> Hmm I think my message was killed by the server because of my nick.
2020-10-21 16:35:46 +0200 <texasmynsted> Is there a way to get more help from hlint? Example: Maybe somebody has a list of extra rules the apply?
2020-10-21 16:36:41 +0200 <texasmynsted> I would like it to say "snd <$> is the same as snds", if it actually is. Heh
2020-10-21 16:39:48 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 16:40:08 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-21 16:40:28 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Client Quit)
2020-10-21 16:41:11 +0200berberman_(~berberman@unaffiliated/berberman)
2020-10-21 16:41:17 +0200christo(~chris@81.96.113.213)
2020-10-21 16:42:03 +0200berberman(~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2020-10-21 16:42:39 +0200berberman_(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2020-10-21 16:43:47 +0200berberman(~berberman@unaffiliated/berberman)
2020-10-21 16:45:15 +0200berberman(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2020-10-21 16:45:21 +0200Lowl3v3l(~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de) (Remote host closed the connection)
2020-10-21 16:45:37 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 16:45:43 +0200Lowl3v3l(~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
2020-10-21 16:45:47 +0200berberman(~berberman@unaffiliated/berberman)
2020-10-21 16:45:55 +0200shafox(~shafox@106.51.234.111)
2020-10-21 16:47:16 +0200deadk(e@freenode/staff/spy.edk)
2020-10-21 16:47:18 +0200berberman(~berberman@unaffiliated/berberman) (Max SendQ exceeded)
2020-10-21 16:47:44 +0200berberman(~berberman@unaffiliated/berberman)
2020-10-21 16:48:04 +0200Lowl3v3l(~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de) (Read error: Connection reset by peer)
2020-10-21 16:48:50 +0200Lowl3v3l(~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
2020-10-21 16:51:17 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 16:51:32 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 265 seconds)
2020-10-21 16:53:28 +0200invaser(~Thunderbi@31.148.23.125)
2020-10-21 16:54:07 +0200__skn-(~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c)
2020-10-21 16:56:00 +0200ddellacosta(~dd@86.106.121.168)
2020-10-21 16:56:37 +0200__skn(~sunil@sec.nimmagadda.net) (Ping timeout: 264 seconds)
2020-10-21 16:58:14 +0200kori(~kori@arrowheads/kori) (Read error: Connection reset by peer)
2020-10-21 17:00:02 +0200kyprizel(~kyprizel@185.204.1.185) ()
2020-10-21 17:02:33 +0200jlamothe(~jlamothe@dev.jlamothe.net) (Quit: leaving)
2020-10-21 17:02:35 +0200kori(~kori@arrowheads/kori)
2020-10-21 17:04:33 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 17:06:38 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
2020-10-21 17:07:00 +0200__skn-(~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c) (Quit: ZNC 1.8.2 - https://znc.in)
2020-10-21 17:07:05 +0200z0(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 17:07:42 +0200__skn(~sunil@sec.nimmagadda.net)
2020-10-21 17:07:46 +0200mananamenos_(~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-21 17:08:21 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
2020-10-21 17:08:23 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net)
2020-10-21 17:09:21 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-10-21 17:10:09 +0200 <z0> does haskell optimize something like (last . takeWhile) not to traverse a list twice?
2020-10-21 17:11:43 +0200__skn(~sunil@sec.nimmagadda.net) (Client Quit)
2020-10-21 17:11:56 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 272 seconds)
2020-10-21 17:12:02 +0200__skn(~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c)
2020-10-21 17:12:27 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 17:12:30 +0200thir(~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-21 17:12:43 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde)
2020-10-21 17:13:27 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 17:14:03 +0200 <merijn> z0: That's not even really optimisation, that happens automatically from laziness
2020-10-21 17:15:00 +0200 <z0> thanks. just making sure
2020-10-21 17:15:13 +0200bind(~bind@unaffiliated/bind) (Ping timeout: 264 seconds)
2020-10-21 17:15:26 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
2020-10-21 17:17:34 +0200bind(~bind@unaffiliated/bind)
2020-10-21 17:18:07 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-10-21 17:19:28 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 17:20:08 +0200jonathanx(~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
2020-10-21 17:20:46 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-21 17:21:02 +0200erolm_a(~erolm_a@62.19.60.223)
2020-10-21 17:21:15 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2020-10-21 17:22:05 +0200dwt(~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 240 seconds)
2020-10-21 17:22:42 +0200 <Cheery> Realising monads are constructing some sort of linear logic.
2020-10-21 17:22:52 +0200 <sarahzrf> how so?
2020-10-21 17:22:58 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
2020-10-21 17:23:04 +0200geowiesnot(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 258 seconds)
2020-10-21 17:23:43 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 17:24:07 +0200Sanchayan(~Sanchayan@122.181.211.206) (Quit: leaving)
2020-10-21 17:24:24 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-10-21 17:24:40 +0200shatriff(~vitaliish@176.52.219.10)
2020-10-21 17:24:44 +0200chele(~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2020-10-21 17:25:04 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
2020-10-21 17:25:59 +0200 <Cheery> sarahzrf: how to explain it depends a bit on how you view at linear logic and linear types.
2020-10-21 17:26:51 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 17:27:02 +0200polyrain(~polyrain@2001:8003:e501:6901:5473:8418:3e33:a31a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 17:27:10 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 17:27:10 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 17:27:10 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 17:27:16 +0200 <sarahzrf> i view them in many different ways
2020-10-21 17:27:32 +0200Saukk(~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
2020-10-21 17:27:55 +0200Klumben(Nsaiswatch@gateway/shell/panicbnc/x-dhcfdjwdfkfdqaso)
2020-10-21 17:28:18 +0200 <Cheery> well lets say you consider that you look it from linear logic, and think that intuitionistic types are represented through !x, a construct that explicitly represents discarding/copying/instantiation.
2020-10-21 17:28:28 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 17:29:05 +0200 <Cheery> then if you look at monads, they do prevent you from copying things in arbitrary ways.
2020-10-21 17:29:14 +0200 <merijn> They do?
2020-10-21 17:29:14 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
2020-10-21 17:29:16 +0200 <merijn> How so?
2020-10-21 17:31:15 +0200nados(~dan@69-165-210-185.cable.teksavvy.com)
2020-10-21 17:31:54 +0200 <Cheery> Well you can supply some monad m, or then bind to it. Given that the linear parts stay inside the monad, then it stays "linear".
2020-10-21 17:32:15 +0200 <sarahzrf> what if i `fmap (\x -> (x, x))'
2020-10-21 17:32:34 +0200 <Cheery> the 'x' is never a linear type in such construct.
2020-10-21 17:32:34 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 17:32:43 +0200 <Cheery> You can make this obvious with indexed monads.
2020-10-21 17:32:50 +0200SolarAquarion(SolarAquar@gateway/shell/panicbnc/x-twsqpddkakzbghtr)
2020-10-21 17:33:05 +0200 <Cheery> But I think the property is already present in the use of IO monad.
2020-10-21 17:33:12 +0200 <[exa]> Cheery: what if someone copies the whole monad and continues it in 2 different places?
2020-10-21 17:33:46 +0200solonarv(~solonarv@astrasbourg-552-1-23-6.w90-13.abo.wanadoo.fr)
2020-10-21 17:34:05 +0200 <Cheery> [exa]: as long as you can copy it, it's more like a plan to do something.
2020-10-21 17:36:22 +0200 <[exa]> well that's kinda "linearity by being very careful", you'd ideally want that typechecked
2020-10-21 17:36:48 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net)
2020-10-21 17:37:02 +0200 <Cheery> I think you can model linear logic with indexed monads and it's just equivalent to other implementations.
2020-10-21 17:37:09 +0200 <Cheery> at least right now I think so.
2020-10-21 17:37:25 +0200arguapacha(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca) (Ping timeout: 240 seconds)
2020-10-21 17:37:58 +0200 <Cheery> I can try to illustrate this a bit.. so if you take the ireturn and ibind
2020-10-21 17:38:07 +0200 <Cheery> ireturn :: a -> m i i a
2020-10-21 17:38:15 +0200 <Cheery> ibind :: (a -> m j k b) -> m i j a -> m i k b
2020-10-21 17:38:37 +0200 <Cheery> I dunno why they've flipped that one.
2020-10-21 17:39:54 +0200 <Cheery> for an example, lets take additive product, this is kind of a construct that provides two options, and then later either one can be selected.
2020-10-21 17:39:56 +0200arguapacha(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca)
2020-10-21 17:40:52 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
2020-10-21 17:40:58 +0200 <Cheery> opt :: m c a _ -> m c b _ -> m c (a & b) _
2020-10-21 17:41:16 +0200 <Cheery> exl :: m (a & b) a _
2020-10-21 17:41:21 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 17:41:22 +0200 <Cheery> exr :: m (a & b) b
2020-10-21 17:41:42 +0200 <Cheery> now I'm wondering what would go to the _, the place of parameter.
2020-10-21 17:42:26 +0200jlamothe(~jlamothe@dev.jlamothe.net)
2020-10-21 17:42:30 +0200Lycurgus(~niemand@98.4.96.235)
2020-10-21 17:42:37 +0200arguapacha_(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca)
2020-10-21 17:42:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 17:42:55 +0200babygnu(~robert@gateway/tor-sasl/babygnu)
2020-10-21 17:43:28 +0200 <Cheery> You can do the same thing with multiplicatives, the multiplicative disjunction (that ear symbol) is a bit like function but you can choose which side you treat as a parameter.
2020-10-21 17:44:00 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 17:44:27 +0200 <Cheery> the conjunction resembles a pair, but you can't do fst/snd on it unless the item on another side is exponential.
2020-10-21 17:44:30 +0200arguapacha(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca) (Ping timeout: 256 seconds)
2020-10-21 17:46:30 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 17:46:41 +0200NextHendrixnh
2020-10-21 17:46:59 +0200kuribas(~user@ptr-25vy0i9s82bgras1pw6.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2020-10-21 17:49:57 +0200 <[exa]> Cheery: would some kind of Either work as _ there? (also kindof provides a way to do the final choice)
2020-10-21 17:50:00 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
2020-10-21 17:50:25 +0200xacktm(xacktm@gateway/shell/panicbnc/x-wtuwnbsvfqpgvaqk)
2020-10-21 17:53:35 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 17:54:04 +0200hnOsmium0001(uid453710@gateway/web/irccloud.com/x-widejiobrxcglhbz)
2020-10-21 17:54:29 +0200 <Cheery> [exa]: well I think it's bit of confusing because it is maybe not needed, indexed monoid might be enough as well.
2020-10-21 17:54:51 +0200 <Cheery> or category
2020-10-21 17:55:45 +0200 <Cheery> but since the parts that can be duplicated behave the same way as haskell, it'd remain as a language around these constructs.
2020-10-21 17:55:59 +0200unlink2(~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 17:56:14 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2020-10-21 17:56:18 +0200borne(~fritjof@muedsl-82-207-207-196.citykom.de) (Ping timeout: 265 seconds)
2020-10-21 17:56:36 +0200Hande(~Hande@195.206.169.184)
2020-10-21 17:56:47 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 17:57:04 +0200 <Cheery> the "linear" parts would remain in the place where the IO monad is these days.
2020-10-21 17:57:28 +0200unlink2(~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de)
2020-10-21 17:58:20 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-21 17:58:22 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
2020-10-21 17:58:41 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Client Quit)
2020-10-21 17:58:55 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-21 18:00:27 +0200Rudd0(~Rudd0@185.189.115.108)
2020-10-21 18:02:20 +0200tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 18:05:46 +0200caubert(~mrbentari@207.246.80.112) (Ping timeout: 272 seconds)
2020-10-21 18:05:54 +0200Deide(~Deide@217.155.19.23) (Read error: Connection reset by peer)
2020-10-21 18:05:58 +0200maerwald_maerwald
2020-10-21 18:06:02 +0200 <Cheery> If you like to give it some sort of linear lambda vibes, you turn the "input" into a scope.
2020-10-21 18:06:03 +0200mrbentarikau(~mrbentari@207.246.80.112)
2020-10-21 18:06:21 +0200nlhowell(~nlhowell@don28-11.ln.rinet.ru)
2020-10-21 18:06:42 +0200mrbentarikaucaubert
2020-10-21 18:06:59 +0200daGrevis(~daGrevis@unaffiliated/dagrevis) (Ping timeout: 260 seconds)
2020-10-21 18:07:18 +0200redeemed(~rd@79.115.163.113) (Ping timeout: 260 seconds)
2020-10-21 18:07:39 +0200jlamothe(~jlamothe@dev.jlamothe.net) (Quit: leaving)
2020-10-21 18:08:06 +0200 <Cheery> exl :: m (C r (a&b)) a, and likewise you'd get vs/vz to access and "pull" an item down.. oh moment I think I'll try to model those.
2020-10-21 18:09:43 +0200 <sarahzrf> it sounds like youre really just talking about categories, not monads
2020-10-21 18:09:46 +0200mnrmnaugh(~mnrmnaugh@unaffiliated/mnrmnaugh) (Read error: Connection reset by peer)
2020-10-21 18:09:59 +0200Benzi-Junior(~BenziJuni@88-149-67-198.du.xdsl.is) (Quit: gone)
2020-10-21 18:10:09 +0200 <sarahzrf> and yes, closed monoidal categories model multiplicative intuitionistic linear logic iirc
2020-10-21 18:10:18 +0200mnrmnaugh(~mnrmnaugh@unaffiliated/mnrmnaugh)
2020-10-21 18:10:34 +0200 <Cheery> vs :: m x (C y z) -> m (C x w) (C (C y w) z)
2020-10-21 18:10:46 +0200ubert(~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
2020-10-21 18:10:56 +0200 <Cheery> vz :: m (C x y) (C x y)
2020-10-21 18:11:33 +0200ClaudiusMaximus(~claude@198.123.199.146.dyn.plus.net)
2020-10-21 18:11:36 +0200 <sarahzrf> i suppose that in fairness a category is a kind of monad, if you pick the right bicategory—but i assumed you meant monads in the bicategory Cat :p
2020-10-21 18:11:46 +0200ClaudiusMaximus(~claude@198.123.199.146.dyn.plus.net) (Changing host)
2020-10-21 18:11:46 +0200ClaudiusMaximus(~claude@unaffiliated/claudiusmaximus)
2020-10-21 18:12:32 +0200 <Cheery> Yeah I think it's just categories. I'm just thinking of how these things fit together.
2020-10-21 18:12:34 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 18:12:58 +0200 <sarahzrf> also sorry i misspoke, you want closed *symmetric* monoidal categories, for MILL
2020-10-21 18:13:27 +0200ystael(~ystael@209.6.50.55) (Read error: Connection reset by peer)
2020-10-21 18:14:21 +0200daGrevis(~daGrevis@unaffiliated/dagrevis)
2020-10-21 18:14:42 +0200 <sarahzrf> for the record, the categorical semantics of linear logic's additives are usually ordinary products and coproducts
2020-10-21 18:15:25 +0200 <Cheery> yup. the linear logic builds linear implication around the tensor product.
2020-10-21 18:15:40 +0200 <sarahzrf> the opt, exl, exr you wrote above are exactly the data of a product
2020-10-21 18:15:57 +0200 <sarahzrf> assuming they satisfy the right equations
2020-10-21 18:16:09 +0200 <sarahzrf> and are natural
2020-10-21 18:16:13 +0200jlamothe(~jlamothe@dev.jlamothe.net)
2020-10-21 18:16:20 +0200Benzi-Junior(~BenziJuni@88-149-67-198.du.xdsl.is)
2020-10-21 18:16:22 +0200LKoen(~LKoen@81.255.219.130)
2020-10-21 18:16:45 +0200 <sarahzrf> actually sorry naturality is only a concern for opt and it drops out of satisfying the right equations with exl and exr
2020-10-21 18:16:54 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 18:17:04 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-21 18:17:05 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-21 18:17:05 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 18:18:18 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 18:18:33 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 18:18:43 +0200stefan-__(~cri@42dots.de)
2020-10-21 18:19:58 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2020-10-21 18:20:08 +0200britva(~britva@51.154.14.117) (Quit: This computer has gone to sleep)
2020-10-21 18:20:22 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2020-10-21 18:20:25 +0200 <Cale> Over the last couple decades, I've run into a few too many cases where the symmetric monoidal category abstraction was appropriate for being able to get control over whether substructural operations are present and how they're implemented. It's too bad that I don't think Linear Haskell solves any of the same problems (because it restricts you to something which is a restriction of (->))
2020-10-21 18:20:48 +0200 <Cale> Conal's constrained categories thing gives you a really general view of it though.
2020-10-21 18:21:22 +0200nineonin_(~textual@216-19-190-182.dyn.novuscom.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 18:21:28 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
2020-10-21 18:21:31 +0200 <sarahzrf> oh? whats constrained categories
2020-10-21 18:21:49 +0200 <Cale> https://github.com/conal/concat
2020-10-21 18:21:55 +0200 <Cale> http://conal.net/papers/compiling-to-categories/
2020-10-21 18:21:56 +0200 <sarahzrf> i thought that was "compiling to categories"
2020-10-21 18:21:59 +0200 <sarahzrf> oh
2020-10-21 18:22:06 +0200 <Cheery> is this conal's recent stuff he talked about on summer?
2020-10-21 18:22:20 +0200 <Cheery> well the compiling to categories is older.
2020-10-21 18:22:21 +0200 <sarahzrf> you know i probably shouldve questioned why it was "con" and not "com" in the repo name
2020-10-21 18:22:27 +0200 <sarahzrf> lol
2020-10-21 18:22:47 +0200 <Cheery> yeah maybe I should look at that a bit.
2020-10-21 18:23:09 +0200 <Cheery> He's been progressing on that though.
2020-10-21 18:23:23 +0200ericsagnes(~ericsagne@2405:6580:0:5100:3856:125a:3130:f979) (Ping timeout: 272 seconds)
2020-10-21 18:23:24 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu)
2020-10-21 18:24:06 +0200 <sarahzrf> im on record as wanting "basically like concat, but baked into the language in a principled and typed way"
2020-10-21 18:24:10 +0200nbloomf(~nbloomf@2600:1700:ad14:3020:c4b2:ae08:d967:f34e)
2020-10-21 18:24:42 +0200 <sarahzrf> also for my foundations of math
2020-10-21 18:24:46 +0200 <Cale> sarahzrf: If you have ideas about how to make the user experience of that language good, I'd really like to hear about it
2020-10-21 18:25:04 +0200 <sarahzrf> haha i wish!
2020-10-21 18:25:22 +0200 <sarahzrf> mostly i start daydreaming about being able to have something like that every so often when i get mad at setoid hell
2020-10-21 18:25:42 +0200dsiypl4(~dsiypl4@41.251.199.43)
2020-10-21 18:25:43 +0200 <sarahzrf> or whatever other "why the fuck cant i just work internally" thing comes up
2020-10-21 18:25:54 +0200 <sarahzrf> have you seen beluga and/or the work on cocon
2020-10-21 18:26:02 +0200 <Cale> No, I haven't
2020-10-21 18:26:02 +0200 <sarahzrf> i think that's a promising direction for that sort of thing
2020-10-21 18:26:10 +0200 <sarahzrf> it's only half related, but
2020-10-21 18:26:18 +0200bergsans(~bergsans@c80-217-8-29.bredband.comhem.se) (Remote host closed the connection)
2020-10-21 18:26:25 +0200 <sarahzrf> umm let's take this to ##dependent or sth
2020-10-21 18:27:02 +0200 <Cheery> Ok. :) it started as haskell, now this is going..
2020-10-21 18:28:50 +0200buckworst(~nate@110.138.18.157)
2020-10-21 18:31:06 +0200MattMareo(~mattl@unaffiliated/mattmareo) (Ping timeout: 265 seconds)
2020-10-21 18:31:11 +0200raichoo(~raichoo@dslb-084-062-114-218.084.062.pools.vodafone-ip.de) (Quit: Lost terminal)
2020-10-21 18:31:35 +0200nineonin_(~textual@216.81.48.202)
2020-10-21 18:31:44 +0200MattMareo(~mattl@unaffiliated/mattmareo)
2020-10-21 18:34:55 +0200ericsagnes(~ericsagne@2405:6580:0:5100:edb7:2e5e:75c7:865c)
2020-10-21 18:35:27 +0200coot(~coot@37.30.52.15.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 265 seconds)
2020-10-21 18:36:41 +0200xff0x(~fox@2001:1a81:529c:a900:6b08:6f66:959:4c93) (Ping timeout: 272 seconds)
2020-10-21 18:37:15 +0200xff0x(~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de)
2020-10-21 18:37:19 +0200MattMareo(~mattl@unaffiliated/mattmareo) (Ping timeout: 260 seconds)
2020-10-21 18:37:59 +0200MattMareo(~mattl@unaffiliated/mattmareo)
2020-10-21 18:38:27 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 18:44:54 +0200invaser(~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
2020-10-21 18:45:05 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-10-21 18:45:18 +0200nineonine(~nineonine@216.81.48.202) ()
2020-10-21 18:47:27 +0200alp(~alp@2a01:e0a:58b:4920:f968:6025:1be8:4fb9) (Ping timeout: 272 seconds)
2020-10-21 18:48:25 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
2020-10-21 18:48:36 +0200nineonine(~nineonine@216.81.48.202)
2020-10-21 18:48:50 +0200dsiypl4(~dsiypl4@41.251.199.43) (Ping timeout: 260 seconds)
2020-10-21 18:49:21 +0200asheshambasta(~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be) (Ping timeout: 272 seconds)
2020-10-21 18:53:23 +0200nineonine(~nineonine@216.81.48.202) (Client Quit)
2020-10-21 18:53:56 +0200Saukk(~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
2020-10-21 18:54:10 +0200ggole(~ggole@2001:8003:8119:7200:b1ad:260c:cc33:2a8d) (Quit: Leaving)
2020-10-21 18:54:18 +0200erolm_a(~erolm_a@62.19.60.223) (Ping timeout: 265 seconds)
2020-10-21 18:54:29 +0200Lycurgus(~niemand@98.4.96.235) (Quit: Exeunt)
2020-10-21 18:56:05 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2020-10-21 18:56:59 +0200z0(~z0@bl15-167-204.dsl.telepac.pt) (Quit: Lost terminal)
2020-10-21 18:57:40 +0200ystael(~ystael@209.6.50.55)
2020-10-21 18:58:37 +0200Deide(~Deide@217.155.19.23)
2020-10-21 18:58:42 +0200erolm_a(~erolm_a@62.19.60.223)
2020-10-21 18:58:42 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 18:58:51 +0200stefan-__(~cri@42dots.de)
2020-10-21 19:00:49 +0200elliott_(~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-21 19:01:46 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu)
2020-10-21 19:02:10 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-fjkcgpxmhvapxtfm)
2020-10-21 19:03:15 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-21 19:05:16 +0200caubert(~mrbentari@207.246.80.112) (Quit: WeeChat 2.9)
2020-10-21 19:05:27 +0200mrbentarikau(~mrbentari@207.246.80.112)
2020-10-21 19:05:35 +0200mrbentarikaucaubert
2020-10-21 19:06:31 +0200dyniec[m](dyniecmatr@gateway/shell/matrix.org/x-pvfhaoakrmoprspz)
2020-10-21 19:07:20 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 19:07:20 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 19:07:20 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-21 19:07:39 +0200britva(~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
2020-10-21 19:08:26 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 260 seconds)
2020-10-21 19:09:29 +0200dsiypl4(~dsiypl4@41.251.199.43)
2020-10-21 19:09:45 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-21 19:14:46 +0200Sigyn(sigyn@freenode/utility-bot/sigyn) (Quit: i've seen things you people wouldn't believe. spam bots on fire off the shoulder of sigyn. i watched k-line beams glitter in the dark near the Tannhäuser Gate. all these moments will be lost in time, like tears in rain. time to /die)
2020-10-21 19:15:19 +0200Sigyn(sigyn@freenode/utility-bot/sigyn)
2020-10-21 19:15:19 +0200ChanServ+o Sigyn
2020-10-21 19:20:40 +0200britva(~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1) (Quit: This computer has gone to sleep)
2020-10-21 19:20:41 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net)
2020-10-21 19:24:18 +0200 <texasmynsted> how do I know what "base" to use?
2020-10-21 19:24:34 +0200redeemed(~rd@2a02:2f0b:b20a:d200:75cb:8151:518a:825f)
2020-10-21 19:24:47 +0200Ariakenom(~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se)
2020-10-21 19:25:34 +0200 <texasmynsted> Example: I did cabal init, and got "build-depends: base ^>=4.12.0.0". I do not recall why I thought that was the right base. I also do not recall what the ^ is for.
2020-10-21 19:26:00 +0200Kaeipi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-21 19:26:15 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
2020-10-21 19:26:16 +0200 <koz_> ^>= says 'at least this version works, but a higher minor version might too'.
2020-10-21 19:26:18 +0200erolm_a(~erolm_a@62.19.60.223) (Ping timeout: 260 seconds)
2020-10-21 19:26:29 +0200 <koz_> What's your GHC version?
2020-10-21 19:26:36 +0200 <koz_> Base version and GHC version are closely connected.
2020-10-21 19:26:46 +0200 <texasmynsted> 8.8.4
2020-10-21 19:26:58 +0200 <koz_> I think you want 4.13 then?
2020-10-21 19:27:01 +0200 <texasmynsted> I just upgraded it today.
2020-10-21 19:27:05 +0200 <texasmynsted> okay
2020-10-21 19:27:13 +0200 <texasmynsted> how would I know that?
2020-10-21 19:27:24 +0200 <koz_> Because each GHC version comes with a base version.
2020-10-21 19:27:30 +0200 <koz_> There's a list somewhere.
2020-10-21 19:27:34 +0200koz_can't remember where.
2020-10-21 19:27:42 +0200 <merijn> https://wiki.haskell.org/Base_package
2020-10-21 19:28:23 +0200 <koz_> Yeah, that one.
2020-10-21 19:28:55 +0200 <texasmynsted> Nice! thank you
2020-10-21 19:28:58 +0200 <koz_> Pity we're not getting base 5 to go with GHC 9.
2020-10-21 19:28:58 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-21 19:29:09 +0200 <koz_> (although the degree of breakage that would induce would be legendary)
2020-10-21 19:29:24 +0200 <merijn> Well, technically that wouldn't break anything
2020-10-21 19:29:25 +0200erolm_a(~erolm_a@62.19.60.223)
2020-10-21 19:29:25 +0200 <texasmynsted> too bad ghc does not have a flag for "--base"
2020-10-21 19:29:35 +0200Kaeipi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-10-21 19:29:44 +0200 <merijn> It'd require manual intervention to get things to compile with the new GHC, but that's different from "breaking things"
2020-10-21 19:29:47 +0200 <monochrom> You can use "cabal gen-bounds"
2020-10-21 19:29:53 +0200Kaeipi(~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-21 19:30:02 +0200 <merijn> The entire point of upperbounds is that new releases can't break things >.>
2020-10-21 19:30:30 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Remote host closed the connection)
2020-10-21 19:30:31 +0200 <texasmynsted> ist that what ^ does?
2020-10-21 19:30:47 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 19:30:47 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 19:30:47 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 19:30:53 +0200 <texasmynsted> oh
2020-10-21 19:30:58 +0200 <texasmynsted> /me facepalm
2020-10-21 19:31:00 +0200 <monochrom> No, merijn means that GHC new versions also changes language syntax and semantics and type checking.
2020-10-21 19:31:05 +0200 <texasmynsted> I see that answered above
2020-10-21 19:31:45 +0200 <merijn> "break" implies "used to work", but that's not the case for new versions
2020-10-21 19:32:00 +0200invaser(~Thunderbi@31.148.23.125)
2020-10-21 19:32:12 +0200 <merijn> texasmynsted: "^>= 4.12" says "this is compatible with everything that is PVP compatible with version 4.12"
2020-10-21 19:32:16 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 19:32:17 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 19:32:28 +0200 <merijn> texasmynsted: Where "PVP compatible" is explained here: https://pvp.haskell.org/
2020-10-21 19:32:42 +0200stefan-__(~cri@42dots.de)
2020-10-21 19:34:06 +0200is_null(~jpic@pdpc/supporter/professional/is-null) (Ping timeout: 260 seconds)
2020-10-21 19:35:05 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 19:35:20 +0200tzh(~tzh@2601:448:c500:5300::19b0)
2020-10-21 19:36:51 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 19:37:10 +0200DataComputist(~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Remote host closed the connection)
2020-10-21 19:38:34 +0200jneira(501e64fa@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.250) (Ping timeout: 260 seconds)
2020-10-21 19:39:18 +0200 <texasmynsted> :-)
2020-10-21 19:39:23 +0200 <texasmynsted> Thank you
2020-10-21 19:39:25 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 240 seconds)
2020-10-21 19:39:32 +0200MindlessDrone(~MindlessD@unaffiliated/mindlessdrone) (Ping timeout: 258 seconds)
2020-10-21 19:42:14 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 19:42:15 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 19:43:35 +0200MindlessDrone(~MindlessD@unaffiliated/mindlessdrone)
2020-10-21 19:44:34 +0200erolm_a(~erolm_a@62.19.60.223) (Ping timeout: 272 seconds)
2020-10-21 19:44:57 +0200erolm_a(~erolm_a@62.19.60.223)
2020-10-21 19:47:19 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 19:47:50 +0200oisdk(~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Ping timeout: 246 seconds)
2020-10-21 19:48:53 +0200mirrorbird(~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Ping timeout: 272 seconds)
2020-10-21 19:50:22 +0200kritzefitz(~kritzefit@212.86.56.80) (Ping timeout: 265 seconds)
2020-10-21 19:50:59 +0200oisdk(~oisdk@2001:bb6:3329:d100:110c:4b45:443f:14f0)
2020-10-21 19:51:13 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde)
2020-10-21 19:52:49 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 19:53:58 +0200karanlikmadde(~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
2020-10-21 19:55:06 +0200mananamenos_(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 260 seconds)
2020-10-21 19:55:51 +0200is_null(~jpic@pdpc/supporter/professional/is-null)
2020-10-21 19:57:37 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-10-21 19:59:46 +0200jespada(~jespada@90.254.245.15) (Ping timeout: 260 seconds)
2020-10-21 20:00:00 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-21 20:00:02 +0200Hande(~Hande@195.206.169.184) ()
2020-10-21 20:00:37 +0200jlamothe(~jlamothe@dev.jlamothe.net) (Ping timeout: 258 seconds)
2020-10-21 20:01:36 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 20:02:05 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 20:02:15 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-21 20:02:16 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-21 20:02:16 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-21 20:02:18 +0200jespada(~jespada@90.254.245.15)
2020-10-21 20:03:00 +0200Kolkrabe(~user@unaffiliated/siracusa)
2020-10-21 20:03:04 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 20:03:09 +0200borne(~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
2020-10-21 20:04:14 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
2020-10-21 20:04:47 +0200xff0x(~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de) (Ping timeout: 260 seconds)
2020-10-21 20:05:46 +0200invaser(~Thunderbi@31.148.23.125) (Ping timeout: 246 seconds)
2020-10-21 20:05:51 +0200alp(~alp@2a01:e0a:58b:4920:5496:1877:65f3:df3d)
2020-10-21 20:06:10 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 256 seconds)
2020-10-21 20:06:12 +0200howdoi(uid224@gateway/web/irccloud.com/x-qkgpowqaqjtdktyy)
2020-10-21 20:06:25 +0200xff0x(~fox@141.98.255.143)
2020-10-21 20:06:33 +0200hiroaki(~hiroaki@ip4d176049.dynamic.kabel-deutschland.de)
2020-10-21 20:11:06 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-10-21 20:11:28 +0200DataComputist(~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
2020-10-21 20:11:36 +0200xff0x(~fox@141.98.255.143) (Ping timeout: 256 seconds)
2020-10-21 20:12:35 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 20:13:08 +0200 <hyperisco> tsc: createProcess: does not exist (No such file or directory) I know tsc is on my PATH, why might it not be found? Other executables are found… I am on Windows
2020-10-21 20:13:36 +0200xff0x(~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de)
2020-10-21 20:13:44 +0200 <hyperisco> or am I reading this error wrong? I am reading it as tsc does not exist
2020-10-21 20:13:46 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 260 seconds)
2020-10-21 20:14:13 +0200lep-delete(~lep@94.31.83.149) (Read error: Connection reset by peer)
2020-10-21 20:14:38 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net)
2020-10-21 20:15:16 +0200lep-delete(~lep@94.31.83.149)
2020-10-21 20:16:10 +0200 <geekosaur> does createProcess search %PATH% as you are invoking it? (there are two modes, one searches the PATH and the other wants a full pathname)
2020-10-21 20:18:54 +0200 <geekosaur> nemmind, I see it currently does PATH search if there's no slash in the name
2020-10-21 20:19:58 +0200AceNovo(~chris@67-42-33-191.phnx.qwest.net)
2020-10-21 20:20:00 +0200 <geekosaur> proc on windows has some extra behaviors but it should try %PATH% eventually
2020-10-21 20:20:22 +0200 <hyperisco> it says it uses whatever the system's resolution is
2020-10-21 20:21:06 +0200 <hyperisco> "on Windows systems the Win32 CreateProcess semantics is used"
2020-10-21 20:21:20 +0200isovector1(~isovector@172.103.216.166.cable.tpia.cipherkey.com)
2020-10-21 20:21:35 +0200 <hyperisco> wait... " An .exe extension is added if the filename does not already have an extension. " what?!
2020-10-21 20:21:51 +0200 <koz_> hyperisco: Gotta love dem Windows conventions.
2020-10-21 20:21:56 +0200 <monochrom> That should be harmless IME.
2020-10-21 20:22:05 +0200 <koz_> Although I think your Windows executable already has a .exe?
2020-10-21 20:22:08 +0200zigapeda1(~zigapeda@195.140.213.38)
2020-10-21 20:22:09 +0200 <hyperisco> but tsc.exe does not exist
2020-10-21 20:22:13 +0200 <hyperisco> no it is called tsc lol
2020-10-21 20:22:18 +0200 <hyperisco> it works fine in cmd.exe
2020-10-21 20:22:20 +0200 <geekosaur> glwt
2020-10-21 20:22:47 +0200 <hyperisco> shoot me
2020-10-21 20:22:50 +0200 <monochrom> Oh, then make your own alias tsc.exe
2020-10-21 20:22:51 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 20:23:04 +0200 <hyperisco> it isn't that simple…
2020-10-21 20:23:08 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 20:23:14 +0200 <monochrom> Or make the builder of tsc name it tsc.exe in the first place.
2020-10-21 20:23:16 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 20:23:46 +0200 <monochrom> Windows symlink is different from Linux symlink, but such a thing exists since 15 years go, no?
2020-10-21 20:23:47 +0200lep-deleteGuest88073
2020-10-21 20:23:48 +0200 <hyperisco> is it because cmd.exe will look for tsc.cmd
2020-10-21 20:24:04 +0200Guest88073lep-delete
2020-10-21 20:24:15 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 20:24:21 +0200 <hyperisco> well whatever this stopped being a Haskell question
2020-10-21 20:24:32 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 20:24:38 +0200 <hyperisco> unless it is Haskell that is adding ".exe"
2020-10-21 20:24:44 +0200 <hyperisco> in which case… why… why do this
2020-10-21 20:25:32 +0200geowiesnot(~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
2020-10-21 20:25:50 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 256 seconds)
2020-10-21 20:25:51 +0200 <monochrom> I don't know but I'm sure it's explained in some changelog or commit/PR comment.
2020-10-21 20:25:55 +0200 <monochrom> or source code
2020-10-21 20:26:31 +0200 <monochrom> and most likely it's "breaks some other vocal minority if not added"
2020-10-21 20:26:46 +0200jneira(501e64fa@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.250)
2020-10-21 20:27:13 +0200 <geekosaur> for grins and giggles, try it as "tsc."
2020-10-21 20:27:56 +0200 <hyperisco> I am attempting to not create this twice because I need a dot on one platform and not another
2020-10-21 20:28:18 +0200 <geekosaur> this is not going to end well, I suspect
2020-10-21 20:28:28 +0200 <hyperisco> I stopped using shelly because of this weirdness lol
2020-10-21 20:28:35 +0200 <hyperisco> apparently it goes deeper than I expected
2020-10-21 20:29:13 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 20:29:25 +0200alp(~alp@2a01:e0a:58b:4920:5496:1877:65f3:df3d) (Ping timeout: 272 seconds)
2020-10-21 20:29:37 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-21 20:29:39 +0200 <geekosaur> windows likes its extensions. but in this case I did not mean naming the file with a dot, just specifying the filepath that way. then again, depending on what you're doing, that may still not be what you intend
2020-10-21 20:29:53 +0200ishutin(~Ishutin@80-95-82-226.pool.digikabel.hu)
2020-10-21 20:30:42 +0200 <geekosaur> you may just have to call it "tsc." everywhere to make both platforms happy
2020-10-21 20:31:08 +0200 <hyperisco> stop making me cry
2020-10-21 20:31:09 +0200 <geekosaur> (unix won't care if the name happens to contain a dot)
2020-10-21 20:31:19 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
2020-10-21 20:31:30 +0200 <geekosaur> you're trying to do crossplatform, you _will_ cry
2020-10-21 20:31:31 +0200 <hyperisco> why wouldn't it?
2020-10-21 20:32:42 +0200ishutin_(~Ishutin@94-21-82-21.pool.digikabel.hu) (Ping timeout: 272 seconds)
2020-10-21 20:33:09 +0200isovector1(~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Quit: Leaving)
2020-10-21 20:33:21 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 20:33:59 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 20:34:07 +0200bartemius(~bartemius@109-252-19-142.nat.spd-mgts.ru) (Remote host closed the connection)
2020-10-21 20:34:10 +0200stefan-__(~cri@42dots.de)
2020-10-21 20:34:39 +0200alp(~alp@88.126.45.36)
2020-10-21 20:37:10 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
2020-10-21 20:38:01 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 20:39:58 +0200fendor_fendor
2020-10-21 20:40:30 +0200 <hyperisco> it seems like it is Haskell that adds this "exe" thing
2020-10-21 20:40:52 +0200 <hyperisco> though I can't trace down where in the source it does it
2020-10-21 20:41:30 +0200 <hyperisco> I am floored… that seems pretty ridiculous
2020-10-21 20:46:02 +0200christo(~chris@81.96.113.213) (Remote host closed the connection)
2020-10-21 20:46:50 +0200 <monochrom> unix has the executable bit already.
2020-10-21 20:49:09 +0200 <hyperisco> it doesn't say tsc. = tsc though
2020-10-21 20:49:23 +0200 <monochrom> Oh, no.
2020-10-21 20:49:42 +0200thc202(~thc202@unaffiliated/thc202) (Ping timeout: 260 seconds)
2020-10-21 20:49:45 +0200 <monochrom> The hope is that "tsc." helps Windows.
2020-10-21 20:50:45 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 240 seconds)
2020-10-21 20:50:51 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 20:51:42 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-10-21 20:52:02 +0200 <hyperisco> I don't know what I missed in the code repo for process but I cannot see anywhere it adds on ".exe"
2020-10-21 20:52:27 +0200 <hyperisco> and CreateProcess in win32 makes no mention of adding this implicitly, in fact it features optional extension
2020-10-21 20:53:14 +0200 <hyperisco> and the call to CreateProcess leaves the extension arg NULL, so it could only be part of the command path
2020-10-21 20:53:20 +0200 <hyperisco> but nowhere do I see .exe being added to that path
2020-10-21 20:53:42 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 20:54:22 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-10-21 20:59:56 +0200tnm(~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de)
2020-10-21 21:00:50 +0200LKoen(~LKoen@81.255.219.130) (Remote host closed the connection)
2020-10-21 21:01:39 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu)
2020-10-21 21:02:16 +0200tv(~tv@unaffiliated/tv) (Ping timeout: 256 seconds)
2020-10-21 21:02:35 +0200 <hyperisco> the original issue seems to be gone https://github.com/haskell/process/commit/270e43a2138898967da904e3d61a6e2589cb7b1a
2020-10-21 21:03:33 +0200berberman_(~berberman@unaffiliated/berberman)
2020-10-21 21:04:02 +0200 <hyperisco> adding .exe is part of https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createpr… ie CreateProcessA not CreateProcess
2020-10-21 21:04:15 +0200berberman(~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2020-10-21 21:05:28 +0200 <monochrom> Does "documentation for the Windows SearchPath API" say something about this?
2020-10-21 21:05:40 +0200 <hyperisco> I mean not part of SearchPathA https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-searchpatha which is what the process docs link to
2020-10-21 21:05:57 +0200thir(~thir@p4febc651.dip0.t-ipconnect.de)
2020-10-21 21:06:49 +0200justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
2020-10-21 21:06:49 +0200justsomeguy(~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
2020-10-21 21:06:49 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 21:07:28 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Client Quit)
2020-10-21 21:07:40 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 21:07:41 +0200 <monochrom> I still think it's simplest to find a way to ensure that "tsc.exe" exists.
2020-10-21 21:08:05 +0200 <hyperisco> it really isn't
2020-10-21 21:08:35 +0200 <hyperisco> tsc.cmd exists and I can use that if createProcess on tsc throws
2020-10-21 21:08:49 +0200 <hyperisco> I just wanted to know where this .exe thing is coming from
2020-10-21 21:09:16 +0200 <hyperisco> sstill unclear because process called CreateProcess I assume from windows.h but why do the docs call it CreateProcessA
2020-10-21 21:09:47 +0200 <monochrom> Does Windows have some kind of strace? That can speed up the search.
2020-10-21 21:09:54 +0200 <hyperisco> https://stackoverflow.com/questions/3060991/what-is-the-difference-between-createprocess-and-creat… it is just a macro for unicode vs ascii
2020-10-21 21:10:20 +0200 <hyperisco> so that's the end of that… Windows just puts .exe on if there is no extension, thanks Windows… I absolve you process package
2020-10-21 21:10:45 +0200geekosaursuspected as much, because windows
2020-10-21 21:10:58 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
2020-10-21 21:11:16 +0200 <hyperisco> I guess that is why npm gives you both tsc and tsc.cmd lol
2020-10-21 21:11:51 +0200 <monochrom> It is a legacy thing that traces all the day back to DOS.
2020-10-21 21:12:31 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 21:12:33 +0200britva(~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 21:12:40 +0200thir(~thir@p4febc651.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 21:12:58 +0200seanvert(~user@177.84.244.242)
2020-10-21 21:13:00 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 21:13:01 +0200 <monochrom> and CP/M. DOS took this idea from CP/M
2020-10-21 21:13:02 +0200 <Chousuke> Meaningful file extensions are probably one of those "eh, good enough" choices made way back in the past that you just can't undo.
2020-10-21 21:13:04 +0200 <hyperisco> the docs really are linking to the wrong doc page though
2020-10-21 21:13:27 +0200codygman(~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
2020-10-21 21:13:57 +0200thir(~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
2020-10-21 21:14:04 +0200 <monochrom> On this note actually we suffer a bit from "the victor wrote the history".
2020-10-21 21:14:12 +0200codygman(~codygman@47-184-107-46.dlls.tx.frontiernet.net)
2020-10-21 21:15:35 +0200britva(~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
2020-10-21 21:15:50 +0200tv(~tv@unaffiliated/tv)
2020-10-21 21:16:04 +0200 <monochrom> There was two viable philosophies back then. Unix philosophy was "a file is a sequence of bytes, minimal metadata and semantics from the OS's POV". That was a singular, minority philosophy actually, all other OSes at the time said "a file is the bytes plus a lot of metadata to tell the OS what the file is intended for".
2020-10-21 21:16:23 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 21:16:31 +0200 <monochrom> Then all other OSes lost and Unix won.
2020-10-21 21:16:50 +0200 <geekosaur> tell that to Windows
2020-10-21 21:16:52 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 21:16:53 +0200 <Chousuke> the latter turned out to be a bad idea because you can lie to the OS and it can't trust the metadata anyway.
2020-10-21 21:16:55 +0200borne(~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-10-21 21:16:57 +0200 <hyperisco> sigh but the .cmd depends on knowing its own directory which doesn't seem to work with CreateProcess
2020-10-21 21:17:02 +0200 <Chousuke> so the sane thing to do is to ignore it entirely.
2020-10-21 21:17:07 +0200Athas(athas@sigkill.dk) (Quit: ZNC - http://znc.sourceforge.net)
2020-10-21 21:17:49 +0200thir(~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 21:17:59 +0200 <monochrom> geekosaur, I mean the philosophy won, even Windows programmers now assume the Unix philosophy and consider extensions to be merely UI.
2020-10-21 21:18:01 +0200thir(~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
2020-10-21 21:18:39 +0200 <geekosaur> but the OS doesn't quite, as witness it adding ".exe" here. plus the hack I suggested which should have told it to use a null extension
2020-10-21 21:19:04 +0200 <geekosaur> (and "tsc" should have matched it as a result)
2020-10-21 21:19:23 +0200 <monochrom> And yet we actually know, when we're honest, that the Unix philosophy is wrong. Look at how Linux desktop systems have to add back an MIME type system, confessing that metadata about "file types" is right.
2020-10-21 21:19:54 +0200 <geekosaur> ^
2020-10-21 21:19:56 +0200arguapacha_(~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca) (Read error: Connection reset by peer)
2020-10-21 21:20:30 +0200 <hyperisco> tsc.: createProcess: invalid argument (Exec format error)
2020-10-21 21:20:37 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net) (Ping timeout: 264 seconds)
2020-10-21 21:21:00 +0200 <geekosaur> lovely. so it found it and tried to treat it as something other than an exe?
2020-10-21 21:21:01 +0200thir_(~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
2020-10-21 21:22:52 +0200 <hyperisco> If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended.
2020-10-21 21:23:09 +0200 <Chousuke> monochrom: isn't MIME mostly about giving names to file types rather than accompanying each file with a declared type? Unless you're encoding it somehow, I suppose.
2020-10-21 21:23:30 +0200 <hyperisco> I don't know what the problem is
2020-10-21 21:23:46 +0200 <Chousuke> but even if something claims to be a jpeg image you'd still best not treat it as one until it's been successfully parsed and verified :P
2020-10-21 21:23:53 +0200 <hyperisco> SearchPathA doesn't seem to care about trailing periods
2020-10-21 21:24:33 +0200 <geekosaur> Chousuke, it's a mapping from extension to file type and utilities that can operate on files of that type. It can also include or work with magic(5) data (that is, identofying files by contents; see the "file" command)
2020-10-21 21:24:43 +0200thir(~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 21:25:05 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 21:26:04 +0200 <hyperisco> geekosaur, oh, I see, it is saying the exe is not recognised by Windows, it did find it… ah ha… so presumably the extensionless file is intended for unix systems
2020-10-21 21:27:34 +0200ircbrowse_tom(~ircbrowse@64.225.78.177)
2020-10-21 21:27:34 +0200Server+CLnt
2020-10-21 21:28:26 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
2020-10-21 21:28:48 +0200 <geekosaur> ilegal to create such a file but if you specify one for an existing file it means "no extension". extensions are baked in pretty deep
2020-10-21 21:28:52 +0200Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2020-10-21 21:28:58 +0200 <Chousuke> geekosaur: right, so it's a mechanism for mapping identified types to applications that can work with those types, and you can use the filename extension to "identify" a file type if you want to. I suppose you'd need such a mapping even if you had the type built-in to the data.
2020-10-21 21:29:11 +0200 <monochrom> I don't know and won't be pedantic about whether the MIME RFCs are only about naming file types or more ambitiously promoting attaching such named file types to files.
2020-10-21 21:30:11 +0200 <monochrom> But the way Linux desktops do it is in lieu of an OS-sanctioned metadata system, let's look at filenames and a prefix of file contents to reverse-engineer-guess-approximate the real thing.
2020-10-21 21:30:54 +0200 <monochrom> And certainly naming/IDing file types is a prerequisite of attaching file types to files in an organized way.
2020-10-21 21:31:09 +0200 <geekosaur> also Macs, with an OS-sanctioned way but it's a layer above the core OS
2020-10-21 21:31:22 +0200 <geekosaur> and not available to e.g. ghc if it wanted to use it
2020-10-21 21:31:24 +0200 <monochrom> The other, most popular file system illustrates what I mean. That file system is widely known as HTTP.
2020-10-21 21:31:43 +0200 <hyperisco> okay, so if I use a shell process the .cmd works right… the puzzle pieces are coming together
2020-10-21 21:31:46 +0200AmrasSarma
2020-10-21 21:31:47 +0200 <geekosaur> (it's part of the Cocoa API)
2020-10-21 21:32:02 +0200 <hyperisco> annoyingly though I have to construct a shell expression instead of just passing an array of arguments
2020-10-21 21:32:19 +0200 <hyperisco> and last I checked that is nigh impossible to do correctly
2020-10-21 21:32:26 +0200 <monochrom> I can have an URL that goes "http://foo.com/xyz.pdf", and if the HTTP response header says that the file type of that file is text/html, then it's HTML, not PDF.
2020-10-21 21:33:03 +0200 <geekosaur> hyperisco: or portably
2020-10-21 21:33:22 +0200 <hyperisco> well it should work on unix because I try calling the executable directly first
2020-10-21 21:33:34 +0200 <hyperisco> doesn't have to go through a shell
2020-10-21 21:37:35 +0200 <hololeap> % import Control.Monad.Logic
2020-10-21 21:37:36 +0200 <yahb> hololeap: ; <no location info>: error:; Could not find module `Control.Monad.Logic'; Perhaps you meant; Control.Monad.Co (from kan-extensions-5.2); Control.Monad.Cont (from mtl-2.2.2); Control.Monad.Fail (from base-4.14.0.0)
2020-10-21 21:38:03 +0200 <[exa]> no prolog today
2020-10-21 21:38:21 +0200 <monochrom> yahb probably doesn't have logict installed
2020-10-21 21:38:36 +0200 <Chousuke> monochrom: I guess I'm more a fan of the simple and stupid approach of just treating everything as bytes. for HTTP, the header is a type hint, but you still can't trust that the data is anything other than a stream of bytes.
2020-10-21 21:38:52 +0200 <monochrom> "become a galaxy-level patron so you can instruct yahb to install one more package!"
2020-10-21 21:39:05 +0200 <geekosaur> but you have to have some idea of what parser to use to validate it, at minimum
2020-10-21 21:39:17 +0200 <Chousuke> yeah
2020-10-21 21:39:29 +0200 <Chousuke> I'm not sure that that's useful on the filesystem level though
2020-10-21 21:39:46 +0200 <geekosaur> it's useful at the level of apps getting data from the filesystem
2020-10-21 21:39:50 +0200 <monochrom> You are right that a receiver still has to parse, and to expect parse error. But the receiver also expects to not bother trying other parsers.
2020-10-21 21:40:24 +0200 <monochrom> If you say "text/html" I'm not going to try gunzip it.
2020-10-21 21:40:47 +0200 <geekosaur> unless the compression header says to
2020-10-21 21:40:50 +0200 <monochrom> even if the bytes scream "I'm gzip"
2020-10-21 21:40:59 +0200 <monochrom> Yeah, that.
2020-10-21 21:41:38 +0200 <monochrom> If you say "text/html" I'm not going to run objdump on it, even if the bytes scream "ELF"
2020-10-21 21:41:50 +0200 <hololeap> i'm confused as to how you use ListT
2020-10-21 21:41:57 +0200 <hololeap> *LogicT
2020-10-21 21:42:17 +0200 <[exa]> hololeap: any short example / confusing snippet?
2020-10-21 21:42:18 +0200 <monochrom> For the most part you can use it like you use a list monad.
2020-10-21 21:42:25 +0200 <hololeap> i know it has some kind of similarities to ListT, but i don't see how
2020-10-21 21:42:49 +0200 <monochrom> There is just one addition command to learn if you want the search to be BFS instead of DFS.
2020-10-21 21:43:12 +0200 <monochrom> Perhaps start with Logic instead of LogicT?
2020-10-21 21:43:58 +0200 <hololeap> i've played around with Logic a bit, but simply constructing a `Logic a` value is weird
2020-10-21 21:44:35 +0200Franciman(~francesco@host-82-54-10-114.retail.telecomitalia.it) (Quit: Leaving)
2020-10-21 21:44:46 +0200 <[exa]> hololeap: how weird? (can't you construct `Logic a` using just `pure` ?
2020-10-21 21:44:58 +0200hackageukrainian-phonetics-basic 0.1.0.0 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.1.0.0 (OleksandrZhabenko)
2020-10-21 21:44:58 +0200 <Chousuke> monochrom: the other side of the coin is that if the metadata claims the file to be something and it looks like something else, it might get opened by an application you didn't expect which has a long history of causing problems. So I guess file extensions aren't completely awful for deciding the application to open, as long as they're visible to the user.
2020-10-21 21:45:45 +0200 <hololeap> odds = pure 1 `mplus` (odds >>= \i -> if i >= 100 then mzero else pure (i+2))
2020-10-21 21:46:01 +0200 <hololeap> is this roughly equivalent to [1,3..100]?
2020-10-21 21:46:07 +0200 <Chousuke> come to think of it, hashbangs are basically file metadata to decide the opening program. :P
2020-10-21 21:46:50 +0200knupfer(~Thunderbi@i59F7FF96.versanet.de) (Quit: knupfer)
2020-10-21 21:46:54 +0200knupfer1(~Thunderbi@200116b82c30ba0001bfef634072ae05.dip.versatel-1u1.de)
2020-10-21 21:47:25 +0200 <[exa]> monochrom, Chousuke: btw sorry to jump into discussion, but the golden rule says that if the user/operator/etc is unable to instruct the programs to use correct data access methods, so he will fail at maintaining the metadata...unless the metadata becomes inseparable part of data, as it once had already, with file magic numbers
2020-10-21 21:47:27 +0200 <geekosaur> to decide the interpreter, to be specific (and the dynamic loader is treated as an interpreter)
2020-10-21 21:47:43 +0200 <monochrom> You can instantiate that to [] and get: odds = [1] ++ (odds >>= \i -> if i>=100 then [] else [i+2])
2020-10-21 21:49:18 +0200knupfer1knupfer
2020-10-21 21:49:43 +0200 <hololeap> ok, but i'm trying to construct something similar to [1,3..100], except i want it to be `Logic Int`
2020-10-21 21:49:54 +0200 <[exa]> (that said, I'd welcome if all file formats would have extensible magic, just like #!)
2020-10-21 21:50:00 +0200 <Chousuke> geekosaur: yeah. and if you're putting +x on any random file and running it, I don't think you can expect to stay secure. :P
2020-10-21 21:50:04 +0200 <hololeap> `observeAll odds` doesn't terminate
2020-10-21 21:50:08 +0200 <monochrom> Just add "odds :: Logic Int"
2020-10-21 21:51:18 +0200 <geekosaur> because if you try to observe all of it, it just keeps going through values after it hits the limit (empty list doesn't mean "stop", any more than it does for the list comprehension example)
2020-10-21 21:51:24 +0200 <monochrom> Probably the [] instantiation won't either.
2020-10-21 21:51:28 +0200chaosmasttter(~chaosmast@p200300c4a70942015d50de0935368812.dip0.t-ipconnect.de)
2020-10-21 21:51:40 +0200 <geekosaur> Chousuke, yet it's common for scripts to work that way
2020-10-21 21:51:47 +0200 <monochrom> > let odds = pure 1 `mplus` (odds >>= \i -> if i >= 100 then mzero else pure (i+2)) in odds :: [Int]
2020-10-21 21:51:50 +0200 <lambdabot> [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53...
2020-10-21 21:51:54 +0200 <hololeap> your right, it doesn't
2020-10-21 21:51:58 +0200 <monochrom> actually need a smaller test
2020-10-21 21:52:02 +0200 <monochrom> > let odds = pure 1 `mplus` (odds >>= \i -> if i >= 10 then mzero else pure (i+2)) in odds :: [Int]
2020-10-21 21:52:05 +0200 <lambdabot> [1,3,5,7,9,11*Exception: <<loop>>
2020-10-21 21:52:23 +0200 <monochrom> Not a good program in the first place IMO
2020-10-21 21:52:30 +0200 <geekosaur> huh, I expected a timeout, not <<loop>>
2020-10-21 21:52:53 +0200 <monochrom> You don't do left recursion like that (odds = odds >>= ...)
2020-10-21 21:53:14 +0200 <geekosaur> oh, hm, I guess it does do that, yeh
2020-10-21 21:53:56 +0200 <hololeap> so, does a Logic computation by default not terminate, but requires observeMany to terminate it?
2020-10-21 21:54:14 +0200 <geekosaur> it's just the way this one was constructed
2020-10-21 21:54:16 +0200 <Chousuke> geekosaur: it is. I read most scripts before I run them, though of course I have to trust some things. Generally whatever is installed from OS package management is auto-trusted.
2020-10-21 21:54:34 +0200 <monochrom> I would rather code up a forward constraint propagation algorithm for learning logict.
2020-10-21 21:54:58 +0200 <Chousuke> geekosaur: I am very uncomfortable every time I have to use pip or gem or whatnot for whatever purpose.
2020-10-21 21:55:11 +0200 <hololeap> well, how would i write a `Logic Int` computation that would evaluate to [1,3,5,7,9] when used with observeAll?
2020-10-21 21:55:12 +0200shafox(~shafox@106.51.234.111) (Remote host closed the connection)
2020-10-21 21:55:45 +0200errst(~tirej@unaffiliated/tirej) (Quit: Lost terminal)
2020-10-21 21:56:36 +0200 <monochrom> odds i | i < 100 = pure i <|> odds (i+2)
2020-10-21 21:56:50 +0200 <monochrom> | otherwise = empty
2020-10-21 21:56:54 +0200Athas(athas@2a01:7c8:aaac:1cf:9a0:fad3:fdf2:2ed)
2020-10-21 21:57:03 +0200ech(~user@gateway/tor-sasl/ech) (Ping timeout: 240 seconds)
2020-10-21 21:57:11 +0200 <monochrom> change to mplus/mzero if Logic doesn't support Applicative
2020-10-21 21:58:26 +0200 <monochrom> May the odds be ever in your favour.
2020-10-21 21:58:30 +0200 <hololeap> hold on, i thought mzero/empty wouldn't stop the computation
2020-10-21 21:58:50 +0200Sheilong(uid293653@gateway/web/irccloud.com/x-zkmqxnjkmjnikczm)
2020-10-21 21:59:30 +0200 <hololeap> oh, i see. it never calls `odds` on the second branch. in my original example it calls it no matter what.
2020-10-21 21:59:54 +0200ZarTek(znc@static.138.236.76.144.clients.your-server.de)
2020-10-21 21:59:57 +0200hackageordinal 0.3.0.0 - Convert numbers to words in different languages. https://hackage.haskell.org/package/ordinal-0.3.0.0 (wvanonsem90)
2020-10-21 22:00:00 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-21 22:00:17 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 260 seconds)
2020-10-21 22:00:37 +0200rprije(~rprije@110-175-117-18.tpgi.com.au)
2020-10-21 22:01:23 +0200 <monochrom> Oddly enough, "odds = pure 1 <|> fmap (+ 2) odds" is much more well defined that adding "if i>=100 then empty"
2020-10-21 22:01:25 +0200supercoven_(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 240 seconds)
2020-10-21 22:02:08 +0200 <hololeap> ok, i see now. it looks like i was over-complicating things, although i still don't have an intuition for this. the type signature `forall r. (a -> r -> r) -> r -> r` is not intuitive to me
2020-10-21 22:02:09 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 22:02:18 +0200tabaqui(~tabaqui@2604:a880:800:c1::21b:3001)
2020-10-21 22:02:19 +0200 <hololeap> monochrom: how is it more well defined?
2020-10-21 22:03:07 +0200 <tabaqui> Allright, I'm using simple recusion to implement my dsl
2020-10-21 22:03:15 +0200 <tabaqui> Now I have another issue
2020-10-21 22:03:24 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-21 22:03:46 +0200 <tabaqui> type family VarType (a :: Symbol) :: *
2020-10-21 22:03:50 +0200 <monochrom> The different between "an infinite 'loop' that actually is productive in giving you an infinite list" and "an infinite loop that doesn't accomplish anything"
2020-10-21 22:04:11 +0200 <tabaqui> f :: Sing a -> VarType a
2020-10-21 22:04:29 +0200 <tabaqui> How can I write any function with such signature?
2020-10-21 22:04:48 +0200 <hololeap> monochrom: oh, i see what you mean
2020-10-21 22:05:04 +0200ech(~user@gateway/tor-sasl/ech)
2020-10-21 22:05:07 +0200z0(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:05:13 +0200 <monochrom> If you're going to do an infinite "x0 ++ x1 ++ x2 ++ x3 ++ ...", you would rather each xi be a non-empty list, so that the whole thing is an infinite list, rather than...
2020-10-21 22:05:16 +0200 <tabaqui> I've tried to compare singletons with %==, but Haskell doesn't accept it as a proof
2020-10-21 22:05:30 +0200z0Guest46583
2020-10-21 22:05:53 +0200 <monochrom> rather than from x50 onwards it's all xi=[] so the list should end but the computer doesn't know and chases gooses.
2020-10-21 22:06:10 +0200Franciman(~francesco@host-82-54-10-114.retail.telecomitalia.it)
2020-10-21 22:06:26 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 22:07:53 +0200coot(~coot@37.30.51.94.nat.umts.dynamic.t-mobile.pl)
2020-10-21 22:08:54 +0200 <tabaqui> Oh, probably I could replace TypeFamilies
2020-10-21 22:09:41 +0200 <ski> (or at least, infinitely many of them being non-empty)
2020-10-21 22:09:49 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 264 seconds)
2020-10-21 22:10:19 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
2020-10-21 22:10:31 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-10-21 22:10:50 +0200 <ski> hololeap : `forall r. (a -> r -> r) -> r -> r' is (doubly) CPS (success, and failure, continuation)
2020-10-21 22:11:27 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu)
2020-10-21 22:12:07 +0200 <hololeap> ski: i don't have much of an intuition for cps, so that doesn't help much
2020-10-21 22:12:27 +0200avoandmayo(~textual@122-58-158-238-adsl.sparkbb.co.nz)
2020-10-21 22:12:40 +0200 <hololeap> i can see how (a -> r -> r) is roughly equal to (:) and r is roughly equal to []
2020-10-21 22:13:11 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 22:13:13 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 22:13:57 +0200 <hololeap> % :t runContT
2020-10-21 22:13:57 +0200 <yahb> hololeap: ContT r m a -> (a -> m r) -> m r
2020-10-21 22:14:23 +0200 <hololeap> % :t ContT
2020-10-21 22:14:24 +0200 <yahb> hololeap: ((a -> m r) -> m r) -> ContT r m a
2020-10-21 22:14:59 +0200ZarTek(znc@static.138.236.76.144.clients.your-server.de) ()
2020-10-21 22:15:12 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 22:15:39 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 22:15:52 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 22:16:13 +0200notnatebtw(~nate@110.138.18.157) (Client Quit)
2020-10-21 22:17:10 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 22:18:38 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-21 22:19:08 +0200ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2020-10-21 22:19:25 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2020-10-21 22:19:29 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-10-21 22:19:31 +0200ukari(~ukari@unaffiliated/ukari)
2020-10-21 22:21:18 +0200britva(~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1) (Quit: This computer has gone to sleep)
2020-10-21 22:24:14 +0200kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-10-21 22:26:32 +0200 <ski> @unmtl ContT () (Cont r) a
2020-10-21 22:26:32 +0200 <lambdabot> (a -> (() -> r) -> r) -> (() -> r) -> r
2020-10-21 22:26:37 +0200 <ski> hololeap ^
2020-10-21 22:27:38 +0200 <hololeap> huh, ok
2020-10-21 22:28:00 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 22:28:27 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 22:28:44 +0200 <ski> (that's what i meant by "doubly". there's two CPS "levels", one on top of the other one)
2020-10-21 22:29:00 +0200 <ski> hololeap : happen to know any Prolog ?
2020-10-21 22:30:01 +0200 <hololeap> unfortunately, no. and i don't have a specific use-case needing Logic(T). i was just trying to understand another tool
2020-10-21 22:30:27 +0200hackageordinal 0.3.1.0 - Convert numbers to words in different languages. https://hackage.haskell.org/package/ordinal-0.3.1.0 (wvanonsem90)
2020-10-21 22:31:25 +0200 <ski> well, consider using lists as "multiple alternative successes"
2020-10-21 22:31:42 +0200 <ski> what the `Applicative' and `Monad' instance of `[]' gives you
2020-10-21 22:32:26 +0200britva(~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
2020-10-21 22:33:01 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:33:20 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:33:21 +0200 <ski> you can think of `child :: Person -> [] Person' as computing for you "an arbitrary child" of a person (given some family relations database / knowledge base that this queries)
2020-10-21 22:33:40 +0200Franciman(~francesco@host-82-54-10-114.retail.telecomitalia.it) (Quit: Leaving)
2020-10-21 22:33:46 +0200buckworst(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 22:33:57 +0200 <ski> (well, let's rename that function to `childOf')
2020-10-21 22:34:12 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:34:28 +0200 <hololeap> interesting that you're not naming it "childrenOf", but i think i see where you're going
2020-10-21 22:34:41 +0200bartemius(~bartemius@109-252-19-142.nat.spd-mgts.ru)
2020-10-21 22:34:47 +0200 <ski> then you could define `grandChildOf :: Person -> [] Person; grandChild person = do child <- childOf person; grandChild <- childOf child; return grandChild'
2020-10-21 22:34:54 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 22:34:59 +0200 <ski> the point is to "think in the singular", so to speak
2020-10-21 22:35:28 +0200z0__(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:35:28 +0200 <ski> it just so happens that it'll actually try all the children, so sequencing `;' here in `do' acts like nested loops
2020-10-21 22:35:28 +0200erolm_a(~erolm_a@62.19.60.223) (Read error: Connection reset by peer)
2020-10-21 22:35:41 +0200erolm_a(~erolm_a@82.24.185.133)
2020-10-21 22:35:44 +0200z0__(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:36:02 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:36:05 +0200Iwawa(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 240 seconds)
2020-10-21 22:37:05 +0200 <hololeap> grandChildOf = childOf >=> childOf
2020-10-21 22:37:14 +0200 <ski> in Prolog, you'd write this as `grand_child_of(Person,GrandChild) :- child_of(Person,Child),child_of(Child,GrandChild).' (where you can read `:-' as "if")
2020-10-21 22:38:32 +0200 <ski> ("`GrandChild' is a grand-child of `Person', if `Child' is a child of `Person', and `GrandChild' is a child of `Child'." is how you could read it out aloud)
2020-10-21 22:38:44 +0200Guest46583(~z0@bl15-167-204.dsl.telepac.pt) (Quit: Lost terminal)
2020-10-21 22:39:13 +0200bartemius(~bartemius@109-252-19-142.nat.spd-mgts.ru) (Ping timeout: 264 seconds)
2020-10-21 22:40:07 +0200geekosaur(82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
2020-10-21 22:40:18 +0200stefan-__(~cri@42dots.de) (Read error: Connection reset by peer)
2020-10-21 22:40:22 +0200hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Read error: Connection reset by peer)
2020-10-21 22:40:33 +0200 <ski> consider `between(1,5,N),N > 2,M is N*N,M < 10'
2020-10-21 22:40:41 +0200stefan-__(~cri@42dots.de)
2020-10-21 22:41:01 +0200 <ski> `between(1,5,N)' will have five solutions for `N', being the integers between `1' and `5' (inclusive)
2020-10-21 22:42:05 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 22:42:19 +0200 <ski> at first, `N = 1' is tried (first solution of that between/3 call). then `N > 1' is tried, but this fails (no solutions / "empty list of solutions"). this causes "backtracking" (the program "executing backwards"), going back to the last point where we had an alternative choice, which here was the between/3 call
2020-10-21 22:43:31 +0200 <ski> so, the next solution of that call is tries, which is `N = 2', so execution resumes going forward again. but this solution also fails the test `N > 2', so we backtrack again, getting `N = 3' as solution from between/3, this time, finally passing the `N > 2' test
2020-10-21 22:44:24 +0200 <ski> next, we compute `M' to be the square of `N', so now `M = 9'. and this passes `M < 10', so we have an overall solution to the whole query : `N = 3,M = 9' (`,' means "and")
2020-10-21 22:44:30 +0200 <ski> hololeap : making any sense ?
2020-10-21 22:44:54 +0200z0(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:44:58 +0200z0(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:45:00 +0200 <ski> > [(m,n) | n <- [1 .. 5],n > 2,let m = n*n,m < 10]
2020-10-21 22:45:03 +0200 <lambdabot> [(9,3)]
2020-10-21 22:45:04 +0200 <ski> is the Haskell version of this
2020-10-21 22:45:37 +0200 <ski> > do n <- [1 .. 5]; guard (n > 2); let {m = n*n}; guard (m < 10); return (m,n) -- or, with `do'-notation
2020-10-21 22:45:39 +0200 <lambdabot> [(9,3)]
2020-10-21 22:47:24 +0200 <dminuoso> phadej: Hi! I recall you had a nice diagram of profunctor optics and their hierarchy, along with their profunctor constraints (Strong, Choice, etc). Was that up on the Glassery.md? If so, the images there are broken. :(
2020-10-21 22:47:37 +0200z0(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:47:53 +0200 <ski> anyway ..
2020-10-21 22:48:31 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:49:08 +0200 <hololeap> dminuoso: this? http://i.imgur.com/ALlbPRa.png
2020-10-21 22:49:16 +0200 <ski> .. after getting the first solution `N = 3,M = 9', we can ask the Prolog interactor to check if it can find any other/more. (usually by pressing `;', which means "or"). conceptually, this acts as we telling Prolog we're not satisfied with the solution it found, so that it should try to find another
2020-10-21 22:49:31 +0200 <hololeap> dminuoso: sorry, that's lens not profunctors
2020-10-21 22:49:40 +0200z0_(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:49:50 +0200texasmynsted(~texasmyns@104.140.52.83) (Remote host closed the connection)
2020-10-21 22:50:06 +0200 <ski> (similar to how the `N > 2' test "told" the between/3 call that the first two solutions of it were no good, by starting backtracking ("backward execution"), so control returned back, "unreturned into", that between/3 call)
2020-10-21 22:50:31 +0200texasmynsted(~texasmyns@104.140.52.83)
2020-10-21 22:51:26 +0200 <ski> in this case, the last choice-point was still in between/3 (none of the other goals after it had alternative solutions). so we'll then try `N = 4', which passes the `N > 2' test, but then the `M < 10' test fails (since `M = 16' then). and similarly the `N = 5' solution also fails, so we try to backtrack to the left of the first call (to between/3), and "hit the wall"
2020-10-21 22:51:32 +0200 <ski> meaning, there are no (more) solutions
2020-10-21 22:52:03 +0200 <ski> hololeap : that's a very quick intro to backtracking in Prolog
2020-10-21 22:52:27 +0200 <hololeap> ski: so how would this look using the Logic monad?
2020-10-21 22:52:44 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 22:53:19 +0200 <ski> well
2020-10-21 22:53:26 +0200 <ski> first a little detour
2020-10-21 22:53:51 +0200 <ski> consider how ordinary functions or procedures, in a strict programming language (like e.g. C) can be implemented
2020-10-21 22:54:18 +0200 <ski> when calling a function, we will need to tell it where execution is to continue, after it has done its work
2020-10-21 22:55:10 +0200texasmynsted(~texasmyns@104.140.52.83) (Ping timeout: 246 seconds)
2020-10-21 22:55:38 +0200 <ski> in assembler, there's commonly an `rts' instruction, for returning, and a `jsr' or `call' instruction, for calling. the latter will e.g. put the address of the next instruction in a register, or on the stack. and the former will jump to that address, resuming control to the caller
2020-10-21 22:55:40 +0200z0(~z0@bl15-167-204.dsl.telepac.pt) (Quit: leaving)
2020-10-21 22:55:51 +0200 <ski> the return address is a continuation
2020-10-21 22:56:35 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Quit: Lost terminal)
2020-10-21 22:56:51 +0200z0(~z0@bl15-167-204.dsl.telepac.pt)
2020-10-21 22:56:52 +0200knupfer(~Thunderbi@200116b82c30ba0001bfef634072ae05.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-10-21 22:56:54 +0200 <ski> conceptually, it's an extra parameter that we pass, when calling a "function" (really, jumping to a memory address, with the expectation that parameters are passed in some standard locations, usually either in registers, or at some position relative to a current stack pointer)
2020-10-21 22:57:34 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 22:57:50 +0200z0(~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
2020-10-21 22:58:25 +0200 <ski> in Haskell, a type `T' is equivalent to `forall o. (T -> o) -> o' (aka `forall o. Cont o T'). here the callback argument of type `T -> o' plays the same role as "what to do after"
2020-10-21 22:59:15 +0200 <ski> but, to (efficiently) implement the Prolog execution, we need some way to be able to resume execution inside a call, e.g. to between/3, after it has already returned successfully !
2020-10-21 23:00:02 +0200zigapeda1(~zigapeda@195.140.213.38) ()
2020-10-21 23:00:19 +0200 <ski> so, when between/3 returns, having succeeded in finding a solution, it will tell us a "redo" address, which we can jump to, if/when we're not satisfied with the current solution, would like the call to try to find another one, the next one
2020-10-21 23:01:13 +0200 <ski> similarly, since a call may fail to have any solutions, and we may also run out of all the solutions it has, we need some way to tell it what to do (where to jump), if case it fails to find any (more) solutions. this is the "failure continuation"
2020-10-21 23:01:28 +0200texasmyn_(~texasmyns@104.140.52.83)
2020-10-21 23:01:54 +0200 <ski> so, instead of passing a single "return address", when calling a function, we're to pass two addresses. one being a "success continuation", and one being a "failure continuation"
2020-10-21 23:02:18 +0200 <ski> in case there's no (more) solutions, it'll continue using the latter
2020-10-21 23:02:18 +0200ixlun(~matthew@213.205.241.94) (Read error: Connection reset by peer)
2020-10-21 23:02:36 +0200nineonin_(~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 23:03:14 +0200 <ski> in case there's one (more) solution, it'll continue, using the former. also passing to the former the "redo", which is what we'll pass as "failure continuation" to the next call, so it knows where to "backtrack to", if it fails (runs out of solutions)
2020-10-21 23:03:23 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 23:03:36 +0200 <ski> so, consider a function of type `T -> [] U'
2020-10-21 23:03:52 +0200 <ski> we'll replace `[] U' by continuation-passing
2020-10-21 23:04:42 +0200 <ski> first we'll say `T -> (U -> ...) -> ...', where `U -> ...' is the (type of the) success continuation, that will be passed an `U' result/solution (if any is found)
2020-10-21 23:05:20 +0200 <ski> but we also need a failure continuation, a separate parameter, so `T -> (U -> ...) -> (...) -> (...)'
2020-10-21 23:05:58 +0200 <ski> if we were in a strict language, we'd need to model the failure continuation as a function (to delay computation of it)
2020-10-21 23:06:08 +0200kori(~kori@arrowheads/kori) (Read error: Connection reset by peer)
2020-10-21 23:06:25 +0200 <ski> we'd have `T -> (U -> ...) -> (() -> o) -> o'
2020-10-21 23:07:52 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-21 23:07:52 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-10-21 23:08:00 +0200 <ski> e.g. consider a definition of `between :: Integer -> Integer -> Logic Integer', where `Logic a' means something like `(a -> ...) -> (() -> o) -> o'
2020-10-21 23:08:04 +0200 <ski> base case is
2020-10-21 23:08:37 +0200 <ski> between lo hi succeess failure | lo > hi = failure ()
2020-10-21 23:08:50 +0200thir_(~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 23:09:22 +0200 <ski> so, if there's no integers within the given bounds, we (tail-)call the failure continuation
2020-10-21 23:09:50 +0200 <ski> (and this forces the return type of the failure continuation to be the same as the overall return type. the "final result/answer" type `o')
2020-10-21 23:10:20 +0200 <ski> next, we need to elaborate the type of the success continuation
2020-10-21 23:10:55 +0200hekkaidekapus}(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-21 23:10:55 +0200 <ski> i said that it should be passed (by `between', in this case), a "redo", where to continue, if we want to search for more solutions
2020-10-21 23:11:10 +0200noteness_(noteness@unaffiliated/nessessary129) (Quit: I'LL BE BACK)
2020-10-21 23:11:35 +0200noteness(noteness@unaffiliated/nessessary129)
2020-10-21 23:11:43 +0200 <ski> and i mentioned that that "redo" is actually also a failure continuation (which could be passed to further calls, down the line, to let them know where to go (back, where to backtrack to), if they fail to find any solution)
2020-10-21 23:12:23 +0200hekkaidekapus{(~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-10-21 23:12:41 +0200 <ski> so, we refine `T -> (U -> ...) -> (() -> o) -> o' further to `T -> (U -> (() -> o) -> o) -> (() -> o) -> o' (so `Logic a' is `(a -> (() -> o) -> o) -> (() -> o) -> o', or actually `forall o. (a -> (() -> o) -> o) -> (() -> o) -> o')
2020-10-21 23:13:01 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2020-10-21 23:13:08 +0200 <ski> so, the successful case of `between' now becomes
2020-10-21 23:13:17 +0200jud(~jud@unaffiliated/jud) (Read error: Connection reset by peer)
2020-10-21 23:13:20 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 23:13:34 +0200tnm(~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de) (Quit: leaving)
2020-10-21 23:13:52 +0200ph88(~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140) (Quit: Leaving)
2020-10-21 23:13:54 +0200 <ski> between lo hi success failure = success lo redo
2020-10-21 23:13:56 +0200 <ski> where
2020-10-21 23:14:14 +0200 <ski> redo () = between (lo + 1) hi success failure
2020-10-21 23:14:45 +0200 <ski> however, in a non-strict language, we can drop the `()' argument types, so we have just
2020-10-21 23:15:13 +0200 <ski> between :: Integer -> Integer -> ((Integer -> o -> o) -> o -> o)
2020-10-21 23:16:37 +0200 <ski> hololeap : so .. this is more or less what `Logic' does. next, you'd go on to define conjunction (which is basically `(>>=)'), and also disjunction
2020-10-21 23:17:35 +0200coot(~coot@37.30.51.94.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-10-21 23:17:36 +0200 <ski> what the CPS does, in Haskell, is it makes the "list of successes/solutions" virtual, passed directly to consumers
2020-10-21 23:17:53 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-21 23:18:22 +0200falafel(~falafel@71-34-132-121.clsp.qwest.net)
2020-10-21 23:22:16 +0200borne(~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
2020-10-21 23:22:27 +0200irc_user(uid423822@gateway/web/irccloud.com/x-ozudxpdqqqotmvjh)
2020-10-21 23:23:47 +0200Pitaya(~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
2020-10-21 23:24:18 +0200Plantain(~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
2020-10-21 23:24:32 +0200christo(~chris@81.96.113.213)
2020-10-21 23:25:16 +0200 <hololeap> but we also need a continuation of sorts, that ignores its argument, to be used in the case of failure
2020-10-21 23:25:21 +0200 <hololeap> i'm with you so far
2020-10-21 23:26:31 +0200 <ski> (some of that may have been a bit unclear. do yell if you wonder about something)
2020-10-21 23:27:13 +0200jsynacek(~jsynacek@ip-185-149-130-112.kmenet.cz) (Ping timeout: 260 seconds)
2020-10-21 23:28:11 +0200 <ski> (btw, `between' is just a version of `enumFromTo', which is what `\lo hi -> [lo .. hi]' amounts to)
2020-10-21 23:28:22 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 260 seconds)
2020-10-21 23:29:24 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 23:30:12 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 23:30:39 +0200 <tomsmeding> this is a new one: 'variance introduced by outliers: -9223372036854775808% (severely inflated)'
2020-10-21 23:30:46 +0200notnatebtw(~nate@110.138.18.157)
2020-10-21 23:31:15 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-21 23:31:34 +0200nexya(2eef64c3@marwin.brg.sgsnet.se)
2020-10-21 23:31:35 +0200 <koz_> Uhh...
2020-10-21 23:31:47 +0200 <koz_> That's an oddly specific number there.
2020-10-21 23:31:51 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-21 23:32:00 +0200 <ski> negative variance ?
2020-10-21 23:32:07 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-21 23:32:24 +0200 <tomsmeding> unsure
2020-10-21 23:32:30 +0200 <tomsmeding> it _is_ an oddly specific number
2020-10-21 23:32:57 +0200 <ski> criterion ?
2020-10-21 23:33:01 +0200 <tomsmeding> yeah
2020-10-21 23:33:21 +0200 <tomsmeding> > printf "%x" 9223372036854775808
2020-10-21 23:33:23 +0200 <lambdabot> error:
2020-10-21 23:33:23 +0200 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M315352001722...
2020-10-21 23:33:23 +0200 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2020-10-21 23:33:30 +0200 <tomsmeding> > printf "%x" (9223372036854775808 :: Integer)
2020-10-21 23:33:32 +0200 <lambdabot> error:
2020-10-21 23:33:32 +0200 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M830512809473...
2020-10-21 23:33:32 +0200 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2020-10-21 23:33:39 +0200 <ski> > printf "%x" 9223372036854775808 :: String
2020-10-21 23:33:41 +0200 <lambdabot> "8000000000000000"
2020-10-21 23:33:46 +0200 <ski> ooh
2020-10-21 23:33:47 +0200 <tomsmeding> OverloadedStrings?
2020-10-21 23:33:53 +0200nexya(2eef64c3@marwin.brg.sgsnet.se) (Remote host closed the connection)
2020-10-21 23:33:56 +0200 <tomsmeding> but yeah INT64_MIN
2020-10-21 23:34:14 +0200 <ski> @type "abc"
2020-10-21 23:34:15 +0200 <lambdabot> [Char]
2020-10-21 23:34:16 +0200 <ski> @type printf
2020-10-21 23:34:17 +0200 <lambdabot> PrintfType r => String -> r
2020-10-21 23:34:25 +0200tomsmedingis confused
2020-10-21 23:34:42 +0200nineonine(~textual@216.81.48.202)
2020-10-21 23:34:51 +0200 <tomsmeding> oh PrintfType is the thing as always with printf
2020-10-21 23:35:05 +0200 <ski> it's the vararg trick thing, yea
2020-10-21 23:35:23 +0200 <tomsmeding> the only reason I used printf is that I failed to remember showIntAtBase
2020-10-21 23:35:34 +0200 <tomsmeding> I floundered between showBase, showAtBase, showIntBase
2020-10-21 23:36:25 +0200 <tomsmeding> but I'm not sure what criterion is up to
2020-10-21 23:37:23 +0200conal(~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
2020-10-21 23:38:07 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 23:38:33 +0200conal(~conal@ip-66-115-176-174.creativelink.net)
2020-10-21 23:38:45 +0200__monty__(~toonn@unaffiliated/toonn) (Quit: leaving)
2020-10-21 23:39:06 +0200 <monochrom> 9223372036854775808 looks like an invalid file descriptor we ran into a week or two ago.
2020-10-21 23:39:20 +0200 <monochrom> Now it is negated and presented as an illegal variance? :)
2020-10-21 23:43:45 +0200nikonuka
2020-10-21 23:43:58 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-10-21 23:44:18 +0200 <tomsmeding> well an invalid file descriptor it certainly is, though I'm curious how you got a file descriptor in a 64-bit int
2020-10-21 23:46:16 +0200Ariakenom(~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: Leaving)
2020-10-21 23:46:35 +0200AceNovo(~chris@67-42-33-191.phnx.qwest.net) (Remote host closed the connection)
2020-10-21 23:46:43 +0200 <dolio> > minBound :: Int
2020-10-21 23:46:44 +0200 <lambdabot> -9223372036854775808
2020-10-21 23:47:45 +0200acidjnk_new2(~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-21 23:49:21 +0200thir(~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
2020-10-21 23:50:11 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2020-10-21 23:51:59 +0200 <tomsmeding> ah apparently criterion gets confused when you pass it a benchmark that takes <1ms until you repeat it 14 times, then it takes 3 seconds
2020-10-21 23:52:16 +0200 <monochrom> Oddly enough, -9223372036854775808 is an even number, not an odd number. >:)
2020-10-21 23:52:21 +0200 <tomsmeding> how my function gets that behaviour is yet unknown, but at least that's an interesting factoid
2020-10-21 23:52:34 +0200 <tomsmeding> monochrom: is that odd?
2020-10-21 23:54:56 +0200acarrico(~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
2020-10-21 23:56:32 +0200vicfred(~vicfred@unaffiliated/vicfred)
2020-10-21 23:56:33 +0200crestfallen(~john@128.32.176.159)
2020-10-21 23:57:52 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
2020-10-21 23:58:07 +0200thir(~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-21 23:58:16 +0200notnatebtw(~nate@110.138.18.157) (Quit: WeeChat 2.9)
2020-10-21 23:58:27 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-10-21 23:59:00 +0200arw(~arw@impulse.informatik.uni-erlangen.de) (Remote host closed the connection)