2022/08/13

2022-08-13 00:00:24 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-08-13 00:03:44 +0200king_gs(~Thunderbi@187.201.216.244)
2022-08-13 00:05:55 +0200acidjnk(~acidjnk@p200300d6e7137a17909a7d6537cea7ce.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-08-13 00:07:31 +0200king_gs(~Thunderbi@187.201.216.244) (Client Quit)
2022-08-13 00:08:36 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-08-13 00:13:12 +0200pmarg(~pmarg@224.80-203-5.customer.lyse.net)
2022-08-13 00:15:08 +0200pmarg(~pmarg@224.80-203-5.customer.lyse.net) ()
2022-08-13 00:16:57 +0200nate4(~nate@98.45.169.16)
2022-08-13 00:21:45 +0200nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-08-13 00:24:17 +0200yvan-sraka(~yvan-srak@105.67.135.250)
2022-08-13 00:26:23 +0200Everything(~Everythin@37.115.210.35) (Quit: leaving)
2022-08-13 00:26:26 +0200nicos(~nico@190.247.245.154) (Ping timeout: 268 seconds)
2022-08-13 00:29:37 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-08-13 00:32:43 +0200nicos(~nico@186.141.200.155)
2022-08-13 00:35:29 +0200michalz(~michalz@185.246.204.73) (Remote host closed the connection)
2022-08-13 00:37:09 +0200nicos(~nico@186.141.200.155) (Ping timeout: 252 seconds)
2022-08-13 00:37:17 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 00:37:42 +0200noteness(~noteness@user/noteness)
2022-08-13 00:40:36 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1909:1570:14f1:22f)
2022-08-13 00:42:41 +0200Everything(~Everythin@37.115.210.35)
2022-08-13 00:43:25 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 00:43:25 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-08-13 00:43:26 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 00:43:26 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-13 00:43:43 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 00:44:02 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 00:44:07 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 00:45:06 +0200mrmr1(~mrmr@user/mrmr)
2022-08-13 00:46:19 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 00:46:19 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-13 00:46:19 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-08-13 00:46:47 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-08-13 00:46:56 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 00:47:00 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 00:47:03 +0200mrmr(~mrmr@user/mrmr) (Ping timeout: 252 seconds)
2022-08-13 00:47:03 +0200mrmr1mrmr
2022-08-13 00:47:05 +0200gmg(~user@user/gehmehgeh)
2022-08-13 00:48:29 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-08-13 00:54:57 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-13 00:55:27 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 00:56:21 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-08-13 00:58:01 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
2022-08-13 00:59:39 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 00:59:53 +0200alp_(~alp@user/alp) (Ping timeout: 252 seconds)
2022-08-13 01:00:29 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-08-13 01:00:31 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1909:1570:14f1:22f) (Remote host closed the connection)
2022-08-13 01:00:49 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1909:1570:14f1:22f)
2022-08-13 01:03:19 +0200luffy(~chenqisu1@183.217.201.23)
2022-08-13 01:03:20 +0200hrberg(~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-08-13 01:10:57 +0200kimjetwav(~user@2607:fea8:235e:b600:10e5:8f0a:fe7a:2725)
2022-08-13 01:12:16 +0200dcoutts_(~duncan@host86-153-135-25.range86-153.btcentralplus.com)
2022-08-13 01:13:35 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 01:14:21 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-08-13 01:16:28 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-08-13 01:18:34 +0200yvan-sraka(~yvan-srak@105.67.135.250) (Remote host closed the connection)
2022-08-13 01:22:29 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-08-13 01:23:05 +0200nicos(~nico@186.143.199.156)
2022-08-13 01:23:49 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-08-13 01:23:59 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-08-13 01:25:11 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-13 01:28:09 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-08-13 01:30:31 +0200alternateved(~user@staticline-31-183-149-36.toya.net.pl) (Remote host closed the connection)
2022-08-13 01:30:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 01:33:12 +0200Core6565(~nico@186.143.136.251)
2022-08-13 01:34:53 +0200nicos(~nico@186.143.199.156) (Ping timeout: 268 seconds)
2022-08-13 01:39:03 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Quit: Leaving)
2022-08-13 01:42:03 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 01:43:40 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 01:45:14 +0200mikoto-chan(~mikoto-ch@164.5.249.78)
2022-08-13 01:45:27 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
2022-08-13 01:47:18 +0200mastarija(~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) (Quit: Leaving)
2022-08-13 01:51:57 +0200vglfr(~vglfr@145.224.94.75) (Ping timeout: 252 seconds)
2022-08-13 01:54:17 +0200nicos(~nico@190.247.245.154)
2022-08-13 01:54:17 +0200Core6565(~nico@186.143.136.251) (Read error: Connection reset by peer)
2022-08-13 01:57:27 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 01:59:30 +0200o-90(~o-90@gateway/tor-sasl/o-90)
2022-08-13 02:00:12 +0200king_gs(~Thunderbi@2806:103e:29:da7a:1909:1570:14f1:22f) (Ping timeout: 268 seconds)
2022-08-13 02:01:57 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2022-08-13 02:02:27 +0200o-90(~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
2022-08-13 02:04:03 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 02:04:45 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-08-13 02:05:29 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 02:16:31 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-08-13 02:18:42 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 02:20:30 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 02:26:14 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-08-13 02:26:14 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-08-13 02:26:14 +0200wroathe(~wroathe@user/wroathe)
2022-08-13 02:27:28 +0200mikoto-chan(~mikoto-ch@164.5.249.78) (Read error: Connection reset by peer)
2022-08-13 02:32:04 +0200vysn(~vysn@user/vysn)
2022-08-13 02:33:06 +0200cheater(~Username@user/cheater) (Ping timeout: 264 seconds)
2022-08-13 02:33:30 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 268 seconds)
2022-08-13 02:35:00 +0200cheater(~Username@user/cheater)
2022-08-13 02:36:13 +0200rethinkpad(~rethinkpa@185.156.46.152)
2022-08-13 02:38:43 +0200mmhat(~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-08-13 02:41:51 +0200Core4402(~nico@186.141.197.86)
2022-08-13 02:42:42 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 264 seconds)
2022-08-13 02:44:45 +0200nicos(~nico@190.247.245.154) (Ping timeout: 252 seconds)
2022-08-13 02:46:25 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-13 02:47:07 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 02:53:49 +0200Core4402(~nico@186.141.197.86) (Ping timeout: 268 seconds)
2022-08-13 02:59:01 +0200TonyStone(~TonyStone@2603-7080-8607-c36a-1069-803a-a882-c346.res6.spectrum.com) (Ping timeout: 244 seconds)
2022-08-13 02:59:26 +0200nilradical(~nilradica@user/naso)
2022-08-13 03:01:47 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 03:03:14 +0200ryantrinkle(~ryan@2607:f00:3:14c0:7c6b:7160:d1ff:3f7)
2022-08-13 03:03:22 +0200 <ryantrinkle> any recommendation for how to get a graph of haskell modules?
2022-08-13 03:03:31 +0200 <ryantrinkle> i'm using graphmod and it's alright but also not really designed as a library
2022-08-13 03:03:56 +0200 <ryantrinkle> (actually, it's very cool, not just alright; but i'm looking for something with a clean haskell interface rather than dot)
2022-08-13 03:05:04 +0200dolio(~dolio@130.44.130.54) (Ping timeout: 268 seconds)
2022-08-13 03:06:34 +0200dolio(~dolio@130.44.130.54)
2022-08-13 03:06:48 +0200ystael(~ystael@user/ystael) (Ping timeout: 268 seconds)
2022-08-13 03:07:02 +0200ystael(~ystael@user/ystael)
2022-08-13 03:08:09 +0200vglfr(~vglfr@145.224.94.75)
2022-08-13 03:08:13 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2022-08-13 03:08:21 +0200 <d34df00d> dmj: probably a really silly question, but what do you think about compiling miso to wasm via the llvm backend of ghc instead of relying on ghcjs?
2022-08-13 03:08:42 +0200 <d34df00d> Dunno how feasible it is though. I remember lots of pains when I tried to just even pass any options to the llvm backend from ghc.
2022-08-13 03:09:00 +0200 <d34df00d> My gut feel is also that wasm via llvm would be a tad faster than the js that ghcjs produces.
2022-08-13 03:10:17 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-08-13 03:11:36 +0200TonyStone(~TonyStone@2603-7080-8607-c36a-b4e0-8ace-bf5e-83e4.res6.spectrum.com)
2022-08-13 03:16:25 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-08-13 03:18:00 +0200mikoto-chan(~mikoto-ch@164.5.249.78)
2022-08-13 03:24:29 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-08-13 03:25:48 +0200causal(~user@50.35.83.177)
2022-08-13 03:33:22 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.6)
2022-08-13 03:35:50 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-08-13 03:37:33 +0200cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2022-08-13 03:42:07 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 04:01:36 +0200waldo(~waldo@user/waldo)
2022-08-13 04:03:45 +0200cheater(~Username@user/cheater)
2022-08-13 04:05:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 04:06:04 +0200nattiestnate(~nate@180.243.14.16) (Quit: WeeChat 3.6)
2022-08-13 04:12:33 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 04:17:59 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 04:18:28 +0200nate4(~nate@98.45.169.16)
2022-08-13 04:18:59 +0200vglfr(~vglfr@145.224.94.75) (Ping timeout: 252 seconds)
2022-08-13 04:23:23 +0200nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-08-13 04:29:58 +0200nilradical(~nilradica@user/naso) ()
2022-08-13 04:30:40 +0200td_(~td@muedsl-82-207-238-237.citykom.de) (Ping timeout: 268 seconds)
2022-08-13 04:31:36 +0200razetime(~quassel@117.254.35.202)
2022-08-13 04:31:51 +0200td_(~td@muedsl-82-207-238-051.citykom.de)
2022-08-13 04:36:08 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 04:36:37 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 04:47:17 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 04:53:42 +0200nicos(~nico@190.247.245.154)
2022-08-13 04:56:21 +0200Kaipei(~Kaiepi@142.68.249.28)
2022-08-13 04:57:51 +0200Kaiepi(~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds)
2022-08-13 04:58:57 +0200nicos(~nico@190.247.245.154) (Quit: CoreIRC for Android - www.coreirc.com)
2022-08-13 05:03:12 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-08-13 05:03:13 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-13 05:03:22 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 05:04:05 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 05:04:07 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-13 05:05:11 +0200Kaipei(~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds)
2022-08-13 05:06:45 +0200jero98772(~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
2022-08-13 05:07:13 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 05:07:13 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 05:07:13 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 05:07:13 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-08-13 05:07:13 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 05:07:36 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 05:07:43 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 05:07:49 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 05:07:54 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-08-13 05:08:16 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 05:09:11 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 05:10:16 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 05:14:44 +0200toastytime(~toastytim@2603-6081-19f0-7e30-05ee-e4d3-a53d-8390.res6.spectrum.com)
2022-08-13 05:16:49 +0200vglfr(~vglfr@145.224.94.75)
2022-08-13 05:21:19 +0200Kaiepi(~Kaiepi@142.68.249.28) (Ping timeout: 252 seconds)
2022-08-13 05:21:55 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-08-13 05:25:31 +0200waldo(~waldo@user/waldo) (Ping timeout: 268 seconds)
2022-08-13 05:25:32 +0200rethinkpad(~rethinkpa@185.156.46.152) (Quit: Leaving)
2022-08-13 05:26:40 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-08-13 05:29:18 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 05:29:18 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-08-13 05:29:45 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-08-13 05:31:30 +0200toastytime(~toastytim@2603-6081-19f0-7e30-05ee-e4d3-a53d-8390.res6.spectrum.com) ()
2022-08-13 05:31:35 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 05:36:39 +0200haritz(~hrtz@user/haritz) (Ping timeout: 268 seconds)
2022-08-13 05:37:51 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 05:39:01 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 05:42:15 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-08-13 05:46:48 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 05:47:07 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2022-08-13 05:51:27 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-08-13 05:52:20 +0200lottaquestions(~nick@2607:fa49:503e:7100:3481:111f:f558:e90a) (Remote host closed the connection)
2022-08-13 05:52:46 +0200lottaquestions(~nick@2607:fa49:503e:7100:276:d569:54ed:ceaf)
2022-08-13 05:55:07 +0200razetime(~quassel@117.254.35.202) (Ping timeout: 268 seconds)
2022-08-13 05:55:38 +0200etoast(~exaltedto@user/exaltedtoast) (Quit: Tschüss)
2022-08-13 06:03:11 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 06:12:27 +0200 <famubu[m]> Hi. I was trying to do program that evaluates a postfix expression using state monad but ran into some errors. I am a beginner in haskell. I've pasted the program and a description at https://bpa.st/LL3Q
2022-08-13 06:14:24 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.202)
2022-08-13 06:14:48 +0200 <glguy> famubu[m]: line 65 needs to be a let binding instead of a <-
2022-08-13 06:15:05 +0200 <glguy> newst <- foo x curst -- becomes -- let newst = foo x curst
2022-08-13 06:15:26 +0200 <glguy> or you could replace: put newst -- with -- put (foo x curst)
2022-08-13 06:17:10 +0200Solid(~slot@xmonad/slotThe) (WeeChat 3.6)
2022-08-13 06:17:21 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 06:22:31 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-08-13 06:23:27 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-08-13 06:26:25 +0200waldo(~waldo@user/waldo)
2022-08-13 06:26:59 +0200 <famubu[m]> Thanks that got rid of the error.
2022-08-13 06:27:08 +0200 <famubu[m]> To get ther result, should I be using `runState` function?
2022-08-13 06:28:47 +0200Jeanne-Kamikaze(~Jeanne-Ka@142.147.89.202) (Quit: Leaving)
2022-08-13 06:34:41 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 06:35:23 +0200luffy(~chenqisu1@183.217.201.23) (Ping timeout: 252 seconds)
2022-08-13 06:36:56 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-13 06:39:56 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 06:41:48 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-08-13 06:42:02 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-08-13 06:43:07 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 06:47:24 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 06:48:13 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-08-13 06:48:56 +0200 <monochrom> Tes.
2022-08-13 06:49:30 +0200 <ski> famubu[m] : one of `runState',`evalState',`execState'
2022-08-13 06:49:57 +0200razetime(~quassel@117.254.35.202)
2022-08-13 06:50:09 +0200 <ski> instead of the `get' and `put' pair, you could here use `modify'
2022-08-13 06:53:00 +0200 <ski> instead of using `head' and `tail', it would be better to use pattern-matching, to check the list/stack has the requisite elements. similarly, instead of having `isOp :: Char -> Bool' and `chrToOp :: (Num a,Fractional a) => Char -> (a -> a -> a)' you could be using `chrToMaybeOp :: (Num a,Fractional a) => Char -> Maybe (a -> a -> a)', and then use pattern-matching (`case'-`of') with the call of that
2022-08-13 06:58:32 +0200 <ski> @where parse-don't-validate
2022-08-13 06:58:32 +0200 <lambdabot> I know nothing about parse-don't-validate.
2022-08-13 06:58:41 +0200 <ski> @where+ parse-don't-validate "Parse, don't validate" by lexi-lambda in 2019-11-05 at <https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/>
2022-08-13 06:58:41 +0200 <lambdabot> It is forever etched in my memory.
2022-08-13 07:12:55 +0200zebrag(~chris@user/zebrag) (Remote host closed the connection)
2022-08-13 07:17:45 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 07:21:16 +0200Kaiepi(~Kaiepi@142.68.249.28)
2022-08-13 07:23:04 +0200frost(~frost@user/frost)
2022-08-13 07:35:53 +0200etoast(~exaltedto@user/exaltedtoast)
2022-08-13 07:38:28 +0200wagle_wagle
2022-08-13 07:42:01 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-13 07:50:24 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 07:52:45 +0200Me-me(~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host)
2022-08-13 07:52:45 +0200Me-me(~me-me@user/me-me)
2022-08-13 07:56:51 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 07:57:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 07:58:11 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-08-13 07:58:28 +0200coot(~coot@213.134.176.158)
2022-08-13 08:00:57 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds)
2022-08-13 08:01:13 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-08-13 08:04:48 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-08-13 08:16:57 +0200mikoto-chan(~mikoto-ch@164.5.249.78) (Ping timeout: 252 seconds)
2022-08-13 08:18:43 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 08:19:58 +0200nate4(~nate@98.45.169.16)
2022-08-13 08:20:11 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 08:20:11 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-08-13 08:20:34 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-08-13 08:22:22 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 08:24:58 +0200nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-08-13 08:27:51 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 08:27:51 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 08:28:15 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 08:28:54 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 08:29:39 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 08:34:15 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
2022-08-13 08:34:29 +0200 <famubu[m]> I was trying to convert the string `"12 15"` to `[12, 15]` with `map read . words $ "12 15`. But it gives `Exception: Prelude.read: no parse`. Found out that it's because `read` cannot figure out the type into which the conversion should be done. How can that be fixed in this case?
2022-08-13 08:34:48 +0200famubu[m]forgot the endng quote for the string..
2022-08-13 08:35:42 +0200dtman34(~dtman34@2601:446:4400:2ad9:d479:9e91:5e69:3014) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2022-08-13 08:36:02 +0200dtman34(~dtman34@2601:446:4400:2ad9:a35d:f509:3d33:3205)
2022-08-13 08:37:20 +0200waldo(~waldo@user/waldo) (Ping timeout: 268 seconds)
2022-08-13 08:37:40 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-13 08:38:30 +0200 <int-e> famubu[m]: if you try that in ghci you'll need a type signature, otherwise it'll default to [()] as the result type
2022-08-13 08:38:36 +0200waldo(~waldo@user/waldo)
2022-08-13 08:39:34 +0200 <int-e> So this'll work without type signature: `map read . words $ "() ()"`
2022-08-13 08:39:59 +0200 <int-e> in programs... context will usually determine the type and `map read . words` will just work.
2022-08-13 08:40:06 +0200 <hololeap> ski: that's a good article, well written
2022-08-13 08:42:18 +0200 <hololeap> wouldn't it be something like: (Num a, Read a) => [a]
2022-08-13 08:42:26 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection)
2022-08-13 08:42:29 +0200 <hololeap> as opposed to ()
2022-08-13 08:43:44 +0200 <hololeap> > map (read :: String -> Int) . words $ "12 15"
2022-08-13 08:43:45 +0200 <int-e> hololeap: There's no Num in play here. (If there was, it would default to Integer)
2022-08-13 08:43:47 +0200 <lambdabot> error:
2022-08-13 08:43:47 +0200 <lambdabot> Ambiguous occurrence ‘map’
2022-08-13 08:43:47 +0200 <lambdabot> It could refer to
2022-08-13 08:43:57 +0200 <int-e> @undef
2022-08-13 08:43:57 +0200 <lambdabot> Undefined.
2022-08-13 08:44:03 +0200 <int-e> > map (read :: String -> Int) . words $ "12 15"
2022-08-13 08:44:05 +0200 <lambdabot> [12,15]
2022-08-13 08:44:15 +0200 <hololeap> yeah fair, it wouldn't know it was a Num just from the string
2022-08-13 08:44:39 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it)
2022-08-13 08:44:41 +0200 <int-e> ghci has extended defaulting rules that pick () for Read a => a.
2022-08-13 08:46:37 +0200 <ski> > replicateM 2 (StateT (reads :: ReadS Int)) `runStateT` "12 15"
2022-08-13 08:46:38 +0200 <lambdabot> [([12,15],"")]
2022-08-13 08:47:13 +0200 <int-e> ouch
2022-08-13 08:47:16 +0200 <ski> (could also use `many')
2022-08-13 08:47:51 +0200 <ski> hololeap : don't thank me, i didn't write it
2022-08-13 08:48:11 +0200 <hololeap> I didn't :)
2022-08-13 08:48:20 +0200 <ski> hehe
2022-08-13 08:49:24 +0200 <hololeap> that makes me wonder if there's some kind of best-guess "duck typing" lib for strings in haskell
2022-08-13 08:49:42 +0200 <ski> @quote stark
2022-08-13 08:49:42 +0200 <lambdabot> AlanPerlis says: The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information.
2022-08-13 08:50:06 +0200mmhat(~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de)
2022-08-13 08:55:03 +0200 <hololeap> famubu[m]: it's nicer to use the TypeApplications extension IMO: map (read @Int) . words $ "12 15"
2022-08-13 08:56:39 +0200 <hololeap> % map (read @Int) . words $ "12 15"
2022-08-13 08:56:39 +0200 <yahb2> <interactive>:4:6: error: ; Pattern syntax in expression context: read@Int ; Did you mean to enable TypeApplications?
2022-08-13 08:56:55 +0200 <ski> % :set -XTypeApplications
2022-08-13 08:56:55 +0200 <yahb2> <no output>
2022-08-13 08:56:56 +0200 <hololeap> yahb2 doesn't have that enabled by default...
2022-08-13 08:57:00 +0200 <hololeap> % map (read @Int) . words $ "12 15"
2022-08-13 08:57:01 +0200 <yahb2> [12,15]
2022-08-13 08:57:50 +0200 <hololeap> the classic example of this problem is (read . show)
2022-08-13 08:58:08 +0200 <hololeap> % :t "abcd"
2022-08-13 08:58:08 +0200 <yahb2> "abcd" :: [Char]
2022-08-13 08:58:13 +0200 <hololeap> % :t show "abcd"
2022-08-13 08:58:13 +0200 <yahb2> show "abcd" :: String
2022-08-13 08:58:19 +0200 <hololeap> % :t read . show $ "abcd"
2022-08-13 08:58:19 +0200 <yahb2> read . show $ "abcd" :: Read c => c
2022-08-13 08:58:30 +0200 <hololeap> (it doesn't know what c is)
2022-08-13 08:58:40 +0200 <hololeap> % :t read @Int . show $ "abcd"
2022-08-13 08:58:40 +0200 <yahb2> read @Int . show $ "abcd" :: Int
2022-08-13 08:58:47 +0200 <hololeap> haha
2022-08-13 08:58:56 +0200 <hololeap> it's an Int
2022-08-13 08:59:33 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 08:59:35 +0200 <hololeap> % read @String . show $ "abcd"
2022-08-13 08:59:35 +0200 <yahb2> "abcd"
2022-08-13 09:00:16 +0200hololeapis just rambling to nobody, most likely
2022-08-13 09:00:40 +0200 <int-e> > fix read -- the unproductive cousin of `fix show`
2022-08-13 09:00:43 +0200 <lambdabot> "*Exception: <<loop>>
2022-08-13 09:01:23 +0200 <hololeap> actually, I'm curious
2022-08-13 09:01:35 +0200 <hololeap> is there another use for fix than
2022-08-13 09:01:48 +0200 <hololeap> fix :: (a -> b) -> a -> b
2022-08-13 09:02:02 +0200 <ski> you can fix an error
2022-08-13 09:02:22 +0200 <ski> no, that's not a valid type of `fix'
2022-08-13 09:02:29 +0200monochrom(trebla@216.138.220.146) (Quit: NO CARRIER)
2022-08-13 09:02:45 +0200 <int-e> > fix ((0:) . scanl (+) 1)
2022-08-13 09:02:47 +0200 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
2022-08-13 09:03:47 +0200 <int-e> I hardly ever use `fix` in real code; recursive definitions are usually clearer.
2022-08-13 09:04:05 +0200 <ski> i've occasionally used it for a local loop
2022-08-13 09:04:28 +0200razetime(~quassel@117.254.35.202) (Ping timeout: 268 seconds)
2022-08-13 09:04:46 +0200 <hololeap> I think I meant this: fix :: ((a -> b) -> a -> b) -> a -> b
2022-08-13 09:05:02 +0200 <ski> yea, i was wondering if so
2022-08-13 09:05:08 +0200razetime(~quassel@117.254.35.202)
2022-08-13 09:05:14 +0200 <int-e> hololeap: sure, you can do that
2022-08-13 09:05:26 +0200 <ski> (but probably more memorable for you to work that out yourself)
2022-08-13 09:05:36 +0200 <hololeap> that just seems to be the only useful way to use fix
2022-08-13 09:05:44 +0200 <hololeap> I was wondering if there were others
2022-08-13 09:06:00 +0200 <int-e> > map (fix (\f x -> if x < 2 then x else f (x-1) + f (x-2))) [0..5]
2022-08-13 09:06:03 +0200 <lambdabot> [0,1,1,2,3,5]
2022-08-13 09:06:17 +0200 <ski> > (`fix` 5) (\fact n -> if n == 0 then 1 else n * fact (n - 1))
2022-08-13 09:06:19 +0200 <lambdabot> 120
2022-08-13 09:06:26 +0200 <int-e> ...argh
2022-08-13 09:06:31 +0200skismiles
2022-08-13 09:06:46 +0200 <int-e> (that's for using `fix` as an infix operator)
2022-08-13 09:06:52 +0200 <ski> (i know)
2022-08-13 09:06:54 +0200 <hololeap> those both have the same type signature I just wrote
2022-08-13 09:07:19 +0200 <hololeap> the use of fix does, anyway
2022-08-13 09:07:20 +0200 <int-e> hololeap: yes, that was the point
2022-08-13 09:07:34 +0200 <hololeap> % :t fix
2022-08-13 09:07:34 +0200 <yahb2> <interactive>:1:1: error: Variable not in scope: fix
2022-08-13 09:07:44 +0200 <hololeap> import more stuff yahb2
2022-08-13 09:08:05 +0200 <int-e> hololeap: see the earlier fibonacci example with `scanl` for a different use of `fix`.
2022-08-13 09:08:20 +0200 <jackdk> % :m + Data.Functino
2022-08-13 09:08:20 +0200 <yahb2> <no location info>: error: ; Could not find module ‘Data.Functino’ ; Perhaps you meant ; Data.Function (from base-4.14.3.0) ; Data.Functor (from base-4.14.3.0)
2022-08-13 09:08:23 +0200 <jackdk> % :m + Data.Function
2022-08-13 09:08:23 +0200 <yahb2> <no output>
2022-08-13 09:08:25 +0200 <hololeap> oh, right, I didn't really grok that
2022-08-13 09:08:30 +0200 <jackdk> % fix error
2022-08-13 09:08:30 +0200 <yahb2> *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: **...
2022-08-13 09:09:04 +0200 <ski> @let infixl 0 `asTypeIn`; a `asTypeIn` f = a where _ = f a
2022-08-13 09:09:05 +0200 <lambdabot> Defined.
2022-08-13 09:09:08 +0200 <int-e> hololeap: Well, the type there is ([Integer] -> [Integer]) -> [Integer], so it's actually working on a (lazy) value.
2022-08-13 09:09:09 +0200 <ski> @type fix `asTypeIn` \fix -> map (fix (\f x -> if x < 2 then x else f (x - 1) + f (x - 2))) [0 .. 5]
2022-08-13 09:09:10 +0200 <lambdabot> (Ord b, Num b, Enum b) => ((b -> b) -> b -> b) -> b -> b
2022-08-13 09:09:15 +0200 <hololeap> :t ((0:) . scanl (+) 1)
2022-08-13 09:09:17 +0200 <lambdabot> Num a => [a] -> [a]
2022-08-13 09:09:41 +0200 <hololeap> I see, which is why it ended in ....
2022-08-13 09:09:41 +0200 <ski> int-e : noticed `asTypeIn' is gone, but not `asAppliedTo'
2022-08-13 09:10:01 +0200razetime(~quassel@117.254.35.202) (Ping timeout: 268 seconds)
2022-08-13 09:10:09 +0200 <hololeap> so without making it CPS it is guaranteed to be a bottom?
2022-08-13 09:11:08 +0200 <hololeap> difficult question...
2022-08-13 09:11:10 +0200 <ski> > fix ((0 :) . (1 :) . (zipWith (+) `ap` tail))
2022-08-13 09:11:12 +0200 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
2022-08-13 09:11:15 +0200 <ski> @quote Aztec
2022-08-13 09:11:15 +0200 <lambdabot> quicksilver says: zip`ap`tail - the Aztec god of consecutive numbers
2022-08-13 09:11:38 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-08-13 09:11:43 +0200zeenk(~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
2022-08-13 09:12:12 +0200 <ski> CPS ?
2022-08-13 09:12:21 +0200 <hololeap> continuation passing style
2022-08-13 09:12:25 +0200 <ski> i know
2022-08-13 09:12:31 +0200 <ski> i didn't understand the question
2022-08-13 09:12:42 +0200 <hololeap> fix :: (a -> a) -> a
2022-08-13 09:13:09 +0200 <int-e> What's "it"?
2022-08-13 09:13:24 +0200 <hololeap> if you define 'a' as 'a -> b', it basically makes a CPS loop
2022-08-13 09:13:37 +0200 <ski> not the same `a'
2022-08-13 09:13:39 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 09:13:43 +0200 <hololeap> right
2022-08-13 09:14:07 +0200 <ski> (and even if you were talking about `a = a -> b', i still don't see what that would have to do with CPS)
2022-08-13 09:14:25 +0200 <hololeap> so when 'a' is a function you can control the program's flow, whereas if it is some (lazy) value being generated there is no way to control it
2022-08-13 09:14:38 +0200 <hololeap> so it loops forever
2022-08-13 09:14:48 +0200 <ski> what does "control the program's flow" mean, here ?
2022-08-13 09:15:02 +0200 <ski> i thought the fibonacci example showed that you could control it
2022-08-13 09:15:14 +0200 <hololeap> you pass a function in as a variable, and you can choose to call it, or not
2022-08-13 09:15:20 +0200monochrom(trebla@216.138.220.146)
2022-08-13 09:15:24 +0200 <hololeap> fix $ \loop x -> ...
2022-08-13 09:15:35 +0200 <hololeap> you can examine x and choose to run loop, or not
2022-08-13 09:15:51 +0200 <ski> you produce a list, and you can choose how many elements you want to generate / look at
2022-08-13 09:16:04 +0200 <hololeap> whereas, fix $ \x -> ...
2022-08-13 09:16:14 +0200 <hololeap> what can you do, except transform x somehow?
2022-08-13 09:16:25 +0200 <ski> `(:)' is non-strict
2022-08-13 09:16:39 +0200 <ski> that's what makes `fix (1 :)' non-bottom
2022-08-13 09:16:53 +0200 <hololeap> ok, I think I'm not getting the terminology correct here
2022-08-13 09:16:59 +0200 <int-e> > fix (\xs -> map (\n -> if n < 2 then n else xs !! (n-1) + xs !! (n-2)) [0..])
2022-08-13 09:17:00 +0200 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
2022-08-13 09:17:02 +0200 <hololeap> I think I used "bottom" inaccurately
2022-08-13 09:17:28 +0200 <int-e> "control flow" is misleading when your program is defining a bunch of constants.
2022-08-13 09:18:18 +0200 <ski> @let infixr 5 /\/; (/\/) :: [a] -> [a] -> [a]; [ ] /\/ ys = ys; (x:xs) /\/ ys = x : ys /\/ xs
2022-08-13 09:18:19 +0200 <lambdabot> Defined.
2022-08-13 09:18:25 +0200hgolden(~hgolden2@cpe-172-251-233-141.socal.res.rr.com)
2022-08-13 09:18:35 +0200titibandit(~titibandi@xdsl-87-78-231-157.nc.de)
2022-08-13 09:18:39 +0200 <famubu[m]> Thanks. Hadn't known about the TypeApplications extension.
2022-08-13 09:18:39 +0200 <int-e> (beware of that variant; not only is it inefficient, it'll also overflow because it produces [Int] rather than [Integer])
2022-08-13 09:18:49 +0200 <ski> > fix (\abacaba -> repeat 0 /\/ map succ abacaba)
2022-08-13 09:18:51 +0200 <lambdabot> [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1...
2022-08-13 09:19:07 +0200 <hololeap> > fix (\loop (x:xs) -> if x > 5 then [] else x : loop xs) (1..)
2022-08-13 09:19:09 +0200 <lambdabot> <hint>:1:59: error: parse error on input ‘..’
2022-08-13 09:19:36 +0200 <Lears> hololeap: I've often used fix like `fix \~Foo{bar,baz} -> Foo{ bar = ..., baz = ... }` for mutually recursive records.
2022-08-13 09:19:38 +0200 <hololeap> > fix (\loop (x:xs) -> if x > 5 then [] else x : loop xs) [1..]
2022-08-13 09:19:40 +0200 <lambdabot> [1,2,3,4,5]
2022-08-13 09:19:45 +0200 <ski> > fix (\abbcbccd -> 0 : tail (abbcbccd /\/ map succ abbcbccd))
2022-08-13 09:19:47 +0200 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
2022-08-13 09:20:03 +0200 <hololeap> see, you can control the flow by terminating the loop
2022-08-13 09:20:42 +0200 <hololeap> > fix (\abbcbccd -> 0 : tail (abbcbccd /\/ map succ abbcbccd))
2022-08-13 09:20:43 +0200 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
2022-08-13 09:20:54 +0200 <hololeap> can't stop that, except by consuming it lazily
2022-08-13 09:20:59 +0200 <jackdk> Lears: that's a cool trick, I've never seen it before
2022-08-13 09:21:14 +0200perdent(~perdent@124.188.233.11)
2022-08-13 09:21:38 +0200 <ski> > takeWhile (<= 5) (fix ((1 :) . map succ)) -- also terminating the loop, hololeap
2022-08-13 09:21:41 +0200 <lambdabot> [1,2,3,4,5]
2022-08-13 09:21:42 +0200 <int-e> :t (/\/)
2022-08-13 09:21:43 +0200 <lambdabot> [a] -> [a] -> [a]
2022-08-13 09:21:50 +0200 <ski> "interleave"
2022-08-13 09:22:19 +0200 <hololeap> right, because takeWhile is consuming the result lazily. I was asking a question about fix as a standalone
2022-08-13 09:22:23 +0200 <ski> @quote waiting.to.happen
2022-08-13 09:22:23 +0200 <lambdabot> elliott says: race condition waiting to happen
2022-08-13 09:22:29 +0200 <ski> bah
2022-08-13 09:22:42 +0200 <ski> @quote being.like.loops
2022-08-13 09:22:42 +0200 <lambdabot> Cale says: You should think of lists as being like loops which are waiting to happen.
2022-08-13 09:23:06 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com)
2022-08-13 09:23:20 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 09:24:57 +0200 <ski> Lears : for a data type that you've already defined ior are also using elsewhere ? or just for this loop ?
2022-08-13 09:26:17 +0200razetime(~quassel@117.254.35.202)
2022-08-13 09:26:52 +0200 <hololeap> Lears: I don't think I understand that :/
2022-08-13 09:27:08 +0200 <hololeap> how would you use that?
2022-08-13 09:27:20 +0200 <Lears> ski: I'm not sure I understand the question.
2022-08-13 09:28:03 +0200 <Lears> hololeap: It's equivalent to let bar_ = ...; baz_ = ... in Foo{ bar = bar_, baz = baz_ }, but you can use the real names.
2022-08-13 09:28:59 +0200 <hololeap> I would probably just use RecordWildcards or something like that
2022-08-13 09:30:06 +0200 <hololeap> also, that line hurts my head :)
2022-08-13 09:30:12 +0200razetime_(~quassel@117.254.35.202)
2022-08-13 09:30:30 +0200 <hololeap> why are you using ~ on Foo
2022-08-13 09:30:46 +0200 <Lears> It needs to be a lazy match on the constructor, or it'll bottom.
2022-08-13 09:31:19 +0200 <hololeap> I think I'm just struggling with how it _doesnt_ bottom even with the lazy match
2022-08-13 09:31:29 +0200 <hololeap> it's a very tight knot
2022-08-13 09:32:23 +0200ashpil(~ashpil@c-65-50-153-147.hs.gigamonster.net)
2022-08-13 09:33:08 +0200 <hololeap> cool, though, now that I'm starting to understand it
2022-08-13 09:33:54 +0200mmhat(~mmh@p200300f1c706f761ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-08-13 09:34:02 +0200 <hololeap> it waits to get it's first Foo in the lambda because of laziness, then grabs a Foo from the lambda's contents
2022-08-13 09:34:06 +0200 <hololeap> *its
2022-08-13 09:34:30 +0200 <hololeap> is that basically the way it works?
2022-08-13 09:35:49 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 09:35:58 +0200 <int-e> @undef
2022-08-13 09:35:58 +0200 <lambdabot> Undefined.
2022-08-13 09:36:06 +0200 <int-e> :t undefined `asArgOf` show
2022-08-13 09:36:07 +0200 <lambdabot> Show a => a
2022-08-13 09:37:29 +0200 <int-e> ski: I think that's a better name, which was my main issue with `asTypeIn`, too close to `asTypeOf`, too hard to understand what `In` is supposed to do.
2022-08-13 09:37:33 +0200ashpil(~ashpil@c-65-50-153-147.hs.gigamonster.net) ()
2022-08-13 09:38:26 +0200kenran(~kenran@200116b82bb6f0004ceffc356ad80ff5.dip.versatel-1u1.de)
2022-08-13 09:40:33 +0200razetime(~quassel@117.254.35.202) (Ping timeout: 252 seconds)
2022-08-13 09:40:49 +0200razetime_(~quassel@117.254.35.202) (Ping timeout: 268 seconds)
2022-08-13 09:41:01 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 09:44:22 +0200 <Lears> hololeap: It's a bit vague, but it doesn't sound wrong. With the lazy match, it doesn't need to see a Foo constructor before it continues to the body, it just needs to bind bar and baz to the presumed contents. Then with those in hand, it can build the result just like regular mutual recursion.
2022-08-13 09:45:19 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2022-08-13 09:45:42 +0200titibandit(~titibandi@xdsl-87-78-231-157.nc.de) (Remote host closed the connection)
2022-08-13 09:48:45 +0200 <c_wraith> but... why is it using fix?
2022-08-13 09:48:57 +0200 <c_wraith> Can't that just be done with let?
2022-08-13 09:49:04 +0200acidjnk(~acidjnk@p200300d6e7137a17a1f5c99515dc5cac.dip0.t-ipconnect.de)
2022-08-13 09:49:09 +0200 <int-e> @src fix
2022-08-13 09:49:09 +0200 <lambdabot> fix f = let x = f x in x
2022-08-13 09:50:00 +0200 <int-e> c_wraith: I think the question is more about how `fix` can be used and less about whether it should be used.
2022-08-13 09:50:01 +0200 <hololeap> can't it just be done like: Foo { bar = ..., baz = ... }
2022-08-13 09:51:21 +0200 <hololeap> what makes it "mutually recursive"?
2022-08-13 09:51:32 +0200 <ski> Lears : sorry, i was talking about the data type that `Foo' belongs to
2022-08-13 09:51:51 +0200 <int-e> . o O ( The primary use of `fix` is to define the Fibonacci numbers. )
2022-08-13 09:52:01 +0200 <Lears> It's like a `rec { ... }` recursive record from some other languages like nix. bar and baz can be defined in terms of one another.
2022-08-13 09:52:01 +0200benin0(~benin@183.82.176.32)
2022-08-13 09:52:26 +0200 <ski> int-e : well, i suppose the proximity to `asTypeOf' was intentional ("what's the type of `fix', as used in the body of the following lambda ?")
2022-08-13 09:52:43 +0200 <c_wraith> int-e: meh. the primary use of fix is to define and use a loop in-line in a do block, instead of as two separate things
2022-08-13 09:52:52 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 09:54:49 +0200 <hololeap> Lears: I see
2022-08-13 09:55:40 +0200 <int-e> c_wraith: see, I'd never do that
2022-08-13 09:55:44 +0200img(~img@user/img)
2022-08-13 09:56:13 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-08-13 09:56:53 +0200 <int-e> c_wraith: Though it's not unreasonable, I guess. And it saves two lines over the `= go where go = do` thing I do instead.
2022-08-13 09:57:30 +0200 <int-e> Maybe if `fix` was exported by the Prelude, my habits would be different. :P
2022-08-13 09:58:46 +0200 <Lears> ski: I'm still not really sure what you're asking, but I might use this with any data type. One of the best uses I've made of it was for an extensible parser record, something like: `ExtParser{ whitespace :: Parser (), atom :: Parser Expr, ... }`, where mutual recursion of the fields was essentially mandatory.
2022-08-13 09:59:07 +0200 <c_wraith> Lears: can't you do it without fix?
2022-08-13 09:59:53 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
2022-08-13 10:00:05 +0200 <ski> Lears : `Foo' is a data constructor (defined using record syntax) of some `data' type. i was asking whether this data type was defined specifically in order to be able to make your mutually recursive loop, and whether it would be used anywhere else than for that
2022-08-13 10:00:07 +0200 <Lears> fix is not a language construct; naturally, anything you can do with it, you can do without. But I found the combination of fix with NamedFieldPuns to be the cleanest way.
2022-08-13 10:01:06 +0200 <int-e> > let foo@(a, b) = (b+1, 0) in foo
2022-08-13 10:01:08 +0200 <lambdabot> (1,0)
2022-08-13 10:01:14 +0200 <hololeap> c_wraith: I had only ever used fix in that way as well, and I asked if there were other ways to use it
2022-08-13 10:04:10 +0200 <int-e> % :set -XRecordWildCards
2022-08-13 10:04:10 +0200 <yahb2> <no output>
2022-08-13 10:04:18 +0200 <int-e> % data Foo = Foo { aaa :: Int, bbb :: Int } deriving Show
2022-08-13 10:04:18 +0200 <yahb2> <no output>
2022-08-13 10:04:24 +0200 <int-e> % let foo@Foo{..} = Foo{ aaa = bbb + 1, bbb = 0 } in foo
2022-08-13 10:04:24 +0200 <yahb2> Foo {aaa = 1, bbb = 0}
2022-08-13 10:05:09 +0200kenran(~kenran@200116b82bb6f0004ceffc356ad80ff5.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2022-08-13 10:05:10 +0200 <c_wraith> hololeap: https://paste.tomsmeding.com/ns0C3OSx
2022-08-13 10:05:29 +0200 <hololeap> % let aaa = bbb + 1; bbb = 0; in Foo{..}
2022-08-13 10:05:29 +0200 <yahb2> Foo {aaa = 1, bbb = 0}
2022-08-13 10:06:42 +0200 <int-e> Ah, even simpler
2022-08-13 10:06:43 +0200 <ski> c_wraith : yes, i do that occasionally, as well
2022-08-13 10:07:27 +0200 <int-e> (and easier to lay out)
2022-08-13 10:08:07 +0200 <hololeap> c_wraith: yeah I was thinking you could use a Monad instead of a function
2022-08-13 10:08:28 +0200 <c_wraith> it's still a function.
2022-08-13 10:08:45 +0200 <c_wraith> it's being applied to a function of type IO () -> IO ()
2022-08-13 10:08:54 +0200 <hololeap> `loop` doesn't have the type signature of a function
2022-08-13 10:09:02 +0200 <ski> % let foo@Foo {aaa = const 0 -> bbb,bbb = (+ 1) -> aaa} = Foo {..} in foo
2022-08-13 10:09:02 +0200 <yahb2> Foo {aaa = 1, bbb = 0}
2022-08-13 10:09:06 +0200 <hololeap> well I guess it does...
2022-08-13 10:09:19 +0200 <c_wraith> loop doesn't. but loop isn't the parameter to fix
2022-08-13 10:09:47 +0200 <hololeap> right, usually `loop` refers to a function when I use fix
2022-08-13 10:09:48 +0200 <ski> i believe hololeap was earlier talking about the cyclic result
2022-08-13 10:13:27 +0200Vajb(~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) (Read error: Connection reset by peer)
2022-08-13 10:13:53 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-08-13 10:15:21 +0200 <hololeap> :t \f x -> fix $ \loop -> if f x then mempty else x <> loop
2022-08-13 10:15:23 +0200 <lambdabot> Monoid a => (a -> Bool) -> a -> a
2022-08-13 10:16:27 +0200 <hololeap> :t (\f x -> fix $ \loop -> if f x then mempty else x <> loop) (>=5) [1..]
2022-08-13 10:16:28 +0200 <lambdabot> (Ord a, Num a, Num [a], Enum a) => [a]
2022-08-13 10:16:35 +0200 <hololeap> > (\f x -> fix $ \loop -> if f x then mempty else x <> loop) (>=5) [1..]
2022-08-13 10:16:36 +0200 <lambdabot> error:
2022-08-13 10:16:36 +0200 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_151’
2022-08-13 10:16:36 +0200 <lambdabot> • In the expression: e_151
2022-08-13 10:16:54 +0200acidjnk(~acidjnk@p200300d6e7137a17a1f5c99515dc5cac.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-08-13 10:17:06 +0200 <hololeap> hm, sorry just playing around
2022-08-13 10:17:07 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-08-13 10:17:51 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds)
2022-08-13 10:18:06 +0200Vajb(~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014)
2022-08-13 10:22:03 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com)
2022-08-13 10:25:59 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 10:28:52 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 10:29:11 +0200 <jackdk> anyone here familiar with `linear-base`? I'm curious why `hIsEOF :: Handle %1 -> RIO (Ur Bool, Handle)` is typed that way as opposed to `hIsEOF :: Handle -> RIO (Ur Bool)` - seems like as a query it shouldn't be necessary to consume and reissue the `Handle`
2022-08-13 10:30:50 +0200ddellaco1(~ddellacos@89.45.90.53)
2022-08-13 10:31:06 +0200 <hololeap> maybe it needs exclusive control of the handle while it checks for eof?
2022-08-13 10:32:00 +0200 <hololeap> that doesn't really guarantee that, though
2022-08-13 10:32:42 +0200 <geekosaur> my guess is it's related to linearity
2022-08-13 10:33:04 +0200 <hololeap> right, linear types
2022-08-13 10:33:11 +0200 <geekosaur> so the caller doesnt have to use it twice
2022-08-13 10:33:13 +0200 <int-e> jackdk: don't you need to do that in order to ensure the right order of effects?
2022-08-13 10:33:17 +0200img(~img@user/img)
2022-08-13 10:34:13 +0200 <int-e> Hmm, or does RIO enforce that... then maybe it's to ensure that the file is still open?
2022-08-13 10:34:14 +0200raym(~raym@user/raym) (Quit: kernel update, rebooting...)
2022-08-13 10:35:03 +0200 <geekosaur> I would hope sequencing was part of RIO
2022-08-13 10:35:11 +0200ddellaco1(~ddellacos@89.45.90.53) (Ping timeout: 252 seconds)
2022-08-13 10:35:12 +0200 <jackdk> I don't know, I'm new to it. I would've assumed the monad gave you sequencing, and you know the file is open because `hClose :: Handle %1 -> RIO ()` would consume it
2022-08-13 10:36:21 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 10:36:32 +0200 <int-e> Are you saying the type checker would accept hIsEOF h >> hClose h, but not hClose h >> hIsEOF h, if you had hIsEOF :: Handle -> RIO (Ur Bool)?
2022-08-13 10:36:40 +0200 <int-e> that seems unlikely.
2022-08-13 10:37:00 +0200raym(~raym@user/raym)
2022-08-13 10:37:10 +0200ddellaco1(~ddellacos@89.45.90.131)
2022-08-13 10:39:04 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 10:41:57 +0200img(~img@user/img)
2022-08-13 10:44:10 +0200img(~img@user/img) (Client Quit)
2022-08-13 10:46:12 +0200Pickchea(~private@user/pickchea)
2022-08-13 10:46:44 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 10:47:05 +0200img(~img@user/img)
2022-08-13 10:47:13 +0200 <jackdk> That's what I would expect, but I tried rewriting `hIsEOF` in `linear-base` with the type I specified, and it seems to refuse both programs. Unsure if this is a limitation of current linear types or indicative of an actual error in my thinking
2022-08-13 10:48:38 +0200img(~img@user/img) (Client Quit)
2022-08-13 10:48:39 +0200ddellaco1(~ddellacos@89.45.90.131) (Ping timeout: 268 seconds)
2022-08-13 10:51:30 +0200img(~img@user/img)
2022-08-13 10:52:26 +0200 <int-e> jackdk: Rejecting both is what I secretly hoped for.
2022-08-13 10:53:08 +0200 <jackdk> what am I missing?
2022-08-13 10:53:47 +0200 <int-e> I mean, I was confident that `hIsEOF h >> hClose h` and `hClose h >> hIsEOF h` would be treated the same by the type checker. And the only way to make sure that `h` can't be used after `hClase h` is to reject both of them.
2022-08-13 10:56:06 +0200perdent(~perdent@124.188.233.11) (Quit: Client closed)
2022-08-13 10:56:07 +0200 <jackdk> I feel like I half-understand why that must be true
2022-08-13 10:58:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 11:00:09 +0200nki[m](~nkimnkaga@2001:470:69fc:105::2:3a8d) (Quit: You have been kicked for being idle)
2022-08-13 11:00:15 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-08-13 11:01:57 +0200ddellaco1(~ddellacos@89.45.90.170)
2022-08-13 11:02:12 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 11:03:07 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 11:03:36 +0200 <Lears> Isn't it just that h can only be used once and hClose uses it once, hence it can't be used elsewhere? Passing it to an unrestricted function could result in it being used any number of times.
2022-08-13 11:03:47 +0200waldo(~waldo@user/waldo) (Ping timeout: 252 seconds)
2022-08-13 11:04:38 +0200 <Lears> Though I'm not that familiar with linear types myself.
2022-08-13 11:06:21 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2022-08-13 11:08:29 +0200chomwitt(~chomwitt@2a02:587:dc15:5e00:f956:e7c7:43ea:328a)
2022-08-13 11:09:37 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds)
2022-08-13 11:10:48 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-08-13 11:15:05 +0200coot(~coot@213.134.176.158)
2022-08-13 11:15:22 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-08-13 11:16:12 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 11:16:36 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com)
2022-08-13 11:17:34 +0200 <int-e> Lears: After reading a bit on this, yeah, that's the reason.
2022-08-13 11:18:17 +0200chomwitt(~chomwitt@2a02:587:dc15:5e00:f956:e7c7:43ea:328a) (Ping timeout: 268 seconds)
2022-08-13 11:18:35 +0200jakalx(~jakalx@base.jakalx.net)
2022-08-13 11:19:24 +0200chomwitt(~chomwitt@2a02:587:dc15:5e00:1855:2a35:cc0e:e682)
2022-08-13 11:22:29 +0200 <ski> Mercury (and ATS) has ways of indicating that you can pass a unique reference to a function, but it'll "hand it back" afterwards (without specifiying it as an explicit part of the result)
2022-08-13 11:22:44 +0200 <ski> ("borrowing", if you will, i guess)
2022-08-13 11:23:30 +0200 <ski> (i don't recall if Clean also has this. my memory says no, but i might be mistaken)
2022-08-13 11:24:16 +0200mastarija(~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc)
2022-08-13 11:26:13 +0200hrberg(~quassel@171.79-160-161.customer.lyse.net)
2022-08-13 11:29:04 +0200luffy(~chenqisu1@183.217.201.23)
2022-08-13 11:37:24 +0200ddellaco1(~ddellacos@89.45.90.170) (Ping timeout: 268 seconds)
2022-08-13 11:38:34 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-08-13 11:39:18 +0200ddellaco1(~ddellacos@89.45.90.118)
2022-08-13 11:44:46 +0200ddellaco1(~ddellacos@89.45.90.118) (Ping timeout: 268 seconds)
2022-08-13 11:54:01 +0200nosewings(~ngpc@cpe-76-186-194-45.tx.res.rr.com) (Ping timeout: 252 seconds)
2022-08-13 11:57:48 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-08-13 11:58:14 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 12:02:30 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 264 seconds)
2022-08-13 12:10:38 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-13 12:11:15 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 12:15:07 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com)
2022-08-13 12:21:29 +0200nate4(~nate@98.45.169.16)
2022-08-13 12:22:29 +0200irfan(~irfan@user/irfan)
2022-08-13 12:22:54 +0200yvan-sraka(~yvan-srak@105.67.135.250)
2022-08-13 12:24:24 +0200pagnol(~me@2a02-a453-dccb-1-6cd5-d678-3a95-67d0.fixed6.kpn.net)
2022-08-13 12:24:31 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-08-13 12:26:17 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 12:26:17 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-13 12:26:17 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 12:26:24 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 12:26:42 +0200nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-08-13 12:26:55 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 12:27:30 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 12:27:56 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-08-13 12:28:03 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-13 12:28:06 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 12:30:20 +0200yvan-sraka(~yvan-srak@105.67.135.250) (Remote host closed the connection)
2022-08-13 12:31:47 +0200mastarija(~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) (Quit: Leaving)
2022-08-13 12:32:03 +0200mastarija(~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc)
2022-08-13 12:32:26 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 12:32:43 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy)
2022-08-13 12:33:24 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 12:35:52 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 12:36:47 +0200mastarija(~mastarija@2a05:4f46:e03:6000:20af:4cb5:fc31:abbc) (Client Quit)
2022-08-13 12:38:09 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 12:38:52 +0200img(~img@user/img)
2022-08-13 12:39:48 +0200califax(~califax@user/califx)
2022-08-13 12:41:04 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 12:44:35 +0200kitty4(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 268 seconds)
2022-08-13 12:45:50 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-08-13 12:52:17 +0200califax(~califax@user/califx)
2022-08-13 12:53:34 +0200haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220)
2022-08-13 12:53:34 +0200haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host)
2022-08-13 12:53:34 +0200haritz(~hrtz@user/haritz)
2022-08-13 12:53:48 +0200sander(~sander@user/sander) (Remote host closed the connection)
2022-08-13 12:54:10 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-08-13 12:56:07 +0200sander(~sander@user/sander)
2022-08-13 12:57:25 +0200acidjnk(~acidjnk@p200300d6e7137a17f898ec8a19fe3297.dip0.t-ipconnect.de)
2022-08-13 13:00:42 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 13:01:07 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 13:01:33 +0200 <gurkenglas> I have a kind of function in mind. Its thing is sorta... that you have the data of how it was constructed, that you can memoize it, that you have hope of proving two of them equal
2022-08-13 13:01:35 +0200shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-08-13 13:01:57 +0200 <gurkenglas> it might be some sort of dual of linearly-typed functions
2022-08-13 13:02:44 +0200 <gurkenglas> a linearly typed function uses its argument once, a _ function "uses everything except the argument once"?
2022-08-13 13:04:36 +0200 <gurkenglas> "you can memoize it" not in the sense that you can write down the outputs for each input to not run it twice on the same input, but in the sense that running it n times takes as long as running it once plus O(n)
2022-08-13 13:06:03 +0200coot(~coot@213.134.176.158) (Quit: coot)
2022-08-13 13:06:54 +0200 <gurkenglas> Do you see what I mean? Can you guess what it'd be called? Do you have suggestions for how to investigate these?
2022-08-13 13:06:59 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
2022-08-13 13:08:59 +0200ddellaco1(~ddellacos@89.45.90.235)
2022-08-13 13:15:39 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 13:15:44 +0200mthunter(~mthunter2@user/mthunter)
2022-08-13 13:17:00 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 13:17:26 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 13:17:58 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-08-13 13:19:56 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 13:19:57 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 13:20:32 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 13:20:52 +0200califax(~califax@user/califx)
2022-08-13 13:21:34 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 13:22:23 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 13:24:09 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 13:24:37 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 13:24:57 +0200icebreaker(~icebreake@user/icebreaker) (Remote host closed the connection)
2022-08-13 13:30:13 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 268 seconds)
2022-08-13 13:30:15 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-08-13 13:30:17 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 268 seconds)
2022-08-13 13:35:12 +0200mrmr(~mrmr@user/mrmr) (Quit: Ping timeout (120 seconds))
2022-08-13 13:35:30 +0200mrmr(~mrmr@user/mrmr)
2022-08-13 13:35:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 13:35:56 +0200 <zzz> how do i make a custom type of mine a numeric literal? is it possible?
2022-08-13 13:38:19 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-08-13 13:39:30 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
2022-08-13 13:39:40 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 13:39:56 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 13:44:46 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 13:46:25 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-08-13 13:46:26 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2022-08-13 13:46:27 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy)
2022-08-13 13:46:54 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-08-13 13:46:59 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-08-13 13:47:05 +0200pmarg(~pmarg@2a01:799:159f:9b00:17c2:9fe8:3b24:da93)
2022-08-13 13:48:46 +0200 <pavonia> :t (123, 0.456)
2022-08-13 13:48:48 +0200 <lambdabot> (Fractional b, Num a) => (a, b)
2022-08-13 13:49:03 +0200 <pavonia> zzz: Implement one of those classes for your type
2022-08-13 13:49:25 +0200img(~img@user/img)
2022-08-13 13:50:01 +0200 <pavonia> :t (0.456, "abc", 123)
2022-08-13 13:50:04 +0200 <lambdabot> (Fractional a, Num c) => (a, [Char], c)
2022-08-13 13:52:07 +0200mbuf(~Shakthi@122.165.55.71)
2022-08-13 13:52:44 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net)
2022-08-13 13:52:52 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 13:55:19 +0200frost(~frost@user/frost) (Quit: Client closed)
2022-08-13 13:59:07 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-13 14:02:02 +0200 <qrpnxz> Haskell: Our functions are actually functions.™ 🙂
2022-08-13 14:03:40 +0200yvan-sraka(~yvan-srak@105.67.135.250)
2022-08-13 14:05:29 +0200benin00(~benin@2401:4900:2325:5674:b133:d14b:76b3:3d8)
2022-08-13 14:06:07 +0200 <ski> zzz : specifically, implement `fromInteger' and possibly `fromRational' (and, preferably, also the other methods of the relevant classes)
2022-08-13 14:07:01 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 14:07:16 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 14:07:29 +0200benin0(~benin@183.82.176.32) (Ping timeout: 252 seconds)
2022-08-13 14:07:29 +0200benin00benin0
2022-08-13 14:08:35 +0200 <ski> @tell gurkenglas memoize your type of function, how ? (example, maybe ?)
2022-08-13 14:08:35 +0200 <lambdabot> Consider it noted.
2022-08-13 14:09:43 +0200pagnol(~me@2a02-a453-dccb-1-6cd5-d678-3a95-67d0.fixed6.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 14:10:19 +0200zzzfacepalms
2022-08-13 14:10:21 +0200 <zzz> of course
2022-08-13 14:11:29 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-08-13 14:11:53 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 14:12:13 +0200vglfr(~vglfr@145.224.94.75) (Ping timeout: 244 seconds)
2022-08-13 14:13:57 +0200 <ski> if you want to fail at compile-time for some attempted literals, you could also try TH, possibly with quasi-quoters
2022-08-13 14:14:22 +0200 <zzz> haskell is so nice that i sometimes forget how much
2022-08-13 14:19:27 +0200ddellaco1(~ddellacos@89.45.90.235) (Ping timeout: 244 seconds)
2022-08-13 14:21:19 +0200ddellaco1(~ddellacos@89.45.90.157)
2022-08-13 14:24:36 +0200sr83402380(~sr8340238@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net)
2022-08-13 14:25:34 +0200 <sr83402380> I get this error when trying to run stack build https://paste.tomsmeding.com/NqyTEFxE could someone explain what this means?
2022-08-13 14:25:59 +0200Everything(~Everythin@37.115.210.35) (Quit: leaving)
2022-08-13 14:28:48 +0200ddellaco1(~ddellacos@89.45.90.157) (Ping timeout: 268 seconds)
2022-08-13 14:30:39 +0200ddellaco1(~ddellacos@89.45.90.66)
2022-08-13 14:30:55 +0200 <sr83402380> I have a .cabal file there and I also have a stack.yaml file
2022-08-13 14:37:07 +0200coot(~coot@213.134.176.158)
2022-08-13 14:38:40 +0200Pickchea(~private@user/pickchea) (Ping timeout: 268 seconds)
2022-08-13 14:40:45 +0200vglfr(~vglfr@145.224.94.75)
2022-08-13 14:40:47 +0200 <sr83402380> nvm
2022-08-13 14:40:51 +0200sr83402380(~sr8340238@cpc142034-slou6-2-0-cust488.17-4.cable.virginm.net) (Remote host closed the connection)
2022-08-13 14:44:51 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy) (Ping timeout: 268 seconds)
2022-08-13 14:46:08 +0200luffy(~chenqisu1@183.217.201.23) (Ping timeout: 268 seconds)
2022-08-13 14:50:45 +0200benin04(~benin@183.82.206.125)
2022-08-13 14:52:23 +0200benin0(~benin@2401:4900:2325:5674:b133:d14b:76b3:3d8) (Ping timeout: 255 seconds)
2022-08-13 14:52:23 +0200benin04benin0
2022-08-13 14:54:03 +0200Flow(~none@gentoo/developer/flow) (Quit: WeeChat 3.5)
2022-08-13 14:54:13 +0200mastarija(~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3)
2022-08-13 14:54:52 +0200Flow(~none@gentoo/developer/flow)
2022-08-13 14:55:05 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 14:57:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-08-13 14:57:46 +0200waldo(~waldo@user/waldo)
2022-08-13 14:58:14 +0200mastarija(~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) (Client Quit)
2022-08-13 14:58:25 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 14:58:32 +0200mastarija(~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3)
2022-08-13 15:00:17 +0200coot(~coot@213.134.176.158) (Ping timeout: 268 seconds)
2022-08-13 15:02:57 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 15:04:54 +0200acidjnk(~acidjnk@p200300d6e7137a17f898ec8a19fe3297.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-08-13 15:07:28 +0200 <zzz> GeneralizedNewtypeDeriving + default <3
2022-08-13 15:08:15 +0200mastarij1(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372)
2022-08-13 15:08:36 +0200mastarija(~mastarija@2a05:4f46:e03:6000:40d3:9ecb:e074:4af3) (Quit: Leaving)
2022-08-13 15:09:05 +0200mastarij1(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Client Quit)
2022-08-13 15:09:22 +0200mastarija(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372)
2022-08-13 15:10:00 +0200 <zzz> now i just need a way to tell ghc "benckmark my program with all possible combinations of these types"
2022-08-13 15:10:37 +0200mastarija(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Client Quit)
2022-08-13 15:10:39 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 15:11:20 +0200mastarija(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372)
2022-08-13 15:13:21 +0200darklambda(~whateverg@58.182.140.104)
2022-08-13 15:16:09 +0200yvan-sraka(~yvan-srak@105.67.135.250) (Remote host closed the connection)
2022-08-13 15:19:01 +0200 <mastarija> I'm having some issues with overlapping instances for servant authentication : https://paste.tomsmeding.com/c6iWXrNQ
2022-08-13 15:19:28 +0200 <mastarija> I've cleaned the data type in question and possible instances that ghc can't choose between
2022-08-13 15:19:37 +0200 <mastarija> I don't quite see what's confusing it
2022-08-13 15:23:38 +0200odnes(~odnes@109-178-141-43.pat.ren.cosmote.net)
2022-08-13 15:23:39 +0200odnes(~odnes@109-178-141-43.pat.ren.cosmote.net) (Remote host closed the connection)
2022-08-13 15:24:15 +0200darklambda(~whateverg@58.182.140.104) (Read error: Connection reset by peer)
2022-08-13 15:24:19 +0200darklamb1a(~whateverg@58.182.140.104)
2022-08-13 15:25:19 +0200 <mastarija> I did add couple of custom combinators, but I don't think that should confuse it
2022-08-13 15:27:21 +0200darklamb1a(~whateverg@58.182.140.104) (Client Quit)
2022-08-13 15:34:06 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-08-13 15:35:30 +0200ddellaco1(~ddellacos@89.45.90.66) (Ping timeout: 264 seconds)
2022-08-13 15:35:58 +0200nilradical(~nilradica@user/naso)
2022-08-13 15:36:59 +0200ddellaco1(~ddellacos@89.46.114.248)
2022-08-13 15:37:52 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 15:37:59 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-08-13 15:41:25 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-08-13 15:51:25 +0200 <nilradical> did john carmack ever release his haskell port of wolf3d
2022-08-13 15:58:30 +0200 <qrpnxz> there a way to tell the linter that a function's result is meant to be ignored? I have a function that throws so returns a polymorphic type, but linter thinks i perhaps wanted to use that unusable value lol
2022-08-13 16:00:08 +0200mastarija(~mastarija@2a05:4f46:e03:6000:fc8c:bae4:d1f2:2372) (Ping timeout: 268 seconds)
2022-08-13 16:00:50 +0200 <ski> hm, ooc, how are you "using" it ?
2022-08-13 16:01:00 +0200 <ski> (disclaimer, i dunno knobs on linter)
2022-08-13 16:01:16 +0200yvan-sraka(~yvan-srak@105.67.135.250)
2022-08-13 16:01:42 +0200 <qrpnxz> idk what ooc means, but i just call the function idk what you mean
2022-08-13 16:01:42 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-08-13 16:04:09 +0200 <ski> ("out of curiosity")
2022-08-13 16:04:59 +0200 <ski> does the function compute an action ? like you're saying `_ <- ...' or `...' in `do' ?
2022-08-13 16:05:15 +0200 <ski> or you're using `let' or `where' ? (`case' ?)
2022-08-13 16:05:59 +0200 <qrpnxz> nah i just ..., if i did _ <- ... the warning would go away sure, but i dont' want to do that since i'm not ignoring anything, the function doesn't return!
2022-08-13 16:06:24 +0200 <zzz> is this hlint?
2022-08-13 16:06:47 +0200 <qrpnxz> uhhh, probably let me check
2022-08-13 16:07:05 +0200 <qrpnxz> i think so
2022-08-13 16:07:49 +0200 <qrpnxz> ah wait it's not a linter hint, it's a ghc warning
2022-08-13 16:07:51 +0200 <qrpnxz> oh boy
2022-08-13 16:07:56 +0200 <ski> is it the last command in a `do' ?
2022-08-13 16:07:57 +0200 <qrpnxz> now i've lost hope haha
2022-08-13 16:08:02 +0200 <qrpnxz> ski: no
2022-08-13 16:08:09 +0200 <Lears> There's -Wno-unused-do-binds or something like that.
2022-08-13 16:08:25 +0200 <ski> still wondering what in your code's triggering the warning
2022-08-13 16:08:25 +0200 <qrpnxz> yeah, but i do want the warnings in general, so i rather not do that
2022-08-13 16:09:11 +0200 <qrpnxz> ski: it's triggered because i have like `... >> throw bad >> ...` and ghc sees i never use the result of throw (this is my own throw, not base throw) so it complains
2022-08-13 16:09:33 +0200 <ski> and the point of the `>> ...' ?
2022-08-13 16:10:08 +0200 <qrpnxz> hmm, point was to match types, but i see your point now lol
2022-08-13 16:10:11 +0200hippoid(~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Quit: WeeChat 3.5)
2022-08-13 16:10:16 +0200 <ski> (the `throw' is conditional ?)
2022-08-13 16:11:19 +0200 <ski> heh, not sure i had a point, as such, just curious about what the source was
2022-08-13 16:11:19 +0200 <qrpnxz> yes, i throw on error, but you are right, that following statement was pointless is what the real problem was. Removed it and the warning went away.
2022-08-13 16:11:49 +0200 <ski> yay
2022-08-13 16:11:55 +0200 <qrpnxz> 🥳
2022-08-13 16:12:20 +0200mthunter(~mthunter2@user/mthunter) ()
2022-08-13 16:12:58 +0200 <ski> (fwiw, dunno what you meant by "match types", either)
2022-08-13 16:13:37 +0200jesone(~jesone@2601:192:7f:da30::fcf8)
2022-08-13 16:14:28 +0200 <qrpnxz> in my subconcious i treated throw as not polymorphic, so i put a statement afterward that was the right type for that place in the code.
2022-08-13 16:17:51 +0200 <zzz> hlint warns me if i name some_thing like this. hlint: WHY NOT CAMELCASE???
2022-08-13 16:18:03 +0200 <zzz> shut up hlint
2022-08-13 16:18:39 +0200 <qrpnxz> lol
2022-08-13 16:18:40 +0200Pickchea(~private@user/pickchea)
2022-08-13 16:19:00 +0200yvan-sraka(~yvan-srak@105.67.135.250) (Remote host closed the connection)
2022-08-13 16:19:12 +0200 <Lears> hlint is opinionated. You're supposed to hit it with a stick until it only says what you want to hear.
2022-08-13 16:19:42 +0200 <zzz> yup
2022-08-13 16:19:48 +0200 <qrpnxz> xd, i like opinionated for the most part
2022-08-13 16:20:06 +0200waldo(~waldo@user/waldo) (Quit: quit)
2022-08-13 16:21:21 +0200 <zzz> hlint: "Found: Something _ _ ; Why not: Something {}"
2022-08-13 16:21:50 +0200 <zzz> well, i could explain why not. but there is no input field for my explanation
2022-08-13 16:22:00 +0200 <zzz> stupid hlint
2022-08-13 16:22:41 +0200 <geekosaur> best part of vs code: on every stupid hlint hint there's an action "disable this hint"
2022-08-13 16:23:00 +0200nate4(~nate@98.45.169.16)
2022-08-13 16:24:32 +0200 <ski> i don't care too much about some things hlint is complaining about
2022-08-13 16:24:45 +0200 <ski> qrpnxz : ic, ty
2022-08-13 16:25:13 +0200 <qrpnxz> zzz: lol i felt that
2022-08-13 16:25:51 +0200 <qrpnxz> geekosaur: best part of vs code: i write garbage and then apply all hints to make it look nice automatically
2022-08-13 16:25:59 +0200 <qrpnxz> 😁
2022-08-13 16:27:08 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-08-13 16:27:15 +0200 <Rembane_> I used brittany for that when writing Haskell, but I don't know if brittany is maintained anymore.
2022-08-13 16:27:55 +0200nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-08-13 16:29:08 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 16:30:46 +0200 <qrpnxz> last version november 2021
2022-08-13 16:31:08 +0200 <qrpnxz> "Added support for GHC 9.0. Dropped support for all other versions of GHC"
2022-08-13 16:32:20 +0200 <zzz> hlint asks me why not combine a bunch of local bindings from different functions that look the same, completely unaware of free variables
2022-08-13 16:32:53 +0200 <qrpnxz> brittany looks pretty good in the demo video
2022-08-13 16:34:25 +0200jesone(~jesone@2601:192:7f:da30::fcf8) (Remote host closed the connection)
2022-08-13 16:34:32 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-08-13 16:34:32 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-08-13 16:34:32 +0200wroathe(~wroathe@user/wroathe)
2022-08-13 16:35:50 +0200ddellaco1(~ddellacos@89.46.114.248) (Ping timeout: 268 seconds)
2022-08-13 16:37:21 +0200ddellaco1(~ddellacos@89.45.90.209)
2022-08-13 16:40:58 +0200 <nilradical> relude has a custom hlint file that is really handy
2022-08-13 16:41:53 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-08-13 16:43:41 +0200ddellaco1(~ddellacos@89.45.90.209) (Ping timeout: 252 seconds)
2022-08-13 16:45:19 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-08-13 16:45:41 +0200ddellaco1(~ddellacos@89.45.90.170)
2022-08-13 16:46:05 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 16:46:21 +0200 <geekosaur> hlint kept suggesting more obtuse and generally longer substitutions for me
2022-08-13 16:46:50 +0200 <geekosaur> no thank you, I want to understand that code in 6 months
2022-08-13 16:52:57 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-08-13 16:53:02 +0200acidjnk(~acidjnk@p200300d6e7137a17b9b7690179552a14.dip0.t-ipconnect.de)
2022-08-13 16:54:38 +0200zebrag(~chris@user/zebrag)
2022-08-13 16:55:07 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 16:58:56 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 16:59:55 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
2022-08-13 17:01:41 +0200kenran(~kenran@200116b82bfce100213ee5ca9c704528.dip.versatel-1u1.de)
2022-08-13 17:03:20 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 17:07:40 +0200gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de)
2022-08-13 17:08:16 +0200alp_(~alp@user/alp)
2022-08-13 17:10:59 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 17:11:08 +0200pmarg(~pmarg@2a01:799:159f:9b00:17c2:9fe8:3b24:da93) (Ping timeout: 268 seconds)
2022-08-13 17:11:25 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 17:13:46 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 17:16:05 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-08-13 17:16:12 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 17:17:53 +0200king_gs(~Thunderbi@2806:103e:29:da7a:8e16:45ff:feeb:cfcf)
2022-08-13 17:18:44 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-08-13 17:19:11 +0200king_gs(~Thunderbi@2806:103e:29:da7a:8e16:45ff:feeb:cfcf) (Client Quit)
2022-08-13 17:23:58 +0200mbuf(~Shakthi@122.165.55.71) (Quit: Leaving)
2022-08-13 17:24:14 +0200 <zzz> wait. since when can we write `t :: Bool = True
2022-08-13 17:24:25 +0200 <zzz> ` ?
2022-08-13 17:25:49 +0200 <ski> `PatternSignatures', or `ScopedTypeVariables'
2022-08-13 17:25:53 +0200 <geekosaur> I think that's part of ScopedTy[peVariables and therefore of GHC2021
2022-08-13 17:26:10 +0200 <ski> (also `<pat> :: <type> <- <expr>' commands)
2022-08-13 17:26:26 +0200pmarg(~pmarg@224.80-203-5.customer.lyse.net)
2022-08-13 17:26:46 +0200pmarg(~pmarg@224.80-203-5.customer.lyse.net) (Remote host closed the connection)
2022-08-13 17:27:43 +0200 <ski> (also, i'd like to be able to write result type ascriptions, like `foo (x :: A) :: B = ..x..' ..)
2022-08-13 17:28:22 +0200 <monochrom> Did you get that influence from SML? :)
2022-08-13 17:28:39 +0200 <monochrom> Although, SML got that influence from Algol etc...
2022-08-13 17:28:49 +0200razetime(~quassel@117.254.35.202)
2022-08-13 17:28:57 +0200razetime_(~quassel@117.254.35.202)
2022-08-13 17:28:57 +0200 <ski> hm .. probably
2022-08-13 17:29:06 +0200kenran(~kenran@200116b82bfce100213ee5ca9c704528.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2022-08-13 17:29:06 +0200 <ski> (although i learned SML after Haskell)
2022-08-13 17:29:22 +0200 <zzz> ah ok
2022-08-13 17:29:46 +0200razetime(~quassel@117.254.35.202) (Client Quit)
2022-08-13 17:29:50 +0200razetime_(~quassel@117.254.35.202) (Client Quit)
2022-08-13 17:30:04 +0200razetime(~quassel@117.254.35.202)
2022-08-13 17:30:13 +0200 <ski> hm, Algol assigns result value to function name, like Pascal (and Ada, iirc), does ?
2022-08-13 17:30:37 +0200 <zzz> ski: yeah that would be nice
2022-08-13 17:31:56 +0200 <fr33domlover[m]> Is there a library for types parameterized by container type? e.g. `data T f = T (f Int)` ? I'm looking for a way to automatically derive Eq, Ord, etc. instance for a type like that
2022-08-13 17:32:16 +0200 <fr33domlover[m]> I recall a library but can't find it or recall its name :-/
2022-08-13 17:32:44 +0200 <ski> (while we're at it, we could also allow "declaration follows use"-style signatures (a la C), like `map (_ :: a -> b) (_ :: [a]) :: [b]',`primes !! _ :: Integer', .. or maybe not)
2022-08-13 17:33:04 +0200 <monochrom> Yeah Pascal got that from Algol, too.
2022-08-13 17:33:11 +0200 <ski> figured
2022-08-13 17:33:21 +0200 <zzz> ski: haskell needs an alternative syntax
2022-08-13 17:33:29 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 17:33:44 +0200 <fr33domlover[m]> Yay found it https://hackage.haskell.org/package/barbies :P
2022-08-13 17:34:01 +0200 <APic> yay
2022-08-13 17:34:08 +0200 <zzz> \o/
2022-08-13 17:34:39 +0200 <ski> i sorta like that, except that i think you should give your own name for the result (separately from the function name) .. or at least, you ought to be able to. (MPD (Multi-Processing, Parallel, Distributed) (a derivative of SR), a minor language i encountered, does this)
2022-08-13 17:35:09 +0200 <ski> also, the Mercury `foo(X,Y) = Z :- ..X..Y..Z..' is very similar
2022-08-13 17:35:49 +0200 <ski> (or `foo x y = z where ..x..y..; z = ..x..y..', in Haskell terms)
2022-08-13 17:36:15 +0200 <qrpnxz> lmao https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/src/Data.ByteString.Internal.html#acc…
2022-08-13 17:36:39 +0200 <monochrom> > f x y = let f = [x,y] in f
2022-08-13 17:36:41 +0200 <lambdabot> <hint>:1:7: error: parse error on input ‘=’
2022-08-13 17:36:45 +0200 <monochrom> Oh oops
2022-08-13 17:36:52 +0200mastarija(~mastarija@2a05:4f46:e03:6000:80e6:5d48:fb8:8fa0)
2022-08-13 17:37:05 +0200 <monochrom> > let (f x y = let f = [x,y] in f) in f 3 4
2022-08-13 17:37:06 +0200 <lambdabot> <hint>:1:12: error: parse error on input ‘=’
2022-08-13 17:37:28 +0200 <qrpnxz> hm, that looks fine though
2022-08-13 17:37:30 +0200 <monochrom> Sorry! I'll stop. :)
2022-08-13 17:38:18 +0200 <mastarija> can anyone help me decypher this servant error? https://paste.tomsmeding.com/c6iWXrNQ
2022-08-13 17:38:19 +0200 <qrpnxz> > let { f x y = let f = [x,y] in f } in f 3 4
2022-08-13 17:38:21 +0200 <lambdabot> [3,4]
2022-08-13 17:38:32 +0200 <monochrom> Yeah, that. Heaven on Earth. :)
2022-08-13 17:38:38 +0200 <qrpnxz> 😁
2022-08-13 17:38:46 +0200 <mastarija> I don't get what's confusing him with those instances.
2022-08-13 17:39:07 +0200 <mastarija> I've made errors more readable if you scroll down
2022-08-13 17:39:14 +0200 <int-e> . o O ( Somebody used overlapping instances and you're paying the price.)
2022-08-13 17:39:19 +0200 <ski> > let f x ((x :) . (: []) -> f) = f in f 3 4
2022-08-13 17:39:21 +0200 <lambdabot> [3,4]
2022-08-13 17:39:32 +0200 <qrpnxz> wot
2022-08-13 17:39:43 +0200 <ski> look ma, shadowing !
2022-08-13 17:40:07 +0200 <qrpnxz> that pattern match blow my mind, does not look legal
2022-08-13 17:41:06 +0200 <monochrom> It's "view patterns".
2022-08-13 17:41:11 +0200 <int-e> > let compute x | x <- x-1, x <- 4*x, x <- x `div` 7 = x in compute 42
2022-08-13 17:41:13 +0200 <lambdabot> 23
2022-08-13 17:41:32 +0200 <qrpnxz> oh i've heard of those let's see
2022-08-13 17:41:38 +0200 <mastarija> int-e, any way around those overlapping instances perhaps?
2022-08-13 17:44:22 +0200 <qrpnxz> without knowing servant deeply and your code as well, personally i can't help you with that. What might help is being more specific with our types (annotating) perhaps? That helps GHC choose the instance.
2022-08-13 17:44:37 +0200 <qrpnxz> s/our/your
2022-08-13 17:45:00 +0200 <mastarija> :(
2022-08-13 17:45:45 +0200 <int-e> Me neither, though the instance heads look like there *is* a genuine overlap which may require IncoherenInstances and prayers to be accepted.
2022-08-13 17:46:05 +0200 <int-e> +t
2022-08-13 17:46:18 +0200acidjnk(~acidjnk@p200300d6e7137a17b9b7690179552a14.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2022-08-13 17:47:09 +0200HashOpenSores
2022-08-13 17:49:53 +0200OpenSoresHash
2022-08-13 17:50:01 +0200 <int-e> it's funny how lines 56-59 aren't more specific than lines 49-50 (the rest of it doesn't matter)
2022-08-13 17:50:51 +0200 <mastarija> Damn, and the day was going so well :/
2022-08-13 17:53:06 +0200 <int-e> I guess the "problem" is that a and a' are the same, so both (a Servant.API.Alternative.:<|>) and (a' Servant.API.Alternative.:<|>) can stand in for `m`.
2022-08-13 17:53:29 +0200 <mastarija> Is there a way to "debug" type inference?
2022-08-13 17:53:37 +0200 <mastarija> Like, going step by step
2022-08-13 17:53:46 +0200 <mastarija> That would be a nice feature
2022-08-13 17:54:03 +0200pt_owl(~noone@p200300e277470aa2231dde224d8a36df.dip0.t-ipconnect.de)
2022-08-13 17:54:24 +0200 <int-e> So /maybe/ this can be avoided by grouping all the :<|> differently. That... doesn't seem like a fun idea to investigate.
2022-08-13 17:55:28 +0200 <mastarija> I'm using generics that turn records into a tree of (:<|>)
2022-08-13 17:55:54 +0200 <mastarija> Funny thing is, only one sub api is causing this problem. If I comment it out then others work
2022-08-13 17:56:04 +0200 <mastarija> But I don't have anything special in that API...
2022-08-13 17:56:39 +0200 <zzz> mastarija: DerivingStrategies not enough? :p
2022-08-13 17:57:23 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2022-08-13 17:57:41 +0200 <zzz> oops nvm that. i miread
2022-08-13 17:57:44 +0200 <zzz> *misread
2022-08-13 17:57:56 +0200econo(uid147250@user/econo)
2022-08-13 17:58:42 +0200 <int-e> mastarija: Well, some of the old/new pairs to the left of a :<|> are the same as it goes down that tree... maybe that doesn't happen for the other services?
2022-08-13 17:59:34 +0200 <int-e> And by "some" I guess I mean "all". (This is me looking at the cleaned data type.)
2022-08-13 18:00:06 +0200lyiriyah[m](~lyiriyahm@2001:470:69fc:105::cc0) (Quit: You have been kicked for being idle)
2022-08-13 18:00:26 +0200mrmr7(~mrmr@user/mrmr)
2022-08-13 18:00:39 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in)
2022-08-13 18:01:10 +0200 <mastarija> hm.. well in this case I'd expect them to stay the same :/
2022-08-13 18:01:58 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Remote host closed the connection)
2022-08-13 18:02:10 +0200mrmr(~mrmr@user/mrmr) (Ping timeout: 268 seconds)
2022-08-13 18:02:10 +0200mrmr7mrmr
2022-08-13 18:02:11 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
2022-08-13 18:03:50 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-08-13 18:04:04 +0200 <int-e> Instance resolution is such a blunt knife to cut with once you enter overlapping instances territory. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/instances.html#instance-overlap
2022-08-13 18:04:10 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 18:04:47 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 18:08:22 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 18:13:04 +0200 <mastarija> int-e, hm... it can't decide between `AddSetCookies ('S n) (m old) (m new)` and `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')` where m is a functor.
2022-08-13 18:13:12 +0200 <mastarija> :<|> is indeed a functor
2022-08-13 18:13:27 +0200 <mastarija> However, it is more specific than just `m a`
2022-08-13 18:13:31 +0200 <int-e> mastarija: The context is irrelevant for instance selection
2022-08-13 18:13:43 +0200 <mastarija> Therefore I'd expect that to resolve...
2022-08-13 18:13:49 +0200 <mastarija> int-e: what do you mean by that?
2022-08-13 18:13:57 +0200 <int-e> s/irrelevant/ignored/
2022-08-13 18:13:59 +0200 <mastarija> Oh...
2022-08-13 18:14:14 +0200 <mastarija> So constraints don't matter
2022-08-13 18:14:20 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net) (Remote host closed the connection)
2022-08-13 18:14:48 +0200 <mastarija> Ok, still. `:<|>` seems more specific than `m`
2022-08-13 18:15:12 +0200 <int-e> right. Which is how m = (a :<|>) [abusing syntax] becomes valid when a = a'.
2022-08-13 18:15:26 +0200benin0(~benin@183.82.206.125) (Quit: The Lounge - https://thelounge.chat)
2022-08-13 18:15:49 +0200 <int-e> I agree that it /looks/ more specific. I don't really understand ghc's rules for that though.
2022-08-13 18:16:13 +0200 <ski> there's overlap, but one isn't more specific than the other (you need to instantiate both sides to get to the overlap)
2022-08-13 18:17:06 +0200 <mastarija> ski: what do you mean instantiate both sides?
2022-08-13 18:17:09 +0200 <ski> m = (a :<|>) as well as a = a'
2022-08-13 18:17:12 +0200nilradical(~nilradica@user/naso) (Read error: Connection reset by peer)
2022-08-13 18:17:13 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net)
2022-08-13 18:17:41 +0200 <ski> mastarija : make more specific / specialize
2022-08-13 18:18:03 +0200nilradical(~nilradica@user/naso)
2022-08-13 18:18:12 +0200ccntrq(~Thunderbi@172.209.94.92.rev.sfr.net) (Client Quit)
2022-08-13 18:18:37 +0200 <mastarija> ski: all of the types listed here are quite concrete https://paste.tomsmeding.com/c6iWXrNQ
2022-08-13 18:18:42 +0200 <ski> AddSetCookies ('S n) (a :<|> b) (a :<|> b') -- this is the overlap. note it's not identical (in structure) to either side
2022-08-13 18:20:35 +0200 <mastarija> one of suggested instances ghc offers is `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')`
2022-08-13 18:20:57 +0200 <mastarija> It's not missing the tick on second a
2022-08-13 18:21:46 +0200mvk(~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 244 seconds)
2022-08-13 18:22:07 +0200 <zzz> ski: apparently we can also do `f :: A | someGuard = ... ; ...`
2022-08-13 18:22:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 18:22:29 +0200 <ski> sure
2022-08-13 18:22:54 +0200nilradical(~nilradica@user/naso) (Ping timeout: 264 seconds)
2022-08-13 18:23:27 +0200 <ski> (guards on pattern bindings can be useful, at times)
2022-08-13 18:25:16 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 18:25:28 +0200 <ski> mastarija : yes, so it doesn't know which to pick (and there's none most specific)
2022-08-13 18:26:05 +0200 <mastarija> ah.. I've noticed now
2022-08-13 18:27:09 +0200nilradical(~nilradica@user/naso)
2022-08-13 18:27:57 +0200 <mastarija> Line 4-12 and 26-34 are the same `a` and he doesn't know if `m` in `AddSetCookies ('S n) (m old) (m new)` is perhaps `(:<|> a)` and therefore can't choose...
2022-08-13 18:29:44 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 18:33:08 +0200 <mastarija> is there a way to further evaluate a kind of a type?
2022-08-13 18:33:40 +0200 <mastarija> I used :kind! ToServantApi (MyAPI Double)
2022-08-13 18:33:53 +0200 <mastarija> But that only evaluated the "first layer"
2022-08-13 18:34:03 +0200 <mastarija> other type level functions weren't evaluated
2022-08-13 18:34:56 +0200ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 268 seconds)
2022-08-13 18:35:08 +0200 <mastarija> or rather, "deeper" type families weren't evaluated
2022-08-13 18:35:50 +0200ec(~ec@gateway/tor-sasl/ec)
2022-08-13 18:36:09 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-08-13 18:36:58 +0200ComingFromCPP(~ComingFro@2601:43:200:154f:e4ab:469f:ada2:4ef9)
2022-08-13 18:37:14 +0200 <ComingFromCPP> Hello All! I've put together some questions:
2022-08-13 18:37:14 +0200jakalx(~jakalx@base.jakalx.net)
2022-08-13 18:37:15 +0200 <ComingFromCPP> when to use difference environment and build tools, such as
2022-08-13 18:37:15 +0200 <ComingFromCPP>   nix
2022-08-13 18:37:16 +0200 <ComingFromCPP>     url: github.com/input-output-hk/haskell.nix
2022-08-13 18:37:16 +0200 <ComingFromCPP>     url: github.com/jonascarpay/template-haskell
2022-08-13 18:37:17 +0200 <ComingFromCPP>     url: github.com/utdemir/hs-nix-template
2022-08-13 18:37:17 +0200 <ComingFromCPP>   cabal
2022-08-13 18:37:17 +0200 <ComingFromCPP>     url: haskell.org/cabal
2022-08-13 18:37:18 +0200 <ComingFromCPP>     setup: unknown cross-platform method, maybe via nix?
2022-08-13 18:37:18 +0200 <ComingFromCPP>   stack
2022-08-13 18:37:19 +0200 <ComingFromCPP>     setup: curl -sSL https://get.haskellstack.org/ | sh
2022-08-13 18:37:20 +0200 <ComingFromCPP> how to cross-compile, i.e.
2022-08-13 18:37:20 +0200 <ComingFromCPP>   use cabal?
2022-08-13 18:37:20 +0200 <ComingFromCPP>   use nix?
2022-08-13 18:37:21 +0200 <ComingFromCPP> how to debug a program, i.e.
2022-08-13 18:37:21 +0200 <ComingFromCPP>   static analysis?
2022-08-13 18:37:22 +0200 <ComingFromCPP>   performance analysis?
2022-08-13 18:37:23 +0200 <ComingFromCPP>   exception best-practices?
2022-08-13 18:37:29 +0200 <hpc> @where paste
2022-08-13 18:37:30 +0200 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-08-13 18:38:21 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 18:38:38 +0200 <ComingFromCPP> https://paste.tomsmeding.com/3spfP4SN
2022-08-13 18:39:07 +0200 <ComingFromCPP> It's not code, just notes and beginner questions to set up a good Haskell environment that my company and I can use
2022-08-13 18:39:25 +0200 <mastarija> right now we have `AddSetCookies ('S n) (m old) (m new)` and `AddSetCookies ('S n) (a :<|> b) (a' :<|> b')`
2022-08-13 18:39:48 +0200 <mastarija> do you think adding orphan instance `AddSetCookies ('S n) (a :<|> b) (a :<|> b')` could help solve this issue?
2022-08-13 18:40:23 +0200 <mastarija> I think it would ...
2022-08-13 18:40:26 +0200 <mastarija> Gonna try it
2022-08-13 18:40:35 +0200 <hpc> on setting up a dev environment, everything ultimately ends up using cabal
2022-08-13 18:40:43 +0200 <hpc> so you may want to start with just understanding that on its own
2022-08-13 18:41:08 +0200 <hpc> stack takes cabal and adds installing ghc and pinning the versions of everything to a known good set
2022-08-13 18:41:49 +0200 <hpc> nix is a general-purpose packaging system that's interesting on its own, and hard to describe concisely
2022-08-13 18:41:58 +0200 <hpc> you may want to try ghcup to start
2022-08-13 18:42:25 +0200 <hpc> it'll get you exposed to everything in the easiest to install way, and least "wrapped" by other tools
2022-08-13 18:43:15 +0200 <ComingFromCPP> Dependency projects are managed in Cabal, right? (Or are they somewhere else?)
2022-08-13 18:43:36 +0200 <hpc> yeah, cabal is the thing that goes "install dependencies, build package, install package"
2022-08-13 18:43:37 +0200 <ski> ComingFromCPP : "The Cabal/Stack Disambiguation Guide" <https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07> might be useful
2022-08-13 18:43:56 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2022-08-13 18:44:09 +0200 <hpc> for the rest of your questions... i personally avoid exceptions entirely so i couldn't say what's best there
2022-08-13 18:44:37 +0200 <[exa]> ComingFromCPP: this is quite useful https://wiki.haskell.org/How_to_write_a_Haskell_program (despite the page name sounds very beginnerish, it's a super useful collection of practices)
2022-08-13 18:44:38 +0200 <hpc> for profiling and such, you might like to start with quickcheck and criterion
2022-08-13 18:45:20 +0200 <hpc> that'll get you a nice start, before going down the rabbit hole of other tools
2022-08-13 18:45:51 +0200 <ski> @wiki ThreadScope
2022-08-13 18:45:51 +0200 <lambdabot> https://wiki.haskell.org/ThreadScope
2022-08-13 18:47:33 +0200 <ComingFromCPP> We do very little building of the code locally; It's all CI/CD jobs. I'm perfectly OK postponing learning CI for Haskell, but It's very important that there are no caveats to it. Coming from C++, configuring and running the build system is about 20% of our work. Layer on CI and instrumentation, I'm lucky that I still get to spend most of my time
2022-08-13 18:47:34 +0200 <ComingFromCPP> actually programming.
2022-08-13 18:48:06 +0200 <ComingFromCPP> Are there any similar caveats to CI/CD on Haskell? Or is it a more simple, set up your docker or nix environment, use x and y tools, and let it run.
2022-08-13 18:48:34 +0200 <hpc> it's generally that simple, yeah
2022-08-13 18:48:59 +0200 <ComingFromCPP> Wow
2022-08-13 18:49:22 +0200 <mastarija> ski: muhuhaha! adding the orphan instance `AddSetCookies ('S n) (a :<|> b) (a :<|> b')` did the trick! :D
2022-08-13 18:49:34 +0200 <ski> mastarija : najs
2022-08-13 18:49:59 +0200 <mastarija> I'd say that's a bug
2022-08-13 18:50:17 +0200 <mastarija> Because it's perfectly fine for one part of the tree to stay the same
2022-08-13 18:50:26 +0200 <ski> (one could even argue overlapping instances is a bug)
2022-08-13 18:50:48 +0200skihas no idea what all this servant stuff actually means
2022-08-13 18:50:57 +0200 <mastarija> Well, if there are no better solutions at the moment, it's a necessity
2022-08-13 18:51:43 +0200 <mastarija> are there any proposd alternatives to overlapping?
2022-08-13 18:52:48 +0200 <ski> "don't do that" ? manually build record dictionaries ?
2022-08-13 18:53:29 +0200 <mastarija> manual labor is for peasants, not for FP aristocracy
2022-08-13 18:53:46 +0200 <mastarija> is ski a reference to S K I combinators?
2022-08-13 18:53:59 +0200 <mastarija> :D
2022-08-13 18:54:00 +0200 <ski> aye
2022-08-13 18:54:31 +0200 <ski> (too set in stone to change now)
2022-08-13 18:54:33 +0200 <Rembane_> ski: Is this why you are so fast down snow covered slopes?
2022-08-13 18:54:40 +0200skidoesn't ski
2022-08-13 18:55:04 +0200 <ComingFromCPP> One last question: I'm reading "learn you a haskell" and having *a ton* of fun with it. However, for the next steps, what are some very common projects that are useful? Some common things that I use frequently are:
2022-08-13 18:55:04 +0200 <ComingFromCPP> - websockets
2022-08-13 18:55:05 +0200 <ComingFromCPP> - asynchronous tcp and udp sockets
2022-08-13 18:55:05 +0200 <ComingFromCPP> - asynchronous message-passing (or any similar model, such as the actor model or just raw executor/lock)
2022-08-13 18:55:06 +0200 <ComingFromCPP> - GPIO utilities (bonus points for being non-reliant on the kernel)
2022-08-13 18:55:06 +0200 <ComingFromCPP> - Some way of exposing code to a UI for the design team (namely angular)
2022-08-13 18:57:56 +0200 <[exa]> ComingFromCPP: asynchronous IO is "free" with haskell because RTS contains a very efficient eventloop implementation that you can use for free. Most of haskell networking is in fact super easy thanks to that. There are packages for websockets, and very nice packages for doing webs and JSON APIs (you can start with scotty and when you feel adventurous try servant).
2022-08-13 18:58:52 +0200 <ski> PCPH, "Parallel and Concurrent Programming in Haskell" by Simon Marlow in 2013 at <https://web.archive.org/web/20180121171509/http://chimera.labs.oreilly.com/books/1230000000929>,<https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/>, might be interesting
2022-08-13 18:58:58 +0200instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2022-08-13 18:59:14 +0200 <[exa]> re message passing, std library has channels and shared data and software transactional memory and similar stuff, which is pretty much okay for all non-distributed async programming
2022-08-13 18:59:24 +0200liz(~liz@host86-157-124-38.range86-157.btcentralplus.com)
2022-08-13 18:59:42 +0200 <ski> @where CIS194
2022-08-13 18:59:42 +0200 <lambdabot> https://www.seas.upenn.edu/~cis194/spring13/lectures.html
2022-08-13 19:00:00 +0200 <ski> ^ some more basic exercises, if you were missing them, browsing LYAH
2022-08-13 19:00:02 +0200 <ComingFromCPP> Woah -- transactional memory? That's in the standards track for some-time-in-the-next-9-years for C++.
2022-08-13 19:00:09 +0200 <ski> sure
2022-08-13 19:00:20 +0200 <ski> that's the `STM
2022-08-13 19:00:27 +0200 <ski> ' monad. with `TVar's
2022-08-13 19:01:03 +0200 <ComingFromCPP> Bookmarking and planning to read these links. Please send any/all good resources you have. Being fluent in the languages I use is important to me.
2022-08-13 19:01:43 +0200 <mastarija> how do I do this "* ski doesn't ski" thing?
2022-08-13 19:01:52 +0200 <ski> there's also basic `MVar's (concurrent boxes with locks, may be empty), `Chan's (concurrent channels), `QSem',`QSemN' (semaphores)
2022-08-13 19:02:00 +0200 <ski> /me looks at mastarija
2022-08-13 19:02:10 +0200mastarijashitting pants
2022-08-13 19:02:15 +0200 <mastarija> Nice :D
2022-08-13 19:02:44 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 19:03:20 +0200pagnol(~me@213-205-209-87.ftth.glasoperator.nl)
2022-08-13 19:03:32 +0200 <ski> (there's also `atomicModifyIORef', for plain `IORef's (references to mutable cells))
2022-08-13 19:04:00 +0200 <ComingFromCPP> Most of my experience in asynchrony comes from the excellent Boost.Asio
2022-08-13 19:04:19 +0200 <ski> ComingFromCPP : "Tackling the Awkward Squad" paper might be interesting to give a glance
2022-08-13 19:04:25 +0200Pickchea(~private@user/pickchea)
2022-08-13 19:04:31 +0200 <ComingFromCPP> Are there any corollaries in Haskell? I.e., an "IO Context" with executors?
2022-08-13 19:04:59 +0200 <ComingFromCPP> Or does that not compute in FP land
2022-08-13 19:05:13 +0200 <[exa]> ComingFromCPP: do you have an example of what "corollaries" are?
2022-08-13 19:05:23 +0200 <ski> @wiki Research papers/Parallelism and concurrency
2022-08-13 19:05:24 +0200 <lambdabot> https://wiki.haskell.org/Research_papers/Parallelism_and_concurrency
2022-08-13 19:05:33 +0200califax(~califax@user/califx)
2022-08-13 19:05:44 +0200 <[exa]> I'm not sure if I ever heard that word for any concurrent stuff
2022-08-13 19:06:27 +0200alp_(~alp@user/alp) (Ping timeout: 268 seconds)
2022-08-13 19:06:44 +0200 <ComingFromCPP> Anything that would map somewhat conceptually to how Asio sets up its logic; i.e. there is some IO Context type, which different functions can derive from, to produce IO on sockets
2022-08-13 19:07:37 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-08-13 19:08:10 +0200off^(~off@206.85.120.17) (Ping timeout: 268 seconds)
2022-08-13 19:08:10 +0200 <[exa]> I guess this is mostly handled by the RTS for you
2022-08-13 19:09:11 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 19:09:13 +0200 <ComingFromCPP> wow, ok, time to read them!
2022-08-13 19:09:25 +0200 <ComingFromCPP> then*. See you around!
2022-08-13 19:09:45 +0200 <[exa]> if I guess right what asio Context does (from a quick peek at the docs), it basically holds all open fds/sockets and runs the eventloop
2022-08-13 19:09:45 +0200 <ski> feel free to stick around and lurk
2022-08-13 19:09:56 +0200 <[exa]> which is precisely what RTS does transparently
2022-08-13 19:10:30 +0200 <[exa]> and yeah, +1 for lurking.
2022-08-13 19:11:07 +0200califax(~califax@user/califx)
2022-08-13 19:11:31 +0200 <ComingFromCPP> [exa] yes, that's the "asynchronous core" of boost.asio, and it's wonderful that this RTS is similar
2022-08-13 19:12:51 +0200 <[exa]> yeah well these eventloops are pretty common (check out e.g. libev)
2022-08-13 19:13:48 +0200ski. o O ( "green threads" )
2022-08-13 19:14:20 +0200 <[exa]> the nice thing about haskell concurrency is that it's really easy to use. as in, spawning a async green thread that takes care about a socket is literally: forkIO (doSomethingWithSocket s)
2022-08-13 19:15:01 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-08-13 19:15:03 +0200nilradical(~nilradica@user/naso) ()
2022-08-13 19:17:43 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 19:21:44 +0200 <ComingFromCPP> [exa]  Looking over this project: https://github.com/aycanirican/hlibev/tree/master/Examples  How is it that these wrapper function are being called in a purely functional environment? Aren't there possible side effects?
2022-08-13 19:22:47 +0200 <ski> hm, which wrapper functions (which file) ?
2022-08-13 19:23:29 +0200 <ComingFromCPP> haskell side appears to be here: https://github.com/aycanirican/hlibev/blob/master/Network/Libev.hsc
2022-08-13 19:23:33 +0200 <ski> effects vs. side-effects is a matter of perspective, if you've proper separation
2022-08-13 19:23:43 +0200 <ComingFromCPP> c wrapper here: https://github.com/aycanirican/hlibev/blob/master/wrapper.c
2022-08-13 19:24:13 +0200 <ski> ah, you mean like FFI wrapping
2022-08-13 19:24:25 +0200 <mastarija> ComingFromCPP: I see everything done in IO
2022-08-13 19:24:30 +0200 <mastarija> that deservs it
2022-08-13 19:24:45 +0200 <mastarija> you can also mark your wrapped functions safe or unsafe
2022-08-13 19:26:24 +0200 <ski> very roughly put, everything that might do "general side-effects" (that's quite vague, but includes mutable reference cells, mutable arrays, throwing and catching exceptions, doing I/O, concurrency, ..) is "tainted" with an `IO' in the return type. and you can't get rid of it. so the program consists of a "purely functional" core, with an effectful shell around it (preferably not too thick a one, but it
2022-08-13 19:26:30 +0200 <ski> depends on the application)
2022-08-13 19:27:20 +0200 <ski> (and FFI wrapping also involves `IO', the "sin-bin" "monad")
2022-08-13 19:27:45 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 19:29:05 +0200 <ski> (you could say we're taking the "separation of internal machinery from user interaction" quite seriously)
2022-08-13 19:30:35 +0200califax(~califax@user/califx)
2022-08-13 19:30:58 +0200 <[exa]> ComingFromCPP: btw you probably won't need to wrap libev in haskell unless you plan to open like 10k sockets per process at once
2022-08-13 19:31:15 +0200 <ComingFromCPP> We would need that, yes
2022-08-13 19:31:31 +0200 <ComingFromCPP> Though, we'd probably use our own code, and make an FFI for it
2022-08-13 19:32:02 +0200 <ski> (but, i should hasten to add, everything is still "purely functional", there's no "side-effects" (but there's "effects"). what this means is that you can use the same refactoring and reasoning principles and laws everywhere, including `IO' stuff. the main point of `IO' (apart from imposing an explicit sequencing) is to know when you're *not* using it)
2022-08-13 19:32:10 +0200 <mastarija> ComingFromCPP: there's also the ST monad that you can run and get a pure value
2022-08-13 19:32:48 +0200 <ComingFromCPP> Although, isn't this concurrency baked in to the runtime? Isn't libev or similar just, baked in?
2022-08-13 19:33:05 +0200 <[exa]> ComingFromCPP: tbh maybe better have a tiny proxy in front of the thing (haproxy?) and spread over a few workers, not sure if you want 10k client connections to hang from a single process
2022-08-13 19:33:13 +0200 <ski> `ST' is for local mutable state, that's not visible/detectable from outside (this does not include local caches expected to survive across multiple calls)
2022-08-13 19:33:37 +0200 <[exa]> ComingFromCPP: yeah a small alternative of libev (maybe even libev? I didn't check) powers the RTS concurrency
2022-08-13 19:34:03 +0200Alex_test(~al_test@178.34.151.166) (Ping timeout: 268 seconds)
2022-08-13 19:34:33 +0200 <[exa]> ComingFromCPP: there's a webserver called warp which is fully haskell+rts and it is pretty powerful, they even did some benchmarking. might be interesting to see for you, to compare their benchmark results with your expectations
2022-08-13 19:34:40 +0200AlexZenon(~alzenon@178.34.151.166) (Ping timeout: 268 seconds)
2022-08-13 19:34:47 +0200 <ComingFromCPP> We would need the option to use any number of sockets on any number of connections. I'm responsible for making all of our use-cases, our affiliate's use-cases, and tests run without failure.
2022-08-13 19:35:19 +0200AlexZenon(~alzenon@178.34.151.166)
2022-08-13 19:35:33 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-08-13 19:35:59 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-08-13 19:36:06 +0200 <[exa]> with "any number of sockets", I guess until you hit the OS limits?
2022-08-13 19:36:22 +0200 <ComingFromCPP> kind of. this isn't always possible with poll alone on iOS in particular, so there's some magic above it that multiplexes sockets
2022-08-13 19:36:52 +0200 <ComingFromCPP> but, yes, any number. there is no hard limit.
2022-08-13 19:37:08 +0200razetime(~quassel@117.254.35.202) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-08-13 19:37:13 +0200califax(~califax@user/califx)
2022-08-13 19:38:30 +0200mastarija(~mastarija@2a05:4f46:e03:6000:80e6:5d48:fb8:8fa0) (Ping timeout: 264 seconds)
2022-08-13 19:38:31 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 19:38:38 +0200 <[exa]> ComingFromCPP: looks pretty capable tbh http://www.aosabook.org/en/posa/warp.html
2022-08-13 19:39:17 +0200Alex_test(~al_test@178.34.151.166)
2022-08-13 19:39:35 +0200 <ski> "Escaping Hell with Monads" by Philip Nilsson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> is a brief monad non-tutorial, to get a very rough idea of the scope of the concept what it does (what kinds of boiler-plate it can help remove). as for tutorials, most of the monad tutorials out there are not very good (often more confusing than helping). i somewhat like the
2022-08-13 19:39:40 +0200 <ski> (brief, but to the point) "What the hell are Monads?" by Noel Winstanley in 1999-02 at <https://www-users.mat.umk.pl//~fly/materialy/fp/haskell-doc/Monads.html> (possibly this is the first general monad tutorial, not counting papers)
2022-08-13 19:40:08 +0200 <ski> as for why there's so many non-useful tutorials, see
2022-08-13 19:40:10 +0200 <ski> @where burrito
2022-08-13 19:40:10 +0200 <lambdabot> http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/
2022-08-13 19:40:36 +0200yvan-sraka(~yvan-srak@105.67.135.250)
2022-08-13 19:41:17 +0200 <[exa]> ComingFromCPP: the benchmark there is for something slightly different but obviously you'll get roughly the same performance with websockets (they are imo even a bit simpler because you don't need to care that much about accept()er token)
2022-08-13 19:41:20 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 19:41:28 +0200 <ski> @where AAM
2022-08-13 19:41:28 +0200 <lambdabot> http://www.haskell.org/haskellwiki/All_About_Monads
2022-08-13 19:41:29 +0200 <ski> @where Typeclassopedia
2022-08-13 19:41:29 +0200 <lambdabot> http://www.haskell.org/haskellwiki/Typeclassopedia
2022-08-13 19:41:33 +0200 <ski> are useful
2022-08-13 19:42:09 +0200 <ComingFromCPP> [exa]  that project, warp, looks inspiring. However, we never touch HTTP (or any protocol over L4). It may be helpful to note that the particular application space I work in is bonding several internet connections over a VPN
2022-08-13 19:42:10 +0200zincy(~tom@2a00:23c8:970c:4801:311e:408a:9fbc:9900)
2022-08-13 19:42:24 +0200 <ski> but, before tackling monads, you should know about parametric polymorphism (generics / "templates"), higher-order functions, `data' types, type classes & ad-hoc overloading
2022-08-13 19:42:37 +0200 <ComingFromCPP> Raw sockets, or abstractions, are the only relevant medium
2022-08-13 19:42:37 +0200Pickchea(~private@user/pickchea) (Ping timeout: 252 seconds)
2022-08-13 19:42:57 +0200 <albet70> what's the benefit to use CPS in programming?
2022-08-13 19:42:58 +0200king_gs(~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8)
2022-08-13 19:43:36 +0200 <ski> (oh, and it should be emphasized that `IO' is just a very particular type (which happens to be a monad, as well as having lots of other operations). the "monad" concept is quite a bit more general)
2022-08-13 19:43:54 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2022-08-13 19:44:07 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 19:45:02 +0200 <ComingFromCPP> ski fortunately, C++ have very robust support for for these pre-reqs for monads. I'll get reading on them.
2022-08-13 19:45:04 +0200 <ski> albet70 : virtualizing data structures, exotic control structures (quite a bit there ..), automagically right-associating binds ..
2022-08-13 19:45:56 +0200 <ski> oh, and if you have any questions, you're welcome to ask in here. both beginner and more advanced questions are welcome, as well as both more theoretical and more applied
2022-08-13 19:46:47 +0200 <ski> hm, reminds me of
2022-08-13 19:46:48 +0200 <ski> @where prerequisite
2022-08-13 19:46:49 +0200 <lambdabot> "Prerequisite for Learning Haskell" <http://www.vex.net/~trebla/haskell/prerequisite.xhtml>
2022-08-13 19:46:58 +0200 <ski> although you probably won't have much trouble there
2022-08-13 19:47:01 +0200 <albet70> and what's "control structure"?
2022-08-13 19:48:05 +0200 <qrpnxz> ByteString low-level unsafe procedures: return boxed bytes. I'm crying 😢.
2022-08-13 19:48:21 +0200 <Bulby[m]> i've done too much rust
2022-08-13 19:48:23 +0200 <Bulby[m]> maybe and some mixe
2022-08-13 19:48:31 +0200 <Bulby[m]> "is it nothing or none"
2022-08-13 19:48:48 +0200 <qrpnxz> nonthing
2022-08-13 19:48:51 +0200 <qrpnxz> :)
2022-08-13 19:49:21 +0200 <ski> albet70 : exceptions, coroutines, (cooperative) concurrency, backtracking, "parallel/lock-step iteration", ..
2022-08-13 19:49:25 +0200 <Bulby[m]> i love json
2022-08-13 19:49:39 +0200 <Bulby[m]> i'm setting up json for nbt data reader so I can read it easier
2022-08-13 19:50:20 +0200 <ski> `NONE' is SML, `None' is OCaml
2022-08-13 19:51:47 +0200 <ComingFromCPP> How is a monad differed from `optional`, or the `variant`/`visit` pattern? https://en.cppreference.com/w/cpp/utility/optional and https://blog.nickelp.ro/posts/p2162/
2022-08-13 19:51:59 +0200 <ski> `optional' is one example of a monad
2022-08-13 19:52:29 +0200 <ski> "monad" is an interface, like "priority queue". `optional' is a particular implementation of it (like an array-backed PQ)
2022-08-13 19:53:14 +0200 <ski> difference is that most operations on PQs are in the abstract interface, not specific to the implementation. for monads, most operations that make it useful are not in the "monad" interface
2022-08-13 19:53:27 +0200 <qrpnxz> albet70: one neat use of CPS pretty common in haskell is this function called bind looks like (>>=) :: m a -> (a -> m b) -> m b 😉. Another nice use case is structured programming; consider the `with` pattern: withFile, withAsync, unsafeWithForeignPtr, the type of the warp request handler, withAcquire from resourcet, all these are continuation based for safety and you get a scoped effect.
2022-08-13 19:53:44 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 19:54:21 +0200 <ski> monads provide "(dynamic) sequencing" (for an abstract notion of "sequencing". e.g. for the "list" (or sequence, or backtracking) monad, "sequencing" actually means "loop nesting". for exception monad, it means "short-circuiting")
2022-08-13 19:56:00 +0200 <Bulby[m]> if I have an `Either A A` can I convert it to an `A`
2022-08-13 19:56:06 +0200 <Bulby[m]> i got the `Either A A` from bimapping
2022-08-13 19:56:20 +0200 <qrpnxz> sure, use `either`
2022-08-13 19:56:25 +0200 <qrpnxz> `either id id`
2022-08-13 19:56:39 +0200 <qrpnxz> from Data.Either
2022-08-13 19:56:42 +0200 <ski> (there's also a weaker / more general concept, called "idiom" or "applicative functor", that provide "static sequencing" (the "effect structure" is fixed, can't be affected by intermediate run-time values). most build systems are applicative, some are monadic (where during the building process you can compute new rules, which will get incorporated into the present build plan))
2022-08-13 19:56:45 +0200 <Bulby[m]> oh i can replace the bimap with that too right
2022-08-13 19:57:00 +0200 <ski> @where applicative-vs-monadic
2022-08-13 19:57:00 +0200 <lambdabot> "Applicative vs Monadic build systems" by ndm in 2014-07-23 at <https://neilmitchell.blogspot.se/2014/07/applicative-vs-monadic-build-systems.html>. (cf. "static sequencing" vs. "dynamic sequencing")
2022-08-13 19:57:34 +0200 <ski> Bulby[m] : probably. `either f g . bimap h i = either (f . h) (g . i)'
2022-08-13 19:57:39 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 19:58:00 +0200 <Bulby[m]> yeah, it works
2022-08-13 19:58:07 +0200 <Bulby[m]> i'm using scientific and I don't care about repeating part
2022-08-13 19:58:31 +0200 <Bulby[m]> altho if i have a double do they repeat?
2022-08-13 19:58:56 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-08-13 19:58:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 19:59:01 +0200 <albet70> qrpnxz , like this https://ro-che.info/articles/2019-06-07-why-use-contt
2022-08-13 19:59:14 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 19:59:25 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-08-13 20:00:06 +0200 <qrpnxz> yes
2022-08-13 20:00:15 +0200 <Bulby[m]> oh i just realized I could just directly call to json on the float/double oh well
2022-08-13 20:00:25 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Client Quit)
2022-08-13 20:00:51 +0200 <ski> ComingFromCPP : `variant' there is probably more or less the same as `Either' here (tagged/discriminated/disjoint union (not type-tagged), aka sum/variant type). as a monad, it is the exception monad
2022-08-13 20:00:52 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 20:01:02 +0200 <ski> ComingFromCPP : `visit' referring to Visitor pattern ?
2022-08-13 20:01:42 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 20:02:03 +0200 <albet70> const liftA2 = f => ma => mb => bind(ma)(a => bind(mb)(b => pure(f(a)(b))))
2022-08-13 20:02:17 +0200 <ComingFromCPP> How would this be written in haskell? https://paste.tomsmeding.com/MDYtkAhv
2022-08-13 20:02:24 +0200acidjnk(~acidjnk@p200300d6e7137a570d798ae271e642ee.dip0.t-ipconnect.de)
2022-08-13 20:02:31 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 20:02:33 +0200 <albet70> f a b c = b (\ d -> a (\ e -> c (e d)))
2022-08-13 20:02:34 +0200 <ski> Visitor pattern is an ugly (CPS) work-around for absence of proper (destructuring, binding) pattern-matching (preferably nestable) on variant/sum types
2022-08-13 20:02:47 +0200 <albet70> are this liftA2 and f are same?
2022-08-13 20:04:01 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 20:04:12 +0200 <albet70> liftA2 f ma mb = ma >>= \a -> mb >>= \b -> pure $ f a b
2022-08-13 20:04:13 +0200 <ski> albet70 : no. `f' is `(<**>)' on `Cont o'
2022-08-13 20:04:33 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 20:04:45 +0200 <ski> @src liftM2
2022-08-13 20:04:45 +0200 <lambdabot> liftM2 f m1 m2 = do
2022-08-13 20:04:45 +0200 <lambdabot> x1 <- m1
2022-08-13 20:04:45 +0200 <lambdabot> x2 <- m2
2022-08-13 20:04:45 +0200 <lambdabot> return (f x1 x2)
2022-08-13 20:05:09 +0200 <ski> @undo liftM2 f m1 m2 = do {x1 <- m1; x2 <- m2; return (f x1 x2)}
2022-08-13 20:05:09 +0200 <lambdabot> liftM2 f m1 m2 = m1 >>= \ x1 -> m2 >>= \ x2 -> return (f x1 x2)
2022-08-13 20:05:18 +0200 <albet70> f a b c = a (\e -> b (\d -> c (e d)))
2022-08-13 20:05:40 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 20:05:43 +0200 <ski> er, sorry. it's `flip (<*>)', not `(<**>)'
2022-08-13 20:06:09 +0200 <ComingFromCPP> ski re. visitor pattern, yes. Also, I found this particularly helpful: "monads provide "(dynamic) sequencing" (for an abstract notion of "sequencing". e.g. for the "list" (or sequence, or backtracking) monad, "sequencing" actually means "loop nesting". for exception monad, it means "short-circuiting")"
2022-08-13 20:06:17 +0200 <ski> well, that `f' is `(<*>)' on `Cont o'
2022-08-13 20:08:13 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 20:09:08 +0200 <ski> ComingFromCPP : monads are probably best learned, not by focusing too much on the "big picture" (what a monad really is, how to think about it) first, but rather seeing a whole bunch of the most common monads, learn to appreciate the commonalities across what are wildly differing concepts. (the main point of abstracting and talking about "monads" and defining a `Monad' type class for capturing them, is to be
2022-08-13 20:09:14 +0200 <ski> able to write generic library operations that work for all monads)
2022-08-13 20:10:07 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 20:10:09 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 20:10:13 +0200 <Bulby[m]> with aeson can I pretty encode (i.e. with indentation)
2022-08-13 20:11:13 +0200 <ski> (that's one mistake that many of all these (confusing) monad tutorials make. trying to think up analogies and things to liken them to. quite likely you won't find something appropriate of that sort. but at some point, after engrossing yourself in examples, and how to actuall *use* monads, and learning what they're good for, it'll "click")
2022-08-13 20:11:48 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-08-13 20:12:20 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2022-08-13 20:12:45 +0200 <ski> ComingFromCPP : sorry, i forgot what "emplace" means/does
2022-08-13 20:13:16 +0200waldo(~waldo@user/waldo)
2022-08-13 20:13:55 +0200 <ski> is `is' filled with just `0's, or does it increment ? (i guess the name `iota' implies it'll increment ?)
2022-08-13 20:14:31 +0200Lord_of_Life_Lord_of_Life
2022-08-13 20:14:37 +0200 <ski> hm, i guess `evens' will contain the even elements (presumably in-order)
2022-08-13 20:15:37 +0200 <ComingFromCPP> emplace constructs an element in-place, usually with move construction; it's a form of assignment
2022-08-13 20:15:41 +0200 <ski> > let is = [0 .. 99]; evens = filter even is in is -- this uses (linked, non-strict, immutable) lists
2022-08-13 20:15:42 +0200 <lambdabot> [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2...
2022-08-13 20:15:57 +0200 <ski> er, would help to return the new list :p
2022-08-13 20:16:02 +0200 <ski> > let is = [0 .. 99]; evens = filter even is in evens
2022-08-13 20:16:03 +0200 <lambdabot> [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52...
2022-08-13 20:16:04 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-08-13 20:16:25 +0200 <ComingFromCPP> is increments (iota does that)
2022-08-13 20:16:29 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 20:16:47 +0200 <albet70> @djinn (a->b->c) ->(e->a)->(e->b)->e->c
2022-08-13 20:16:47 +0200 <lambdabot> f a b c d = a (b d) (c d)
2022-08-13 20:16:48 +0200 <ComingFromCPP> yeah, it's just even numbers between 0 and 100, without writing it by hand is all
2022-08-13 20:16:59 +0200 <ski> mm, i was wondering if maybe `is' shared storage with `evens' (the latter pointing into the former). but now i think that's not the case
2022-08-13 20:17:33 +0200 <ComingFromCPP> that's a very interesting question (it doesn't, here, but iota usually doesn't share space)
2022-08-13 20:17:45 +0200 <int-e> ski: well the Integer values will be shared
2022-08-13 20:17:47 +0200 <ComingFromCPP> iota is *usually* used to *represent* a transformation, without doing it
2022-08-13 20:17:56 +0200 <ski> int-e : in the C++ ?
2022-08-13 20:18:04 +0200 <int-e> Oh there's C++?
2022-08-13 20:18:14 +0200 <ski> <https://paste.tomsmeding.com/MDYtkAhv>
2022-08-13 20:18:25 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 20:18:34 +0200 <int-e> Then no.
2022-08-13 20:19:43 +0200 <int-e> There's nothing to point to in the case of `int`.
2022-08-13 20:20:50 +0200 <ski> righto
2022-08-13 20:20:56 +0200 <albet70> @jinn (((a->b->c) -> r) -> r) -> ((a->r)->r) -> ((b->r) -> r) -> (c->r)->r
2022-08-13 20:20:57 +0200 <lambdabot> f a b c d = c (\ e -> b (\ f -> a (\ g -> d (g f e))))
2022-08-13 20:21:05 +0200 <ComingFromCPP> there are easy ways to have an iota "view" over some set of data structures but that's not the case here, no
2022-08-13 20:22:18 +0200 <ski> Haskell lists are intended to be accessed sequentially. preferably in an incremental fashion. and not holding on to earlier cells, so that the whole list doesn't need to be materialized all at the same time (can matter if the list is long). ("fusion" optimization can sometimes even completely dematerialize the list cells, fusing the producer with the consumer in a tight loop). lists are commonly best thought
2022-08-13 20:22:24 +0200 <ski> of as *control* structures ("iterations/loops"), rather than data structures
2022-08-13 20:22:56 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 20:23:07 +0200 <ComingFromCPP> Is this why a list is a monad?
2022-08-13 20:23:53 +0200 <ski> if you're not accessing them sequentially, you probably want a different data structure (`Seq',`Map',`Array',`Vector',..). if you're not doing incremental, or if you're holding on to the front, you *might* want to change. or maybe not
2022-08-13 20:24:30 +0200nate4(~nate@98.45.169.16)
2022-08-13 20:25:01 +0200 <ComingFromCPP> What are the differences between arrays, vectors and lists? Or, even then, what's the difference of a "list of functions" and a map?
2022-08-13 20:25:33 +0200 <ski> well, strict lists (fully materialized all at the same time) would also form a monad. but you'd not automatically get nice backtracking behaviour with good potential for intermediate list cells only living relatively shortly
2022-08-13 20:27:00 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 20:27:09 +0200instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
2022-08-13 20:28:23 +0200 <ski> `Array' is immutable arrays (with non-strict elements. you can e.g. define an array recursively, for top-down dynamic programming). there's also `IOArray' (and `STArray') for mutable ones. they can be indexed by arbitrary ranges, and be multi-dimensional. `Vector' was introduced later, is indexed by natural numbers, and one-dimensional. they have a lot of automatic fusion goodies
2022-08-13 20:28:35 +0200 <qrpnxz> does ghc have a primitive somewhere that has the system endianness?
2022-08-13 20:29:11 +0200nate4(~nate@98.45.169.16) (Ping timeout: 252 seconds)
2022-08-13 20:29:26 +0200 <ski> `Map' is a finite (partial) map, mapping keys to values (occasionally people use lists of pairs instead for simplicity. but if the association list grows longer, probably you want `Map', or `IntMap' or some kind of trie or something)
2022-08-13 20:30:52 +0200 <ski> (iirc, `Map' is implemented internally as a kind of tree. it's immutable. when you produce a modified version, most of the structure (apart from the path(s) down to the changed elements, and possible tree restructuring/reassociation) will be shared)
2022-08-13 20:31:17 +0200 <int-e> :t GHC.ByteOrder.targetByteOrder
2022-08-13 20:31:19 +0200 <lambdabot> GHC.ByteOrder.ByteOrder
2022-08-13 20:31:56 +0200 <int-e> % GHC.ByteOrder.ByteOrder
2022-08-13 20:31:56 +0200 <yahb2> <interactive>:28:1: error: ; Not in scope: data constructor ‘GHC.ByteOrder.ByteOrder’ ; No module named ‘GHC.ByteOrder’ is imported.
2022-08-13 20:31:57 +0200 <ski> (if you want to, you could have a `Map' in a mutable cell, and then swap it out (e.g. atomically, if needed) for the new version. the new version won't actually be computed until you look at it)
2022-08-13 20:32:15 +0200 <int-e> err
2022-08-13 20:32:20 +0200 <int-e> % GHC.ByteOrder.targetByteOrder
2022-08-13 20:32:20 +0200 <yahb2> LittleEndian
2022-08-13 20:32:29 +0200 <ski> ComingFromCPP : not sure what you had in mind with "list of functions"
2022-08-13 20:32:43 +0200pavonia(~user@user/siracusa)
2022-08-13 20:34:22 +0200ComingFromCPP(~ComingFro@2601:43:200:154f:e4ab:469f:ada2:4ef9) (Ping timeout: 252 seconds)
2022-08-13 20:35:59 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 20:37:12 +0200irfan(~irfan@user/irfan) (Quit: leaving)
2022-08-13 20:38:22 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 20:38:48 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 20:39:18 +0200kenran(~kenran@200116b82bfce1004033fa24eb56acab.dip.versatel-1u1.de)
2022-08-13 20:40:05 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-08-13 20:46:59 +0200acidjnk(~acidjnk@p200300d6e7137a570d798ae271e642ee.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-08-13 20:47:29 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 20:57:58 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net)
2022-08-13 20:58:23 +0200instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2022-08-13 20:58:49 +0200off^(~off@206.85.120.17)
2022-08-13 20:59:13 +0200pagnol(~me@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 268 seconds)
2022-08-13 20:59:46 +0200alp_(~alp@user/alp)
2022-08-13 21:03:28 +0200instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
2022-08-13 21:15:23 +0200waldo(~waldo@user/waldo) (Quit: quit)
2022-08-13 21:25:39 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net) (Remote host closed the connection)
2022-08-13 21:26:45 +0200alp_(~alp@user/alp) (Ping timeout: 252 seconds)
2022-08-13 21:35:32 +0200vglfr(~vglfr@145.224.94.75) (Read error: Connection reset by peer)
2022-08-13 21:38:46 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-08-13 21:39:29 +0200vglfr(~vglfr@145.224.94.75)
2022-08-13 21:39:31 +0200gmg(~user@user/gehmehgeh)
2022-08-13 21:41:05 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-08-13 21:42:53 +0200off^(~off@206.85.120.17) (Ping timeout: 252 seconds)
2022-08-13 21:43:21 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-08-13 21:43:47 +0200 <byorgey> zzz: just now saw your message asking how swarm is going. It's going great. Expect a public alpha release Soon (TM).
2022-08-13 21:44:26 +0200 <byorgey> But the semester is about to start so "soon" could be a few months.
2022-08-13 21:45:20 +0200 <d34df00d> I have some code like `foo :: Context -> IO (); foo ctx = do f1 ctx; f2 ctx; f3 ctx`. How do I leverage function type being a MonadReader without too much boilerplate, to avoid mentioning `ctx` everywhere?
2022-08-13 21:46:44 +0200 <c_wraith> it's not pretty. I wouldn't bother.
2022-08-13 21:46:49 +0200 <dolio> It's not going to make that example shorter.
2022-08-13 21:47:19 +0200 <d34df00d> :(
2022-08-13 21:47:22 +0200 <d34df00d> Welp.
2022-08-13 21:48:46 +0200 <dolio> It's more worth it if you dont' need the context much, so you can factor a significant portion of your definitions to be in terms of ReaderT and such.
2022-08-13 21:48:58 +0200canta(~canta@user/canta) (Ping timeout: 240 seconds)
2022-08-13 21:49:32 +0200 <dolio> Also, IO operations aren't generic, so they're a lot more annoying.
2022-08-13 21:51:32 +0200 <Lears> d34df00d: Don't use Monad, use Monoid. That's `foo = f1 <> f2 <> f3`.
2022-08-13 21:52:15 +0200 <dolio> There's no monoid instance for IO, though, right?
2022-08-13 21:52:49 +0200 <Lears> % print () <> print ()
2022-08-13 21:52:49 +0200 <yahb2> () ; ()
2022-08-13 21:53:38 +0200 <dolio> Oh, Monoid a => Monoid (IO a).
2022-08-13 21:55:03 +0200 <d34df00d> Hmm, that might work.
2022-08-13 21:55:07 +0200 <d34df00d> Thanks!
2022-08-13 21:59:31 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 22:03:56 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 22:04:53 +0200vglfr(~vglfr@145.224.94.75) (Ping timeout: 252 seconds)
2022-08-13 22:05:30 +0200nattiestnate(~nate@180.243.14.16)
2022-08-13 22:07:21 +0200yvan-sraka(~yvan-srak@105.67.135.250) (Remote host closed the connection)
2022-08-13 22:16:38 +0200 <Bulby[m]> do bytestrings not have a splitAt thing
2022-08-13 22:17:05 +0200 <Bulby[m]> they do
2022-08-13 22:17:47 +0200 <Bulby[m]> right with the other functions
2022-08-13 22:17:47 +0200 <Bulby[m]> odd
2022-08-13 22:20:00 +0200E23[m](~mkomlofsk@2001:470:69fc:105::2:4224)
2022-08-13 22:21:30 +0200 <monochrom> "how to split a bytestring without even being odd" :)
2022-08-13 22:22:23 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-08-13 22:23:00 +0200 <Bulby[m]> oh is zlib deflate
2022-08-13 22:26:03 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-08-13 22:27:56 +0200acidjnk(~acidjnk@p200300d6e7137a57bcb77a9a2e56f2aa.dip0.t-ipconnect.de)
2022-08-13 22:28:59 +0200 <Bulby[m]> https://docs.oracle.com/javase/7/docs/api/java/util/zip/InflaterInputStream.html
2022-08-13 22:29:02 +0200 <Bulby[m]> java is being very unhelpful
2022-08-13 22:34:34 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-08-13 22:35:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-08-13 22:45:56 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-08-13 22:48:26 +0200king_gs(~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) (Remote host closed the connection)
2022-08-13 22:48:44 +0200king_gs(~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8)
2022-08-13 22:50:08 +0200jgeerds(~jgeerds@55d46bad.access.ecotel.net)
2022-08-13 22:50:33 +0200kenran(~kenran@200116b82bfce1004033fa24eb56acab.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2022-08-13 22:51:36 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.6)
2022-08-13 22:52:26 +0200 <qrpnxz> there a way to define a default type in a type class? Like if i had `class C t { type T t :: Type }`, there a way to have a default for `T t`?
2022-08-13 22:55:04 +0200m1dnight(~christoph@78-22-0-121.access.telenet.be)
2022-08-13 22:56:13 +0200ddellaco1(~ddellacos@89.45.90.170) (Ping timeout: 252 seconds)
2022-08-13 22:58:03 +0200off^(~off@206.85.120.17)
2022-08-13 22:58:47 +0200ComingFromCPP(~ComingFro@2601:43:200:154f:4c0a:73b1:5013:f412)
2022-08-13 22:58:56 +0200 <Lears> qrpnxz: `type T t = ...`?
2022-08-13 22:59:33 +0200ComingFromCPP(~ComingFro@2601:43:200:154f:4c0a:73b1:5013:f412) (Client Quit)
2022-08-13 23:00:00 +0200 <qrpnxz> if i try like `type T t = t` i get `T is not a (visible) associated type of class C`, idk if that makes sense to you
2022-08-13 23:02:24 +0200 <qrpnxz> i think i'm just going to redesign the class, probably split it in two and use multi parameter. More flexible anyhow.
2022-08-13 23:02:25 +0200Vajb(~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014) (Read error: Connection reset by peer)
2022-08-13 23:02:34 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-08-13 23:03:06 +0200 <Lears> (visible) sounds like it's not in scope somehow.
2022-08-13 23:04:15 +0200 <qrpnxz> it's probably just straight up not valid syntax to do that
2022-08-13 23:04:28 +0200 <Lears> % class C t where { type T t; type T t = t }
2022-08-13 23:04:28 +0200 <yahb2> <no output>
2022-08-13 23:04:54 +0200 <Lears> Looks fine here.
2022-08-13 23:05:45 +0200 <int-e> % class D t where { type U t = t }
2022-08-13 23:05:45 +0200 <yahb2> <interactive>:40:24: error: ; ‘U’ is not a (visible) associated type of class ‘D’
2022-08-13 23:05:45 +0200 <qrpnxz> i was trying class C t where { Type T t = t; }.
2022-08-13 23:05:52 +0200 <int-e> I guess that's... right.
2022-08-13 23:08:13 +0200 <Bulby[m]> using binary to convert a bytestring to a bytestring feels incorrect
2022-08-13 23:08:18 +0200 <Bulby[m]> i probably should use an actual parsing lib
2022-08-13 23:08:41 +0200dcoutts_(~duncan@host86-153-135-25.range86-153.btcentralplus.com) (Ping timeout: 252 seconds)
2022-08-13 23:09:06 +0200 <Bulby[m]> i love megaparsec!
2022-08-13 23:09:18 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2022-08-13 23:11:19 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-08-13 23:12:23 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-08-13 23:15:00 +0200MajorBiscuit(~MajorBisc@46-229-126.internethome.cytanet.com.cy)
2022-08-13 23:15:38 +0200 <Bulby[m]> god
2022-08-13 23:15:45 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 23:15:50 +0200 <Bulby[m]> is there a lib that implements plain inflate that works on bytestrings
2022-08-13 23:16:24 +0200 <monochrom> zlib doesn't work on bytestrings? (I really don't know, just checking.)
2022-08-13 23:16:47 +0200vglfr(~vglfr@145.224.94.75)
2022-08-13 23:16:50 +0200 <hpc> compress :: ByteString -> ByteString
2022-08-13 23:16:55 +0200 <hpc> decompress :: ByteString -> ByteString
2022-08-13 23:16:58 +0200 <hpc> it definitely does
2022-08-13 23:17:03 +0200 <Bulby[m]> that does but i have no ideaif it is plain inflate
2022-08-13 23:17:13 +0200 <Bulby[m]> idk what java even uses
2022-08-13 23:17:15 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-08-13 23:17:23 +0200 <Bulby[m]> its docs are absolutely zero help
2022-08-13 23:17:24 +0200 <monochrom> Then again zlib is gzip not "inflate" zip (pkzip)
2022-08-13 23:17:34 +0200 <Bulby[m]> pkzip?
2022-08-13 23:17:38 +0200 <Bulby[m]> interesting
2022-08-13 23:18:00 +0200 <Bulby[m]> no results on hackage so no lib advertises it
2022-08-13 23:18:13 +0200 <monochrom> "inflate deflate" came from pkzip, which today no one knows, it's just called "zip" now.
2022-08-13 23:18:26 +0200 <monochrom> Yeah I don't think hackage has zip.
2022-08-13 23:18:29 +0200 <Bulby[m]> so it's normal zip?
2022-08-13 23:18:37 +0200 <monochrom> yeah I would think so.
2022-08-13 23:18:45 +0200 <Bulby[m]> i've definitely used libs that can do zip archives
2022-08-13 23:18:53 +0200 <Bulby[m]> however i'm dealing with plain inflate
2022-08-13 23:19:02 +0200 <Bulby[m]> or whatever this means
2022-08-13 23:19:03 +0200 <Bulby[m]> https://github.com/jmc2obj/j-mc-2-obj/blob/master/src/org/jmc/Region.java#L234
2022-08-13 23:20:07 +0200 <monochrom> Ah I see what you mean now.
2022-08-13 23:20:36 +0200 <monochrom> deflated data without headers containers etc
2022-08-13 23:21:07 +0200 <monochrom> But I know nothing about compression libraries on hackage, apart from having heard of zlib.
2022-08-13 23:21:28 +0200 <Bulby[m]> oh
2022-08-13 23:21:29 +0200 <Bulby[m]> https://hackage.haskell.org/package/zlib-0.6.3.0/docs/Codec-Compression-Zlib-Raw.html
2022-08-13 23:21:30 +0200 <Bulby[m]> "raw deflate format."
2022-08-13 23:21:47 +0200 <monochrom> OK nice, that may help heh
2022-08-13 23:21:48 +0200 <qrpnxz> hmm, don't like that zlib api too much. Async exceptions, implicit streaming.
2022-08-13 23:22:00 +0200 <Bulby[m]> i'm tired
2022-08-13 23:22:03 +0200 <monochrom> Yeah we all agree.
2022-08-13 23:22:51 +0200 <monochrom> But it predates all the conduit pipes streaming ideas we have today.
2022-08-13 23:23:09 +0200 <Bulby[m]> i don't care i just want decompression
2022-08-13 23:23:10 +0200 <monochrom> Back then lazy I/O was very popular.
2022-08-13 23:23:16 +0200 <Bulby[m]> it's not a library so it doesn't have to be good
2022-08-13 23:23:29 +0200 <Bulby[m]> plus i already should have the lazy bytestring in memory
2022-08-13 23:23:51 +0200 <monochrom> Data.ByteString.Lazy exists because solely of the desire to do lazy I/O and it came from that era.
2022-08-13 23:24:04 +0200 <Bulby[m]> 🤷
2022-08-13 23:24:12 +0200 <Bulby[m]> idrc lol
2022-08-13 23:24:23 +0200 <Bulby[m]> i'm just reading minecraft chunks
2022-08-13 23:24:24 +0200 <monochrom> It was a much simpler time. >:)
2022-08-13 23:25:08 +0200 <qrpnxz> lazy bytestring is a slightly tweaked [ByteString] pretty much. And you know, [ByteString] pretty useful haha so of course lazy bytestring also
2022-08-13 23:28:03 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-08-13 23:28:08 +0200 <Bulby[m]> i feel like I have used conduit before but can't find the code to prove it
2022-08-13 23:28:21 +0200 <Bulby[m]> nvm
2022-08-13 23:28:22 +0200 <Bulby[m]> https://github.com/TheDrawingCoder-Gamer/nylon/blob/master/src/Nylon/Installer.hs
2022-08-13 23:28:37 +0200 <Bulby[m]> probably doesn't work
2022-08-13 23:28:54 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Ping timeout: 264 seconds)
2022-08-13 23:30:56 +0200 <Bulby[m]> god i've done a lot of langs
2022-08-13 23:31:10 +0200 <Bulby[m]> just looking at github i've done quite a few
2022-08-13 23:31:18 +0200 <Bulby[m]> altho some are dead forks
2022-08-13 23:31:44 +0200king_gs(~Thunderbi@2806:103e:29:da7a:a700:e259:637b:75e8) (Quit: king_gs)
2022-08-13 23:32:01 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-08-13 23:33:23 +0200Vajb(~Vajb@2001:999:70c:2b99:3e15:6929:5bc6:c014)
2022-08-13 23:35:49 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 23:36:23 +0200dcoutts_(~duncan@host86-153-135-25.range86-153.btcentralplus.com)
2022-08-13 23:36:27 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 23:39:00 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-08-13 23:41:12 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-08-13 23:47:04 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-08-13 23:47:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-08-13 23:48:21 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2022-08-13 23:54:58 +0200acidjnk(~acidjnk@p200300d6e7137a57bcb77a9a2e56f2aa.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-08-13 23:55:14 +0200yvan-sraka(~yvan-srak@105.67.135.250)