2022/07/30

2022-07-30 00:06:06 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-07-30 00:06:42 +0200SamBellamy(~SamBellam@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) (Ping timeout: 252 seconds)
2022-07-30 00:07:15 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 00:07:40 +0200malte(~malte@mal.tc)
2022-07-30 00:12:39 +0200yin(~yin@user/zero)
2022-07-30 00:12:50 +0200SamBellamy(~SamBellam@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net)
2022-07-30 00:17:40 +0200leah_(lp0@heathens.club) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-07-30 00:18:21 +0200leah_(lp0@heathens.club)
2022-07-30 00:20:13 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-07-30 00:21:46 +0200SamBellamy(~SamBellam@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) (Remote host closed the connection)
2022-07-30 00:22:54 +0200yin(~yin@user/zero) (Read error: Connection reset by peer)
2022-07-30 00:27:21 +0200yin(~yin@user/zero)
2022-07-30 00:41:05 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-07-30 00:42:20 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 00:50:52 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-07-30 00:52:45 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Client Quit)
2022-07-30 00:55:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 00:56:28 +0200Guest3(~textual@64.145.79.82)
2022-07-30 01:00:50 +0200acidjnk_new(~acidjnk@p200300d6e7058697153735ad212ee21c.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-07-30 01:03:15 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-07-30 01:04:20 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-30 01:04:57 +0200Tuplanolla(~Tuplanoll@91-159-68-204.elisa-laajakaista.fi) (Ping timeout: 252 seconds)
2022-07-30 01:08:19 +0200Inst(~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e) (Ping timeout: 272 seconds)
2022-07-30 01:20:43 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
2022-07-30 01:21:52 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.243)
2022-07-30 01:23:49 +0200noteness(~noteness@user/noteness) (Quit: bye)
2022-07-30 01:24:27 +0200noteness(~noteness@user/noteness)
2022-07-30 01:27:25 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-07-30 01:27:38 +0200sarahtheaudi(~sarahthea@S01069050ca4e3573.cg.shawcable.net)
2022-07-30 01:27:41 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds)
2022-07-30 01:28:08 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-07-30 01:31:20 +0200hasbae(~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Quit: WeeChat 3.5)
2022-07-30 01:38:22 +0200pavonia(~user@user/siracusa)
2022-07-30 01:44:33 +0200AlexZenon(~alzenon@178.34.150.131) (Ping timeout: 252 seconds)
2022-07-30 01:46:32 +0200Alex_test(~al_test@178.34.150.131) (Ping timeout: 268 seconds)
2022-07-30 01:47:34 +0200mvk(~mvk@2607:fea8:5ce3:8500::311d)
2022-07-30 01:47:51 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-07-30 01:48:46 +0200AlexZenon(~alzenon@178.34.150.131)
2022-07-30 01:49:51 +0200noteness(~noteness@user/noteness)
2022-07-30 01:50:04 +0200Alex_test(~al_test@178.34.150.131)
2022-07-30 01:57:13 +0200Sgeo(~Sgeo@user/sgeo)
2022-07-30 01:57:24 +0200maroloccio(~marolocci@151.75.246.79) (Quit: WeeChat 3.0)
2022-07-30 01:57:32 +0200yin(~yin@user/zero) (Ping timeout: 245 seconds)
2022-07-30 02:00:52 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 02:01:39 +0200yin(~yin@user/zero)
2022-07-30 02:02:14 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 02:03:24 +0200geekosaurxmonadtrack
2022-07-30 02:04:54 +0200xmonadtrackgeekosaur
2022-07-30 02:06:42 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2022-07-30 02:06:42 +0200yin(~yin@user/zero) (Ping timeout: 245 seconds)
2022-07-30 02:07:37 +0200nckx(~nckx@tobias.gr) (Quit: Updating my Guix System <https://guix.gnu.org>)
2022-07-30 02:12:44 +0200nckx(~nckx@tobias.gr)
2022-07-30 02:16:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-07-30 02:16:37 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-07-30 02:16:37 +0200wroathe(~wroathe@user/wroathe)
2022-07-30 02:21:54 +0200kraftwerk28(~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-30 02:27:51 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
2022-07-30 02:28:58 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 02:29:24 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-30 02:30:01 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 272 seconds)
2022-07-30 02:32:41 +0200notzmv(~zmv@user/notzmv)
2022-07-30 02:35:19 +0200Guest3(~textual@64.145.79.82) (Quit: Textual IRC Client: www.textualapp.com)
2022-07-30 02:35:23 +0200kraftwerk28(~kraftwerk@178.62.210.83)
2022-07-30 02:35:53 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-07-30 02:37:48 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-07-30 02:39:21 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-30 02:49:12 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2022-07-30 02:54:42 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
2022-07-30 03:11:07 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-07-30 03:14:44 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 03:17:15 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-07-30 03:18:53 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-07-30 03:20:02 +0200dvdrw(~dvdrw@user/dvdrw) (Ping timeout: 245 seconds)
2022-07-30 03:21:03 +0200alp_(~alp@user/alp) (Ping timeout: 276 seconds)
2022-07-30 03:23:34 +0200Katarushisu4(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
2022-07-30 03:24:17 +0200Katarushisu(~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-07-30 03:24:17 +0200Katarushisu4Katarushisu
2022-07-30 03:26:46 +0200lemonsni-(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2022-07-30 03:27:13 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 252 seconds)
2022-07-30 03:28:33 +0200 <naso> hello, i'm having trouble building and running tests in my cabal project. when i do `cabal test` everything compiles, thenn it says:
2022-07-30 03:28:40 +0200 <naso> <no location info>: error:
2022-07-30 03:28:40 +0200 <naso> output was redirected with -o, but no output will be generated
2022-07-30 03:28:40 +0200 <naso> because there is no Main module.
2022-07-30 03:29:01 +0200 <naso> in my cabal file I have `main-is: Spec.hs`
2022-07-30 03:34:12 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 03:43:13 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 03:46:08 +0200AlexZenon_2(~alzenon@178.34.150.131)
2022-07-30 03:47:45 +0200AlexZenon(~alzenon@178.34.150.131) (Ping timeout: 252 seconds)
2022-07-30 03:48:06 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-07-30 03:52:44 +0200xff0x(~xff0x@ae132116.dynamic.ppp.asahi-net.or.jp) (Ping timeout: 255 seconds)
2022-07-30 03:55:00 +0200 <qrpnxz> naso: change the module name in Spec.hs to Main
2022-07-30 03:55:13 +0200Sciencentistguy5(~sciencent@hacksoc/ordinary-member)
2022-07-30 03:56:55 +0200Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 252 seconds)
2022-07-30 03:56:55 +0200Sciencentistguy5Sciencentistguy
2022-07-30 03:57:10 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net)
2022-07-30 03:57:58 +0200lagash(lagash@lagash.shelltalk.net) (Ping timeout: 240 seconds)
2022-07-30 03:59:32 +0200sarahtheaudi(~sarahthea@S01069050ca4e3573.cg.shawcable.net) (Ping timeout: 252 seconds)
2022-07-30 04:00:51 +0200 <naso> qrpnxz: thanks! i always thought the module name had to match the file name. actually it also works if i just remove the module declaration altogether
2022-07-30 04:01:41 +0200PiDelport(uid25146@id-25146.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-30 04:01:59 +0200 <naso> another problem now: although the tests seem to run, nothing is printed from my `putStrLn` calls within `main`
2022-07-30 04:02:16 +0200 <qrpnxz> it generally does, but here you are specifying which file is main, so it doesn't have to be called main, but the module does need to be main or it doesn't know to make an executable
2022-07-30 04:02:56 +0200 <qrpnxz> naso: ah yeah, so there's a flag to get it to display that output, i will look for it, but the output is also put into a file in dist-newstyle or whatever it's called
2022-07-30 04:03:53 +0200 <qrpnxz> use --show-details flag
2022-07-30 04:04:01 +0200 <qrpnxz> for example, --show-details=streaming
2022-07-30 04:04:12 +0200 <qrpnxz> but there's other setting you can put that i forget
2022-07-30 04:04:24 +0200lagash(lagash@2605:6400:20:b4:9c76:1538:3398:ce71)
2022-07-30 04:07:50 +0200 <naso> thanks qrpnxz i'll look in the manual. I tried `cabal test --show-details=streaming` but get error 'unrecognized 'test' option `--show-details=streaming'' . Also tried putting it in the .cabal file under ghc-options: but did not seem to have aan effect
2022-07-30 04:08:48 +0200 <qrpnxz> naso: try --test-show-details
2022-07-30 04:09:33 +0200 <naso> ok that worked! do you know how i can put that in the cabal file so it's on automatically
2022-07-30 04:12:37 +0200dcoutts_(~duncan@host109-149-1-189.range109-149.btcentralplus.com)
2022-07-30 04:15:02 +0200dcoutts__(~duncan@host86-150-41-142.range86-150.btcentralplus.com) (Ping timeout: 245 seconds)
2022-07-30 04:15:19 +0200sarahtheaudi(~sarahthea@S01069050ca4e3573.cg.shawcable.net)
2022-07-30 04:16:12 +0200 <naso> putting it under `ghc-options:` in the test section did not work
2022-07-30 04:26:20 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-07-30 04:28:18 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-30 04:32:10 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-07-30 04:32:29 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 252 seconds)
2022-07-30 04:34:25 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 04:34:35 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-07-30 04:36:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-30 04:37:24 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-30 04:37:40 +0200 <qrpnxz> i do not
2022-07-30 04:38:07 +0200 <qrpnxz> you could make a shell alias or function or script to do that for you tho
2022-07-30 04:39:36 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-07-30 04:39:49 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 252 seconds)
2022-07-30 04:40:49 +0200 <naso> ok thanks
2022-07-30 04:41:09 +0200zaquest(~notzaques@5.130.79.72)
2022-07-30 04:41:46 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 04:43:32 +0200 <sarahtheaudi> https://www.youtube.com/watch?v=7wvLIWe6qxA
2022-07-30 04:45:22 +0200td_(~td@muedsl-82-207-238-203.citykom.de) (Ping timeout: 268 seconds)
2022-07-30 04:45:41 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.243) (Quit: Leaving)
2022-07-30 04:46:51 +0200td_(~td@94.134.91.248)
2022-07-30 04:48:44 +0200cbdlt^(~cbdlt@50-242-35-142-static.hfc.comcastbusiness.net) (Remote host closed the connection)
2022-07-30 04:49:07 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-07-30 04:49:24 +0200sarahtheaudi(~sarahthea@S01069050ca4e3573.cg.shawcable.net) (Ping timeout: 252 seconds)
2022-07-30 04:50:20 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-07-30 04:53:06 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-30 04:53:07 +0200yin(~yin@user/zero)
2022-07-30 04:55:52 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-07-30 04:56:57 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 272 seconds)
2022-07-30 04:58:07 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 05:01:19 +0200notzmv(~zmv@user/notzmv)
2022-07-30 05:04:58 +0200maerwald(~maerwald@mail.hasufell.de) (Changing host)
2022-07-30 05:04:58 +0200maerwald(~maerwald@user/maerwald)
2022-07-30 05:08:36 +0200Inst(~Inst@2601:6c4:4080:3f80:88fb:d6ca:60f6:4fa2)
2022-07-30 05:08:48 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
2022-07-30 05:10:35 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 05:21:27 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-30 05:22:35 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-30 05:28:18 +0200zxx7529(~Thunderbi@user/zxx7529) (Quit: zxx7529)
2022-07-30 05:36:23 +0200meow_mew(uid562569@id-562569.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-30 05:41:03 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 252 seconds)
2022-07-30 05:45:03 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-07-30 05:47:53 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 05:49:24 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-07-30 05:51:38 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 05:51:48 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 05:58:17 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 05:58:32 +0200Guest33(~Guest33@ool-4a5964de.dyn.optonline.net)
2022-07-30 05:58:36 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 05:59:04 +0200 <Guest33> hello
2022-07-30 05:59:21 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 06:00:06 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 06:00:09 +0200Guest33(~Guest33@ool-4a5964de.dyn.optonline.net) (Client Quit)
2022-07-30 06:01:56 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 06:02:48 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
2022-07-30 06:03:47 +0200vglfr(~vglfr@91.192.47.10) (Ping timeout: 252 seconds)
2022-07-30 06:04:09 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 06:04:58 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 06:06:17 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2022-07-30 06:07:59 +0200 <Haskelytic> https://hackage.haskell.org/package/monads-tf-0.1.0.3/docs/Control-Monad-List.html#t:ListT
2022-07-30 06:08:11 +0200yin(~yin@user/zero) (Ping timeout: 252 seconds)
2022-07-30 06:08:18 +0200 <Haskelytic> what does it mean that "the argument monad is commutative"
2022-07-30 06:08:42 +0200 <Haskelytic> if arg is `m` then `m t` = `t m`?
2022-07-30 06:12:35 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 252 seconds)
2022-07-30 06:18:04 +0200Me-me(~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Remote host closed the connection)
2022-07-30 06:19:19 +0200noteness(~noteness@user/noteness) (Quit: bye)
2022-07-30 06:19:37 +0200noteness(~noteness@user/noteness)
2022-07-30 06:22:03 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 06:26:46 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan)
2022-07-30 06:27:41 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-30 06:31:46 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 06:32:04 +0200finsternis(~X@23.226.237.192) (Ping timeout: 244 seconds)
2022-07-30 06:33:43 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 06:34:01 +0200finsternis(~X@23.226.237.192)
2022-07-30 06:34:35 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2022-07-30 06:44:28 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-30 06:45:37 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 268 seconds)
2022-07-30 06:46:11 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-07-30 06:47:25 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 06:47:47 +0200russruss(~russruss@my.russellmcc.com) (Quit: The Lounge - https://thelounge.chat)
2022-07-30 06:48:41 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 06:57:27 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 07:01:09 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-07-30 07:01:09 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-07-30 07:01:09 +0200wroathe(~wroathe@user/wroathe)
2022-07-30 07:02:55 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 07:03:40 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 07:04:54 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Changing host)
2022-07-30 07:04:54 +0200Guest3(~textual@user/polo)
2022-07-30 07:04:59 +0200Guest3money
2022-07-30 07:05:12 +0200money(~textual@user/polo) (Client Quit)
2022-07-30 07:05:31 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 07:05:34 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 07:09:19 +0200Me-me(~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net)
2022-07-30 07:09:37 +0200vglfr(~vglfr@91.192.47.10) (Ping timeout: 245 seconds)
2022-07-30 07:09:37 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2022-07-30 07:10:46 +0200Me-me(~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host)
2022-07-30 07:10:46 +0200Me-me(~me-me@user/me-me)
2022-07-30 07:14:12 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2022-07-30 07:38:08 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 07:44:27 +0200dtman34(~dtman34@2601:446:4400:2ad9:8c87:c49c:8d33:7100) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
2022-07-30 07:45:19 +0200dtman34(~dtman34@2601:446:4400:2ad9:d95d:5c8c:b796:d6dc)
2022-07-30 07:46:06 +0200gawen(~gawen@user/gawen) (Quit: cya)
2022-07-30 07:47:56 +0200gawen(~gawen@user/gawen)
2022-07-30 07:50:28 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-07-30 07:57:39 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-07-30 08:00:02 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 08:01:48 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-30 08:04:32 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 08:09:35 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 08:12:10 +0200alp_(~alp@user/alp)
2022-07-30 08:15:54 +0200mvk(~mvk@2607:fea8:5ce3:8500::311d) (Ping timeout: 244 seconds)
2022-07-30 08:26:20 +0200enemeth79(uid309041@id-309041.lymington.irccloud.com)
2022-07-30 08:28:49 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 08:32:17 +0200alp_(~alp@user/alp) (Ping timeout: 272 seconds)
2022-07-30 08:36:01 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-30 08:36:07 +0200kraftwerk28(~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-30 08:36:11 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-07-30 08:36:12 +0200 <[Leary]> Haskelytic: I believe it refers to the *effects* of the monad. I.e. forall x :: m a, y :: m b, f :: (a -> b -> c): liftM2 f x y = liftM2 (flip f) y x.
2022-07-30 08:36:23 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-07-30 08:37:28 +0200 <Haskelytic> ah, that makes a lot more sense
2022-07-30 08:39:04 +0200img(~img@user/img)
2022-07-30 08:39:30 +0200kraftwerk28(~kraftwerk@178.62.210.83)
2022-07-30 08:40:10 +0200 <Haskelytic> another question, it seems to me that the `Writer` monad is kind of redundant? you could just use `State` to do the same kind of computation
2022-07-30 08:42:49 +0200 <[Leary]> You could use state to do both reader and writer; you could use IO to do state. Sometimes you'd rather have certain restrictions than more power.
2022-07-30 08:45:22 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 244 seconds)
2022-07-30 08:47:04 +0200acidjnk_new(~acidjnk@p200300d6e7058679a001276fdd936342.dip0.t-ipconnect.de)
2022-07-30 08:48:29 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 08:48:30 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-30 08:48:34 +0200 <Haskelytic> I'm still coming to grips with the `IO` monad. It feels like some kind of deep magic.
2022-07-30 08:49:56 +0200 <Maxdamantus> Maybe my OI monad can make it seem less magical: https://gist.github.com/Maxdamantus/a9e7413521a07a7f922d09d3588692e5
2022-07-30 08:50:23 +0200 <Haskelytic> lmao that name
2022-07-30 08:50:42 +0200 <Maxdamantus> Wrote that quickly a few years ago as a demonstration of how it doesn't need to involve impure functions (unlike eg GHC's `IO` implementation), dunno if other people have made similar demonstrations.
2022-07-30 08:51:07 +0200 <Haskelytic> I'm kind of in that stage where I can use `IO` as an opaque type (through its methods) but it feels like a black hole :)
2022-07-30 08:51:25 +0200 <Haskelytic> a black hole with a white hole on the other side for binding vals
2022-07-30 08:51:37 +0200 <Haskelytic> Maxdamantus: thanks for the link!
2022-07-30 08:53:13 +0200 <Haskelytic> Maxdamantus: dang there's a lot going on there haha...I'm not familiar with GADTs yet
2022-07-30 08:53:37 +0200 <Haskelytic> time to hunker down :)
2022-07-30 08:55:04 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-07-30 08:55:05 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-07-30 08:55:05 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Write error: Connection reset by peer)
2022-07-30 08:55:05 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-07-30 08:55:05 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-07-30 08:55:05 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-30 08:55:15 +0200 <pavonia> Is TH the only way to force evaluation of a top-level value at compile time?
2022-07-30 08:55:26 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-30 08:55:36 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-07-30 08:55:50 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-30 08:55:55 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-07-30 08:55:56 +0200califax(~califax@user/califx)
2022-07-30 08:59:06 +0200dtman34(~dtman34@2601:446:4400:2ad9:d95d:5c8c:b796:d6dc) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
2022-07-30 08:59:27 +0200jargon(~jargon@184.101.188.251) (Remote host closed the connection)
2022-07-30 08:59:32 +0200dtman34(~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
2022-07-30 09:01:02 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-07-30 09:01:25 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-30 09:01:35 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 09:03:44 +0200dtman34(~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (Client Quit)
2022-07-30 09:04:36 +0200dtman34(~dtman34@2601:446:4400:2ad9:8627:39fc:b68b:80d8)
2022-07-30 09:05:03 +0200Guest52(~Guest52@46.245.121.30)
2022-07-30 09:05:49 +0200Guest52(~Guest52@46.245.121.30) (Client Quit)
2022-07-30 09:08:58 +0200 <jackdk> could use `{-# NOINLINE #-}` and `rnf`?
2022-07-30 09:09:04 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de)
2022-07-30 09:11:27 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 09:12:13 +0200 <pavonia> Would that actually evaluate at compile-time?
2022-07-30 09:12:57 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 09:16:17 +0200cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2022-07-30 09:16:47 +0200califax(~califax@user/califx) (Ping timeout: 268 seconds)
2022-07-30 09:16:55 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 09:17:09 +0200 <[Leary]> Haskelytic: An `IO a` is a recipe to perform certain effects and perhaps produce an `a`. We're given primitive recipes as our building blocks and we can combine them via the monadic interface. `main` is where we put a recipe we'd like to see performed. Anything 'deeper' than that is implementation details you aren't supposed to know; using IO as an opaque type via its methods is right and proper.
2022-07-30 09:17:37 +0200califax(~califax@user/califx)
2022-07-30 09:18:25 +0200dos__^^(~user@user/dos/x-1723657) (Remote host closed the connection)
2022-07-30 09:19:33 +0200dos__^^(~user@user/dos/x-1723657)
2022-07-30 09:22:10 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de)
2022-07-30 09:25:57 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2022-07-30 09:27:43 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 09:33:16 +0200misterfish(~misterfis@ip214-130-173-82.adsl2.static.versatel.nl)
2022-07-30 09:33:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 09:44:35 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-07-30 09:44:51 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi)
2022-07-30 09:50:03 +0200cheater(~Username@user/cheater)
2022-07-30 09:52:30 +0200zmt00(~zmt00@user/zmt00) (Quit: Leaving)
2022-07-30 09:52:57 +0200cheater(~Username@user/cheater) (Client Quit)
2022-07-30 09:53:58 +0200Pickchea(~private@user/pickchea)
2022-07-30 09:53:59 +0200cheater(~Username@user/cheater)
2022-07-30 09:55:20 +0200gmg(~user@user/gehmehgeh)
2022-07-30 09:55:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8)
2022-07-30 09:56:38 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-30 09:57:03 +0200califax(~califax@user/califx)
2022-07-30 10:00:19 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8) (Ping timeout: 272 seconds)
2022-07-30 10:02:07 +0200zmt00(~zmt00@user/zmt00)
2022-07-30 10:02:33 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 10:07:05 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 10:13:03 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 10:13:09 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 10:22:29 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-30 10:23:28 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 10:25:18 +0200chomwitt(~chomwitt@2a02:587:dc12:b700:8e4f:832:bb90:1d0b)
2022-07-30 10:26:19 +0200vglfr(~vglfr@91.192.47.10) (Ping timeout: 252 seconds)
2022-07-30 10:26:34 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 10:28:48 +0200vglfr(~vglfr@91.192.47.10) (Read error: Connection reset by peer)
2022-07-30 10:29:04 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 10:29:13 +0200misterfish(~misterfis@ip214-130-173-82.adsl2.static.versatel.nl) (Ping timeout: 244 seconds)
2022-07-30 10:29:44 +0200chomwitt(~chomwitt@2a02:587:dc12:b700:8e4f:832:bb90:1d0b) (Ping timeout: 244 seconds)
2022-07-30 10:37:12 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 10:38:49 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-07-30 10:39:48 +0200coco(~coco@212-51-146-199.fiber7.init7.net)
2022-07-30 10:41:42 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 10:44:37 +0200 <EvanR> Haskelytic, it's worse than that. State can do what you think writer does, and writer does something else xD
2022-07-30 10:44:46 +0200 <EvanR> namely, eat all your memory
2022-07-30 10:46:29 +0200Tuplanolla(~Tuplanoll@91-159-68-204.elisa-laajakaista.fi)
2022-07-30 10:47:49 +0200Pickchea(~private@user/pickchea) (Ping timeout: 272 seconds)
2022-07-30 10:50:53 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-07-30 10:51:31 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-07-30 10:52:03 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-07-30 10:52:41 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2022-07-30 10:53:15 +0200Guest3(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit)
2022-07-30 10:54:39 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 11:05:08 +0200AlexZenon_2AlexZenon
2022-07-30 11:06:01 +0200enemeth79(uid309041@id-309041.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-30 11:08:41 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-30 11:09:07 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 11:10:03 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-07-30 11:10:52 +0200vglfr(~vglfr@91.192.47.10) (Ping timeout: 245 seconds)
2022-07-30 11:17:17 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-07-30 11:17:17 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-30 11:17:48 +0200vglfr(~vglfr@91.192.47.10)
2022-07-30 11:17:48 +0200califax(~califax@user/califx)
2022-07-30 11:18:05 +0200gmg(~user@user/gehmehgeh)
2022-07-30 11:18:07 +0200sandy_doo(~sandydoo@185.209.196.136)
2022-07-30 11:18:39 +0200Pickchea(~private@user/pickchea)
2022-07-30 11:23:17 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-07-30 11:24:09 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-07-30 11:24:21 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de) (Ping timeout: 268 seconds)
2022-07-30 11:24:52 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 11:25:49 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-30 11:26:46 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 11:28:07 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-30 11:28:22 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 11:30:02 +0200 <int-e> :t execWriter
2022-07-30 11:30:05 +0200 <lambdabot> Writer w a -> w
2022-07-30 11:31:49 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-07-30 11:35:17 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi)
2022-07-30 11:42:03 +0200 <albet70> is IO a monad?
2022-07-30 11:42:57 +0200 <albet70> fmap :: (a-> b) -> IO a -> IO b?
2022-07-30 11:43:15 +0200 <Axman6> what does the documentation for IO say?
2022-07-30 11:43:35 +0200 <albet70> which document?
2022-07-30 11:43:36 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-07-30 11:43:55 +0200 <Axman6> well, :info IO in GHCi will tell you a lot
2022-07-30 11:44:50 +0200 <albet70> instance Applicative Functor Monad
2022-07-30 11:45:13 +0200benin0(~benin@183.82.205.104)
2022-07-30 11:45:27 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 245 seconds)
2022-07-30 11:46:05 +0200 <albet70> @djinn (a -> b) -> IO a -> IO b
2022-07-30 11:46:05 +0200 <lambdabot> Error: Undefined type IO
2022-07-30 11:48:22 +0200 <albet70> but IO a is an IO action, fmap f (a::IO a) will produce a (b:: IO b), it will run twice IO action?
2022-07-30 11:48:41 +0200 <[exa]> no, why
2022-07-30 11:49:21 +0200 <[exa]> "IO is an action" is a bit of oversimplification here, take IO types as descriptions of IO actions that happen once the runtime "interprets" the program
2022-07-30 11:49:24 +0200 <albet70> 'cause there're two IO actions
2022-07-30 11:49:51 +0200 <[exa]> so in your case, `fmap` takes a description of some action that produces `a`, and rewrites it to a description of some action that produces `b`
2022-07-30 11:50:02 +0200enemeth79(uid309041@id-309041.lymington.irccloud.com)
2022-07-30 11:50:09 +0200 <albet70> is there an example?
2022-07-30 11:50:20 +0200 <albet70> for fmap on IO a?
2022-07-30 11:51:00 +0200 <[exa]> yes, for example `fmap length getLine`
2022-07-30 11:52:00 +0200 <[exa]> the `fmap` in there gets type `(String->Int) -> IO String -> IO Int`
2022-07-30 11:56:37 +0200 <albet70> that getLine need input like anc from keyboard, then return 3 :: IO Int?
2022-07-30 11:57:03 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 11:57:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8)
2022-07-30 12:01:41 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8) (Ping timeout: 244 seconds)
2022-07-30 12:04:12 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2022-07-30 12:07:31 +0200sandy_doo(~sandydoo@185.209.196.136) (Ping timeout: 252 seconds)
2022-07-30 12:11:17 +0200 <Midjak> Hello. I can't find the range function in the Data.Array package documentation. However, I have to import it in ghci to be able to use it. I don't understand... https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-Array.html#g:2
2022-07-30 12:12:01 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 12:12:36 +0200 <Midjak> hummm ok it's in Data.Ix ... I have trouble to understand how import work... need to review this
2022-07-30 12:15:57 +0200malte(~malte@mal.tc) (Ping timeout: 252 seconds)
2022-07-30 12:22:02 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-30 12:22:55 +0200vglfr(~vglfr@91.192.47.10) (Ping timeout: 252 seconds)
2022-07-30 12:28:18 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 12:28:55 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de)
2022-07-30 12:29:19 +0200 <tomsmeding> Midjak: in the documentation of Data.Array you see "module Data.Ix" near the top; this indicates a re-export of that entire module. In the source code, this looks like "module Data.Ix" in the export list: https://hackage.haskell.org/package/array-0.5.4.0/docs/src/Data.Array.html
2022-07-30 12:29:26 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-07-30 12:29:32 +0200dvdrw(~dvdrw@user/dvdrw)
2022-07-30 12:30:06 +0200 <Midjak> hummm ok... thank you tomsmeding !
2022-07-30 12:32:12 +0200 <tomsmeding> Midjak: I agree this makes documentation somewhat harder to navigate sometimes; example of a particularly bad case: https://hackage.haskell.org/package/stm-2.5.0.2/docs/Control-Concurrent-STM.html
2022-07-30 12:32:14 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8)
2022-07-30 12:32:15 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-07-30 12:32:44 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-07-30 12:32:59 +0200 <tomsmeding> Though in the case of stm, it's usually clear where functions come from just because each module defines a separate data structure :)
2022-07-30 12:33:23 +0200 <tomsmeding> Like, readTQueue is not going to be defined in the TVar module
2022-07-30 12:33:55 +0200 <Midjak> ah yes, indeed, the package reexport all this sub-module .
2022-07-30 12:36:03 +0200 <Midjak> oh I have just read the abstract pf the paper about STM. seems very interesting!
2022-07-30 12:36:56 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8) (Ping timeout: 255 seconds)
2022-07-30 12:41:17 +0200FragByte_(~christian@user/fragbyte)
2022-07-30 12:41:47 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-07-30 12:44:30 +0200FragByte(~christian@user/fragbyte) (Ping timeout: 264 seconds)
2022-07-30 12:44:30 +0200FragByte_FragByte
2022-07-30 12:45:21 +0200 <pavonia> When you have a local variable in a top-level function that doesn't depend on any of the function's parameters, will it get evaluated on each function call again?
2022-07-30 12:45:56 +0200 <pavonia> e.g. f x y = x + y + c where c = <complicated expression>
2022-07-30 12:48:14 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 12:55:11 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Ping timeout: 252 seconds)
2022-07-30 12:55:21 +0200 <int-e> :t \x y -> x + y + c
2022-07-30 12:55:22 +0200 <lambdabot> Expr -> Expr -> Expr
2022-07-30 12:55:30 +0200 <int-e> err
2022-07-30 12:55:31 +0200 <int-e> :t \x y -> x + y + ?c
2022-07-30 12:55:33 +0200 <lambdabot> (Num a, ?c::a) => a -> a -> a
2022-07-30 12:56:33 +0200 <int-e> There's let-floating if c has a fixed type.
2022-07-30 12:56:43 +0200 <int-e> And that would avoid recomputation.
2022-07-30 12:56:59 +0200 <int-e> If you have c :: Num a => a then that won't happen.
2022-07-30 12:58:01 +0200 <int-e> So it depends, on types, and on the compiler actually performing that optimization. I'd worry more about the former.
2022-07-30 12:58:18 +0200 <pavonia> Hhm, the type is Integral a => (Array Int Bool, a). Does that mean the array would not be re-evaluated but the number would?
2022-07-30 12:59:13 +0200 <int-e> That's what I'd expect... well, provided there's no conversion from values of type a involved in creating the array.
2022-07-30 12:59:38 +0200 <int-e> s/conversion from//
2022-07-30 13:00:54 +0200 <int-e> (There's things like comparisons too which I wouldn't include under "conversion from")
2022-07-30 13:01:25 +0200 <pavonia> There is
2022-07-30 13:02:10 +0200 <pavonia> I'll let the values be created at top-level and don't care about that case then
2022-07-30 13:02:41 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 13:04:35 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Client Quit)
2022-07-30 13:05:52 +0200 <int-e> pavonia: And of course if you know the Integral instance that's going to be used, you could provide a type signature to fix that.
2022-07-30 13:08:00 +0200 <int-e> But yeah, moving the value to the toplevel is an easy way to make certain it's not reevaluated.
2022-07-30 13:10:27 +0200acidjnk(~acidjnk@p200300d6e7058679941b85bc31e49e75.dip0.t-ipconnect.de)
2022-07-30 13:10:51 +0200glguy(x@libera/staff/glguy) (Read error: Connection reset by peer)
2022-07-30 13:10:52 +0200glguy_(x@libera/staff/glguy)
2022-07-30 13:11:30 +0200acidjnk_new(~acidjnk@p200300d6e7058679a001276fdd936342.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-07-30 13:15:35 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-30 13:16:19 +0200benin05(~benin@183.82.30.242)
2022-07-30 13:16:26 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-30 13:16:32 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 13:18:26 +0200benin0(~benin@183.82.205.104) (Ping timeout: 268 seconds)
2022-07-30 13:18:26 +0200benin05benin0
2022-07-30 13:25:54 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-07-30 13:26:42 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 245 seconds)
2022-07-30 13:35:36 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 13:40:03 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-30 13:40:11 +0200zxx7530(~Thunderbi@user/zxx7529)
2022-07-30 13:41:46 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 13:41:53 +0200sandy_doo(~sandydoo@185.209.196.136)
2022-07-30 13:42:30 +0200zxx7530zxx7529
2022-07-30 13:42:42 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 13:43:21 +0200naso(~naso@193-116-244-197.tpgi.com.au) (Client Quit)
2022-07-30 13:44:00 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 13:52:08 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-07-30 13:53:41 +0200mbuf(~Shakthi@122.165.55.71)
2022-07-30 13:56:47 +0200Guest|38(~Guest|38@h217.18.214.67.dynamic.ip.windstream.net)
2022-07-30 13:57:46 +0200Guest|38(~Guest|38@h217.18.214.67.dynamic.ip.windstream.net) (Client Quit)
2022-07-30 13:58:16 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-07-30 13:59:11 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de)
2022-07-30 14:02:44 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net)
2022-07-30 14:08:31 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de) (Ping timeout: 252 seconds)
2022-07-30 14:11:13 +0200doelie(~tom@c-73-17-195-134.hsd1.me.comcast.net)
2022-07-30 14:12:32 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net) (Ping timeout: 245 seconds)
2022-07-30 14:15:18 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-07-30 14:16:42 +0200hasbae(~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
2022-07-30 14:19:36 +0200 <doelie> hi all. is there anything special that needs to be done for foreign import capi functions that call pthread_create()? i have some code that starts a couple of threads which works fine from plain C executable, but doesn't seem to start threads when called from haskell.
2022-07-30 14:23:08 +0200 <[exa]> doelie: any special compile flags? (I assume -threaded ?)
2022-07-30 14:24:55 +0200crazazy(~user@130.89.171.62)
2022-07-30 14:26:32 +0200russruss(~russruss@my.russellmcc.com)
2022-07-30 14:29:07 +0200 <doelie> "/nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/bin/ghc" -threaded -I../tools -I../stm32f103 -I../../uc_tools -I../../uc_tools/linux hs_emu.hs
2022-07-30 14:29:38 +0200 <[exa]> are the C functions calling back into haskell? (that's a common source of scheduling trouble)
2022-07-30 14:29:56 +0200 <doelie> no haskell -> C only
2022-07-30 14:31:01 +0200 <[exa]> ok weird, that should just work
2022-07-30 14:31:19 +0200 <[exa]> I'd go `strace -f` and try to see what it's actually doing
2022-07-30 14:33:49 +0200naso(~naso@193-116-244-197.tpgi.com.au)
2022-07-30 14:33:57 +0200 <naso> any good tutorials on quickcheck
2022-07-30 14:34:44 +0200 <[exa]> naso: define "good" :D
2022-07-30 14:35:32 +0200 <naso> not out of date... teaches me how to make Arbitrary instances for my custom types
2022-07-30 14:35:41 +0200xff0x(~xff0x@ap007189.d.east.v6connect.net)
2022-07-30 14:36:11 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
2022-07-30 14:36:18 +0200 <[exa]> I was pretty happy with the official manual here http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html
2022-07-30 14:37:10 +0200 <naso> thanks :)
2022-07-30 14:37:49 +0200 <[exa]> like, hackage says this _might_ be out of date but it's probably not harshly out of date
2022-07-30 14:37:57 +0200 <[exa]> if something looks broken feel free to ask here
2022-07-30 14:38:51 +0200benin05(~benin@183.82.177.174)
2022-07-30 14:39:03 +0200 <doelie> exa: the clone() calls are different in my C code and in the hs code. i'll strip it down to something simpler. thanks for the idea!
2022-07-30 14:39:44 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8)
2022-07-30 14:39:58 +0200 <[exa]> naso: btw what's your type like? actually, the only conceptual problem with writing Arbitrary instances is that you must avoid generating an infinite object
2022-07-30 14:40:47 +0200benin0(~benin@183.82.30.242) (Ping timeout: 252 seconds)
2022-07-30 14:40:47 +0200benin05benin0
2022-07-30 14:41:36 +0200 <[exa]> doelie: ah ok, nice. it could be useful to check if the pthread_create doesn't actually return some kind of useful error (you might be hitting the limits because haskell already creates a few threads)
2022-07-30 14:41:46 +0200arjun(~arjun@user/arjun)
2022-07-30 14:43:32 +0200 <[exa]> naso: btw it's often quite useful to copy code from this library https://hackage.haskell.org/package/quickcheck-instances :]
2022-07-30 14:43:39 +0200 <naso> [exa]: the difficulty with my type is that it's consists of a bunch of (finite) sets and functions between them that have to satisfy some equations. just generating the data randomly, the chance of satisfying the equations is very low, so i have to think of a good way to sample the space of possibilities efficiently
2022-07-30 14:43:55 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 244 seconds)
2022-07-30 14:44:15 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:28f8:ffd7:495f:96f8) (Ping timeout: 260 seconds)
2022-07-30 14:44:45 +0200 <naso> [exa]: thanks for that
2022-07-30 14:46:35 +0200 <[exa]> ah so, that might be complicated. Is there some natural way to walk the space of "valid" values?
2022-07-30 14:47:45 +0200 <doelie> exa: maybe this has something to do with signals. i've had issues before combining Haskell and C code that did not handle EINTR properly
2022-07-30 14:47:59 +0200 <naso> yeah should be i just need to think of the best way to go about it
2022-07-30 14:48:04 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 14:48:06 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 14:48:26 +0200 <geekosaur> doelie, try +RTS -V0
2022-07-30 14:48:50 +0200 <geekosaur> the RTS uses a *lot* of timer signals
2022-07-30 14:50:05 +0200acidjnk(~acidjnk@p200300d6e7058679941b85bc31e49e75.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-07-30 14:53:46 +0200 <[exa]> naso: how complex are the equations? one reasonable method is to generate a random case that doesn't satisfy anything, and then try to fix it towards the closest one that would pass
2022-07-30 14:54:51 +0200causal(~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e)
2022-07-30 14:56:20 +0200 <naso> [exa]: essentially i am trying to generate a random finite set-valued functor on a a finite category, so the data consists of a bunch of sets, a bunch of funcitons between the sets, and the functions have to satisfy the the functor laws
2022-07-30 14:56:42 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-07-30 14:56:57 +0200 <doelie> geekosaur: disabling timer didn't do anything
2022-07-30 14:56:59 +0200 <naso> i think i need to find a generating set of arrows in the original category and just randomly get the values of the functor on that generating set
2022-07-30 14:57:39 +0200 <doelie> i'll flatten the C code into a single pthread_create() call...
2022-07-30 14:58:59 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 15:01:15 +0200geekosaurwonders if hedgehog would be better suited to this than QuickCheck
2022-07-30 15:02:17 +0200Milan(~Milan@46.245.121.30)
2022-07-30 15:02:23 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 15:02:39 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 268 seconds)
2022-07-30 15:02:54 +0200 <naso> never used hedgehog before ... looking it up now. thanks
2022-07-30 15:04:57 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 15:06:23 +0200 <Milan> Hi ,Is it possible for  any one to answer  my question {is Lambda function always consider each function an identity function?}
2022-07-30 15:09:26 +0200chomwitt(~chomwitt@2a02:587:dc12:b700:d6f4:2a4f:a8e:737)
2022-07-30 15:10:11 +0200akegalj(~akegalj@95.168.118.31)
2022-07-30 15:10:25 +0200akegalj(~akegalj@95.168.118.31) (Client Quit)
2022-07-30 15:11:30 +0200 <[exa]> naso: oh wow. maybe test on a few smaller subsets of the functors that have reasonable generators?
2022-07-30 15:12:25 +0200misterfish(~misterfis@ip214-130-173-82.adsl2.static.versatel.nl)
2022-07-30 15:12:26 +0200 <[exa]> Milan: I'm not sure if I understood the question right, but in lambda calculus there are certainly functions that are _not_ identity functions, so the answer is probably no
2022-07-30 15:13:59 +0200 <Milan> thank you ,but the process of currying forces me think like this
2022-07-30 15:14:04 +0200 <doelie> stripped down example works fine... something not right with my C code. thanks for the help exa, geekosaur
2022-07-30 15:14:49 +0200 <[exa]> Milan: like, all lambda functions are single-parameter functions (as in, λx.something), but that doesn't mean they have to be identities (λx.x)
2022-07-30 15:15:29 +0200 <Milan> oh ,I got what u mean
2022-07-30 15:15:53 +0200 <geekosaur> currying has nothing to do with identities, it's just a different way of looking at parameters, and supports partial application
2022-07-30 15:16:21 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net) (Ping timeout: 252 seconds)
2022-07-30 15:16:23 +0200 <[exa]> doelie: can you check whether the threads in the complicated code get started? (as in, code execution doesnt even reach the threads vs. the threads start but get interrupted forever)
2022-07-30 15:16:34 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net)
2022-07-30 15:17:05 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 252 seconds)
2022-07-30 15:17:18 +0200 <geekosaur> `foo a b = …` is `foo = \a -> \b -> …` so we can treat the expression `foo x` as filling in the `\a ->` and produce the closure `\b -> …` with `x` bound to `a`
2022-07-30 15:17:29 +0200 <Milan> so the function returns one value but not necessarily the  same value as input
2022-07-30 15:18:27 +0200 <[exa]> Milan: yes. take for example the K combinator, which is (λx.(λy.x)) -- upon receiving the 'x' parameter, it returns a function
2022-07-30 15:20:28 +0200 <[exa]> (...which is different from `x` because it's `x` wrapped in a lambda :] )
2022-07-30 15:20:49 +0200 <doelie> exa: i had a fprintf(stderr,...) right at the beginning of the thread main and that didn't get executed. what i think is going on here is that my C code is doing some preprocessor things that are not ok. it started working once i removed some includes. probably best to use a separate compilation unit then link that into haskell.
2022-07-30 15:22:14 +0200 <Milan> excuse me for my questions ,because I am absolute beginner to programming ,is the final out put a `x`? which is different from the first `x`?
2022-07-30 15:22:28 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-30 15:23:24 +0200 <geekosaur> ultimately it's the same as the first x. but it has the "side effect" of consuming a y that disappears
2022-07-30 15:23:45 +0200 <[exa]> Milan: np :] say you have the function (λx.(λy.x)) and you give it a parameter 123. You get: (λx.(λy.x)) 123, which may be β-reduced using substitution x:=123, receiving: (λy.123)
2022-07-30 15:24:37 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-30 15:24:59 +0200 <[exa]> (λy.123) is not the same as 123, as geekosaur pointed out. But you can give it another parameter: (λy.123) 456 gets you your 123 back
2022-07-30 15:26:27 +0200 <[exa]> (the reduction rule is: all occurences of `y` become 456 and the lambda disappears. Unfortunately there weren't any occurrences of `y` except in the lambda head)
2022-07-30 15:28:21 +0200Milan(~Milan@46.245.121.30) (Quit: Client closed)
2022-07-30 15:28:32 +0200Milan(~Milan@46.245.121.30)
2022-07-30 15:30:06 +0200 <Milan> I really appreciate your patience
2022-07-30 15:30:47 +0200Milan(~Milan@46.245.121.30) (Client Quit)
2022-07-30 15:30:57 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-07-30 15:42:03 +0200doelie(~tom@c-73-17-195-134.hsd1.me.comcast.net) (Remote host closed the connection)
2022-07-30 15:45:50 +0200califax_(~califax@user/califx)
2022-07-30 15:46:03 +0200doelie(~tom@c-73-17-195-134.hsd1.ma.comcast.net)
2022-07-30 15:47:45 +0200califax(~califax@user/califx) (Ping timeout: 268 seconds)
2022-07-30 15:47:46 +0200califax_califax
2022-07-30 15:52:14 +0200zmt01(~zmt00@user/zmt00)
2022-07-30 15:52:33 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de)
2022-07-30 15:53:58 +0200m1dnight(~christoph@78.22.0.121) (Quit: WeeChat 3.6)
2022-07-30 15:54:42 +0200 <doelie> works after adding .c -> .o compilation step, then linking that .o on ghc command line and using a clean header for foreign import capi.
2022-07-30 15:56:15 +0200zmt00(~zmt00@user/zmt00) (Ping timeout: 272 seconds)
2022-07-30 15:56:22 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-07-30 15:58:51 +0200m1dnight_(~christoph@78-22-0-121.access.telenet.be)
2022-07-30 15:59:00 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Read error: Connection reset by peer)
2022-07-30 16:01:05 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net) (Ping timeout: 252 seconds)
2022-07-30 16:01:17 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-07-30 16:02:43 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-30 16:03:28 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 16:08:41 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 16:18:40 +0200 <[exa]> doelie: kinda wondering what could have been the offender there. Something redefined pthread_create? :D
2022-07-30 16:19:00 +0200sandy_doo(~sandydoo@185.209.196.136) (Ping timeout: 244 seconds)
2022-07-30 16:19:35 +0200 <doelie> exa: i'm doing a lot of "creative" things there... this is microcontroller code wrapped to run as linux binaries for testing. i think it has something to do with feature macros
2022-07-30 16:21:09 +0200 <[exa]> ah okay that is one easy way to collide. :]
2022-07-30 16:21:12 +0200zebrag(~chris@user/zebrag)
2022-07-30 16:21:56 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-07-30 16:26:17 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds)
2022-07-30 16:28:28 +0200arjun(~arjun@user/arjun) (Quit: tip toe-ing my way outta here)
2022-07-30 16:32:04 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 16:32:28 +0200Swen(~Swen@2001:1c02:2b0f:ed00:f124:9a56:ad5e:5dc8)
2022-07-30 16:34:05 +0200misterfish(~misterfis@ip214-130-173-82.adsl2.static.versatel.nl) (Ping timeout: 252 seconds)
2022-07-30 16:36:03 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-07-30 16:36:07 +0200 <Swen> https://gist.github.com/Swendude/c3b6f639ba06a9277d2110dc849ac59c Any clue how to make cabal import my own executable to test it?
2022-07-30 16:36:10 +0200dequbed(~dequbed@banana-new.kilobyte22.de) (Ping timeout: 244 seconds)
2022-07-30 16:36:42 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 16:38:09 +0200Swen(~Swen@2001:1c02:2b0f:ed00:f124:9a56:ad5e:5dc8) (Quit: Client closed)
2022-07-30 16:38:14 +0200dequbed(~dequbed@banana-new.kilobyte22.de)
2022-07-30 16:38:16 +0200 <geekosaur> iirc when you spe… feh
2022-07-30 16:38:32 +0200 <albet70> is there a function turn [("a",1),("b",2),("a",2)...] to [("a",[1,2...]), ("b",[...])]?
2022-07-30 16:38:44 +0200 <naso> using hedgehog, how can i turn [Property] into Property. i.e. i have a list of properties, and i want to check all of them
2022-07-30 16:39:25 +0200 <geekosaur> > (group . sort) [("a",1),("b",2),("a",2)]
2022-07-30 16:39:27 +0200 <lambdabot> [[("a",1)],[("a",2)],[("b",2)]]
2022-07-30 16:39:51 +0200 <geekosaur> not quite
2022-07-30 16:42:58 +0200dequbed(~dequbed@banana-new.kilobyte22.de) (Client Quit)
2022-07-30 16:43:50 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de) (Ping timeout: 240 seconds)
2022-07-30 16:44:12 +0200 <albet70> I wonder if list comprehension can do it?
2022-07-30 16:45:05 +0200dequbed(~dequbed@banana-new.kilobyte22.de)
2022-07-30 16:50:34 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 268 seconds)
2022-07-30 16:55:33 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 17:00:11 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 17:05:37 +0200vglfr(~vglfr@194.9.14.33) (Remote host closed the connection)
2022-07-30 17:06:46 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 17:08:08 +0200 <[Leary]> albet70: If you find yourself needing that, it might be time to replace your alist with a Map.
2022-07-30 17:08:21 +0200 <[Leary]> :t M.fromListWith (++) . fmap (fmap pure)
2022-07-30 17:08:22 +0200 <lambdabot> Ord k => [(k, a)] -> M.Map k [a]
2022-07-30 17:08:30 +0200 <[Leary]> For example.
2022-07-30 17:10:44 +0200 <albet70> Leary yeah, Map as the result is better
2022-07-30 17:11:58 +0200 <albet70> turn [("a",1),("b",2),("a",2)...] to fromList [("a",[1,2...]), ("b",[...])].
2022-07-30 17:12:08 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 17:16:05 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 17:16:06 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-30 17:16:52 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 244 seconds)
2022-07-30 17:19:14 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 17:19:16 +0200glguy_glguy
2022-07-30 17:19:43 +0200dvdrw(~dvdrw@user/dvdrw) (Quit: Lost terminal)
2022-07-30 17:21:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 17:22:07 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 252 seconds)
2022-07-30 17:24:06 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-30 17:29:42 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 17:31:39 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-07-30 17:33:20 +0200hgolden(~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!)
2022-07-30 17:34:12 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 245 seconds)
2022-07-30 17:35:19 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 252 seconds)
2022-07-30 17:35:52 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds)
2022-07-30 17:36:07 +0200hgolden(~hgolden2@cpe-172-251-233-141.socal.res.rr.com)
2022-07-30 17:47:00 +0200 <albet70> there's a ugly way, first get all the first element in the tuple, group them get the unique ones, then add the second element in the tuple into the unique ones if the first element is equal
2022-07-30 17:47:20 +0200enemeth79(uid309041@id-309041.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-30 17:48:58 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 17:49:09 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 17:50:37 +0200acidjnk(~acidjnk@p200300d6e7058679941b85bc31e49e75.dip0.t-ipconnect.de)
2022-07-30 17:51:33 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-07-30 17:58:17 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-07-30 17:58:23 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-07-30 17:58:24 +0200 <[exa]> albet70: you won't get much better complexity than O(n log n) unless you know the # of "buckets" in advance. So what about just combining sortOn and groupOn and then an easy fold?
2022-07-30 17:58:51 +0200 <[exa]> (whew, not even fold, map is sufficient!)
2022-07-30 17:59:38 +0200 <[exa]> (I see others have already hinted in this direction :] )
2022-07-30 18:00:00 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-30 18:03:00 +0200naso(~naso@193-116-244-197.tpgi.com.au) ()
2022-07-30 18:13:12 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net)
2022-07-30 18:15:41 +0200odnes(~odnes@109-178-189-231.pat.ren.cosmote.net) (Client Quit)
2022-07-30 18:20:29 +0200mbuf(~Shakthi@122.165.55.71) (Quit: Leaving)
2022-07-30 18:22:59 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 252 seconds)
2022-07-30 18:24:22 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-07-30 18:25:01 +0200yin(~yin@user/zero)
2022-07-30 18:28:29 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 252 seconds)
2022-07-30 18:34:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 18:41:34 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.198)
2022-07-30 18:43:05 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-07-30 18:45:30 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-07-30 18:45:30 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-07-30 18:45:30 +0200wroathe(~wroathe@user/wroathe)
2022-07-30 18:49:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 18:50:23 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 18:56:08 +0200econo(uid147250@user/econo)
2022-07-30 18:58:07 +0200gurkenglas(~gurkengla@p548ac71b.dip0.t-ipconnect.de)
2022-07-30 18:59:33 +0200PiDelport(uid25146@id-25146.lymington.irccloud.com)
2022-07-30 19:02:44 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 19:06:22 +0200atkinjac(~atkinjac@2603:3026:105:6900::aa91)
2022-07-30 19:13:11 +0200Techcable(~Techcable@user/Techcable) (Remote host closed the connection)
2022-07-30 19:15:38 +0200Techcable(~Techcable@user/Techcable)
2022-07-30 19:16:25 +0200benin0(~benin@183.82.177.174) (Quit: The Lounge - https://thelounge.chat)
2022-07-30 19:17:46 +0200atkinjac(~atkinjac@2603:3026:105:6900::aa91) (Remote host closed the connection)
2022-07-30 19:21:38 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-07-30 19:22:16 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-07-30 19:26:48 +0200pnotequalnp(~pnotequal@user/pnotequalnp)
2022-07-30 19:27:06 +0200 <[itchyjunk]> I may or may not have made progress. I can turn "hello world" to "helloworld"
2022-07-30 19:27:44 +0200 <hololeap> :t M.fromListWith (<>) . map (fmap S.singleton)
2022-07-30 19:27:45 +0200 <lambdabot> (Ord k, Ord a) => [(k, a)] -> M.Map k (S.Set a)
2022-07-30 19:28:25 +0200 <[itchyjunk]> Ah, why do I always end up with this output..
2022-07-30 19:30:18 +0200 <EvanR> > filter (== ' ') "hello world"
2022-07-30 19:30:20 +0200 <lambdabot> " "
2022-07-30 19:30:25 +0200 <EvanR> crap
2022-07-30 19:30:30 +0200 <geekosaur> heh
2022-07-30 19:30:36 +0200 <geekosaur> (not that I never do that)
2022-07-30 19:31:45 +0200mtjm(~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection)
2022-07-30 19:32:57 +0200 <hololeap> :t M.fromListWith (M.unionWith (+)) . map (fmap (`M.singleton` 1))
2022-07-30 19:32:58 +0200 <lambdabot> (Ord k1, Ord k2, Num a) => [(k1, k2)] -> M.Map k1 (M.Map k2 a)
2022-07-30 19:32:59 +0200mtjm(~mutantmel@2604:a880:2:d0::208b:d001)
2022-07-30 19:35:00 +0200 <hololeap> for each k1, keep count of each k2 that appeared with it
2022-07-30 19:35:25 +0200 <hololeap> (just another possibility)
2022-07-30 19:36:34 +0200 <hololeap> maps are great
2022-07-30 19:37:16 +0200 <int-e> be sure to use a value-strict one
2022-07-30 19:37:49 +0200 <hololeap> I'm not sure I've ever used Data.Map.Lazy (except by accident)
2022-07-30 19:38:20 +0200 <EvanR> it's a specialty structure
2022-07-30 19:38:21 +0200 <int-e> M.fromListWith (M.unionWith (+)) is the core of a ton of quick-and-dirty dynamic programming I've done.
2022-07-30 19:39:04 +0200 <int-e> hololeap: I'm sure I have, but rarely... it's useful for some types of knot-tying.
2022-07-30 19:40:38 +0200 <hololeap> I've never really understood "knot tying", it goes too far into implicit lazy evaluation voodoo for me
2022-07-30 19:41:11 +0200 <hololeap> seems like a memleak waiting to happen
2022-07-30 19:41:24 +0200 <EvanR> the idea is to avoid space leaks xD
2022-07-30 19:41:36 +0200 <EvanR> which happen when you fail to tie the knot
2022-07-30 19:42:42 +0200hololeapconfesses ignorance
2022-07-30 19:42:47 +0200 <tomsmeding> > let l = [2 * l!!1, 5, l!!0 + 7] in l -- solving the system: a = 2b, b = 5, c = a + 7
2022-07-30 19:42:48 +0200 <lambdabot> [10,5,17]
2022-07-30 19:43:04 +0200 <hololeap> ah, of course!
2022-07-30 19:43:07 +0200 <hololeap> ;)
2022-07-30 19:43:18 +0200 <int-e> Right. And you can use a Map instead of a list and index things by their variable name.
2022-07-30 19:43:25 +0200 <tomsmeding> Data.Map.Lazy just makes this n log n instead of n^2 :p
2022-07-30 19:43:28 +0200 <tomsmeding> Yeah
2022-07-30 19:43:54 +0200 <tomsmeding> Only works if the dependency graph has no cycles, of course
2022-07-30 19:44:12 +0200 <tomsmeding> > let l = [2 * l!!1, l!!0, l!!0 + 7] in l
2022-07-30 19:44:15 +0200 <lambdabot> [*Exception: <<loop>>
2022-07-30 19:44:26 +0200 <int-e> It's... somewhat questionable because once you start checking for cycles (to detect invalid input), those tricks become kind of useless.
2022-07-30 19:44:40 +0200 <EvanR> depends on which and how you look at the result!
2022-07-30 19:44:56 +0200 <int-e> But it allows for some compact code for coding challenges where the input is guaranteed to be sound.
2022-07-30 19:45:31 +0200 <int-e> ("coding challenges" may also be your own toy programs where you don't care about things like good error messages.)
2022-07-30 19:50:24 +0200 <hololeap> >>> let m = LM.fromList [('a', 2 * m ! 'b'), ('b', 5), ('c', m ! 'a' + 7)] in m
2022-07-30 19:50:27 +0200 <hololeap> fromList [('a',10),('b',5),('c',17)]
2022-07-30 19:50:38 +0200 <hololeap> so yeah, it seems to work
2022-07-30 19:51:01 +0200 <hololeap> could be a good example to take apart
2022-07-30 19:51:06 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 19:51:10 +0200 <int-e> hololeap: Another knot-tying application I have are monadic DSLs with labels. So you'd start with `mdo`, define labels by `label <- makeLabel`, use labels anywhere (even before they're defined), and internally it would generate names for the labels and put some information about the location inside a Map. Though, hmm, I'm not sure whether I need a value-lazy map for that. It depends on the details.
2022-07-30 19:51:12 +0200 <EvanR> and strict map would loop?
2022-07-30 19:51:45 +0200 <hololeap> yeah, looks like it does
2022-07-30 19:52:16 +0200 <hololeap> the output hangs on "fromList "
2022-07-30 19:52:17 +0200 <int-e> (The knot is really just in taking the collected labels from the end and feeding them back into the computation.)
2022-07-30 19:52:43 +0200 <int-e> Anyway. It rarely comes up, and it's usually deliberate.
2022-07-30 19:53:21 +0200 <bontaq> hmm I have a modeling question related to a graph and how I could get rid of an extra parameter https://gist.github.com/bontaq/803cea883a62e95a25d39380e9ffe18e, if anyone could take a look. I feel like I'm missing something maybe obvious xD
2022-07-30 19:53:25 +0200 <hololeap> I remember using mdo when I got way too deep into this frp application I was trying to make
2022-07-30 19:53:36 +0200 <int-e> And of course there's memoization, but Map really isn't a great data structure for that if you're using the keys sparsely.
2022-07-30 19:54:21 +0200 <int-e> (tries (finite and infinite) are better)
2022-07-30 19:54:50 +0200 <int-e> But /if/ you do memization with Map you'll want a lazy one.
2022-07-30 19:55:26 +0200 <hololeap> isn't a trie basically (Cofree (Map k))
2022-07-30 19:56:27 +0200 <int-e> Hmm. Is it? Maybe it is.
2022-07-30 19:57:03 +0200 <hololeap> I think I remember that being the case
2022-07-30 19:57:16 +0200 <int-e> The point though is that tries can grow lazily, while using Map will always create the full tree of keys.
2022-07-30 19:57:16 +0200 <albet70> what is Cofree? another drink?
2022-07-30 19:58:41 +0200 <hololeap> yeah, ask for one at the cafe next time. they're deliciouis
2022-07-30 19:58:51 +0200 <hololeap> delicious
2022-07-30 19:59:00 +0200 <EvanR> no that's cofreefree
2022-07-30 19:59:20 +0200 <[exa]> c'mon guys I thought we had enough Ffee jokes
2022-07-30 19:59:38 +0200 <hololeap> @hoogle Cofree
2022-07-30 19:59:39 +0200 <lambdabot> module Control.Comonad.Cofree
2022-07-30 19:59:39 +0200 <lambdabot> Control.Comonad.Cofree data Cofree f a
2022-07-30 19:59:39 +0200 <lambdabot> module Control.Comonad.Trans.Cofree
2022-07-30 19:59:44 +0200 <int-e> We'll want `Trie k a = Trie a (Map k (Trie k a))`
2022-07-30 20:00:06 +0200 <EvanR> sorry, *beats previous decade back with a golf club*
2022-07-30 20:00:26 +0200 <hololeap> data Cofree = a :< (f (Cofree f a))
2022-07-30 20:00:29 +0200 <[exa]> albet70: there's a concept of free data structures (as in, easily generated as free algebras), cofree is a dual concept to that
2022-07-30 20:00:57 +0200 <int-e> hololeap: So yeah, that fits. Does that help you understand tries any better?
2022-07-30 20:01:25 +0200 <EvanR> are f and a parameters to the data type there
2022-07-30 20:01:26 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-07-30 20:01:31 +0200 <int-e> I can say that for me, it doesn't.
2022-07-30 20:01:35 +0200 <int-e> EvanR: yes.
2022-07-30 20:02:15 +0200 <hololeap> int-e: yeah it helps me
2022-07-30 20:02:21 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2022-07-30 20:02:29 +0200 <hololeap> EvanR: it should have been "data Cofree f a = ..."
2022-07-30 20:02:41 +0200Lord_of_Life_Lord_of_Life
2022-07-30 20:03:26 +0200 <EvanR> data Foo f a = a :< f (Foo f a), explains more than the term Cofree or any blurb about category theory, for me at this point xD
2022-07-30 20:03:50 +0200 <hololeap> but I think of Cofree mostly in terms of its recursive structure, more than something to do with comonads
2022-07-30 20:03:54 +0200 <EvanR> though I don't see what it has to do with tries
2022-07-30 20:04:58 +0200pnotequalnp(~pnotequal@user/pnotequalnp) (Ping timeout: 252 seconds)
2022-07-30 20:05:05 +0200 <int-e> EvanR: The (infinite) tries we want for memization memoize functions of type [k] -> a, so we need a value for the empty list (at the root) and a subtrie for every value of k.
2022-07-30 20:05:25 +0200 <hasbae> i have the definition of bind (>>=), and need figure out fmap for the same type. is there equality relation fmap and >>=?
2022-07-30 20:05:31 +0200 <int-e> And that's what Cofree (Map k) a allows you to do.
2022-07-30 20:05:49 +0200 <int-e> provided k is finite, otherwise you have more work to do
2022-07-30 20:06:00 +0200 <geekosaur> hasbae, there is a way to derive fmap from >>=, which you should be able to work out from the general definition of >>=
2022-07-30 20:06:22 +0200 <int-e> :t fmap
2022-07-30 20:06:22 +0200 <hasbae> ok
2022-07-30 20:06:23 +0200 <lambdabot> Functor f => (a -> b) -> f a -> f b
2022-07-30 20:06:45 +0200 <int-e> you'll need that other monad operation too.
2022-07-30 20:06:51 +0200 <EvanR> i feel like there should be a way to "solve" one of the monad laws to get fmap in terms of >>= xD
2022-07-30 20:06:53 +0200 <hololeap> EvanR: if you wanted a trie for strings, you would probably want `Cofree (Map Char) Bool`. the Bool is to keep track of whether or not this point in the structure corresponds with a string
2022-07-30 20:06:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 20:07:21 +0200 <hasbae> int-e: return?
2022-07-30 20:07:26 +0200 <int-e> hasbae: yes
2022-07-30 20:08:28 +0200 <hololeap> (with the end of string that is cached in the trie)
2022-07-30 20:11:19 +0200 <hololeap> a trie that has stored the strings "a" and "ab": False :< fromList [('a', True :< fromList [('b', True :< fromList []])]
2022-07-30 20:11:34 +0200 <hololeap> False :< fromList [('a', True :< fromList [('b', True :< fromList []])]
2022-07-30 20:12:01 +0200 <hololeap> (I think I'm missing a parens, but hopefully you get the point)
2022-07-30 20:12:14 +0200 <EvanR> oh ok, that's a trie alright
2022-07-30 20:13:35 +0200wroathe(~wroathe@user/wroathe) (Quit: leaving)
2022-07-30 20:13:58 +0200acidjnk(~acidjnk@p200300d6e7058679941b85bc31e49e75.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-07-30 20:19:39 +0200 <koala_man> what's the current state of Haskell to WASM?
2022-07-30 20:20:24 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net)
2022-07-30 20:20:34 +0200 <geekosaur> still expected in 9.6
2022-07-30 20:21:14 +0200 <geekosaur> if you want more details, talk to terrorjack in #ghc
2022-07-30 20:21:53 +0200 <koala_man> awesome, thanks
2022-07-30 20:23:30 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 20:23:59 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-07-30 20:24:56 +0200yauhsien(~yauhsien@61-231-30-230.dynamic-ip.hinet.net) (Ping timeout: 244 seconds)
2022-07-30 20:25:02 +0200hermes2000(~hermes200@136-24-143-232.cab.webpass.net)
2022-07-30 20:25:29 +0200hermes2000(~hermes200@136-24-143-232.cab.webpass.net) (Client Quit)
2022-07-30 20:27:54 +0200 <koala_man> can an Array be length zero?
2022-07-30 20:28:45 +0200 <koala_man> oh duh, array (0, -1). I confused myself
2022-07-30 20:29:02 +0200 <geekosaur> (0,0) wouldn't it be?
2022-07-30 20:29:34 +0200 <geekosaur> first and last index
2022-07-30 20:29:47 +0200 <geekosaur> > array (0,0) []
2022-07-30 20:29:48 +0200 <lambdabot> array (0,0) [(0,*Exception: (Array.!): undefined array element
2022-07-30 20:30:15 +0200 <geekosaur> so it can make it but the Show instance doesn't work 🙂
2022-07-30 20:30:31 +0200 <koala_man> > array (0,0) [(0,42)] ! 0
2022-07-30 20:30:33 +0200 <lambdabot> 42
2022-07-30 20:30:46 +0200 <koala_man> it's length 1
2022-07-30 20:30:49 +0200 <geekosaur> hm, right, that's one element
2022-07-30 20:31:05 +0200 <geekosaur> > array (0,-1) []
2022-07-30 20:31:07 +0200 <lambdabot> array (0,-1) []
2022-07-30 20:31:21 +0200 <geekosaur> I wonder if that only works by accident
2022-07-30 20:31:34 +0200 <geekosaur> > array (True,False) []
2022-07-30 20:31:35 +0200 <lambdabot> array (True,False) []
2022-07-30 20:31:43 +0200 <geekosaur> apparently not
2022-07-30 20:33:23 +0200 <EvanR> negative one in the index feels like python
2022-07-30 20:33:27 +0200 <EvanR> make it go away
2022-07-30 20:34:18 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 20:35:50 +0200glguy(x@libera/staff/glguy) (Read error: Connection reset by peer)
2022-07-30 20:35:55 +0200glguy_(x@libera/staff/glguy)
2022-07-30 20:40:48 +0200 <EvanR> this is another mark against Array xD
2022-07-30 20:41:21 +0200 <EvanR> the category theory of matrix algebra doesn't require negatives xD
2022-07-30 20:45:16 +0200 <geekosaur> > array (-3,2) (zip [-3..2] "abcdef")
2022-07-30 20:45:19 +0200 <lambdabot> array (-3,2) [(-3,'a'),(-2,'b'),(-1,'c'),(0,'d'),(1,'e'),(2,'f')]
2022-07-30 20:46:33 +0200 <EvanR> oh right the indexes can be anything
2022-07-30 20:46:45 +0200 <EvanR> implementing Ix
2022-07-30 20:49:14 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-07-30 20:49:40 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-07-30 20:52:36 +0200glguy_glguy
2022-07-30 20:56:48 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-07-30 20:59:47 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-30 21:00:02 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.198) (Ping timeout: 245 seconds)
2022-07-30 21:05:12 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-30 21:09:24 +0200 <hpc> here's the real mark against Array
2022-07-30 21:09:25 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 21:09:35 +0200 <hpc> > array ((), ()) ["can't make it empty"]
2022-07-30 21:09:38 +0200 <lambdabot> error:
2022-07-30 21:09:38 +0200 <lambdabot> • Couldn't match expected type ‘((), e)’ with actual type ‘[Char]’
2022-07-30 21:09:38 +0200 <lambdabot> • In the expression: "can't make it empty"
2022-07-30 21:09:48 +0200 <hpc> > array ((), ()) [((), "can't make it empty")]
2022-07-30 21:09:49 +0200 <lambdabot> array ((),()) [((),"can't make it empty")]
2022-07-30 21:10:02 +0200 <onosendi> How do I get the opposite of a boolean? Like `isTrue = True; isFalse = !isTrue`
2022-07-30 21:10:24 +0200 <hpc> > not False
2022-07-30 21:10:27 +0200 <lambdabot> True
2022-07-30 21:10:28 +0200 <hpc> ^
2022-07-30 21:10:37 +0200 <EvanR> isTrue = id
2022-07-30 21:10:48 +0200 <hpc> isTrue = unsafeCoerce
2022-07-30 21:10:55 +0200johnw(~johnw@2600:1700:cf00:db0:e87e:9cff:3897:94f) (Quit: ZNC - http://znc.in)
2022-07-30 21:10:56 +0200 <geekosaur> unlike many languages, there is no autocoercion to Bool
2022-07-30 21:11:22 +0200 <geekosaur> 0 is neither True nor False, it would be a type error if used as a Bool
2022-07-30 21:14:26 +0200 <hpc> of course, that means 0 is FILE_NOT_FOUND
2022-07-30 21:14:33 +0200 <EvanR> it's fine because a lot of, but not all, uses for doing that are covered by pattern matching
2022-07-30 21:14:43 +0200 <hpc> https://thedailywtf.com/articles/What_Is_Truth_0x3f_
2022-07-30 21:14:58 +0200 <onosendi> hpc: thanks
2022-07-30 21:15:00 +0200 <EvanR> which skips the conversion to bool and gets to the actual point, often
2022-07-30 21:15:15 +0200 <hpc> :P
2022-07-30 21:17:48 +0200Sgeo(~Sgeo@user/sgeo)
2022-07-30 21:18:34 +0200 <onosendi> So `foldl` is like JS' `reduce`?
2022-07-30 21:19:41 +0200 <hpc> yep
2022-07-30 21:20:11 +0200 <hpc> also foldr
2022-07-30 21:20:24 +0200 <EvanR> which is arguably less like js reduce
2022-07-30 21:21:12 +0200 <onosendi> Well, we have `reduceRight` :P
2022-07-30 21:22:24 +0200 <EvanR> ... what is that
2022-07-30 21:23:15 +0200 <hpc> it's reduce, but right
2022-07-30 21:23:24 +0200 <hpc> presumably it is less unlike foldr than reduce
2022-07-30 21:23:24 +0200Milan(~Milan@46.245.77.7)
2022-07-30 21:23:26 +0200 <hpc> :P
2022-07-30 21:24:00 +0200 <EvanR> now that we have Foldable, what foldr is is crystal clear
2022-07-30 21:24:24 +0200Milan(~Milan@46.245.77.7) (Client Quit)
2022-07-30 21:30:53 +0200acidjnk(~acidjnk@p200300d6e7058679d19d5270ce8bc1dc.dip0.t-ipconnect.de)
2022-07-30 21:31:23 +0200 <onosendi> The first one gives me a hint to change it. When I change it, I get an error. https://gist.github.com/onosendi/134aa0439a9f1c188d59a297a97bf70c
2022-07-30 21:32:01 +0200 <EvanR> for the first issue, put a type signature
2022-07-30 21:32:45 +0200 <EvanR> wait nvm
2022-07-30 21:33:19 +0200 <EvanR> you need a type sig for the 2nd one but not the first? xD
2022-07-30 21:33:41 +0200 <onosendi> Ah, got it. Thanks.
2022-07-30 21:34:16 +0200 <EvanR> (I'm still confused lol)
2022-07-30 21:34:18 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 21:34:40 +0200 <geekosaur> ghc 9.x?
2022-07-30 21:34:43 +0200 <EvanR> I guess eta reduce doesn't always "just work", regarding type inference
2022-07-30 21:35:07 +0200 <geekosaur> shallow subsumption broke eta reducing
2022-07-30 21:35:32 +0200 <geekosaur> 9.2.4 added -DDeepSubsumption to bring back the old behavior
2022-07-30 21:35:50 +0200 <EvanR> jeez
2022-07-30 21:36:18 +0200 <geekosaur> (all of this happened because of QuickLook / ImpredicativeTypes, even when they're not involved)
2022-07-30 21:36:47 +0200 <onosendi> `ghc --version` = The Glorious Glasgow Haskell Compilation System, version 8.10.7
2022-07-30 21:37:01 +0200 <geekosaur> interesting, eta reduction should work in that version
2022-07-30 21:37:30 +0200 <geekosaur> hm, but are you using ghc directly or using stack?
2022-07-30 21:38:00 +0200 <dolio> I think you guys might be over-analyzing this.
2022-07-30 21:38:10 +0200 <geekosaur> since stack can pick a ghc version based on the resolver, which may not be the version of ghc yuou get at the command line (if any)
2022-07-30 21:38:22 +0200 <dolio> What applies to length2 but not length1?
2022-07-30 21:38:37 +0200 <dolio> From Haskell 98.
2022-07-30 21:38:48 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.198)
2022-07-30 21:39:00 +0200 <geekosaur> oh, monomorphism restriction
2022-07-30 21:39:05 +0200 <dolio> Bingo.
2022-07-30 21:39:16 +0200 <geekosaur> which will apply because of Foldable
2022-07-30 21:39:53 +0200 <geekosaur> and only with ExtendedDefaultRules would that then force defaulting to list
2022-07-30 21:40:56 +0200 <EvanR> that involves prior technology but is no less complicated xD
2022-07-30 21:41:19 +0200 <EvanR> thank you haskell may I please have another haskell
2022-07-30 21:41:57 +0200yin(~yin@user/zero) (Read error: Connection reset by peer)
2022-07-30 21:42:42 +0200 <geekosaur> and hidden behind all of this is that hlint knows nothing about types, monomorphism restriction, subsumption, etc. and will happily suggest eta reduction when it won't work
2022-07-30 21:43:12 +0200 <geekosaur> it's based on heuristic analysis of code
2022-07-30 21:43:34 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-07-30 21:46:19 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-07-30 21:46:45 +0200yin(~yin@user/zero)
2022-07-30 21:47:06 +0200pavonia(~user@user/siracusa)
2022-07-30 21:47:36 +0200 <hololeap> hlint is occasionally helpful though, for instance reminding me that mapMaybe is a thing
2022-07-30 21:48:06 +0200Inst(~Inst@2601:6c4:4080:3f80:88fb:d6ca:60f6:4fa2) (Ping timeout: 244 seconds)
2022-07-30 21:49:08 +0200 <geekosaur> we silenced a warning in xmonad-contrib because it didn't realize that a `const` was needed to make types line up
2022-07-30 21:50:17 +0200 <hololeap> I just have it enabled in hls locally. I wouldn't want it in the CI pipeline
2022-07-30 21:51:26 +0200 <geekosaur> we only enable it in one CI job so it's fairly obvious when a failure is due to hlint
2022-07-30 21:52:07 +0200mixfix41(~sdenynine@user/mixfix41) (Ping timeout: 268 seconds)
2022-07-30 21:54:35 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
2022-07-30 21:55:57 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 21:57:02 +0200 <onosendi> Given those hints/errors in that gist, is that hlint?
2022-07-30 21:57:33 +0200 <geekosaur> the first one is hlint, the second is ghc
2022-07-30 21:59:05 +0200 <onosendi> Ah ok.
2022-07-30 21:59:30 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 240 seconds)
2022-07-30 22:00:26 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-07-30 22:02:52 +0200 <geekosaur> in vs code, hlint's messages are infos and ghc's are warnings or errors (check the icon next to the message). Also, hlint's always have that "Why not:"
2022-07-30 22:03:28 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 22:03:40 +0200 <onosendi> Got it.
2022-07-30 22:03:40 +0200 <geekosaur> and while hlint sometimes has some good ideas, you can feel free to ignore its suggestions or even disable them (in vs code that's available as one of the code actions)
2022-07-30 22:06:19 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-30 22:06:23 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-07-30 22:06:36 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.198) (Quit: Leaving)
2022-07-30 22:06:37 +0200 <onosendi> I'm in nvim using HLS, so I assume it's the same? I'm brand new to this language, so the hints seem to be helpful so far.
2022-07-30 22:06:57 +0200 <geekosaur> I don't know how nvim presents them
2022-07-30 22:07:00 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-07-30 22:07:03 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-07-30 22:07:10 +0200 <geekosaur> haven't tried HLS with either nvim or emacs as yet
2022-07-30 22:08:16 +0200 <geekosaur> (probably won't try it with nvim as I only use that for quick edits)
2022-07-30 22:08:32 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-07-30 22:10:02 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-07-30 22:10:54 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Client Quit)
2022-07-30 22:11:09 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-07-30 22:12:19 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-30 22:12:32 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 245 seconds)
2022-07-30 22:12:54 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 22:13:12 +0200 <onosendi> Does hlint have a config file where you can config the rules?
2022-07-30 22:13:21 +0200 <onosendi> ... per project
2022-07-30 22:13:32 +0200 <geekosaur> yes
2022-07-30 22:13:39 +0200 <onosendi> Ah, cool.
2022-07-30 22:14:18 +0200 <geekosaur> should be .hlint.yaml at the root of a project, iirc
2022-07-30 22:14:36 +0200 <geekosaur> there are also per-file annotations you can add
2022-07-30 22:15:27 +0200 <onosendi> Nice. I'll read the docs.
2022-07-30 22:16:03 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 22:16:39 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 22:17:02 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-30 22:17:17 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 252 seconds)
2022-07-30 22:17:18 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-07-30 22:18:25 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-07-30 22:24:57 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 22:29:44 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl) (Ping timeout: 268 seconds)
2022-07-30 22:30:25 +0200Pickchea(~private@user/pickchea)
2022-07-30 22:30:44 +0200Milan(~Milan@46.245.77.7)
2022-07-30 22:31:48 +0200Milan(~Milan@46.245.77.7) (Client Quit)
2022-07-30 22:32:37 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-30 22:33:47 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 252 seconds)
2022-07-30 22:33:56 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 22:34:33 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl)
2022-07-30 22:34:37 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 245 seconds)
2022-07-30 22:36:03 +0200 <onosendi> I'm on datatypes section, and I'm not sure how to call these? https://gist.github.com/onosendi/75a3d9b55c5edf5f69c6d66c5f259f3c
2022-07-30 22:38:11 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 252 seconds)
2022-07-30 22:38:16 +0200 <geekosaur[m]> The same way you defined it
2022-07-30 22:39:05 +0200 <geekosaur[m]> `calc (Add 1 1)`
2022-07-30 22:39:58 +0200 <onosendi> Ah
2022-07-30 22:42:07 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 22:44:16 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 22:44:37 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-30 22:45:09 +0200coco(~coco@212-51-146-199.fiber7.init7.net) (Ping timeout: 252 seconds)
2022-07-30 22:45:14 +0200jpds1(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-07-30 22:45:14 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-07-30 22:46:17 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-30 22:46:20 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-07-30 22:46:32 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-07-30 22:47:21 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 22:53:45 +0200sonologico(~raphael@dhcp-077-251-118-129.chello.nl)
2022-07-30 22:57:49 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 22:58:08 +0200coco(~coco@212-51-146-199.fiber7.init7.net)
2022-07-30 22:58:49 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-07-30 23:02:45 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 252 seconds)
2022-07-30 23:03:04 +0200JannisO(~JannisO@dyndsl-089-166-213-108.ewe-ip-backbone.de)
2022-07-30 23:03:06 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 23:07:54 +0200briandaed(~briandaed@185.234.210.211.r.toneticgroup.pl) (Remote host closed the connection)
2022-07-30 23:10:01 +0200coco(~coco@212-51-146-199.fiber7.init7.net) (Quit: WeeChat 3.5)
2022-07-30 23:15:27 +0200vglfr(~vglfr@194.9.14.33) (Ping timeout: 245 seconds)
2022-07-30 23:16:46 +0200dolio(~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-30 23:18:49 +0200dolio(~dolio@130.44.130.54)
2022-07-30 23:20:07 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-07-30 23:22:15 +0200dolio(~dolio@130.44.130.54) (Client Quit)
2022-07-30 23:22:24 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-07-30 23:23:10 +0200shailangsa(~shailangs@host109-152-9-231.range109-152.btcentralplus.com) (Ping timeout: 240 seconds)
2022-07-30 23:23:24 +0200dolio(~dolio@130.44.130.54)
2022-07-30 23:33:39 +0200Milan(~Milan@46.245.77.7)
2022-07-30 23:34:29 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
2022-07-30 23:35:35 +0200Milan(~Milan@46.245.77.7) (Client Quit)
2022-07-30 23:39:20 +0200qrpnxz(~qrpnxz@fsf/member/qrpnxz) (Quit: WeeChat 3.5)
2022-07-30 23:40:21 +0200sandy_doo(~sandydoo@185.209.196.136)
2022-07-30 23:40:35 +0200vglfr(~vglfr@194.9.14.33)
2022-07-30 23:46:32 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-30 23:52:37 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 252 seconds)
2022-07-30 23:56:40 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-07-30 23:58:04 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-07-30 23:59:15 +0200jinsun(~jinsun@user/jinsun) ()
2022-07-30 23:59:40 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-30 23:59:45 +0200jinsun(~jinsun@user/jinsun)