2023/10/07

2023-10-07 00:00:42 +0200stites(~stites@2603:3005:b69:4100:ffbe:3c4e:c9c0:ad22) (Ping timeout: 272 seconds)
2023-10-07 00:01:30 +0200stites(~stites@2607:fb91:dcd:e247:3117:f970:e6:e12c)
2023-10-07 00:02:50 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-10-07 00:03:49 +0200acidjnk(~acidjnk@p200300d6e7072f88f8dec80e9aca23dc.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2023-10-07 00:17:48 +0200lottaquestions_(~nick@2607:fa49:503d:b200:f220:35a:bef7:b2bf) (Ping timeout: 272 seconds)
2023-10-07 00:18:21 +0200stites(~stites@2607:fb91:dcd:e247:3117:f970:e6:e12c) (Read error: Connection reset by peer)
2023-10-07 00:18:43 +0200 <tomsmeding> mauke: satisfiability for propositional logic (boolean formulas without quantifiers) is NP-complete
2023-10-07 00:18:43 +0200stites(~stites@130.44.147.204)
2023-10-07 00:19:05 +0200hyiltiz(~hyiltiz@2620:149:13d1::96c) (Ping timeout: 240 seconds)
2023-10-07 00:19:22 +0200 <tomsmeding> "F is a tautology" = "~F is always false" = "~(~F is satisfiable)"
2023-10-07 00:19:35 +0200notzmv(~zmv@user/notzmv)
2023-10-07 00:19:49 +0200 <mauke> hence my lament
2023-10-07 00:20:13 +0200 <tomsmeding> a polynomial algorithm would indeed be nice :p
2023-10-07 00:21:09 +0200 <tomsmeding> would get you rich too
2023-10-07 00:21:49 +0200 <mauke> I remember doing tautology checking using a regex once, but I don't think my rules were complete
2023-10-07 00:22:29 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net) (Quit: Client closed)
2023-10-07 00:22:46 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-10-07 00:24:26 +0200 <mauke> (which doesn't help a bit, because https://perl.plover.com/NPC/NPC-3SAT.html )
2023-10-07 00:25:24 +0200aliosablack(~chomwitt@2a02:587:7a24:b000:1ac0:4dff:fedb:a3f1) (Ping timeout: 240 seconds)
2023-10-07 00:29:56 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-07 00:30:41 +0200Jackneill(~Jackneill@20014C4E1E1DF200D41286918DF96198.dsl.pool.telekom.hu) (Ping timeout: 258 seconds)
2023-10-07 00:31:35 +0200alphacentauri(alphacenta@gateway/vpn/protonvpn/alphacentauri) (Quit: WeeChat 4.0.5)
2023-10-07 00:32:19 +0200alphacentauri(alphacenta@gateway/vpn/protonvpn/alphacentauri)
2023-10-07 00:33:33 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 00:35:22 +0200lottaquestions_(~nick@2607:fa49:503d:b200:4e79:eb07:e229:f040)
2023-10-07 00:37:56 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
2023-10-07 00:41:17 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-10-07 00:41:33 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-10-07 00:44:35 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com) (Ping timeout: 240 seconds)
2023-10-07 00:50:30 +0200justachejustHaunting
2023-10-07 00:54:40 +0200alphacentauri(alphacenta@gateway/vpn/protonvpn/alphacentauri) (Quit: WeeChat 4.0.5)
2023-10-07 00:54:53 +0200Square(~Square@user/square)
2023-10-07 01:01:35 +0200tomith(tomith@user/tomith)
2023-10-07 01:02:07 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 264 seconds)
2023-10-07 01:12:11 +0200hyiltiz(~hyiltiz@2620:149:13d1::96c)
2023-10-07 01:17:53 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 255 seconds)
2023-10-07 01:22:45 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-10-07 01:22:46 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-10-07 01:22:46 +0200wroathe(~wroathe@user/wroathe)
2023-10-07 01:30:45 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 01:40:09 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2023-10-07 01:42:03 +0200alphacentauri(alphacenta@gateway/vpn/protonvpn/alphacentauri)
2023-10-07 01:43:12 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-10-07 02:02:54 +0200sympt(~sympt@user/sympt)
2023-10-07 02:04:14 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Ping timeout: 255 seconds)
2023-10-07 02:05:53 +0200puke(~puke@user/puke) (Quit: puke)
2023-10-07 02:09:16 +0200puke(~puke@user/puke)
2023-10-07 02:14:58 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
2023-10-07 02:26:18 +0200privacy(~privacy@user/privacy) (Quit: Leaving)
2023-10-07 02:30:43 +0200khumba(~khumba@user/khumba)
2023-10-07 02:50:20 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-10-07 02:50:35 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2023-10-07 02:51:40 +0200Lord_of_Life_Lord_of_Life
2023-10-07 02:57:30 +0200Pixi`(~Pixi@user/pixi) (Ping timeout: 258 seconds)
2023-10-07 03:05:00 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
2023-10-07 03:12:58 +0200billchenchina-(~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) (Remote host closed the connection)
2023-10-07 03:18:45 +0200Alleria(~JohnGalt@user/alleria)
2023-10-07 03:20:12 +0200hyiltiz(~hyiltiz@2620:149:13d1::96c) (Ping timeout: 272 seconds)
2023-10-07 03:21:28 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 03:24:15 +0200bilegeek(~bilegeek@2600:1008:b095:5aab:10d2:439f:4d89:6d45)
2023-10-07 03:25:58 +0200Pixi(~Pixi@user/pixi)
2023-10-07 03:26:16 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-10-07 03:27:29 +0200otto_s(~user@p4ff27e4d.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-10-07 03:29:04 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 272 seconds)
2023-10-07 03:29:19 +0200otto_s(~user@p5b0446f7.dip0.t-ipconnect.de)
2023-10-07 03:30:42 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-10-07 03:32:52 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-10-07 03:37:04 +0200Alleria(~JohnGalt@user/alleria) (Quit: Textual IRC Client: www.textualapp.com)
2023-10-07 03:37:50 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 255 seconds)
2023-10-07 03:38:17 +0200aforemny(~aforemny@i59F516E0.versanet.de) (Ping timeout: 255 seconds)
2023-10-07 03:38:23 +0200aforemny_(~aforemny@2001:9e8:6cda:ec00:a6d6:8356:354e:8d01)
2023-10-07 03:45:56 +0200Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 255 seconds)
2023-10-07 03:47:35 +0200Maxdamantus(~Maxdamant@user/maxdamantus)
2023-10-07 03:48:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2023-10-07 03:51:01 +0200hyiltiz(~hyiltiz@2620:149:13d1::96c)
2023-10-07 03:51:13 +0200_xor(~xor@ip-50-5-233-250.dynamic.fuse.net) (Quit: Ping timeout (120 seconds))
2023-10-07 03:52:06 +0200_xor(~xor@ip-50-5-233-250.dynamic.fuse.net)
2023-10-07 03:58:26 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:e0cf:d5dc:ecb2:78c3) (Remote host closed the connection)
2023-10-07 03:58:42 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-10-07 03:59:56 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in)
2023-10-07 04:00:14 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de)
2023-10-07 04:06:54 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-10-07 04:06:54 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-10-07 04:06:54 +0200wroathe(~wroathe@user/wroathe)
2023-10-07 04:13:21 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-10-07 04:13:21 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-10-07 04:13:21 +0200finn_elijaFinnElija
2023-10-07 04:13:35 +0200thegeekinside(~thegeekin@189.217.90.224) (Read error: Connection reset by peer)
2023-10-07 04:26:34 +0200Square(~Square@user/square) (Ping timeout: 255 seconds)
2023-10-07 04:28:52 +0200phma(~phma@host-67-44-208-149.hnremote.net) (Read error: Connection reset by peer)
2023-10-07 04:29:17 +0200phma(~phma@host-67-44-208-149.hnremote.net)
2023-10-07 04:35:33 +0200thegeekinside(~thegeekin@189.217.90.224)
2023-10-07 04:47:44 +0200abrantesasf(~abrantesa@179.217.48.72)
2023-10-07 04:49:39 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-10-07 04:50:25 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 255 seconds)
2023-10-07 04:52:11 +0200ddellacosta(~ddellacos@ool-44c738de.dyn.optonline.net)
2023-10-07 04:52:12 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2023-10-07 04:53:02 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-10-07 04:56:45 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-10-07 04:58:06 +0200td_(~td@i5387091A.versanet.de) (Ping timeout: 260 seconds)
2023-10-07 04:59:33 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 04:59:51 +0200td_(~td@i53870937.versanet.de)
2023-10-07 05:00:02 +0200haasn-(~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2023-10-07 05:02:05 +0200azimut_(~azimut@gateway/tor-sasl/azimut)
2023-10-07 05:02:39 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 252 seconds)
2023-10-07 05:04:14 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 255 seconds)
2023-10-07 05:14:25 +0200aforemny(~aforemny@2001:9e8:6ce5:2900:3ebe:1c43:4cc8:272d)
2023-10-07 05:16:06 +0200aforemny_(~aforemny@2001:9e8:6cda:ec00:a6d6:8356:354e:8d01) (Ping timeout: 272 seconds)
2023-10-07 05:16:50 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-10-07 05:20:12 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-07 05:24:35 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in)
2023-10-07 05:25:09 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de)
2023-10-07 05:37:06 +0200thegeekinside(~thegeekin@189.217.90.224) (Read error: Connection reset by peer)
2023-10-07 05:39:28 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 255 seconds)
2023-10-07 05:39:54 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 05:44:25 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 255 seconds)
2023-10-07 05:51:05 +0200hexology(~hexology@user/hexology) (Quit: hex on you ...)
2023-10-07 05:52:22 +0200hexology(~hexology@user/hexology)
2023-10-07 05:53:31 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2023-10-07 06:14:09 +0200hsw_(~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Quit: Leaving)
2023-10-07 06:14:23 +0200hsw(~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net)
2023-10-07 06:30:46 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 06:32:46 +0200abrantesasf(~abrantesa@179.217.48.72) (Remote host closed the connection)
2023-10-07 06:35:05 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 240 seconds)
2023-10-07 06:44:02 +0200paddymahoney(~paddymaho@cpe883d24bcf597-cmbc4dfb741f80.cpe.net.cable.rogers.com) (Remote host closed the connection)
2023-10-07 06:49:03 +0200blackfield(~aenima@85.255.4.218)
2023-10-07 06:49:05 +0200hyiltiz(~hyiltiz@2620:149:13d1::96c) (Ping timeout: 240 seconds)
2023-10-07 06:50:04 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-07 06:52:07 +0200sabino(~sabino@user/sabino) (Quit: Lambda _ -> x)
2023-10-07 06:57:45 +0200bliminse(~bliminse@user/bliminse) (Remote host closed the connection)
2023-10-07 07:02:55 +0200elbear(~lucian@109.101.137.234)
2023-10-07 07:07:24 +0200elbear(~lucian@109.101.137.234) (Ping timeout: 248 seconds)
2023-10-07 07:19:21 +0200bilegeek(~bilegeek@2600:1008:b095:5aab:10d2:439f:4d89:6d45) (Quit: Leaving)
2023-10-07 07:20:09 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 07:22:58 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 07:24:28 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 248 seconds)
2023-10-07 07:25:47 +0200lg188(~lg188@82.18.98.230)
2023-10-07 07:28:28 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-10-07 07:31:48 +0200bliminse(~bliminse@user/bliminse)
2023-10-07 07:45:06 +0200whodevil(~whodevil@user/whodevil) (Remote host closed the connection)
2023-10-07 07:46:21 +0200qqq(~qqq@92.43.167.61)
2023-10-07 07:48:20 +0200akegalj(~akegalj@78-3-38-175.adsl.net.t-com.hr)
2023-10-07 07:53:46 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 07:55:58 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
2023-10-07 07:56:01 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-10-07 07:56:33 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de)
2023-10-07 07:58:25 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 258 seconds)
2023-10-07 08:02:26 +0200 <remexre> with WAI / warp, is there a standard way for middlewares to pass data to the rest of the Application without needing to manually plumb it around?
2023-10-07 08:02:56 +0200 <remexre> I was expecting to find a TypeMap or something on Request
2023-10-07 08:03:06 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
2023-10-07 08:05:01 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2023-10-07 08:07:40 +0200qqq(~qqq@92.43.167.61) (Ping timeout: 248 seconds)
2023-10-07 08:08:02 +0200qqq(~qqq@92.43.167.61)
2023-10-07 08:19:55 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 08:24:05 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com) (Ping timeout: 240 seconds)
2023-10-07 08:26:34 +0200akegalj(~akegalj@78-3-38-175.adsl.net.t-com.hr) (Quit: leaving)
2023-10-07 08:29:20 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 08:31:33 +0200acidjnk(~acidjnk@p200300d6e7072f72f8dec80e9aca23dc.dip0.t-ipconnect.de)
2023-10-07 08:37:54 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2023-10-07 08:38:07 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2023-10-07 08:39:16 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com) (Ping timeout: 260 seconds)
2023-10-07 08:46:46 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-10-07 08:54:45 +0200aliosablack(~chomwitt@2a02:587:7a24:b000:1ac0:4dff:fedb:a3f1)
2023-10-07 08:55:08 +0200khumba(~khumba@user/khumba) ()
2023-10-07 09:05:16 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-10-07 09:06:10 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 09:09:05 +0200vglfr(~vglfr@88.155.180.78)
2023-10-07 09:10:36 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com) (Ping timeout: 240 seconds)
2023-10-07 09:11:17 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 255 seconds)
2023-10-07 09:12:38 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 09:16:44 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com) (Ping timeout: 245 seconds)
2023-10-07 09:21:35 +0200gmg(~user@user/gehmehgeh)
2023-10-07 09:21:53 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 252 seconds)
2023-10-07 09:22:15 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
2023-10-07 09:22:15 +0200chiselfuse(~chiselfus@user/chiselfuse) (Ping timeout: 252 seconds)
2023-10-07 09:22:59 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 252 seconds)
2023-10-07 09:24:25 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-10-07 09:24:29 +0200chiselfuse(~chiselfus@user/chiselfuse)
2023-10-07 09:24:55 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2023-10-07 09:26:26 +0200vglfr(~vglfr@88.155.180.78) (Read error: Connection reset by peer)
2023-10-07 09:26:46 +0200vglfr(vglfr@gateway/vpn/protonvpn/vglfr)
2023-10-07 09:32:41 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2023-10-07 09:42:16 +0200rgw(~R@2605:a601:a0df:5600:fd37:73ed:1518:5c4b) (Read error: Connection reset by peer)
2023-10-07 09:48:11 +0200fendor(~fendor@2a02:8388:1640:be00:aab:1226:f274:5021)
2023-10-07 09:49:44 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-10-07 09:51:56 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 09:52:49 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
2023-10-07 09:54:32 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 09:54:59 +0200Jackneill(~Jackneill@20014C4E1E1DF200085D5E2535870783.dsl.pool.telekom.hu)
2023-10-07 09:56:03 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-10-07 09:56:15 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 240 seconds)
2023-10-07 09:57:35 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net)
2023-10-07 10:01:36 +0200danza(~francesco@151.47.20.60)
2023-10-07 10:10:20 +0200vglfr(vglfr@gateway/vpn/protonvpn/vglfr) (Ping timeout: 248 seconds)
2023-10-07 10:10:43 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2023-10-07 10:11:11 +0200vglfr(~vglfr@88.155.180.78)
2023-10-07 10:15:01 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 10:15:29 +0200 <danza> hello to all saturday's workaholics...
2023-10-07 10:22:00 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 272 seconds)
2023-10-07 10:24:32 +0200 <haskellbridge> <s​m> or chatoholics..
2023-10-07 10:28:00 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2023-10-07 10:32:37 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-10-07 10:33:30 +0200 <int-e> sm h
2023-10-07 10:33:54 +0200 <mauke> I'm a chataholic, but like with alcohol
2023-10-07 10:37:12 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-10-07 10:37:25 +0200azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 252 seconds)
2023-10-07 10:37:32 +0200Sgeo(~Sgeo@user/sgeo)
2023-10-07 10:40:44 +0200 <int-e> too close to "catholic", can't unsee
2023-10-07 10:46:35 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 10:47:17 +0200 <haskellbridge> <s​m> hi I'm sm and I might have a little chat problem
2023-10-07 10:47:38 +0200 <haskellbridge> <s​m> it's anonymous in here right ?
2023-10-07 10:47:47 +0200 <int-e> Yes, Simon.
2023-10-07 10:48:38 +0200 <haskellbridge> <s​m> 😅
2023-10-07 10:49:05 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Ping timeout: 240 seconds)
2023-10-07 10:50:36 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 10:51:19 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 264 seconds)
2023-10-07 10:51:47 +0200 <danza> is sm Simon Marlow? wow
2023-10-07 10:52:43 +0200 <[exa]> sshhh, play along the anonymous game!
2023-10-07 10:53:02 +0200 <danza> ^^;
2023-10-07 10:53:17 +0200danzais glad not to be famous, for once
2023-10-07 10:53:19 +0200tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz)
2023-10-07 10:53:43 +0200Pickchea(~private@user/pickchea)
2023-10-07 10:53:48 +0200 <haskellbridge> <s​m> no, danza
2023-10-07 10:53:58 +0200 <mauke> no, Michael
2023-10-07 10:54:27 +0200 <nullie> that was so not right
2023-10-07 10:55:31 +0200danzasearchs the web for an haskeller called Simon Michael
2023-10-07 10:58:42 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-10-07 10:58:44 +0200 <danza> now i would be happy to chat about what i found... but something is not right so i will cut it here
2023-10-07 10:59:30 +0200 <danza> i don't know, anyways, communication is so tied to my work these days, i would put chataholism under the workaholism umbrella
2023-10-07 11:00:31 +0200 <[exa]> danza: pls elaborate on #-offtopic :]
2023-10-07 11:01:37 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 260 seconds)
2023-10-07 11:04:21 +0200 <danza> i think the conversation pretty much finished there. If people reply means they are not annoyed, also because this channel is a bit too boring most of the times. And you just started talking about other stuff on #-offtopic, it would be rude to overlap with that
2023-10-07 11:06:10 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 11:12:04 +0200aliosablack(~chomwitt@2a02:587:7a24:b000:1ac0:4dff:fedb:a3f1) (Ping timeout: 252 seconds)
2023-10-07 11:12:43 +0200 <[exa]> danza: don't ask to overlap, just overlap
2023-10-07 11:13:58 +0200 <haskellbridge> <s​m> it's fine danza (and mauke) though of course in general it's safer to let folks share their own name
2023-10-07 11:14:12 +0200 <haskellbridge> <s​m> if that's what you're talking about
2023-10-07 11:14:13 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2023-10-07 11:14:41 +0200 <haskellbridge> <s​m> hello ! 👋🏻 😎
2023-10-07 11:17:39 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-10-07 11:17:54 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-10-07 11:18:02 +0200phma(~phma@host-67-44-208-149.hnremote.net) (Read error: Connection reset by peer)
2023-10-07 11:18:32 +0200remexre_(~remexre@user/remexre)
2023-10-07 11:18:58 +0200phma(~phma@2001:5b0:2143:cec8:c3c:3fa4:1ab9:dd90)
2023-10-07 11:19:01 +0200remexre(~remexre@user/remexre) (Ping timeout: 260 seconds)
2023-10-07 11:19:31 +0200 <danza> i am not sure what we are talking about, it was nullie warning about things not being right. Anyway moving to #-offtopic
2023-10-07 11:19:46 +0200remexre_remexre
2023-10-07 11:23:09 +0200 <haskellbridge> <s​m> so... what're we all doing/thinking in Haskell today
2023-10-07 11:24:15 +0200 <nullie> Sorry, that was an F1 joke
2023-10-07 11:24:43 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 11:25:29 +0200mmhat(~mmh@p200300f1c74e6ffcee086bfffe095315.dip0.t-ipconnect.de)
2023-10-07 11:25:39 +0200mmhat(~mmh@p200300f1c74e6ffcee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2023-10-07 11:27:10 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 11:28:35 +0200 <danza> should we move to offtopic or not? I am confused. Anyways i think the job market is depressing in haskell today ... that prevents much of the doing :P
2023-10-07 11:28:39 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2023-10-07 11:29:51 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-10-07 11:30:13 +0200 <haskellbridge> <s​m> I got a job from having haskell on my resume once
2023-10-07 11:30:23 +0200 <tomsmeding> was it a Haskell job?
2023-10-07 11:30:34 +0200 <haskellbridge> <s​m> nope
2023-10-07 11:30:35 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Ping timeout: 240 seconds)
2023-10-07 11:30:43 +0200 <danza> XD
2023-10-07 11:30:57 +0200 <haskellbridge> <s​m> though Indid get to give a (underprepared, very bad) lunchtime talk on it
2023-10-07 11:31:20 +0200 <tomsmeding> lunchtime talks are best if they are underprepared
2023-10-07 11:31:38 +0200 <haskellbridge> <s​m> (it was a great job nevertheless, though
2023-10-07 11:31:39 +0200 <haskellbridge> <s​m> short lived)
2023-10-07 11:33:05 +0200elbear(~lucian@86.120.11.223)
2023-10-07 11:35:41 +0200 <haskellbridge> <s​m> if you want to be employed doing haskell, I think there's employers that want you, but you have to seek them out
2023-10-07 11:36:58 +0200 <danza> the disproportion with other technologies is such to give "wearing the hard shirt" a new meaning
2023-10-07 11:37:32 +0200 <haskellbridge> <s​m> sure it's not everywhere like mainstream techs, so what
2023-10-07 11:37:46 +0200elbear(~lucian@86.120.11.223) (Ping timeout: 260 seconds)
2023-10-07 11:42:06 +0200 <danza> i guess the biggest problem i have with this situation is it mines my confidence about the value i see in the language. Possibly the second problem, i worry about its longevity
2023-10-07 11:42:21 +0200 <tomsmeding> haskell has been around for 30+ years
2023-10-07 11:43:39 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-10-07 11:45:09 +0200danza(~francesco@151.47.20.60) (Read error: Connection reset by peer)
2023-10-07 11:45:17 +0200danza(~francesco@151.47.12.170)
2023-10-07 11:45:36 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 272 seconds)
2023-10-07 11:47:16 +0200 <danza> i know, i might worry too much about changes. Considering technological evolution in the past 20 years, i became a bit pessimistic about what stays and what goes, and my first point does not help for more optimism
2023-10-07 11:47:21 +0200vglfr(~vglfr@88.155.180.78) (Read error: Connection reset by peer)
2023-10-07 11:47:40 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 11:47:41 +0200vglfr(~vglfr@149.102.244.101)
2023-10-07 11:47:52 +0200 <tomsmeding> is it bad if technology evolves, replacing old stuff with newer, better stuff?
2023-10-07 11:47:53 +0200 <haskellbridge> <s​m> it'll continue in another form even if called something else. It's also a super power to have in your toolbox
2023-10-07 11:48:02 +0200 <tomsmeding> also that
2023-10-07 11:48:10 +0200 <tomsmeding> but there's various rates of change here
2023-10-07 11:48:26 +0200 <tomsmeding> famously, JS frameworks change every year to every month, if you're unlucky
2023-10-07 11:48:32 +0200 <tomsmeding> programming languages take decades
2023-10-07 11:48:41 +0200 <haskellbridge> <s​m> but sure, prioritize what you learn if needed to get employment in the short term
2023-10-07 11:50:06 +0200 <tomsmeding> programming in the way we know it today hasn't been a thing for more than 75 years
2023-10-07 11:50:31 +0200 <tomsmeding> and at 75 years ago we're talking about moving from pushing buttons to storing a program in _memory_
2023-10-07 11:50:40 +0200 <tomsmeding> compilers were not yet in sight
2023-10-07 11:50:54 +0200 <tomsmeding> allow some time to settle :p
2023-10-07 11:51:08 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 11:51:44 +0200 <int-e> going down memory l[ai]ne: https://en.wikipedia.org/wiki/Delay_line_memory
2023-10-07 11:53:36 +0200 <danza> in my opinion as haskellers we work on concepts that are on the scale of thousands of years, basically the age of math, so 75 years do not mean much to me
2023-10-07 11:53:50 +0200 <tomsmeding> then what's the problem :p
2023-10-07 11:55:15 +0200 <danza> but even in my very limited life span i have seen projects dying as corporations found better ways to control their technologies, and contingency sometimes matters
2023-10-07 11:58:01 +0200michalz(~michalz@185.246.204.107)
2023-10-07 11:58:06 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 12:02:34 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
2023-10-07 12:11:36 +0200vglfr(~vglfr@149.102.244.101) (Remote host closed the connection)
2023-10-07 12:12:19 +0200 <cpressey> I can't imagine myself getting a Haskell job because I'm sure they'd want me to use all the features of Haskell that I have no love for
2023-10-07 12:12:21 +0200vglfr(~vglfr@88.155.180.78)
2023-10-07 12:12:49 +0200 <Rembane> cpressey: And no other.
2023-10-07 12:13:05 +0200vglfr(~vglfr@88.155.180.78) (Read error: Connection reset by peer)
2023-10-07 12:13:20 +0200vglfr(~vglfr@149.102.244.101)
2023-10-07 12:14:51 +0200vglfr(~vglfr@149.102.244.101) (Remote host closed the connection)
2023-10-07 12:15:04 +0200vglfr(~vglfr@149.102.244.101)
2023-10-07 12:18:34 +0200 <danza> see, with other languages, people choose the job on the features they do like
2023-10-07 12:20:32 +0200oo_miguel(~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Quit: oo_miguel)
2023-10-07 12:21:04 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 272 seconds)
2023-10-07 12:22:40 +0200michalz(~michalz@185.246.204.107) (Ping timeout: 255 seconds)
2023-10-07 12:24:23 +0200oo_miguel(~Thunderbi@78-11-179-96.static.ip.netia.com.pl)
2023-10-07 12:33:42 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 12:52:42 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 12:54:33 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-07 12:57:48 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 272 seconds)
2023-10-07 12:58:56 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-10-07 13:10:13 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 13:15:04 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Ping timeout: 245 seconds)
2023-10-07 13:15:06 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 260 seconds)
2023-10-07 13:21:58 +0200aliosablack(~chomwitt@2a02:587:7a24:b000:1ac0:4dff:fedb:a3f1)
2023-10-07 13:23:28 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-10-07 13:23:53 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 13:25:20 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Client Quit)
2023-10-07 13:26:18 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 272 seconds)
2023-10-07 13:26:50 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 13:28:15 +0200billchenchina(~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a)
2023-10-07 13:31:31 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 255 seconds)
2023-10-07 13:32:23 +0200privacy(~privacy@user/privacy)
2023-10-07 13:35:45 +0200xff0x(~xff0x@2405:6580:b080:900:4efc:9689:a16f:b515) (Ping timeout: 258 seconds)
2023-10-07 13:37:48 +0200xff0x(~xff0x@178.255.149.135)
2023-10-07 13:38:58 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 13:43:01 +0200puke(~puke@user/puke) (Remote host closed the connection)
2023-10-07 13:43:46 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 260 seconds)
2023-10-07 13:48:21 +0200danza(~francesco@151.47.12.170) (Read error: Connection reset by peer)
2023-10-07 13:49:53 +0200puke(~puke@user/puke)
2023-10-07 13:51:57 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 260 seconds)
2023-10-07 13:59:08 +0200vglfr(~vglfr@149.102.244.101) (Ping timeout: 258 seconds)
2023-10-07 14:03:41 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 14:14:19 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-10-07 14:14:37 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-10-07 14:16:00 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 258 seconds)
2023-10-07 14:24:37 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 14:26:02 +0200acidjnk(~acidjnk@p200300d6e7072f72f8dec80e9aca23dc.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2023-10-07 14:28:22 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2023-10-07 14:28:49 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 245 seconds)
2023-10-07 14:28:58 +0200ec(~ec@gateway/tor-sasl/ec)
2023-10-07 14:30:11 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 14:31:57 +0200xff0x(~xff0x@178.255.149.135) (Ping timeout: 255 seconds)
2023-10-07 14:33:39 +0200xff0x(~xff0x@2405:6580:b080:900:54b9:b3f0:7086:8bcc)
2023-10-07 14:34:19 +0200vglfr(~vglfr@88.155.180.78)
2023-10-07 14:35:42 +0200acidjnk(~acidjnk@p200300d6e7072f72f8dec80e9aca23dc.dip0.t-ipconnect.de)
2023-10-07 14:35:53 +0200Square(~Square@user/square)
2023-10-07 14:36:54 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 14:41:03 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 240 seconds)
2023-10-07 14:44:48 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-07 14:48:00 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 272 seconds)
2023-10-07 14:48:20 +0200Nixkernal(~Nixkernal@119.4.193.178.dynamic.wline.res.cust.swisscom.ch)
2023-10-07 14:54:58 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 14:57:47 +0200sm_(~sm@plaintextaccounting/sm)
2023-10-07 14:59:00 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 240 seconds)
2023-10-07 15:02:48 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 15:15:52 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 272 seconds)
2023-10-07 15:23:17 +0200sm_(~sm@plaintextaccounting/sm) (Quit: sm_)
2023-10-07 15:23:18 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2023-10-07 15:24:12 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 240 seconds)
2023-10-07 15:26:31 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 15:31:09 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-10-07 15:31:09 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-10-07 15:31:09 +0200wroathe(~wroathe@user/wroathe)
2023-10-07 15:31:49 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-10-07 15:32:29 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-10-07 15:41:05 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 240 seconds)
2023-10-07 15:47:18 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2023-10-07 15:48:24 +0200euleritian(~euleritia@77.22.252.56)
2023-10-07 15:51:13 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 15:53:48 +0200dolio(~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
2023-10-07 15:55:13 +0200dolio(~dolio@130.44.134.54)
2023-10-07 15:55:19 +0200dolio(~dolio@130.44.134.54) (Remote host closed the connection)
2023-10-07 15:57:23 +0200harveypwca(~harveypwc@2601:246:c180:a570:41a8:a837:a4a7:bda1)
2023-10-07 15:59:37 +0200bliminse(~bliminse@user/bliminse) (Quit: leaving)
2023-10-07 16:04:53 +0200dolio(~dolio@130.44.134.54)
2023-10-07 16:08:11 +0200jespada(~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
2023-10-07 16:08:26 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 272 seconds)
2023-10-07 16:10:31 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-10-07 16:10:35 +0200killerstorm(~killersto@224.225.60.94.rev.vodafone.pt)
2023-10-07 16:12:56 +0200euleritian(~euleritia@77.22.252.56) (Ping timeout: 255 seconds)
2023-10-07 16:13:57 +0200johnw(~johnw@69.62.242.138) (Read error: Connection reset by peer)
2023-10-07 16:14:16 +0200johnw(~johnw@69.62.242.138)
2023-10-07 16:17:05 +0200sm(~sm@plaintextaccounting/sm) (Quit: sm)
2023-10-07 16:17:59 +0200qqq(~qqq@92.43.167.61) (Read error: Connection reset by peer)
2023-10-07 16:19:17 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 16:33:35 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 16:34:06 +0200elevenkb(elevenkb@thunix.net) (ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1))
2023-10-07 16:34:24 +0200privacy(~privacy@user/privacy) (Quit: Leaving)
2023-10-07 16:37:41 +0200stites(~stites@130.44.147.204) (Ping timeout: 255 seconds)
2023-10-07 16:38:54 +0200stites(~stites@2607:fb91:dc9:51d1:1285:280d:59e4:7da2)
2023-10-07 16:43:12 +0200wroathe(~wroathe@50.205.197.50)
2023-10-07 16:43:12 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-10-07 16:43:12 +0200wroathe(~wroathe@user/wroathe)
2023-10-07 16:45:35 +0200bliminse(~bliminse@user/bliminse)
2023-10-07 16:46:44 +0200qqq(~qqq@92.43.167.61)
2023-10-07 16:48:04 +0200ph88(~ph88@ip5b406c07.dynamic.kabel-deutschland.de)
2023-10-07 16:52:15 +0200 <ph88> Hi all, i want to construct a type like Foo a b | Bar a b. At the place where i get my `a` i know whether i need a Foo or a Bar (`a` itself does not carry this information). Only much later (higher up in the calltree) i get my b. Would it be better to pass around partial functions as data. Or make a new data type just for signaling if it should be a Foo or Bar later?
2023-10-07 16:58:55 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Ping timeout: 258 seconds)
2023-10-07 17:00:14 +0200 <geekosaur> % data Foo a b = Foo a b | Bar a b deriving (Show,Read)
2023-10-07 17:00:14 +0200 <yahb2> <no output>
2023-10-07 17:00:23 +0200 <geekosaur> % :t Foo 5
2023-10-07 17:00:23 +0200 <yahb2> Foo 5 :: Num a => b -> Foo a b
2023-10-07 17:04:49 +0200 <ph88> geekosaur, yes that's one alternative. The other would be that i do like data FooBar = MkFoo a | MkFoo b. case x of; MkFoo a -> Foo a b; MkBar a -> Bar a b
2023-10-07 17:05:34 +0200 <ph88> data FooBar a = MkFoo a | MkFoo a **
2023-10-07 17:05:41 +0200 <ph88> data FooBar a = MkFoo a | MkBar a **
2023-10-07 17:06:32 +0200 <geekosaur> you alos have: data FooBar = Foo | Bar; data Foo a b = F FooBar a b
2023-10-07 17:06:38 +0200 <ph88> maybe it's just me and i considered outputting partial functions more as a trick to be used very locally. not to carry it up the callstack 10 function levels high
2023-10-07 17:07:21 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk)
2023-10-07 17:07:22 +0200 <int-e> Other ideas... if `b` is a type argument you could use (); if it's not you might still use a bottom.
2023-10-07 17:07:58 +0200 <ph88> aah as functor .. interesting that might work too
2023-10-07 17:08:08 +0200todi1(~todi@p4fd1ae09.dip0.t-ipconnect.de)
2023-10-07 17:08:22 +0200 <int-e> (Both of these handle similarly to making an explicit "partially applied" type)
2023-10-07 17:09:00 +0200 <int-e> Nothing wrong with partial functions. You can wrap them inside a newtype if the function types in the signature confuse you :)
2023-10-07 17:09:19 +0200todi(~todi@p5dca54c6.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-10-07 17:10:12 +0200 <ph88> thanks for the perspectives geekosaur int-e :)
2023-10-07 17:12:15 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 17:12:31 +0200sm(~sm@plaintextaccounting/sm) (Client Quit)
2023-10-07 17:17:24 +0200sm(~sm@plaintextaccounting/sm)
2023-10-07 17:17:47 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-10-07 17:23:17 +0200sm_(~sm@plaintextaccounting/sm)
2023-10-07 17:24:10 +0200sm(~sm@plaintextaccounting/sm) (Ping timeout: 255 seconds)
2023-10-07 17:24:14 +0200khumba(~khumba@user/khumba)
2023-10-07 17:27:31 +0200Simikando(~Simikando@adsl-dyn-244.95-102-83.t-com.sk) (Quit: Leaving)
2023-10-07 17:27:33 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-07 17:27:55 +0200elbear(~lucian@86.120.11.223)
2023-10-07 17:29:06 +0200elbear(~lucian@86.120.11.223) (Client Quit)
2023-10-07 17:31:51 +0200billchenchina(~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) (Read error: Connection reset by peer)
2023-10-07 17:32:35 +0200billchenchina(~billchenc@103.152.35.21)
2023-10-07 17:34:41 +0200 <EvanR> is the most straightforwardest way to write a program in haskell that appears as a win32 desktop GUI app
2023-10-07 17:35:17 +0200 <EvanR> to write the program against the C API using FFI and have a WinMain wrapper file that calls haskell main
2023-10-07 17:35:29 +0200notzmv(~zmv@user/notzmv)
2023-10-07 17:35:50 +0200 <geekosaur> probably. or backend/frontend like a web app, with the frontend in whatever language is convenient
2023-10-07 17:40:31 +0200 <EvanR> there was a wrong sounding rust rant posted recently about how we're stuck with C at the lowest level and we can't truly be liberated until we can interface with the OS in rust or whatever language without C
2023-10-07 17:41:05 +0200 <EvanR> it sounded wrong in linux because you can just call into linux using the known mechanisms and C is not required
2023-10-07 17:41:14 +0200 <geekosaur> it's half right, because at the moment FFIs are based on C
2023-10-07 17:41:14 +0200 <EvanR> but windows...
2023-10-07 17:42:26 +0200 <geekosaur> and in particular linux is problematic and arbitrarily changes unless you stick to the C-based entrypoints exported by glibc (yes, musl exists, but it has hardcoded mappings for known kernel versions and breaks if you use it with an unknown kernel version)
2023-10-07 17:42:39 +0200 <geekosaur> windows is actually more stable in that sense
2023-10-07 17:44:24 +0200 <ddellacosta> how hard is it to compile gtk apps to Windows? I've heard that API wrapper was straightforward to use in Haskell, but haven't done it myself
2023-10-07 17:45:08 +0200 <ddellacosta> I guess that's not really what you're going for though, sounds more like proof of concept
2023-10-07 17:46:48 +0200 <EvanR> I'm guessing a GTK app for linux written in haskell is a solved problem
2023-10-07 17:46:51 +0200 <[exa]> EvanR: luckily for the rust people, microsoft kinda decided to replace the stuff with .NET which solves the problem :D
2023-10-07 17:47:01 +0200 <EvanR> lol
2023-10-07 17:47:18 +0200 <EvanR> isn't that all still built on top of the C api
2023-10-07 17:48:02 +0200 <[exa]> anyway yeah I'd bet that a linux GTK+haskell app will (with some random effort inherent to win32) also compile to win32
2023-10-07 17:49:22 +0200 <[exa]> there's plenty of gtk apps that work on windows and the people care about maintaining it, so I'd assume the task would not be a total one-nerd show
2023-10-07 17:49:43 +0200 <EvanR> hahaha
2023-10-07 17:50:02 +0200 <[exa]> but yeah as always, it's windows and YMWV
2023-10-07 17:51:40 +0200 <EvanR> I was thinking that a long winded article on programming in haskell would need to have a realistic program to go with it. And the most realistic thing I can think of is a graphical windows app that uses windows. Which I know isn't that popular to try in haskell. But should be possible and a good place to demonstrate methods to build in abstractions to allow porting to other desktop tech
2023-10-07 17:52:32 +0200 <[exa]> tbh I'd love to start one such thing too, wanted a RDF editor for people
2023-10-07 17:52:58 +0200 <[exa]> and anything that avoids javascript and electron in the process is A GODSEND
2023-10-07 17:53:03 +0200 <EvanR> right
2023-10-07 17:53:17 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-10-07 17:53:48 +0200 <ddellacosta> what about with something like https://haskell-miso.org/ or https://reflex-frp.org/, or even https://hackage.haskell.org/package/brick
2023-10-07 17:53:52 +0200 <[exa]> anyway pandoc ain't good enough? :D
2023-10-07 17:54:35 +0200 <EvanR> pandoc is a rather large program for demonstration purposes
2023-10-07 17:54:36 +0200 <[exa]> ddellacosta: I didn't see a very scaled-out FRP app so far (unfortunately!)
2023-10-07 17:54:53 +0200raym(~ray@user/raym) (Quit: update to FreeBSD 14.0-BETA5)
2023-10-07 17:55:08 +0200 <ddellacosta> oh yeah, that's reasonable, but if it's just about sharing something useful in Haskell for the purposes of an article. But I dunno, just spitballing here
2023-10-07 17:55:23 +0200 <[exa]> anyway yeah brick apps are lovely
2023-10-07 17:55:46 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-10-07 17:56:12 +0200 <[exa]> EvanR: btw you already stumbled upon the gi-gtk-examples, right?
2023-10-07 17:56:31 +0200 <EvanR> miso reflex brick wxwidgets fltk or other thing would detract from an argument that haskell can stand on its own as a general purpose language that could replace C++ for some purpose on windows, an argument which could be doomed to fail but hey
2023-10-07 17:56:52 +0200 <EvanR> yeah I've seen gtk stuff in haskell so that's good for linux
2023-10-07 17:56:59 +0200 <EvanR> and pretty bad for OSX
2023-10-07 17:57:25 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-10-07 17:59:45 +0200 <EvanR> gtk might be the sanest route for a real project that must be in haskell for some reason, but then it establishes haskell as a linux language xD
2023-10-07 18:00:16 +0200 <EvanR> apologies to BSD people who probably have haskell working fine
2023-10-07 18:01:11 +0200 <ddellacosta> okay yeah, I better see the angle you're coming at it from now. I think the reality is that it's going to be a hard sell--I think it's hard to argue that C++ doesn't have more of a foothold in Windows, however you slice it. But that's not an argument against Haskell as a general purpose programming language, IMHO
2023-10-07 18:01:28 +0200 <ddellacosta> I may be biased lol
2023-10-07 18:01:48 +0200 <EvanR> general purposes minus specific things
2023-10-07 18:01:54 +0200 <EvanR> subtractive purposes
2023-10-07 18:02:27 +0200 <geekosaur> brick doesn't work under windows (yet)
2023-10-07 18:02:34 +0200 <ddellacosta> oh, whoops
2023-10-07 18:03:17 +0200 <EvanR> I think the only barrier here is visual studio doesn't have a haskell option which does this winmain thing for you
2023-10-07 18:03:18 +0200 <ddellacosta> for some reason I assumed it was a given with WSL or whatever it is
2023-10-07 18:03:46 +0200 <geekosaur> wsl works but isn't native, the end user has to fire up a wsl session and run the program inside it
2023-10-07 18:03:56 +0200 <ddellacosta> ah, I see.
2023-10-07 18:04:31 +0200 <geekosaur> it's literally ubuntu running inside hyper-v, with no integration
2023-10-07 18:05:02 +0200 <geekosaur> wsl1 had integration but not enough compatibility
2023-10-07 18:05:23 +0200 <geekosaur> (and in particular haskell programs didn't work with it iirc)
2023-10-07 18:16:48 +0200__monty__(~toonn@user/toonn)
2023-10-07 18:17:41 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-10-07 18:17:57 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 18:18:55 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2023-10-07 18:20:24 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2023-10-07 18:20:48 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
2023-10-07 18:20:52 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2023-10-07 18:30:55 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-07 18:39:22 +0200tzh(~tzh@c-71-193-181-0.hsd1.or.comcast.net)
2023-10-07 18:48:27 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: BRB)
2023-10-07 18:48:33 +0200lg188(~lg188@82.18.98.230) (Quit: Ping timeout (120 seconds))
2023-10-07 18:48:51 +0200lg188(~lg188@82.18.98.230)
2023-10-07 18:52:22 +0200 <ph88> is there any typeclass that allows me to take one element of a data structure ? like one element of a list or vector? Usually i use Foldable but i realized it doesn't give me the ability to short iterating on the sequence. What can be done?
2023-10-07 18:52:49 +0200 <ph88> "Abortable iterator" typeclass kind of thing
2023-10-07 18:53:25 +0200 <geekosaur> https://hackage.haskell.org/package/witherable ?
2023-10-07 18:54:13 +0200 <monochrom> Foldable methods can be combined to do that.
2023-10-07 18:54:21 +0200killerstorm(~killersto@224.225.60.94.rev.vodafone.pt) (Quit: Client closed)
2023-10-07 18:54:40 +0200 <monochrom> The lowest-tech way is toList then take 1. There is probably a fancier way.
2023-10-07 18:55:08 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2023-10-07 18:55:13 +0200 <geekosaur> lens offers `ix`
2023-10-07 18:55:50 +0200 <monochrom> Most instances' toList are lazy enough that take 1 . toList spends minimal time.
2023-10-07 18:56:55 +0200 <ph88> monochrom, if possible without losing the original type. So i need a polymorphic version of toList and fromList in that case
2023-10-07 18:57:20 +0200 <monochrom> In Haskell, at least in the pure FP fragment, you don't code up imperative control flow for early exit, you use laziness and let take does the truncation.
2023-10-07 18:57:29 +0200 <geekosaur> if you're taking only one element, you're losing the container anyway
2023-10-07 18:57:37 +0200 <geekosaur> otherwise you probably do want witherable
2023-10-07 18:58:24 +0200 <monochrom> Injecting an element to a singleton data structure is covered by Applicative's pure. >:)
2023-10-07 18:58:46 +0200sm_(~sm@plaintextaccounting/sm) (Quit: sm_)
2023-10-07 19:01:14 +0200 <ph88> monochrom, i saw it being encoded as recursive function which decides to no longer call itself as "early exit"
2023-10-07 19:01:52 +0200 <monochrom> That's what take does.
2023-10-07 19:02:08 +0200 <monochrom> But the producer of the list, it just keeps producing and not care.
2023-10-07 19:02:17 +0200 <monochrom> Namely, toList is the list producer.
2023-10-07 19:04:00 +0200harveypwca(~harveypwc@2601:246:c180:a570:41a8:a837:a4a7:bda1) (Quit: Leaving)
2023-10-07 19:04:55 +0200puke(~puke@user/puke) (Quit: puke)
2023-10-07 19:04:57 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-10-07 19:05:05 +0200 <ph88> i'm confused. What i am trying to do is implement a function mapAll :: (a -> Maybe b) -> f a -> Maybe (f b). That returns Nothing when one time the predicate returns Nothing, otherwise collects the collection into Just. My question is not how to implement it for let's say a list. But whether it's possible to make it polymorphic (for at least List and Vector lets say) and short out early (stop iterating as soon as the condition is
2023-10-07 19:05:06 +0200 <ph88> met). How could it be done ?
2023-10-07 19:06:05 +0200 <monochrom> No, I am confused. How does "take one element of a data structure" become "mapAll :: (a -> Maybe b) -> f a -> Maybe (f b)"?
2023-10-07 19:06:28 +0200 <ph88> monochrom, because from `f a` i want to take one `a` at a time. Perhaps my wording was less than ideal here
2023-10-07 19:07:04 +0200 <monochrom> Take all elements but use them one at a time? toList.
2023-10-07 19:07:49 +0200 <ph88> monochrom, i need a polymorphic version of toList and fromList right ?
2023-10-07 19:08:26 +0200 <ph88> if i want my result type to be `Maybe (f b)`. f ~ f from input to output
2023-10-07 19:08:38 +0200 <monochrom> OK you still need to produce the same kind of data structure. I might try Traversable.
2023-10-07 19:08:53 +0200puke(~puke@user/puke)
2023-10-07 19:09:16 +0200 <ph88> ok thanks, i will look at what Traversable Maybe does
2023-10-07 19:09:31 +0200 <monochrom> No, Traversable is for the f.
2023-10-07 19:09:58 +0200 <ph88> ok but how do i know if it has the behavior i want ?
2023-10-07 19:10:21 +0200 <tomsmeding> :t traverse
2023-10-07 19:10:22 +0200 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
2023-10-07 19:10:41 +0200 <monochrom> And the Maybe there becomes the Applicative instance.
2023-10-07 19:10:56 +0200 <tomsmeding> if that seems confusing: 'traverse = sequence . map' is helpful intuition sometimes
2023-10-07 19:11:51 +0200 <monochrom> You can try to infer from the laws, or you can test examples then use free theorems to infer the general case.
2023-10-07 19:12:03 +0200 <tomsmeding> ('traverse = sequenceA . fmap' is actually a law, and sequence = sequenceA)
2023-10-07 19:13:08 +0200 <monochrom> Here is one test:
2023-10-07 19:13:36 +0200 <monochrom> > traverse (\x -> if x==0 then Just 0 else Nothing) (0 : repeat 1)
2023-10-07 19:13:37 +0200 <lambdabot> Nothing
2023-10-07 19:14:16 +0200 <monochrom> It termintes in finite time, despite the infinite list. Some kind of free theorems will generalize it to other data structures.
2023-10-07 19:14:17 +0200 <ph88> more or less, is Foldable for running the full loop and Traversable for possibly shorting earlier ?
2023-10-07 19:14:33 +0200 <tomsmeding> Traversable is for doing Foldable inside an Applicative
2023-10-07 19:14:48 +0200 <tomsmeding> er, no
2023-10-07 19:14:52 +0200 <monochrom> Oh in this case it's Maybe's <*> that exits early.
2023-10-07 19:15:02 +0200 <tomsmeding> Traversable is for doing fmap inside an Applicative, i.e. an "effectful" fmap
2023-10-07 19:15:07 +0200 <tomsmeding> :t fmap
2023-10-07 19:15:08 +0200 <lambdabot> Functor f => (a -> b) -> f a -> f b
2023-10-07 19:15:10 +0200 <tomsmeding> :t traverse
2023-10-07 19:15:11 +0200 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
2023-10-07 19:15:13 +0200 <monochrom> And here is a test for "everyone is Just":
2023-10-07 19:15:23 +0200 <tomsmeding> fmap's 'f' = traverse's 't'
2023-10-07 19:15:32 +0200 <monochrom> > traverse (\x -> Just x) [0, 1, 2, 3]
2023-10-07 19:15:34 +0200 <lambdabot> Just [0,1,2,3]
2023-10-07 19:16:52 +0200 <tomsmeding> Functor is for independent, elementwise operations; Foldable is for summarisation; Traversable is for "imperative loops" (i.e. loops with Applicative, or Monadic, effects)
2023-10-07 19:17:16 +0200 <monochrom> traverse just uses <*> and recursion. But Maybe's <*> has a short-circuiting clause that sidesteps traverse's recursion under the condition you required.
2023-10-07 19:18:19 +0200 <ph88> if Traversable + Applicative (Maybe instance) encodes "shorting out the loop early". What other Applicative behaviors are there to choose from? I know that Either also shorts out early. Isn't it so that in the combination of Traversable + Applicative you can divide all Applicatives in 2 groups: the ones that possibly short early + the ones that don't ?
2023-10-07 19:18:39 +0200 <monochrom> [] is also an Applicative. IO is also an Applicative.
2023-10-07 19:18:41 +0200 <tomsmeding> does IO short early?
2023-10-07 19:18:49 +0200 <tomsmeding> it can if you throwIO :p
2023-10-07 19:19:01 +0200 <ph88> tomsmeding, then it does i suppose ?
2023-10-07 19:19:11 +0200 <tomsmeding> does the continuation monad short early
2023-10-07 19:19:12 +0200 <tomsmeding> ?
2023-10-07 19:19:13 +0200 <monochrom> Reader, State, Parser, ...
2023-10-07 19:19:15 +0200 <tomsmeding> ¯\_(ツ)_/¯
2023-10-07 19:19:39 +0200 <monochrom> Oh I even know how to make Cont do global jumps >:)
2023-10-07 19:19:42 +0200 <tomsmeding> this goes right down to "what is a Monad"
2023-10-07 19:19:57 +0200 <tomsmeding> even if we aren't even talking about the full power of Monad here
2023-10-07 19:20:01 +0200 <monochrom> Um it's worse. "what is an Applicative"!
2023-10-07 19:20:29 +0200 <ph88> hmm i see what you're saying
2023-10-07 19:20:37 +0200 <monochrom> The space is large than Monad's space, there are going to be even more weird things out there!
2023-10-07 19:21:23 +0200 <monochrom> I just haven't been able to imagine the really weird examples.
2023-10-07 19:21:41 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf) (Remote host closed the connection)
2023-10-07 19:22:06 +0200 <monochrom> Currently I have only learned ZipList and non-monadic applicative parsers.
2023-10-07 19:22:06 +0200Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: BRB)
2023-10-07 19:22:39 +0200 <monochrom> which, since they are actually very practical things, can't be said to be weird at all.
2023-10-07 19:23:28 +0200driib(~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat)
2023-10-07 19:23:37 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-07 19:23:58 +0200 <ph88> i'd like to understand. Where can i find that traverse with Applicative Maybe shorts early? i looked before in the code and i couldn't pinpoint it like i could with imperative code that jumps out of the loop
2023-10-07 19:23:58 +0200Heffalump(~ganesh@urchin.earth.li) ()
2023-10-07 19:24:29 +0200 <tomsmeding> ph88: the Applicative instance of Maybe
2023-10-07 19:24:42 +0200 <tomsmeding> ph88: https://hackage.haskell.org/package/base-4.18.1.0/docs/src/GHC.Base.html#line-1120
2023-10-07 19:24:51 +0200 <ph88> monochrom, i thought since you been here so long you'd taken all the space :p
2023-10-07 19:24:55 +0200 <tomsmeding> note that the 'Nothing <*> _' case ignores its second argument
2023-10-07 19:25:42 +0200tomsmeding. o O ( monochrom is missing all the coloured examples )
2023-10-07 19:25:54 +0200 <monochrom> You look at the recursion in "traverse f (x:xs) = pure (:) <*> f x <*> traverse f xs" and you look at the <*> of Maybe "Nothing <*> _ = Nothing" therefore the "... <*> traverse f xs" recursive call is dropped.
2023-10-07 19:26:27 +0200 <ph88> tomsmeding, ah great thanks, at least that i can understand that in the line above fmap is called another time and in the line below it doesn't call another function
2023-10-07 19:26:58 +0200 <tomsmeding> > Nothing <*> undefined
2023-10-07 19:26:59 +0200 <lambdabot> Nothing
2023-10-07 19:28:16 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 19:30:46 +0200 <ph88> Could i explain Applicative like this: there is a type holding some data. When you want to change it's data the type has a rule what it does with your "change request"
2023-10-07 19:31:48 +0200 <monochrom> How do you test that hypothesis?
2023-10-07 19:32:11 +0200 <monochrom> IOW does it have predictive power?
2023-10-07 19:32:21 +0200 <monochrom> Is it even refutable?
2023-10-07 19:32:44 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-10-07 19:32:50 +0200 <monochrom> Note that in science, irrefutable => meaningless
2023-10-07 19:33:02 +0200 <tomsmeding> monochrom: I think it is supposed to be intuition; intuition is not falsifiable and not scientific, but nevertheless useful
2023-10-07 19:33:03 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-07 19:33:48 +0200 <geekosaur> until you get to quantum mechanics where intuition will always lead you wrong
2023-10-07 19:33:50 +0200 <ph88> ye i still don't have intuition for Applicative
2023-10-07 19:34:12 +0200 <tomsmeding> ph88: but I have a different intuition: Monad is for effectful computation (exceptions, state, IO, whatever), and Applicative is a weaker version of Monad where all subcomputations are independent
2023-10-07 19:34:16 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-10-07 19:34:22 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 19:34:52 +0200 <monochrom> No, I have seen successful intuitions that are succesful because, although falsified 10% of the time, have predictive power and have made correct predictions the other 90% of the time.
2023-10-07 19:35:12 +0200 <ph88> tomsmeding, also useful
2023-10-07 19:35:16 +0200defanor(~defanor@tart.uberspace.net) (Quit: .)
2023-10-07 19:35:29 +0200 <tomsmeding> you get this independentness as follows: in Applicative you have 'pure' (which is clearly a computation whose effects (none) do not depend on any other computation in this program)
2023-10-07 19:35:49 +0200 <tomsmeding> and you have (<*>), which does function application (which is computation), but the _effects_ of the left and of the right argument are independent
2023-10-07 19:36:02 +0200defanor(~defanor@tart.uberspace.net)
2023-10-07 19:36:04 +0200 <tomsmeding> the effects of the right-hand side can not depend on the result of the left-hand side
2023-10-07 19:36:09 +0200sabino(~sabino@user/sabino)
2023-10-07 19:36:23 +0200 <tomsmeding> hence: if you see 'a <*> b', you could run the _effects_ of a and b in parallel
2023-10-07 19:36:46 +0200 <monochrom> For example "monads are like lists" is such an intuition. It works for Maybe. It breaks elsewhere, that's why it stays at the intuition status.
2023-10-07 19:36:54 +0200 <dolio> Applicatives are sequences. Monads are trees.
2023-10-07 19:37:12 +0200 <tomsmeding> this is not so with (>>=): the effects of the continuation (the right-hand argument of (>>=)) are allowed to depend on the _value_ of the left-hand argument, so these two cannot be run in parallel
2023-10-07 19:38:05 +0200 <ph88> tomsmeding, don't understand what you are saying about effects. left-hand side is f (a -> b) a wrapped function, and right-hand side is f a wrapped data (in the simple case where a is a type without arrow)
2023-10-07 19:38:33 +0200 <tomsmeding> a value of type 'f (a -> b)' can be seen as an effectful computation that results in a function of type 'a -> b'
2023-10-07 19:38:55 +0200driib(~driib@vmi931078.contaboserver.net)
2023-10-07 19:38:59 +0200 <tomsmeding> there is not necessarily any value of type 'a -> b' contained in an 'f (a -> b)'!
2023-10-07 19:39:18 +0200 <tomsmeding> if f ~ IO, it might read stuff from a file and determine what function to return based on the file's contents
2023-10-07 19:39:30 +0200roboguy_(~roboguy_@cpe-69-76-235-109.kc.res.rr.com)
2023-10-07 19:39:50 +0200 <tomsmeding> 'wrapped' is intuition that sometimes works, sometimes doesn't work very well
2023-10-07 19:40:20 +0200 <tomsmeding> 'effectful' works always, but is awfully general and thus harder to wrap one's head around (especially when one considers e.g. the continuation monad)
2023-10-07 19:40:45 +0200 <ph88> `determine what function to return` .. whatever function it will still be a `a -> b` right ?
2023-10-07 19:40:51 +0200 <tomsmeding> sure
2023-10-07 19:41:21 +0200 <tomsmeding> consider this value of type 'IO Int': do { s <- readFile "/etc/passwd" ; return (length (lines s)) }
2023-10-07 19:41:24 +0200 <tomsmeding> is that a wrapped Int?
2023-10-07 19:41:42 +0200 <tomsmeding> I'd say it's an effectful computation that returns an Int
2023-10-07 19:42:16 +0200 <ph88> specifically <*> was of interest
2023-10-07 19:42:32 +0200 <tomsmeding> 'Just 42' is also an effectful computation that returns an Int, just with a different kind of effects (only early termination)
2023-10-07 19:42:43 +0200 <tomsmeding> :t (>>=)
2023-10-07 19:42:44 +0200 <lambdabot> Monad m => m a -> (a -> m b) -> m b
2023-10-07 19:42:45 +0200 <tomsmeding> :t (<*>)
2023-10-07 19:42:46 +0200 <lambdabot> Applicative f => f (a -> b) -> f a -> f b
2023-10-07 19:43:34 +0200 <tomsmeding> :t \mf mx -> mf >>= \f -> fmap f mx
2023-10-07 19:43:35 +0200 <lambdabot> Monad m => m (a -> b) -> m a -> m b
2023-10-07 19:43:54 +0200 <tomsmeding> you can make (<*>) using (>>=), but not the other way round
2023-10-07 19:44:15 +0200 <tomsmeding> (>>=) is generic effectful sequencing: doing this one effectful thing, then take the result and _based on that_ determine what effects to perform next
2023-10-07 19:44:29 +0200 <tomsmeding> :t flip (<*>)
2023-10-07 19:44:30 +0200 <lambdabot> Applicative f => f a -> f (a -> b) -> f b
2023-10-07 19:44:37 +0200 <tomsmeding> :t (>>=)
2023-10-07 19:44:38 +0200 <lambdabot> Monad m => m a -> (a -> m b) -> m b
2023-10-07 19:45:10 +0200 <tomsmeding> with (<*>), the you must run your effects for the continuation _first_, and only then are you going to receive the 'a'
2023-10-07 19:46:20 +0200 <tomsmeding> now I had to flip (<*>) to make its type similar to the type of (>>=); this is because for Applicatives where that matters, (<*>) runs the effects of the function before the effects of the argument
2023-10-07 19:47:07 +0200 <roboguy_> ph88: I always liked that one quote from shachaf: "getLine :: IO String contains a String in the same way that /bin/ls contains a list of files"
2023-10-07 19:47:23 +0200 <tomsmeding> but this ordering difference is just a design choice; the effects in (>>=) could not be switched around because the effects of the continuation _depend_ on the result of the first computation, but the effects in (<*>) could also be executed the other way round if you pleased
2023-10-07 19:48:17 +0200 <dolio> Right, because Monads allow nesting, instead of just sequencing.
2023-10-07 19:48:18 +0200 <tomsmeding> that freedom is precisely why 1. fewer computations can be run using the Applicative methods than using the Monad methods (Monad is more powerful), and conversely 2. an Applicative computation has more information statically available
2023-10-07 19:48:52 +0200 <tomsmeding> roboguy_: nice one
2023-10-07 19:49:02 +0200 <geekosaur> @quote /bin/ls
2023-10-07 19:49:02 +0200 <lambdabot> shachaf says: getLine :: IO String contains a String in the same way that /bin/ls contains a list of files
2023-10-07 19:49:20 +0200 <geekosaur> immortalized
2023-10-07 19:49:28 +0200 <ph88> tomsmeding, i was thinking in a way that "i want to apply function to mystery box" and "mystery box will figure out whether to `run your effects for the conditunation first` and then "apply function after"
2023-10-07 19:49:47 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf) (Remote host closed the connection)
2023-10-07 19:49:55 +0200 <tomsmeding> ...or?
2023-10-07 19:49:58 +0200 <monochrom> https://www.vex.net/~trebla/photo/unorganized/IO-String.png >:)
2023-10-07 19:50:34 +0200 <ph88> tomsmeding, or disregard my function and return in some other shape of `f b`
2023-10-07 19:51:26 +0200 <tomsmeding> ph88: what do you mean with "whether to run your effects"? Do you mean that it will decide to run the effects or not?
2023-10-07 19:51:48 +0200 <tomsmeding> also, you're applying a function to the _contents_ of the box
2023-10-07 19:51:52 +0200defanor(~defanor@tart.uberspace.net) (Quit: .)
2023-10-07 19:52:01 +0200 <tomsmeding> which, when reinterpreted back into haskell, is fmap
2023-10-07 19:52:18 +0200Pixi`(~Pixi@user/pixi)
2023-10-07 19:52:21 +0200 <tomsmeding> (<*>) allows the function to itself be computed with an effectful computation
2023-10-07 19:52:27 +0200 <ph88> tomsmeding, if your `f a` type really has an `a` there on the value level and wants to give it to `f (a -> b)`
2023-10-07 19:52:37 +0200defanor(~defanor@tart.uberspace.net)
2023-10-07 19:52:51 +0200 <tomsmeding> but it might not, right?
2023-10-07 19:52:59 +0200 <ph88> yes might or might not
2023-10-07 19:53:36 +0200 <tomsmeding> when given a computation that returns an 'a', and a computation that returns an 'a -> b', if you're given no way to run those computations here and now, all you can do is return a _computation_ that returns a 'b'
2023-10-07 19:53:43 +0200 <tomsmeding> f a -> f (a -> b) -> f b
2023-10-07 19:54:06 +0200 <tomsmeding> that's flip (<*>)
2023-10-07 19:54:50 +0200defanor(~defanor@tart.uberspace.net) (Client Quit)
2023-10-07 19:55:05 +0200 <dolio> :t (<**>)
2023-10-07 19:55:06 +0200 <lambdabot> Applicative f => f a -> f (a -> b) -> f b
2023-10-07 19:55:06 +0200 <tomsmeding> in the case of (<*>), the computation returning the 'a -> b' will be run first -- for Applicatives where that makes a difference
2023-10-07 19:55:31 +0200 <ph88> usually i don't think in the terms of a delayed computation. But in terms of the normal case in which the Applicative keeps applying. Knowing in the back of my head that there is the exception case that it stopped earlier
2023-10-07 19:55:33 +0200 <remexre> if I want to install a Cabal 3 package to a DESTDIR, what's the right way to do that? The project doesn't have a Setup.hs, there's no cabal v2-copy, and cabal install doesn't seem to take a --destdir
2023-10-07 19:55:48 +0200Feuermagier(~Feuermagi@user/feuermagier) (Quit: Leaving)
2023-10-07 19:55:48 +0200defanor(~defanor@tart.uberspace.net)
2023-10-07 19:55:48 +0200Pixi(~Pixi@user/pixi) (Ping timeout: 272 seconds)
2023-10-07 19:56:03 +0200stites(~stites@2607:fb91:dc9:51d1:1285:280d:59e4:7da2) (Read error: Connection reset by peer)
2023-10-07 19:56:10 +0200 <geekosaur> cabal list-bin and copy it yourself, I think
2023-10-07 19:56:23 +0200 <geekosaur> but beware of required data files
2023-10-07 19:56:24 +0200stites(~stites@130.44.147.204)
2023-10-07 19:56:44 +0200 <ph88> tomsmeding, ye this sequencing you explained about Applicative having f (a -> b) run first where monad does it the other way around is also useful :)
2023-10-07 19:57:19 +0200 <geekosaur> conceivably cabal act-as-setup (which is iirc undocumented, but behaves like Setup.hs) is closer to what you want. since it'd undocumented I don't know if it does what you need though
2023-10-07 19:57:28 +0200 <tomsmeding> % (putStrLn "left" >> return 21) <**> (putStrLn "right" >> return (*2))
2023-10-07 19:57:28 +0200 <yahb2> <interactive>:43:32: error: ; • Variable not in scope: (<**>) :: IO b0 -> IO (a0 -> a0) -> t ; • Perhaps you meant ‘<*>’ (imported from Prelude)
2023-10-07 19:57:33 +0200 <tomsmeding> % (putStrLn "left" >> return 21) Control.Applicative.<**> (putStrLn "right" >> return (*2))
2023-10-07 19:57:33 +0200 <yahb2> left ; right ; 42
2023-10-07 19:57:51 +0200 <tomsmeding> ph88: as pointed out by dolio, (<**>) does them in the (>>=) order :p
2023-10-07 19:58:53 +0200 <remexre> geekosaur: yeah, act-as-setup seems to be equivalent to just using the v1- commands? at least in terms of not finding my dependencies, hah
2023-10-07 19:58:58 +0200 <remexre> I'll use list-bin, thanks
2023-10-07 20:00:50 +0200 <ph88> tomsmeding, just the thing is when i go back to traverse (from earlier in the conversation). You don't pass in a `f (a -> b)` but a `a -> f b` so that the computation on the left-hand side must run first is more like an implementation detail at that point for me. With traverse the intuition is not the same when compared about Applicative standalone imo. I don't understand how you can keep those intuitions simultaniously in your head
2023-10-07 20:00:50 +0200 <ph88> and make sense of them. This is why i was so far not able to make a grasp on what traverse and applicative do combined
2023-10-07 20:01:18 +0200 <tomsmeding> I see
2023-10-07 20:01:34 +0200 <tomsmeding> traverse f l = sequenceA (fmap f l)
2023-10-07 20:01:47 +0200 <tomsmeding> if l :: [a], then fmap f l :: [f b]
2023-10-07 20:01:51 +0200 <tomsmeding> sorry for the f-punning
2023-10-07 20:02:23 +0200 <tomsmeding> that doesn't yet run any effects, it just maps over the list (in this case -- could be any Traversable, of course)
2023-10-07 20:02:32 +0200 <tomsmeding> 'sequenceA :: [f b] -> f [b]' is the thing that runs all the effects, and it does so using (<*>)
2023-10-07 20:03:07 +0200 <tomsmeding> the "left-hand side runs first" of (<*>) means that the effects in sequenceA are going to be performed left-to-right instead of in some other order
2023-10-07 20:04:26 +0200 <tomsmeding> of course, "left-to-right" makes perfect sense for lists, but does not necessarily make sense for other Traversable structures, but that's okay
2023-10-07 20:06:55 +0200 <ph88> tomsmeding, Where does sequenceA use <*> ? i don't see it in the source code
2023-10-07 20:07:04 +0200 <ph88> https://hackage.haskell.org/package/base-4.14.1.0/docs/src/Data.Traversable.html#sequenceA
2023-10-07 20:07:35 +0200 <tomsmeding> ph88: in the specific instances: https://hackage.haskell.org/package/base-4.17.0.0/docs/src/Data.Traversable.html#line-297
2023-10-07 20:07:50 +0200 <tomsmeding> note that it's liftA2 here, but liftA2 itself is defined in terms of (<*>)
2023-10-07 20:08:21 +0200 <tomsmeding> sequenceA cannot be defined _in general_ using (<*>) in the class definition; if it could, every Applicative would be Traversable, and we wouldn't have the separate Traversable class
2023-10-07 20:08:37 +0200 <tomsmeding> er, that's not quite accurate
2023-10-07 20:08:38 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection)
2023-10-07 20:08:49 +0200 <tomsmeding> if it could then every Foldable would be Traversable, I guess
2023-10-07 20:08:56 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net)
2023-10-07 20:09:01 +0200 <tomsmeding> not every container is Traversable :p
2023-10-07 20:09:05 +0200 <ph88> :D
2023-10-07 20:09:11 +0200 <tomsmeding> so the specific definition in terms of (<*>) must be container-specific
2023-10-07 20:09:56 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 20:14:40 +0200 <ph88> tomsmeding, `sequenceA cannot be defined _in general_ using (<*>)`. This is odd that traverse AND sequenceA demand an Applicative instance for `f`. Maybe small abstraction leak than demanding a typeclass when it it's not always needed ^^
2023-10-07 20:15:16 +0200 <tomsmeding> ph88: what I meant is that the definition in terms of (<*>) depends on the container
2023-10-07 20:15:27 +0200 <ph88> oooh ok
2023-10-07 20:15:46 +0200 <tomsmeding> traverse = sequenceA . fmap; sequenceA = traverse id
2023-10-07 20:15:55 +0200 <tomsmeding> define one, get the other
2023-10-07 20:17:13 +0200 <ph88> feels like there are two intuitions to think about it, and also two functions that map to each other. Maybe i ought to draw up a matrix about it with some graphic arrows in between
2023-10-07 20:24:40 +0200 <roboguy_> ph88: I recommend looking at several specific Traversable instances. I usually find that to be the best way to learn about a type class
2023-10-07 20:24:47 +0200 <ph88> is there a function like mapAll :: (a -> Maybe b) -> f a -> Maybe (f b) where it only returns Just when all elements could be mapped ?
2023-10-07 20:25:00 +0200 <ph88> roboguy_, ye good advice
2023-10-07 20:26:05 +0200 <tomsmeding> ph88: yes, that's traverse
2023-10-07 20:26:21 +0200 <tomsmeding> that's the whole reason Traversable was brought up :p
2023-10-07 20:26:42 +0200 <tomsmeding> Maybe is the Applicative, f is the Traversable in your mapAll
2023-10-07 20:27:14 +0200 <ph88> tomsmeding, oh sorry i mean another question mapAny :: (a -> Maybe b) -> f a -> Maybe (f b) when it only returns when any of the elements have been mapped (if they could not be mapped then use the old element)
2023-10-07 20:27:20 +0200 <geekosaur> and this should be obvious from the result type because it doesn't allow for Nothing in the middle, only as the outer type, so a middle Nothing has to make the whole thing produce Nothing
2023-10-07 20:27:57 +0200 <roboguy_> :t traverse @_ @Maybe
2023-10-07 20:27:59 +0200 <lambdabot> error:
2023-10-07 20:27:59 +0200 <lambdabot> Pattern syntax in expression context: traverse@_
2023-10-07 20:27:59 +0200 <lambdabot> Did you mean to enable TypeApplications?
2023-10-07 20:28:04 +0200 <geekosaur> use yahb2
2023-10-07 20:28:05 +0200 <tomsmeding> ph88: it cannot return the old element if mapping failed because b is not a
2023-10-07 20:28:13 +0200 <tomsmeding> % :set -XTypeApplications
2023-10-07 20:28:13 +0200 <yahb2> <no output>
2023-10-07 20:28:23 +0200 <tomsmeding> % :t traverse @_ @Maybe
2023-10-07 20:28:23 +0200 <yahb2> traverse @_ @Maybe ; :: (Traversable w, Applicative Maybe) => ; (a -> Maybe b) -> w a -> Maybe (w b)
2023-10-07 20:28:24 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-10-07 20:28:24 +0200 <roboguy_> geekosaur: ah, thanks. It's been a long time, ha!
2023-10-07 20:28:28 +0200 <ph88> tomsmeding, good point what about mapAny :: (a -> Maybe a) -> f a -> Maybe (f a) ?
2023-10-07 20:29:40 +0200 <tomsmeding> mapAny f l = traverse (\x -> f x <|> Just x) l
2023-10-07 20:30:21 +0200 <tomsmeding> where 'f x <|> Just x' is also just 'case f x of { Just y -> Just y ; Nothing -> Just x }'
2023-10-07 20:30:27 +0200 <tomsmeding> I guess one could generalise:
2023-10-07 20:30:31 +0200 <tomsmeding> :t traverse (\x -
2023-10-07 20:30:32 +0200 <lambdabot> error: parse error on input ‘-’
2023-10-07 20:30:39 +0200 <tomsmeding> :t \f l -> traverse (\x -> f x <|> pure x) l
2023-10-07 20:30:41 +0200 <lambdabot> (Traversable t, Alternative f) => (b -> f b) -> t b -> f (t b)
2023-10-07 20:30:55 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2023-10-07 20:32:08 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 255 seconds)
2023-10-07 20:32:17 +0200 <[Leary]> :t fmap . (fromMaybe <*>)
2023-10-07 20:32:17 +0200 <lambdabot> Functor f => (a -> Maybe a) -> f a -> f a
2023-10-07 20:32:39 +0200 <tomsmeding> oh fair no more need to wrap for Maybe
2023-10-07 20:33:12 +0200 <tomsmeding> @unpl fmap . (fromMaybe <*>)
2023-10-07 20:33:13 +0200 <lambdabot> (\ x -> fmap (fromMaybe <*> x))
2023-10-07 20:33:15 +0200 <tomsmeding> thanks
2023-10-07 20:33:48 +0200 <tomsmeding> \f -> fmap (\x -> fromMaybe x (f x))
2023-10-07 20:34:05 +0200 <tomsmeding> [Leary]: introducing the function applicative is not helpful here :p
2023-10-07 20:34:19 +0200 <ph88> how do i run code here other than :f ?
2023-10-07 20:34:27 +0200 <ph88> :t i mean
2023-10-07 20:34:29 +0200 <lambdabot> error: Variable not in scope: mean
2023-10-07 20:34:31 +0200 <tomsmeding> % 1 + 2
2023-10-07 20:34:31 +0200 <yahb2> 3
2023-10-07 20:34:35 +0200 <tomsmeding> > 1 + 2
2023-10-07 20:34:36 +0200 <lambdabot> 3
2023-10-07 20:35:02 +0200 <ph88> let mapAny f l = traverse (\x -> f x <|> Just x) l in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:35:05 +0200 <ph88> % let mapAny f l = traverse (\x -> f x <|> Just x) l in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:35:05 +0200 <yahb2> <interactive>:55:38: error: ; • Variable not in scope: (<|>) :: t -> Maybe a -> f1 b1 ; • Perhaps you meant one of these: ; ‘<*>’ (imported from Prelude), ‘<>’ (imported from Prelud...
2023-10-07 20:35:17 +0200 <tomsmeding> % import Control.Applicative
2023-10-07 20:35:17 +0200 <yahb2> <no output>
2023-10-07 20:35:24 +0200 <ph88> % let mapAny f l = traverse (\x -> f x <|> Just x) l in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:35:24 +0200 <yahb2> Just [1,2,3]
2023-10-07 20:35:42 +0200 <tomsmeding> % let mapAny f = fmap (\x -> f x <|> pure x) in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:35:42 +0200 <yahb2> [Just 1,Just 2,Just 3]
2023-10-07 20:35:45 +0200 <tomsmeding> oh
2023-10-07 20:35:56 +0200 <tomsmeding> % let mapAny f = fmap (\x -> fromMaybe x (f x)) in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:35:56 +0200 <yahb2> <interactive>:63:28: error: ; Variable not in scope: fromMaybe :: t -> t1 -> b1
2023-10-07 20:35:56 +0200 <ph88> well nothing has been mapped so it should output Nothing right ?
2023-10-07 20:36:00 +0200 <tomsmeding> % import Data.Maybe
2023-10-07 20:36:00 +0200 <yahb2> <no output>
2023-10-07 20:36:03 +0200 <tomsmeding> % let mapAny f = fmap (\x -> fromMaybe x (f x)) in mapAny (\_ -> Nothing) [1,2,3]
2023-10-07 20:36:03 +0200 <yahb2> [1,2,3]
2023-10-07 20:36:06 +0200 <tomsmeding> there we go
2023-10-07 20:36:21 +0200 <tomsmeding> _oh_
2023-10-07 20:36:28 +0200 <tomsmeding> ph88: that be a weird function you want
2023-10-07 20:36:47 +0200 <ph88> ok no problem, i can write it. Just wondering if there was something out of the box
2023-10-07 20:36:51 +0200 <geekosaur> any vs. all doesn't seem that weird
2023-10-07 20:37:03 +0200 <ph88> like for UI updates you want to show the user if anything has changed sometimes
2023-10-07 20:37:26 +0200 <roboguy_> tomsmeding: you want traverse, not fmap
2023-10-07 20:38:45 +0200 <tomsmeding> % let mapAny f l = if any isJust (fmap f l) then Just (fmap (\x -> fromMaybe f (f x)) l) else Nothing in (mapAny (\_ -> Nothing) [1,2,3] , mapAny (\x -> if x==2 then Just 42 else Nothing) [1,2,3])
2023-10-07 20:38:45 +0200 <yahb2> <interactive>:71:79: error: ; • Couldn't match type ‘a5’ with ‘a4 -> Maybe a5’ ; Expected: Maybe (a4 -> Maybe a5) ; Actual: Maybe a5 ; ‘a5’ is a rigid type variable bound by...
2023-10-07 20:38:49 +0200 <tomsmeding> crap
2023-10-07 20:40:00 +0200 <tomsmeding> % let mapAny f l = if any isJust (fmap f l) then Just (fmap (\x -> fromMaybe x (f x)) l) else Nothing in (mapAny (\_ -> Nothing) [1,2,3] , mapAny (\x -> if x==2 then Just 42 else Nothing) [1,2,3])
2023-10-07 20:40:00 +0200 <yahb2> (Nothing,Just [1,42,3])
2023-10-07 20:40:02 +0200 <tomsmeding> single-char tpo
2023-10-07 20:40:03 +0200 <tomsmeding> *typo
2023-10-07 20:40:17 +0200 <tomsmeding> and yes, this maps twice
2023-10-07 20:41:52 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 20:42:16 +0200 <ph88> Maybe better to use fold with a helper variable to track whether something was replaced
2023-10-07 20:43:44 +0200 <ph88> tomsmeding, thanks for the discussion i will save it in my notes
2023-10-07 20:44:13 +0200 <[Leary]> ph88: It so happens I wrote something for this kind of change-handling logic a while back. It's somewhat speculative, but could be helpful: https://gist.github.com/LSLeary/eb5e52827249bac5139213ff6ef8d874
2023-10-07 20:44:32 +0200 <tomsmeding> % let mapAny f l = let mapped = fmap (\x -> (x, f x)) l in if any (isJust . snd) mapped then Just (fmap (uncurry fromMaybe) mapped) else Nothing in (mapAny (\_ -> Nothing) [1,2,3] , mapAny (\x -> if x==2 then Just 42 else Nothing) [1,2,3])
2023-10-07 20:44:32 +0200 <yahb2> (Nothing,Just [1,42,3])
2023-10-07 20:45:36 +0200 <ph88> [Leary], where/how did you use it ?
2023-10-07 20:46:31 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net) (Quit: Ping timeout (120 seconds))
2023-10-07 20:46:39 +0200 <[Leary]> It was part of a sketch for streamlining a bunch of xmonad layout update code. That streamlining hasn't happened at this point in time, hence speculative.
2023-10-07 20:47:32 +0200 <[Leary]> Anyway, `changes` there is basically what you want.
2023-10-07 20:47:53 +0200 <tomsmeding> % let mapAny f l = let (Any changed, res) = traverse (\x -> case f x of { Just y -> (Any True, y) ; Nothing -> (Any False, x) }) l in if changed then Just res else Nothing in (mapAny (\_ -> Nothing) [1,2,3] , mapAny (\x -> if x==2 then Just 42 else Nothing) [1,2,3])
2023-10-07 20:47:53 +0200 <yahb2> (Nothing,Just [1,42,3])
2023-10-07 20:48:19 +0200 <tomsmeding> this is the nicest one, I think
2023-10-07 20:48:34 +0200wroathe(~wroathe@50.205.197.50)
2023-10-07 20:48:34 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-10-07 20:48:34 +0200wroathe(~wroathe@user/wroathe)
2023-10-07 20:49:37 +0200 <tomsmeding> the "effect" of this traverse is Writer, and the thing it's writing is a boolean that gets combined using (||), because that's the Monoid instance of Any
2023-10-07 20:51:26 +0200 <monochrom> I am low-tech once again and I would start with catMaybes.
2023-10-07 20:53:42 +0200 <tomsmeding> monochrom: they wanted the successful values replaced if any were successful; with catMaybes you forgot where they were
2023-10-07 20:55:07 +0200 <ph88> i guess you could compare length of input and output array with catMaybes
2023-10-07 20:55:19 +0200 <ph88> hmm no that doesn't work
2023-10-07 20:55:21 +0200 <monochrom> No please don't compare lengths.
2023-10-07 20:56:28 +0200 <ph88> :D
2023-10-07 20:57:02 +0200 <roboguy_> hmm, what should using mapAny over an empty list give back? Nothing or Just []?
2023-10-07 20:58:25 +0200 <monochrom> Which one gives more identity laws? :)
2023-10-07 20:59:07 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net)
2023-10-07 20:59:51 +0200 <monochrom> An example of a candidate identity law: mapAny f (xs <> ys) = mapAny f xs <> mapAny f ys
2023-10-07 21:00:29 +0200 <monochrom> But it is just a candidate because I am not sure whether 1. it is desirable, 2. I formulated it right
2023-10-07 21:00:39 +0200 <roboguy_> I'm thinking this: if it never gives back Just [], then why not just give back an `[a]` instead of a `Maybe [a]`?
2023-10-07 21:00:54 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 245 seconds)
2023-10-07 21:00:56 +0200 <monochrom> But in general you think in terms of "does it have nice laws?" not "does it feel good philosophically".
2023-10-07 21:02:54 +0200 <monochrom> (This is why "product [] = 0", "or [] = True" make many people feel good philosophically but are summarily rejected by rational people because they break, for example, product xs * product ys = product (xs ++ ys))
2023-10-07 21:03:43 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 21:04:33 +0200 <monochrom> Err I guess I wrote homorphism/distributive laws, but set xs = [] to expose the connection with identity laws.
2023-10-07 21:04:50 +0200privacy(~privacy@user/privacy)
2023-10-07 21:07:37 +0200 <roboguy_> monochrom: I was mainly asking that to challenge the original question (at least, if it *is* true that it never gives back Just []). Better to express that in the types and make the result type be [a], if that is the case. After all the type "Maybe [a] but we also know it's never Just []" is really the same as [a]
2023-10-07 21:07:41 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds)
2023-10-07 21:08:25 +0200 <roboguy_> if it *needs* to be Maybe [a], then we could convert it in a separate step
2023-10-07 21:08:58 +0200 <monochrom> Yeah, most often (Any, [a]) is more desirable for this.
2023-10-07 21:09:25 +0200tomsmeding's last version computes an (Any, [a]) and then converts that into a Maybe :p
2023-10-07 21:09:36 +0200 <[Leary]> My gist does the same.
2023-10-07 21:10:42 +0200CiaoSen(~Jura@2a05:5800:298:ba00:664b:f0ff:fe37:9ef)
2023-10-07 21:10:46 +0200 <monochrom> Many decades ago I wrote an expression-simplifier library. To date I am still debating with myself whether "Expr -> Maybe Expr" or "Expr -> (ChangedOrNot, Expr)" works better.
2023-10-07 21:11:11 +0200 <monochrom> They are both annoying but in opposite ways.
2023-10-07 21:11:33 +0200 <monochrom> You know what people say about "half-empty half-full glass of water" right?
2023-10-07 21:11:50 +0200 <monochrom> I say: half of it is empty, the other half is the wrong drink. :( :>)
2023-10-07 21:11:57 +0200 <monochrom> err, :( >:)
2023-10-07 21:11:59 +0200 <darkling> The glass is twice as large as it needs to be. :)
2023-10-07 21:12:18 +0200 <monochrom> Half of my emoticons are unhappy, and the other half are typos.
2023-10-07 21:12:51 +0200billchenchina(~billchenc@103.152.35.21) (Remote host closed the connection)
2023-10-07 21:15:23 +0200hyiltiz(~hyiltiz@2603-8080-1f00-082f-8cdd-ec73-edb7-293e.res6.spectrum.com)
2023-10-07 21:17:04 +0200 <roboguy_> Hah, I also wrote something like that for a term rewriting thing. And I also remember being annoyed
2023-10-07 21:21:07 +0200tomsmedinglikes :>) more
2023-10-07 21:21:39 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 252 seconds)
2023-10-07 21:24:25 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-07 21:24:43 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net) (Ping timeout: 245 seconds)
2023-10-07 21:25:09 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net)
2023-10-07 21:25:23 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com)
2023-10-07 21:27:40 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-10-07 21:28:16 +0200cpressey(~cpressey@host-92-10-151-176.as13285.net) (Client Quit)
2023-10-07 21:31:47 +0200myxos(~myxos@cpe-65-28-251-121.cinci.res.rr.com) (Remote host closed the connection)
2023-10-07 21:32:56 +0200myxos(~myxos@cpe-65-28-251-121.cinci.res.rr.com)
2023-10-07 21:36:30 +0200billchenchina(~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a)
2023-10-07 21:38:56 +0200cpressey(~cpressey@host-2-102-8-121.as13285.net)
2023-10-07 21:41:03 +0200ystael(~ystael@user/ystael) (Ping timeout: 258 seconds)
2023-10-07 21:44:30 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 258 seconds)
2023-10-07 21:44:45 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 252 seconds)
2023-10-07 21:44:51 +0200cpressey(~cpressey@host-2-102-8-121.as13285.net) (Quit: Ping timeout (120 seconds))
2023-10-07 21:45:58 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-10-07 21:47:01 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf) (Remote host closed the connection)
2023-10-07 21:48:08 +0200cpressey(~cpressey@host-2-102-8-121.as13285.net)
2023-10-07 21:48:58 +0200privacy(~privacy@user/privacy) (Remote host closed the connection)
2023-10-07 21:49:11 +0200Sgeo(~Sgeo@user/sgeo)
2023-10-07 21:52:01 +0200privacy(~privacy@user/privacy)
2023-10-07 21:58:27 +0200Jackneill(~Jackneill@20014C4E1E1DF200085D5E2535870783.dsl.pool.telekom.hu) (Ping timeout: 260 seconds)
2023-10-07 21:59:15 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 21:59:18 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 272 seconds)
2023-10-07 22:00:07 +0200roboguy_(~roboguy_@cpe-69-76-235-109.kc.res.rr.com) (Quit: Leaving...)
2023-10-07 22:00:54 +0200Opus(~lossy@user/opus)
2023-10-07 22:00:59 +0200waleee(~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
2023-10-07 22:02:51 +0200idgaen(~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5)
2023-10-07 22:02:52 +0200vglfr(~vglfr@88.155.180.78) (Read error: Connection reset by peer)
2023-10-07 22:07:38 +0200cpressey(~cpressey@host-2-102-8-121.as13285.net) (Ping timeout: 245 seconds)
2023-10-07 22:09:02 +0200ystael(~ystael@user/ystael)
2023-10-07 22:14:36 +0200falafel(~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 248 seconds)
2023-10-07 22:22:37 +0200pavonia(~user@user/siracusa)
2023-10-07 22:28:38 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net)
2023-10-07 22:30:09 +0200hugo(znc@verdigris.lysator.liu.se)
2023-10-07 22:33:11 +0200nate2(~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-10-07 22:35:57 +0200stites(~stites@130.44.147.204) (Read error: Connection reset by peer)
2023-10-07 22:37:34 +0200stites(~stites@130.44.147.204)
2023-10-07 22:46:31 +0200stites(~stites@130.44.147.204) (Ping timeout: 255 seconds)
2023-10-07 22:46:42 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf) (Remote host closed the connection)
2023-10-07 22:47:40 +0200stites(~stites@2607:fb90:ad63:e013:9e88:5faf:89ef:30)
2023-10-07 22:59:57 +0200roboguy_(~roboguy_@cpe-69-76-235-109.kc.res.rr.com)
2023-10-07 22:59:57 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-10-07 23:00:15 +0200Pickchea(~private@user/pickchea)
2023-10-07 23:01:15 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2023-10-07 23:03:49 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2023-10-07 23:05:02 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-10-07 23:13:23 +0200fendor(~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection)
2023-10-07 23:19:24 +0200qqq(~qqq@92.43.167.61) (Quit: leaving)
2023-10-07 23:19:59 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-10-07 23:22:57 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 23:27:36 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf) (Ping timeout: 260 seconds)
2023-10-07 23:28:02 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2023-10-07 23:29:09 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:f026:93e1:c9cc:1bf)
2023-10-07 23:29:24 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2023-10-07 23:29:31 +0200bilegeek(~bilegeek@2600:1008:b029:9629:c264:f679:2b5f:3f7)
2023-10-07 23:41:21 +0200duncan(~duncan@nat-server.ehlab.uk)
2023-10-07 23:51:00 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)