2023/05/22

2023-05-22 00:02:48 +0200 <jade[m]> haha, mit diesem Wortneuschöpfungsbeispiel hast du deinen Standpunkt klar gemacht
2023-05-22 00:04:08 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2023-05-22 00:07:23 +0200shailangsa(~shailangs@host86-186-136-24.range86-186.btcentralplus.com) (Remote host closed the connection)
2023-05-22 00:10:04 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 00:10:27 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-05-22 00:11:44 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
2023-05-22 00:14:01 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 00:15:05 +0200vandita(~vandit@178-164-188-56.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 00:16:58 +0200vandita(~vandit@91-83-11-253.pool.digikabel.hu)
2023-05-22 00:24:45 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
2023-05-22 00:25:08 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2023-05-22 00:26:47 +0200fbytez(~uid@2001:bc8:2117:100::) (Ping timeout: 246 seconds)
2023-05-22 00:38:16 +0200Nosrep(~Nosrep@user/nosrep) (Remote host closed the connection)
2023-05-22 00:39:48 +0200Axman6(~Axman6@user/axman6)
2023-05-22 00:45:11 +0200Nosrep(~Nosrep@user/nosrep)
2023-05-22 00:45:28 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-05-22 00:45:40 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
2023-05-22 00:45:44 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-8029-0ed9-6ced-baf7.rev.sfr.net) (Remote host closed the connection)
2023-05-22 00:53:35 +0200user____1(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2023-05-22 00:58:59 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 246 seconds)
2023-05-22 01:06:52 +0200 <eldritchcookie[m> what are your opinions on existentially quantified types?
2023-05-22 01:07:50 +0200shailangsa(~shailangs@host86-186-133-102.range86-186.btcentralplus.com)
2023-05-22 01:08:18 +0200 <eldritchcookie[m> specifically i would like to compare them to subtyping and inheritance
2023-05-22 01:08:22 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 01:08:52 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2023-05-22 01:11:46 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-05-22 01:14:54 +0200 <ncf> what's the connection?
2023-05-22 01:16:19 +0200acidjnk(~acidjnk@p200300d6e7072f5515ce6425dcae63e2.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2023-05-22 01:17:55 +0200 <ghostbuster> ok noob question.. I open ghci 9.0.2 and type y :: Integer <CR> and I get this error: <interactive>:2:1: error: Variable not in scope: y :: Integer
2023-05-22 01:20:37 +0200 <eldritchcookie[m> yeah you haven't defined y
2023-05-22 01:21:04 +0200 <eldritchcookie[m> you need to do y = (42::Integer)
2023-05-22 01:21:21 +0200 <ncf> or y :: Integer; y = 42
2023-05-22 01:21:53 +0200 <ghostbuster> thanks
2023-05-22 01:22:13 +0200 <eldritchcookie[m> ncf: consider the pair of a existentially quantified type and a typeclass this can simulate inheritance
2023-05-22 01:23:30 +0200 <eldritchcookie[m> class UIElement t where
2023-05-22 01:23:30 +0200 <eldritchcookie[m> onClick:: UIElement -> IO ()
2023-05-22 01:24:07 +0200bilegeek(~bilegeek@2600:1008:b016:b801:f96f:33c3:9ec0:ec8f)
2023-05-22 01:24:10 +0200 <eldritchcookie[m> ok i am having a stroke it was supporsed to be t -> IO ()
2023-05-22 01:25:31 +0200 <eldritchcookie[m> a little bit of c# and i can't even kind check my example code
2023-05-22 01:26:04 +0200 <hpc> ghostbuster: another thing you can do is ":{" and ":}" to start and end multiline statements
2023-05-22 01:26:23 +0200 <hpc> and then you can write type and definition same as you might in a file
2023-05-22 01:26:48 +0200 <hpc> eventually you'll probably just want to make a file though, and "ghci foo.hs"
2023-05-22 01:26:57 +0200 <hpc> and then you can edit the file and :r to reload it
2023-05-22 01:28:54 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 01:29:32 +0200mauke_(~mauke@user/mauke)
2023-05-22 01:31:08 +0200 <ski> eldritchcookie[m : are you talking about interface inheritance, or implementation inheritance ?
2023-05-22 01:31:11 +0200mauke(~mauke@user/mauke) (Ping timeout: 240 seconds)
2023-05-22 01:31:11 +0200mauke_mauke
2023-05-22 01:32:13 +0200 <eldritchcookie[m> don't know the kind in c# when you do public class i : h {}
2023-05-22 01:32:29 +0200 <eldritchcookie[m> so it probably is interface inheritance?
2023-05-22 01:32:31 +0200 <ski> with the base class being fully abstract ?
2023-05-22 01:33:11 +0200 <hpc> eldritchcookie[m: you might like data UIElement = UIElement {onClick :: IO (), ...} better
2023-05-22 01:33:13 +0200 <ski> i guess your inheritance would correspond to making a subclass of `UIElement', then ?
2023-05-22 01:33:20 +0200 <ski> but yea, what hpc said
2023-05-22 01:33:41 +0200 <hpc> that doesn't get you inheritance, but usually you should be using composition anyway
2023-05-22 01:34:19 +0200 <ski> well, there's no subtyping / interface inheritance (in the usual sense that's construed), in Haskell
2023-05-22 01:34:51 +0200 <hpc> eldritchcookie[m: consider if you have some layout container for your UI, maybe we'll call it VerticalLayout
2023-05-22 01:35:09 +0200 <ski> if you want implementation inheritance, then .. you can do "prototyping". you *can* also do open recursion, but that's a little bit trickier, requireds `fix' basically
2023-05-22 01:35:13 +0200 <hpc> it contains a bunch of UIElements and sizes/positions them so they're top to bottom and fill the container
2023-05-22 01:35:31 +0200 <hpc> buuuuuut, UIElement t => [t] requires every element to be the same type
2023-05-22 01:35:40 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-05-22 01:35:42 +0200 <hpc> so you can't have a textarea with a button below it
2023-05-22 01:35:55 +0200 <ski> but as hpc is indicating, often plain lexical scoping ("closures") is a good substitute for (simplistic) uses of existentials
2023-05-22 01:36:15 +0200 <ski> @where on-understanding-revisited
2023-05-22 01:36:15 +0200 <lambdabot> "On Understanding Data Abstraction, Revisited" by William R. Cook in 2009-10 at <http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf>
2023-05-22 01:36:15 +0200 <hpc> you can work around that too, but not without being dragged ever deeper down the type-level rabbit hole
2023-05-22 01:36:19 +0200 <ski> talks a bit about this
2023-05-22 01:36:54 +0200 <hpc> for a UI, i might just use mutability honestly
2023-05-22 01:37:09 +0200 <hpc> have all the UIElement methods close over MVars or whatever
2023-05-22 01:37:56 +0200 <eldritchcookie[m> yeah but someUIElement = MkSomeUIElement UIElement t => t can store any UIElement, your recommendations may be a better design i am saying that you can not that you should
2023-05-22 01:38:14 +0200 <eldritchcookie[m> s/someUIElement/SomeUIElement/
2023-05-22 01:41:35 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-05-22 01:41:48 +0200ctearrrrrrrrrrr^(~ctearrrrr@c-71-204-38-59.hsd1.ga.comcast.net)
2023-05-22 01:47:44 +0200 <ski> itym `data UIElement = forall t. UIElement t => MkSomeUIElement t'
2023-05-22 01:48:05 +0200azimut_(~azimut@gateway/tor-sasl/azimut)
2023-05-22 01:48:20 +0200 <ski> but `data UIElement = MkSomeUIElement { onClick :: IO (),.. }' might work just as well
2023-05-22 01:48:56 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2023-05-22 01:51:54 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 01:54:58 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 01:55:59 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 01:56:28 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be)
2023-05-22 02:12:40 +0200zeenk(~zeenk@2a02:2f04:a105:f00::7fe) (Quit: Konversation terminated!)
2023-05-22 02:12:45 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-05-22 02:15:00 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-05-22 02:16:03 +0200califax(~califax@user/califx)
2023-05-22 02:16:08 +0200cheater_(~Username@user/cheater)
2023-05-22 02:17:53 +0200cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2023-05-22 02:17:54 +0200cheater_cheater
2023-05-22 02:18:39 +0200vandita(~vandit@91-83-11-253.pool.digikabel.hu) (Ping timeout: 256 seconds)
2023-05-22 02:20:01 +0200mei(~mei@user/mei) (Ping timeout: 240 seconds)
2023-05-22 02:20:22 +0200vandita(~vandit@176-241-19-12.pool.digikabel.hu)
2023-05-22 02:24:27 +0200mei(~mei@user/mei)
2023-05-22 02:27:43 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
2023-05-22 02:32:25 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 02:35:13 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028)
2023-05-22 02:36:43 +0200_________(~nobody@user/noodly) (Ping timeout: 268 seconds)
2023-05-22 02:38:26 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 02:42:27 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 256 seconds)
2023-05-22 02:43:38 +0200_________(~nobody@user/noodly)
2023-05-22 02:45:25 +0200nate2(~nate@98.45.169.16)
2023-05-22 02:46:38 +0200nate2(~nate@98.45.169.16) (Read error: Connection reset by peer)
2023-05-22 02:48:22 +0200Sgeo_(~Sgeo@user/sgeo)
2023-05-22 02:51:11 +0200Sgeo(~Sgeo@user/sgeo) (Ping timeout: 240 seconds)
2023-05-22 02:52:30 +0200nate2(~nate@98.45.169.16)
2023-05-22 02:52:32 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-05-22 02:52:32 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-05-22 02:52:32 +0200wroathe(~wroathe@user/wroathe)
2023-05-22 02:58:14 +0200xff0x(~xff0x@2405:6580:b080:900:6bd4:c0cd:e30a:ff91) (Quit: xff0x)
2023-05-22 03:05:58 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 03:10:24 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 248 seconds)
2023-05-22 03:11:07 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-05-22 03:11:55 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
2023-05-22 03:17:15 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-05-22 03:19:11 +0200xff0x(~xff0x@2405:6580:b080:900:1b85:88b0:f232:8118)
2023-05-22 03:26:31 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds)
2023-05-22 03:39:49 +0200rembo10(~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2023-05-22 03:42:04 +0200rembo10(~rembo10@main.remulis.com)
2023-05-22 03:43:03 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 03:48:47 +0200nate2(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-05-22 03:50:25 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 03:53:18 +0200Nosrep(~Nosrep@user/nosrep) (Remote host closed the connection)
2023-05-22 03:56:08 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2023-05-22 04:00:21 +0200xff0x(~xff0x@2405:6580:b080:900:1b85:88b0:f232:8118) (Ping timeout: 265 seconds)
2023-05-22 04:02:50 +0200Nosrep(~Nosrep@user/nosrep)
2023-05-22 04:02:59 +0200czy(~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net)
2023-05-22 04:08:23 +0200td_(~td@i5387091D.versanet.de) (Ping timeout: 240 seconds)
2023-05-22 04:08:46 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 04:10:18 +0200td_(~td@i5387092F.versanet.de)
2023-05-22 04:16:47 +0200vandita(~vandit@176-241-19-12.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 04:18:41 +0200vandita(~vandit@178-164-171-200.pool.digikabel.hu)
2023-05-22 04:27:39 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) (Remote host closed the connection)
2023-05-22 04:32:29 +0200bilegeek(~bilegeek@2600:1008:b016:b801:f96f:33c3:9ec0:ec8f) (Quit: Leaving)
2023-05-22 04:43:11 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-05-22 04:46:56 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2023-05-22 04:51:28 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-05-22 04:51:28 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-05-22 04:51:28 +0200finn_elijaFinnElija
2023-05-22 04:54:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2023-05-22 04:55:05 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-05-22 04:57:17 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-05-22 04:57:38 +0200califax(~califax@user/califx)
2023-05-22 05:00:25 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 05:04:59 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 264 seconds)
2023-05-22 05:07:48 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 05:12:23 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-05-22 05:27:12 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028)
2023-05-22 05:38:20 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 05:39:35 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 05:41:47 +0200Radio(~radioredw@user/radioredwagon)
2023-05-22 05:42:28 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 05:44:32 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds)
2023-05-22 05:46:21 +0200machinedgod(~machinedg@84-115-230-196.cable.dynamic.surfer.at)
2023-05-22 05:47:25 +0200wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-05-22 05:47:54 +0200cheater_(~Username@user/cheater)
2023-05-22 05:48:09 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-05-22 05:48:09 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-05-22 05:48:09 +0200wroathe(~wroathe@user/wroathe)
2023-05-22 05:50:47 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-05-22 05:50:50 +0200cheater_cheater
2023-05-22 05:55:44 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 248 seconds)
2023-05-22 06:01:52 +0200 <ghostbuster> is there a doc that describes the full output syntax of :info for ghci? there's a brief description here https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html but it's not exhaustive
2023-05-22 06:05:46 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-05-22 06:07:47 +0200ibizaman[m](~ibizamanm@2001:470:69fc:105::a3d)
2023-05-22 06:10:46 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 06:14:58 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 250 seconds)
2023-05-22 06:16:58 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 06:21:11 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 256 seconds)
2023-05-22 06:21:56 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 06:23:11 +0200vandita(~vandit@178-164-171-200.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 06:24:24 +0200mbuf(~Shakthi@49.207.178.186)
2023-05-22 06:25:12 +0200vandita(~vandit@92-249-185-234.pool.digikabel.hu)
2023-05-22 06:25:28 +0200rf(~rf@2605:59c8:179c:f610:2be8:1349:28e4:1422) (Ping timeout: 240 seconds)
2023-05-22 06:27:05 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2023-05-22 06:35:36 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 06:38:26 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-05-22 06:39:48 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 06:40:29 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 06:42:42 +0200Radio(~radioredw@user/radioredwagon) (Quit: Leaving)
2023-05-22 06:46:51 +0200jargon(~jargon@184.101.78.160)
2023-05-22 06:57:25 +0200mauke(~mauke@user/mauke) (Quit: leaving)
2023-05-22 07:02:30 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 07:06:13 +0200titibandit(~titibandi@user/titibandit)
2023-05-22 07:07:26 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-05-22 07:13:59 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
2023-05-22 07:23:35 +0200mei(~mei@user/mei) (Ping timeout: 240 seconds)
2023-05-22 07:27:41 +0200mei(~mei@user/mei)
2023-05-22 07:27:42 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-05-22 07:28:57 +0200coot_(~coot@89-69-206-216.dynamic.chello.pl)
2023-05-22 07:31:40 +0200michalz(~michalz@185.246.204.90)
2023-05-22 07:40:44 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-05-22 07:45:06 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9) (Ping timeout: 265 seconds)
2023-05-22 07:45:52 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 07:47:21 +0200vglfr(~vglfr@209.198.137.192) (Read error: Connection reset by peer)
2023-05-22 07:49:32 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9)
2023-05-22 07:52:32 +0200gensyst(~gensyst@user/gensyst)
2023-05-22 07:53:00 +0200 <gensyst> If I do forkOS in two places, could they still ultimately be bound to the same OS thread?
2023-05-22 07:53:09 +0200 <gensyst> Or will those necessarily be two different OS threads?
2023-05-22 07:54:04 +0200 <gensyst> I just want to know, if I have an infinite loop (channel) within forkOS, will that OS thread be occupied , or ... can other forkOS still utilize that OS thread?
2023-05-22 07:58:14 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 07:59:53 +0200trev(~trev@user/trev)
2023-05-22 08:00:31 +0200 <c_wraith> they might share an OS thread. that doesn't mean they won't both get scheduled, by the normal GHC thread scheduling
2023-05-22 08:02:47 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 08:03:44 +0200machinedgod(~machinedg@84-115-230-196.cable.dynamic.surfer.at) (Ping timeout: 248 seconds)
2023-05-22 08:10:53 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 08:13:23 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:5c6b:37b7:8e0:39f9) (Ping timeout: 264 seconds)
2023-05-22 08:16:02 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 08:16:11 +0200_________(~nobody@user/noodly) (Quit: Reconnecting)
2023-05-22 08:16:32 +0200_________(~nobody@user/noodly)
2023-05-22 08:16:33 +0200vglfr(~vglfr@209.198.137.192) (Read error: Connection reset by peer)
2023-05-22 08:17:15 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 08:21:35 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 08:23:50 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 08:28:58 +0200acidjnk(~acidjnk@p200300d6e7072f543cd43d7d1255efcb.dip0.t-ipconnect.de)
2023-05-22 08:29:48 +0200vandita(~vandit@92-249-185-234.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 08:31:42 +0200vandita(~vandit@80-95-70-192.pool.digikabel.hu)
2023-05-22 08:35:18 +0200 <gensyst> c_wraith, what do you mean by not scheduled? (and is there anything other than "normal" scheduling)?
2023-05-22 08:35:54 +0200 <gensyst> can a thread engaged in a loop, do something else also? (as you can see, i'm not much about threads)
2023-05-22 08:35:59 +0200 <gensyst> know*
2023-05-22 08:36:00 +0200 <DigitalKiwi> priority scheduling
2023-05-22 08:36:16 +0200 <c_wraith> I don't think within GHC, there's anything other than the normal scheduling
2023-05-22 08:37:03 +0200 <DigitalKiwi> boo
2023-05-22 08:37:19 +0200 <c_wraith> GHC uses a weird semi-cooperative threading model. You can write a loop that doesn't ever yield the thread, though it is unusual
2023-05-22 08:37:40 +0200CiaoSen(~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de)
2023-05-22 08:37:42 +0200 <c_wraith> The key is that it checks for the end of its timeslice on allocations
2023-05-22 08:38:08 +0200 <c_wraith> you can write a zero-allocation loop, but it's unusual in Haskell
2023-05-22 08:38:32 +0200 <DigitalKiwi> aren't most things in haskell unusual
2023-05-22 08:39:18 +0200 <gensyst> c_wraith, ah, i forgot... of course the *HASKELL* loop might be anywhere, but only FFI calls are going to bound threads. so of course there can be loop.
2023-05-22 08:39:30 +0200 <gensyst> I'm thinking about risks of occupying bound threads
2023-05-22 08:39:37 +0200 <gensyst> sorry, occupying OS threads
2023-05-22 08:39:42 +0200 <gensyst> too many of them
2023-05-22 08:39:44 +0200 <gensyst> until I run out
2023-05-22 08:39:53 +0200 <c_wraith> I mean, failing to yield is pretty catastrophic anyway
2023-05-22 08:40:12 +0200 <c_wraith> it will hang the whole program at the next major GC
2023-05-22 08:40:31 +0200 <DigitalKiwi> i failed to yield and got a ticket and an accident :(
2023-05-22 08:41:00 +0200 <c_wraith> A major GC needs to stop all threads to do its job (well, ok, there is the concurrent collector now. It doesn't need to.)
2023-05-22 08:42:04 +0200 <DigitalKiwi> has anyone written the haskell runtime in rust yet lol
2023-05-22 08:42:28 +0200 <gensyst> But why can forkOS only be called limited number of times? Why aren't the OS threads reused thousand times?
2023-05-22 08:43:46 +0200 <DigitalKiwi> oh https://github.com/HigherOrderCO/HVM
2023-05-22 08:43:47 +0200 <monochrom> Both are false.
2023-05-22 08:43:49 +0200oo_miguel(~Thunderbi@77.252.47.84)
2023-05-22 08:44:25 +0200 <monochrom> And at some time you realize that "forkOS" is a poor name, should have been named "forkBound" in the first place.
2023-05-22 08:45:05 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-05-22 08:45:07 +0200 <gensyst> i distinctly recall getting "too many threads" exception in the past... maybe it was something else :S
2023-05-22 08:45:15 +0200 <gensyst> how could i have been so wrong lol
2023-05-22 08:45:21 +0200 <gensyst> about everything
2023-05-22 08:45:22 +0200 <monochrom> Because even if you use forkIO only, you can have as many OS threads as you want, which is controlled by the number of "capabilities", i.e., RTS option -N
2023-05-22 08:45:56 +0200 <monochrom> Hell, you don't even have to use forkWhatever. You can just use par.
2023-05-22 08:46:27 +0200 <gensyst> monochrom, so forkOS is limited by numCapabilities? (unlike forkIO)
2023-05-22 08:46:49 +0200 <monochrom> That's the opposite of what I said.
2023-05-22 08:49:17 +0200 <c_wraith> honestly, forkOS is a weird thing and I'm not sure why you'd have a program that does it frequently.
2023-05-22 08:50:30 +0200mncheckm(~mncheck@193.224.205.254)
2023-05-22 08:51:10 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 08:55:59 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 264 seconds)
2023-05-22 09:00:01 +0200mei(~mei@user/mei) (Ping timeout: 265 seconds)
2023-05-22 09:04:21 +0200titibandit(~titibandi@user/titibandit) (Remote host closed the connection)
2023-05-22 09:06:36 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 09:10:47 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 09:13:43 +0200delYsid(~user@zidpc777.tugraz.at)
2023-05-22 09:13:59 +0200titibandit(~titibandi@user/titibandit)
2023-05-22 09:15:03 +0200 <delYsid> "mmap 4096 bytes at (nil): Cannot allocate memory" since latest Debian (bookworm) kernel upgrade. Do we have a fix for this, or should I just stop coding haskell for a few weeks?
2023-05-22 09:16:17 +0200mei(~mei@user/mei)
2023-05-22 09:17:04 +0200 <gensyst> i'm confused now. i've no idea where i got this "thread limitation" exceptions.
2023-05-22 09:17:11 +0200 <gensyst> maybe i'm just misremembering things completely
2023-05-22 09:17:11 +0200eugenrh(~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8)
2023-05-22 09:19:21 +0200 <[exa]> delYsid: I see no such problem on debian, what's your versions?
2023-05-22 09:21:12 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:969e:4407:eb4f:f470)
2023-05-22 09:21:25 +0200 <monochrom> I think https://discourse.haskell.org/t/facing-mmap-4096-bytes-at-nil-cannot-allocate-memory-youre-not-alo… basically implies that there is still no solution.
2023-05-22 09:23:48 +0200 <[exa]> hm the test there gives me like 256k allocs before failing, should I be worried?
2023-05-22 09:24:24 +0200 <monochrom> It seems like a Heisenbug. Next time it will be much sooner or much later.
2023-05-22 09:24:27 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 09:25:17 +0200 <[exa]> delYsid: `uname -r` pls?
2023-05-22 09:25:36 +0200 <[exa]> (or maybe better -v)
2023-05-22 09:26:00 +0200gmg(~user@user/gehmehgeh)
2023-05-22 09:26:04 +0200cfricke(~cfricke@user/cfricke)
2023-05-22 09:29:24 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 09:29:35 +0200 <[exa]> ah ok the new kernel really kills it
2023-05-22 09:29:58 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 250 seconds)
2023-05-22 09:33:28 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 09:35:34 +0200 <[exa]> is there any reason why the C example here lists |MMAP_32BIT ? that sounds completely wrong to me
2023-05-22 09:36:10 +0200 <delYsid> [exa]: 6.1.0-9-amd64
2023-05-22 09:36:45 +0200 <delYsid> #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08)
2023-05-22 09:36:51 +0200 <[exa]> ok same here, but I failed to produce a crashing version of anything haskelly yet
2023-05-22 09:36:56 +0200 <[exa]> and your ghc is 9.2?
2023-05-22 09:37:07 +0200 <delYsid> lts-20.21, so 9.4
2023-05-22 09:37:59 +0200 <delYsid> https://bbs.archlinux.org/viewtopic.php?id=282429
2023-05-22 09:38:06 +0200 <delYsid> So others also see the problem.
2023-05-22 09:38:32 +0200 <[exa]> just to check, can you strace the bad mmap syscall?
2023-05-22 09:38:38 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 09:38:42 +0200 <delYsid> It appears recent kernels make certain Haskell programs segfault, great stuff.
2023-05-22 09:39:27 +0200 <[exa]> that happens
2023-05-22 09:39:40 +0200 <[exa]> could you pls find the flags from the mmap syscall?
2023-05-22 09:41:22 +0200 <delYsid> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = -1 ENOMEM (Cannot allocate memory)
2023-05-22 09:41:36 +0200 <[exa]> hm yeah also the 32bit mmap
2023-05-22 09:41:44 +0200 <[exa]> mine doesn't have MAP_32BIT
2023-05-22 09:41:59 +0200 <[exa]> is your system 32bit?
2023-05-22 09:42:03 +0200 <delYsid> no
2023-05-22 09:43:04 +0200 <delYsid> Whats interesting is, that this triggers non-deterministicly, so it appears to happen at rather random points during program execution.
2023-05-22 09:43:21 +0200 <[exa]> that's usual with memory issues, yes
2023-05-22 09:45:49 +0200 <[exa]> IMO the MAP_32BIT shouldn't be there
2023-05-22 09:45:59 +0200 <[exa]> because that's a pretty hard constraint
2023-05-22 09:46:09 +0200 <[exa]> and I don't see any reason why ghc would require that
2023-05-22 09:46:57 +0200 <delYsid> Oh, you're right, this is 9.2" Maybe I should try nightly and see if it goes away.
2023-05-22 09:46:59 +0200mncheckm(~mncheck@193.224.205.254) (Remote host closed the connection)
2023-05-22 09:48:47 +0200 <delYsid> nope, dependency hell prevents that.
2023-05-22 09:49:35 +0200vglfr(~vglfr@209.198.137.192) (Ping timeout: 240 seconds)
2023-05-22 09:49:46 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80)
2023-05-22 09:54:11 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Ping timeout: 264 seconds)
2023-05-22 09:54:49 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80)
2023-05-22 09:56:36 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2023-05-22 09:57:08 +0200mei(~mei@user/mei) (Ping timeout: 240 seconds)
2023-05-22 09:57:08 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Read error: Connection reset by peer)
2023-05-22 09:57:25 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80)
2023-05-22 10:00:10 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 10:01:33 +0200mei(~mei@user/mei)
2023-05-22 10:04:47 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 265 seconds)
2023-05-22 10:08:34 +0200user____1(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de)
2023-05-22 10:11:10 +0200Sgeo_(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-05-22 10:16:23 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:fd6f:3374:7b4:df80) (Ping timeout: 264 seconds)
2023-05-22 10:16:39 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 10:20:40 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-05-22 10:21:04 +0200coot_(~coot@89-69-206-216.dynamic.chello.pl) (Ping timeout: 268 seconds)
2023-05-22 10:21:39 +0200mncheck(~mncheck@193.224.205.254)
2023-05-22 10:26:58 +0200Unhammer(~Unhammer@user/unhammer)
2023-05-22 10:27:35 +0200 <Unhammer> Hi, I've got libbz2-dev on Ubuntu but cabal still says * Missing (or bad) header file: bzlib.h
2023-05-22 10:27:37 +0200 <Unhammer> bzlib> * Missing (or bad) C library: bz2
2023-05-22 10:27:48 +0200 <Unhammer> anyone know what else I need to do?
2023-05-22 10:28:23 +0200 <Unhammer> /usr/include/bzlib.h exists
2023-05-22 10:30:23 +0200 <Unhammer> oh PEBCAK I forgot I run stack with use-nix so I need nix:
2023-05-22 10:30:25 +0200 <Unhammer> packages: [bzip2]
2023-05-22 10:34:05 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-05-22 10:35:43 +0200vandita(~vandit@80-95-70-192.pool.digikabel.hu) (Ping timeout: 265 seconds)
2023-05-22 10:36:43 +0200Guest58(~Guest90@139.59.162.0)
2023-05-22 10:37:10 +0200vandita(~vandit@84-236-97-30.pool.digikabel.hu)
2023-05-22 10:37:31 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 10:38:49 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net)
2023-05-22 10:40:43 +0200elkcl(~elkcl@broadband-37-110-27-252.ip.moscow.rt.ru) (Ping timeout: 256 seconds)
2023-05-22 10:41:44 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 246 seconds)
2023-05-22 10:43:33 +0200wiosna(~karangura@c-73-93-95-154.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
2023-05-22 10:44:01 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-05-22 10:47:25 +0200MajorBiscuit(~MajorBisc@145.94.40.195)
2023-05-22 10:48:01 +0200elkcl(~elkcl@broadband-37-110-27-252.ip.moscow.rt.ru)
2023-05-22 10:50:37 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-05-22 10:51:29 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2023-05-22 10:51:49 +0200Guest58(~Guest90@139.59.162.0) (Quit: Client closed)
2023-05-22 10:51:58 +0200Lord_of_Life_Lord_of_Life
2023-05-22 10:54:26 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:34cc:c2aa:d793:2028) (Remote host closed the connection)
2023-05-22 10:56:08 +0200eugenrh(~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) (Ping timeout: 240 seconds)
2023-05-22 11:00:31 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 11:01:06 +0200magnolia_mayhem[(~ashinnvma@2001:470:69fc:105::2:e5ed) (Remote host closed the connection)
2023-05-22 11:02:04 +0200chomwitt(~chomwitt@2a02:587:7a07:4f00:1ac0:4dff:fedb:a3f1)
2023-05-22 11:04:47 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 11:05:35 +0200user____1(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2023-05-22 11:14:01 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:2973:25bc:e202:9763) (Quit: use-value)
2023-05-22 11:19:06 +0200user____1(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de)
2023-05-22 11:43:39 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 11:46:08 +0200darchitect(~darchitec@2a00:23c6:3584:df01:617c:9829:ef2d:1384) (Ping timeout: 240 seconds)
2023-05-22 11:48:12 +0200darchitect(~darchitec@2a00:23c6:3584:df01:ef79:bcf3:d062:3079)
2023-05-22 11:49:15 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 268 seconds)
2023-05-22 11:51:08 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 11:52:54 +0200alternateved(~user@77-253-195-69.adsl.inetia.pl)
2023-05-22 11:54:56 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3)
2023-05-22 11:55:28 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 265 seconds)
2023-05-22 11:59:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 256 seconds)
2023-05-22 12:03:57 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-05-22 12:04:39 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net)
2023-05-22 12:05:06 +0200ft(~ft@p4fc2a88b.dip0.t-ipconnect.de) (Quit: leaving)
2023-05-22 12:05:30 +0200user____1gurkenglas
2023-05-22 12:05:37 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2023-05-22 12:05:59 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds)
2023-05-22 12:11:10 +0200 <[exa]> delYsid: not a big deal about 9.2 tbh, seems working here too, just not having the 32bit flag for whatever reason
2023-05-22 12:11:36 +0200fbytez(~uid@2001:bc8:2117:100::)
2023-05-22 12:12:01 +0200 <[exa]> oh wait
2023-05-22 12:12:02 +0200 <delYsid> [exa]: Anything I could try to figure out why it is using 32BIT on my side?
2023-05-22 12:12:28 +0200 <[exa]> yeah I see the new ghc is actually doing the 32bit mmap and the older one was not
2023-05-22 12:12:36 +0200 <[exa]> iiiiiiiinteresting
2023-05-22 12:15:37 +0200 <[exa]> yap looks somewhere between 8.10 and 9.4 this |32bit thing got added which obviously kills it, because you can't reasonably expect the system to give you short addresses
2023-05-22 12:17:13 +0200CiaoSen(~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) (Ping timeout: 265 seconds)
2023-05-22 12:17:13 +0200shriekingnoise_(~shrieking@186.137.175.87) (Ping timeout: 265 seconds)
2023-05-22 12:22:24 +0200fbytez(~uid@2001:bc8:2117:100::) (Ping timeout: 248 seconds)
2023-05-22 12:26:01 +0200fbytez(~uid@2001:bc8:2117:100::)
2023-05-22 12:28:59 +0200 <delYsid> well, < 6.1.27 did work, so its a combination of the 32BIT flag and a recent kernel change.
2023-05-22 12:29:25 +0200 <probie> [exa]: why not? It's all virtual memory
2023-05-22 12:29:27 +0200 <[exa]> yap, the changes in kernel can't guarantee that much 32bit prefixes, which is sad but that's the reality
2023-05-22 12:29:46 +0200 <[exa]> probie: for stupid historical reasons, from the code it seems that it's for supporting non-PIC code with short addresses
2023-05-22 12:30:31 +0200gurkenglas(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2023-05-22 12:31:05 +0200 <[exa]> I'm not saying it's not a linux issue too (there's no point in not giving the memory), but IMO the 32bit flag there is just superfluous
2023-05-22 12:31:17 +0200rembo10(~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2023-05-22 12:32:25 +0200foul_owl(~kerry@71.212.137.212) (Ping timeout: 268 seconds)
2023-05-22 12:33:27 +0200rembo10(~rembo10@main.remulis.com)
2023-05-22 12:33:55 +0200shriekingnoise(~shrieking@186.137.175.87)
2023-05-22 12:34:25 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 12:34:59 +0200vandita(~vandit@84-236-97-30.pool.digikabel.hu) (Ping timeout: 264 seconds)
2023-05-22 12:36:29 +0200vandita(~vandit@fibhost-67-47-61.fibernet.hu)
2023-05-22 12:38:31 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 12:50:01 +0200melonai(~mel@rnrd.eu)
2023-05-22 12:55:08 +0200shriekingnoise(~shrieking@186.137.175.87) (Ping timeout: 240 seconds)
2023-05-22 12:56:48 +0200__monty__(~toonn@user/toonn)
2023-05-22 12:59:05 +0200xff0x(~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6)
2023-05-22 13:00:44 +0200gurkenglas(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de)
2023-05-22 13:06:23 +0200gurkenglas(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2023-05-22 13:09:53 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 13:14:35 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 264 seconds)
2023-05-22 13:20:01 +0200 <jean-paul[m]> are typeclasses exactly isomorphic to records of values?
2023-05-22 13:20:12 +0200 <jean-paul[m]> (records of values? what else could you have a record of)
2023-05-22 13:20:54 +0200 <jean-paul[m]> Haskell 98 typeclasses, I probably mean
2023-05-22 13:25:03 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-05-22 13:28:59 +0200delYsid(~user@zidpc777.tugraz.at) (ERC 5.4.1 (IRC client for GNU Emacs 30.0.50))
2023-05-22 13:29:34 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-05-22 13:30:09 +0200xff0x(~xff0x@2405:6580:b080:900:e2e2:76c:3d04:5dc6) (Ping timeout: 256 seconds)
2023-05-22 13:31:42 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2023-05-22 13:31:49 +0200xff0x(~xff0x@ai098135.d.east.v6connect.net)
2023-05-22 13:37:05 +0200MajorBiscuit(~MajorBisc@145.94.40.195) (Ping timeout: 246 seconds)
2023-05-22 13:37:16 +0200Kuttenbrunzer(~Kuttenbru@2a02:8108:8b80:1d48::b809)
2023-05-22 13:37:45 +0200gurkenglas(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de)
2023-05-22 13:39:44 +0200 <ncf> define exactly and isomorphic
2023-05-22 13:40:58 +0200MajorBiscuit(~MajorBisc@145.94.155.219)
2023-05-22 13:42:55 +0200 <dminuoso> % data Foo { a :: Int }
2023-05-22 13:42:55 +0200 <yahb2> <interactive>:151:10: error: ; Unexpected type ‘{a :: Int}’ ; In the data declaration for ‘Foo’ ; A data declaration should have form ; data Foo a = ...
2023-05-22 13:43:27 +0200 <dminuoso> The error message is surprisingly well formulated. What syntax am I tapping into here?
2023-05-22 13:43:51 +0200 <dminuoso> Why is {} being considered by the lexer in that type position?
2023-05-22 13:44:06 +0200 <geekosaur> kind annotation, I think
2023-05-22 13:44:08 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Ping timeout: 240 seconds)
2023-05-22 13:45:42 +0200 <dminuoso> % :set -fprint-explicit-kinds
2023-05-22 13:45:42 +0200 <yahb2> <no output>
2023-05-22 13:45:46 +0200 <dminuoso> % :t Const
2023-05-22 13:45:46 +0200 <yahb2> <interactive>:1:1: error: ; • Data constructor not in scope: Const ; • Perhaps you meant variable ‘const’ (imported from Prelude)
2023-05-22 13:45:55 +0200 <dminuoso> % import Data.Functor.Const
2023-05-22 13:45:55 +0200 <yahb2> <no output>
2023-05-22 13:45:57 +0200 <dminuoso> % :t Const
2023-05-22 13:45:57 +0200 <yahb2> Const :: forall {k} a (b :: k). a -> Const @{k} a b
2023-05-22 13:46:25 +0200 <dminuoso> geekosaur: Ah no! I think this has to do with inferred type variables
2023-05-22 13:46:33 +0200 <dminuoso> But that's only an output thing.
2023-05-22 13:46:47 +0200 <dminuoso> % f :: forall {k} a (b :: k). a -> Const @{k} a b; f = undefined
2023-05-22 13:46:47 +0200 <yahb2> <interactive>:161:43: error: parse error on input ‘}’
2023-05-22 13:46:51 +0200 <geekosaur> yes, it's an "explicitly inferred" (hence braces instead of parens) kind annotation
2023-05-22 13:47:10 +0200 <geekosaur> lets you hide it from TypeApplications
2023-05-22 13:47:41 +0200 <dminuoso> id :: forall {a}. a -> a; id x = x
2023-05-22 13:47:43 +0200 <dminuoso> % id :: forall {a}. a -> a; id x = x
2023-05-22 13:47:43 +0200 <yahb2> <no output>
2023-05-22 13:47:45 +0200 <dminuoso> Interesting
2023-05-22 13:47:54 +0200 <dminuoso> % :set -XTypeApplications
2023-05-22 13:47:54 +0200 <yahb2> <no output>
2023-05-22 13:47:58 +0200 <dminuoso> % id @Int 1
2023-05-22 13:47:58 +0200 <yahb2> <interactive>:167:1: error: ; • Cannot apply expression of type ‘a0 -> a0’ ; to a visible type argument ‘Int’ ; • In the expression: id @Int 1 ; In an equation for ‘it’: it = id...
2023-05-22 13:48:05 +0200 <dminuoso> geekosaur: TIL. Cute, thanks!
2023-05-22 13:48:39 +0200nate2(~nate@98.45.169.16)
2023-05-22 13:53:25 +0200nate2(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-05-22 13:56:12 +0200vglfr(~vglfr@209.198.137.192) (Read error: Connection reset by peer)
2023-05-22 13:56:49 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 14:01:01 +0200CiaoSen(~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de)
2023-05-22 14:01:11 +0200melonaiGuest5823
2023-05-22 14:06:44 +0200oneeyedalien(~oneeyedal@103.21.127.60)
2023-05-22 14:08:54 +0200Guest5823(~mel@rnrd.eu) (Quit: ZNC 1.8.2 - https://znc.in)
2023-05-22 14:09:24 +0200eugenrh(~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8)
2023-05-22 14:10:29 +0200zer0bitz_(~zer0bitz@user/zer0bitz)
2023-05-22 14:11:44 +0200zer0bitz(~zer0bitz@user/zer0bitz) (Ping timeout: 248 seconds)
2023-05-22 14:11:50 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) (Remote host closed the connection)
2023-05-22 14:12:09 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net)
2023-05-22 14:23:17 +0200MajorBiscuit(~MajorBisc@145.94.155.219) (Ping timeout: 246 seconds)
2023-05-22 14:24:24 +0200alternateved(~user@77-253-195-69.adsl.inetia.pl) (Quit: Fading out...)
2023-05-22 14:28:31 +0200vglfr(~vglfr@209.198.137.192) (Ping timeout: 240 seconds)
2023-05-22 14:30:15 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 14:33:17 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
2023-05-22 14:33:35 +0200mei(~mei@user/mei) (Ping timeout: 240 seconds)
2023-05-22 14:34:13 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 14:35:08 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
2023-05-22 14:41:54 +0200MajorBiscuit(~MajorBisc@145.94.40.195)
2023-05-22 14:41:59 +0200mei(~mei@user/mei)
2023-05-22 14:44:47 +0200Kuttenbrunzer(~Kuttenbru@2a02:8108:8b80:1d48::b809) (Remote host closed the connection)
2023-05-22 14:48:21 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-05-22 14:49:35 +0200gensyst(~gensyst@user/gensyst) (Ping timeout: 240 seconds)
2023-05-22 14:53:02 +0200vglfr(~vglfr@209.198.137.192) (Ping timeout: 246 seconds)
2023-05-22 14:54:37 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:6541:9cfd:d4d8:6c86)
2023-05-22 14:56:44 +0200Lycurgus(~juan@user/Lycurgus)
2023-05-22 14:58:25 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3)
2023-05-22 15:02:31 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 240 seconds)
2023-05-22 15:09:25 +0200vandita(~vandit@fibhost-67-47-61.fibernet.hu) (Ping timeout: 240 seconds)
2023-05-22 15:11:25 +0200vandita(~vandit@80-95-69-214.pool.digikabel.hu)
2023-05-22 15:15:44 +0200cheater(~Username@user/cheater) (Ping timeout: 248 seconds)
2023-05-22 15:16:53 +0200 <jean-paul[m]> ncf: Hmmm. Yea I didn't really mean isomorphic I guess. Something something subset? How about: Could I rewrite any arbitrary use of Haskell 98 typeclasses to use a manual/explicit record instead?
2023-05-22 15:17:37 +0200 <jean-paul[m]> I can't think of a case where I couldn't
2023-05-22 15:17:38 +0200 <opqdonut> yes, but you lose the guarantee of uniqueness
2023-05-22 15:18:04 +0200 <opqdonut> e.g. you could have two incompatible OrdDict Int records
2023-05-22 15:18:16 +0200 <jean-paul[m]> Ah, right. Interesting.
2023-05-22 15:18:20 +0200 <opqdonut> and then your binary search tree breaks its invariants
2023-05-22 15:22:52 +0200cheater(~Username@user/cheater)
2023-05-22 15:31:56 +0200 <dminuoso> opqdonut: Mmm, in principle you could still have this property in GHC Haskell compiled programs with typeclasses (even without orphan instances)
2023-05-22 15:32:07 +0200 <dminuoso> Or.. no. Actually hold that thought.
2023-05-22 15:32:12 +0200 <dminuoso> Its precisely orphan instances that can cause this.
2023-05-22 15:34:32 +0200cheater_(~Username@user/cheater)
2023-05-22 15:36:05 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-05-22 15:36:08 +0200cheater_cheater
2023-05-22 15:40:57 +0200 <jade[m]> what's the easiest way to play around with a package in ghci?
2023-05-22 15:41:06 +0200 <jade[m]> download it globally with cabal and load it manually?
2023-05-22 15:41:41 +0200 <dminuoso> `cabal repl --build-depends bytestring`
2023-05-22 15:42:16 +0200 <dminuoso> Though thats a bad example, since it ships as a boot library. :P
2023-05-22 15:42:27 +0200 <dminuoso> `cabal repl --build-depends flatparse`
2023-05-22 15:42:43 +0200 <jade[m]> thank you, I wanted to try out some stuff with random
2023-05-22 15:43:18 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-05-22 15:43:18 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-05-22 15:43:18 +0200wroathe(~wroathe@user/wroathe)
2023-05-22 15:44:02 +0200 <dminuoso> jade[m]: You can even include arbitrary constraints to control versions or specify build-depends for multiple packages.
2023-05-22 15:45:05 +0200 <dminuoso> e.g.: cabal repl --build-depends "flatparse ^>= { 0.3.5.1 }, mason == 0.2.4"
2023-05-22 15:51:18 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2023-05-22 15:51:47 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-05-22 15:53:31 +0200dtman34(~dtman34@2601:447:d000:93c9:f423:c4f2:ff81:26d4) (Ping timeout: 240 seconds)
2023-05-22 15:58:05 +0200delYsid(~user@84-115-138-74.cable.dynamic.surfer.at)
2023-05-22 16:01:53 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be)
2023-05-22 16:05:52 +0200ryantrinkle(~ryantrink@140.174.243.224)
2023-05-22 16:13:23 +0200kritzefitz(~kritzefit@debian/kritzefitz) (Ping timeout: 264 seconds)
2023-05-22 16:16:03 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-8496-336f-2351-c84a.rev.sfr.net) (Ping timeout: 245 seconds)
2023-05-22 16:18:11 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:6541:9cfd:d4d8:6c86) (Ping timeout: 264 seconds)
2023-05-22 16:21:52 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:d461:91e6:38f8:9e24)
2023-05-22 16:24:22 +0200bigLama(~alex@2001:861:4f80:4a50:e792:bb46:1a0c:b1d2)
2023-05-22 16:24:57 +0200Sgeo(~Sgeo@user/sgeo)
2023-05-22 16:28:13 +0200dtman34(~dtman34@76.156.89.180)
2023-05-22 16:28:28 +0200reverse(~inversed@bcdcac82.skybroadband.com) (Ping timeout: 240 seconds)
2023-05-22 16:28:29 +0200shriekingnoise(~shrieking@186.137.175.87)
2023-05-22 16:28:59 +0200vglfr(~vglfr@2a0d:3344:1b4f:9e10:d461:91e6:38f8:9e24) (Ping timeout: 264 seconds)
2023-05-22 16:32:55 +0200kritzefitz(~kritzefit@debian/kritzefitz)
2023-05-22 16:36:32 +0200ozkutuk[m](~ozkutuk@2001:470:69fc:105::2:9af8)
2023-05-22 16:42:11 +0200reverse(~inversed@bcdcac82.skybroadband.com)
2023-05-22 16:44:08 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-05-22 16:50:17 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-05-22 16:54:42 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-05-22 16:57:17 +0200vglfr(~vglfr@209.198.137.192)
2023-05-22 17:00:56 +0200vandita(~vandit@80-95-69-214.pool.digikabel.hu) (Ping timeout: 265 seconds)
2023-05-22 17:01:22 +0200rf(~rf@2605:59c8:179c:f610:35bd:5aa6:7274:a262)
2023-05-22 17:02:34 +0200vandita(~vandit@84-236-122-33.pool.digikabel.hu)
2023-05-22 17:07:08 +0200acidjnk(~acidjnk@p200300d6e7072f543cd43d7d1255efcb.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2023-05-22 17:07:57 +0200bliminse(~bliminse@user/bliminse) (Quit: leaving)
2023-05-22 17:09:18 +0200oneeyedalien(~oneeyedal@103.21.127.60) (Remote host closed the connection)
2023-05-22 17:10:01 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 256 seconds)
2023-05-22 17:10:36 +0200bliminse(~bliminse@user/bliminse)
2023-05-22 17:12:54 +0200nick_(~nick@ip68-14-184-208.pn.at.cox.net)
2023-05-22 17:13:09 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-05-22 17:22:02 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-05-22 17:33:19 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
2023-05-22 17:35:05 +0200gurkenglas(~user@dynamic-046-114-227-240.46.114.pool.telefonica.de) (Ping timeout: 246 seconds)
2023-05-22 17:39:43 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-05-22 17:40:23 +0200Alex_test(~al_test@178.34.163.104) (Ping timeout: 264 seconds)
2023-05-22 17:40:37 +0200CiaoSen(~Jura@dynamic-046-114-219-048.46.114.pool.telefonica.de) (Ping timeout: 256 seconds)
2023-05-22 17:40:45 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Ping timeout: 268 seconds)
2023-05-22 17:40:59 +0200AlexZenon(~alzenon@178.34.163.104) (Ping timeout: 264 seconds)
2023-05-22 17:44:47 +0200Alex_test(~al_test@178.34.163.104)
2023-05-22 17:44:50 +0200vglfr(~vglfr@209.198.137.192) (Ping timeout: 250 seconds)
2023-05-22 17:45:09 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
2023-05-22 17:45:21 +0200mauke(~mauke@user/mauke)
2023-05-22 17:46:13 +0200AlexZenon(~alzenon@178.34.163.104)
2023-05-22 17:47:06 +0200gurkenglas(~user@dynamic-046-114-168-101.46.114.pool.telefonica.de)
2023-05-22 17:48:52 +0200acidjnk(~acidjnk@p200300d6e7072f5435207693d4db5d05.dip0.t-ipconnect.de)
2023-05-22 17:50:11 +0200nate2(~nate@98.45.169.16)
2023-05-22 17:53:42 +0200hugo(znc@verdigris.lysator.liu.se)
2023-05-22 17:54:47 +0200nate2(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-05-22 17:55:31 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds)
2023-05-22 17:55:33 +0200eugenrh(~eugenrh@2a02:2f08:4707:3e00:454b:9ac4:8552:8de8) (Ping timeout: 265 seconds)
2023-05-22 17:55:42 +0200 <eldritchcookie[m> ghc supports shared libraries and finding them dynamically at run time, how different can the shared object be from what is expected say i compile package foo with bar 0.1 but my bar in the system is 0.1.1 with the same exported entities per module, does that work? if so how different can bar be? could i use bar 0.2 which exports more things but hasn't removed any entities?
2023-05-22 17:55:59 +0200MajorBiscuit(~MajorBisc@145.94.40.195) (Ping timeout: 240 seconds)
2023-05-22 17:57:55 +0200 <geekosaur> https://wiki.haskell.org/Shared_libraries_and_GHC
2023-05-22 17:58:21 +0200 <geekosaur> tl;dr: it's more complex than that because internals leak into the shared objects for cross-module inlining
2023-05-22 18:00:58 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-05-22 18:01:59 +0200AlexZenon(~alzenon@178.34.163.104) (Ping timeout: 264 seconds)
2023-05-22 18:03:12 +0200AlexZenon(~alzenon@178.34.163.104)
2023-05-22 18:03:29 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3)
2023-05-22 18:05:20 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:8d0b:d6b6:c02a:1360)
2023-05-22 18:10:25 +0200 <eldritchcookie[m> what i gather is that i can if i disable inlining
2023-05-22 18:11:50 +0200 <eldritchcookie[m> which i should not do
2023-05-22 18:12:23 +0200 <eldritchcookie[m> can i disable inlining for only a specific package?
2023-05-22 18:15:51 +0200coot(~coot@89-69-206-216.dynamic.chello.pl)
2023-05-22 18:19:53 +0200 <eldritchcookie[m> cool there is https://downloads.haskell.org/ghc/9.2.7/docs/html/users_guide/using-optimisation.html#ghc-flag--fo…
2023-05-22 18:20:24 +0200 <eldritchcookie[m> is that what you mentioned or would i need to disable more optimizations?
2023-05-22 18:21:41 +0200 <geekosaur> I think you have to force -O0
2023-05-22 18:22:01 +0200 <geekosaur> and I'm not sure even that would be sufficient to achieve ABI compatibility
2023-05-22 18:22:06 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-05-22 18:23:07 +0200MajorBiscuit(~MajorBisc@145.94.155.219)
2023-05-22 18:24:43 +0200dom0(~u0_a242@46.222.33.239)
2023-05-22 18:24:50 +0200Pickchea(~private@user/pickchea)
2023-05-22 18:27:07 +0200spatchkaa(~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Client closed)
2023-05-22 18:34:27 +0200MajorBiscuit(~MajorBisc@145.94.155.219) (Ping timeout: 256 seconds)
2023-05-22 18:35:05 +0200 <eldritchcookie[m> this makes hslua just so much more appealing as an option.
2023-05-22 18:35:07 +0200alexherbo2(~alexherbo@ip-166.net-81-220-17.versailles.rev.numericable.fr)
2023-05-22 18:37:51 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net)
2023-05-22 18:40:43 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 18:46:01 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 18:47:35 +0200jjb(~jjb@user/jjb) (Ping timeout: 240 seconds)
2023-05-22 18:48:05 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2023-05-22 18:49:13 +0200barzo(~hd@31.223.56.119)
2023-05-22 18:49:36 +0200jjb(~jjb@user/jjb)
2023-05-22 18:59:01 +0200titibandit(~titibandi@user/titibandit) (Remote host closed the connection)
2023-05-22 19:00:06 +0200gensyst(~gensyst@user/gensyst)
2023-05-22 19:01:45 +0200vandita(~vandit@84-236-122-33.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 19:03:53 +0200vandita(~vandit@84-236-122-33.pool.digikabel.hu)
2023-05-22 19:05:45 +0200gensyst(~gensyst@user/gensyst) (Quit: Leaving)
2023-05-22 19:06:28 +0200mbuf(~Shakthi@49.207.178.186) (Quit: Leaving)
2023-05-22 19:08:54 +0200finnekit(~finnekit@fsf/member/finnekit) (Ping timeout: 250 seconds)
2023-05-22 19:08:56 +0200bramhaag(~bramhaag@134.195.121.39) (Ping timeout: 268 seconds)
2023-05-22 19:09:10 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 19:11:34 +0200bramhaag(~bramhaag@134.195.121.39)
2023-05-22 19:11:46 +0200finnekit(~finnekit@fsf/member/finnekit)
2023-05-22 19:13:11 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 19:15:33 +0200kjak(~kjak@pool-72-66-75-40.washdc.fios.verizon.net)
2023-05-22 19:17:57 +0200econo(uid147250@user/econo)
2023-05-22 19:22:56 +0200cheater_(~Username@user/cheater)
2023-05-22 19:23:08 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-05-22 19:23:11 +0200cheater_cheater
2023-05-22 19:32:50 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2023-05-22 19:34:12 +0200dom0(~u0_a242@46.222.33.239) (Read error: Connection reset by peer)
2023-05-22 19:34:30 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es)
2023-05-22 19:34:57 +0200 <ghostbuster> what's the best haskell book that i can get a physical paper copy of?
2023-05-22 19:35:52 +0200 <jade[m]> i liked 'programming in haskell' by graham hutton a lot
2023-05-22 19:37:07 +0200 <geekosaur> consider that seconded
2023-05-22 19:37:57 +0200 <ghostbuster> oh he's part of computerphile on youtube?
2023-05-22 19:38:12 +0200 <ghostbuster> cool
2023-05-22 19:38:14 +0200 <delYsid> [exa]: I figured that passing ghc-options -with-rtsopts=-xm40000000 fixes the segfaults in my binary. Is there a better fix?
2023-05-22 19:41:10 +0200 <jade[m]> ghostbuster: yes, he has a few videos about monadic parsing on there if I recall correctly
2023-05-22 19:41:26 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 246 seconds)
2023-05-22 19:45:05 +0200 <ghostbuster> ok i'm going to order it
2023-05-22 19:45:15 +0200 <ghostbuster> i feel like i need a book i can flip back and forth in
2023-05-22 19:45:51 +0200 <ghostbuster> this looks cool too but maybe not for a beginner https://www.amazon.ca/Algorithm-Design-Haskell-Richard-Bird/dp/1108491618
2023-05-22 19:47:43 +0200Guest97(~Guest97@2a00:23c4:31cc:a301:5093:416:b7a8:251f)
2023-05-22 19:52:13 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es)
2023-05-22 19:53:35 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 19:57:59 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-05-22 19:58:31 +0200dhil(~dhil@78.45.150.83.ewm.ftth.as8758.net) (Ping timeout: 240 seconds)
2023-05-22 20:00:35 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 256 seconds)
2023-05-22 20:01:42 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Remote host closed the connection)
2023-05-22 20:05:07 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 256 seconds)
2023-05-22 20:08:08 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es)
2023-05-22 20:10:26 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Quit: WeeChat 3.8)
2023-05-22 20:11:43 +0200zeenk(~zeenk@2a02:2f04:a105:f00::7fe)
2023-05-22 20:11:52 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f)
2023-05-22 20:12:00 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be)
2023-05-22 20:12:34 +0200alexherbo2(~alexherbo@ip-166.net-81-220-17.versailles.rev.numericable.fr) (Remote host closed the connection)
2023-05-22 20:13:12 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net)
2023-05-22 20:17:26 +0200gensyst(~gensyst@user/gensyst)
2023-05-22 20:19:17 +0200Guest97(~Guest97@2a00:23c4:31cc:a301:5093:416:b7a8:251f) (Quit: Client closed)
2023-05-22 20:19:28 +0200 <sm> ghostbuster: define best, obviously ?
2023-05-22 20:20:01 +0200 <sm> or not, maybe you found it :)
2023-05-22 20:20:31 +0200 <[exa]> delYsid: afaik that's hinting the default mmap location. can you check what happens if you use that in the mmap-test.c tht was posted on the forum?
2023-05-22 20:20:35 +0200 <sm> that might be the one book everyone recommends and no one has a bad word to say about
2023-05-22 20:23:59 +0200gensyst(~gensyst@user/gensyst) (Quit: Leaving)
2023-05-22 20:24:39 +0200Radioredwagon(~radioredw@user/radioredwagon)
2023-05-22 20:25:49 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3)
2023-05-22 20:26:04 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg)
2023-05-22 20:27:01 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be) (Quit: WeeChat 3.8)
2023-05-22 20:29:31 +0200czy(~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Ping timeout: 240 seconds)
2023-05-22 20:30:19 +0200gmg(~user@user/gehmehgeh)
2023-05-22 20:30:23 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 240 seconds)
2023-05-22 20:36:31 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-05-22 20:37:39 +0200coot(~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot)
2023-05-22 20:39:17 +0200simendsjo(~user@84.211.91.241)
2023-05-22 20:46:23 +0200nick_(~nick@ip68-14-184-208.pn.at.cox.net) (Ping timeout: 264 seconds)
2023-05-22 20:47:52 +0200mmhat(~mmh@p200300f1c7066837ee086bfffe095315.dip0.t-ipconnect.de)
2023-05-22 20:48:47 +0200mmhat(~mmh@p200300f1c7066837ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2023-05-22 20:49:02 +0200 <delYsid> [exa]: I got that value from the GHC documentation for -xm, but I have to admit I have absolutely no idea what it does. It apparently makes the problem go away. Which forum are you refering to, the link I pasted?
2023-05-22 20:49:27 +0200 <ghostbuster> sm: i already ordered that one haha
2023-05-22 20:49:39 +0200 <ghostbuster> but i generally like to have at least 2 resources to consult when learning a new language
2023-05-22 20:49:53 +0200 <sm> good job supporting quality writing
2023-05-22 20:49:55 +0200 <[exa]> delYsid: yeah that discourse one
2023-05-22 20:50:07 +0200 <sm> you may not have seen
2023-05-22 20:50:07 +0200 <sm> @where books
2023-05-22 20:50:07 +0200 <lambdabot> https://www.extrema.is/articles/haskell-books is the best list of Haskell books. See also: LYAH, HTAC, RWH, PH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, FSAF, HftVB, TwT, FoP, PFAD, WYAH,
2023-05-22 20:50:07 +0200 <lambdabot> non-haskell-books
2023-05-22 20:51:24 +0200Radioredwagon(~radioredw@user/radioredwagon) (Quit: Leaving)
2023-05-22 20:51:49 +0200 <ghostbuster> cool
2023-05-22 20:51:50 +0200kjak(~kjak@pool-72-66-75-40.washdc.fios.verizon.net) (Remote host closed the connection)
2023-05-22 20:52:30 +0200machinedgod(~machinedg@84-115-230-104.cable.dynamic.surfer.at)
2023-05-22 20:52:36 +0200 <ghostbuster> this might be kind of an odd question but does experience with the parallel nature of logic design / VHDL make it easier/harder to learn functional programming, as opposed to someone who has only used imperative languages?
2023-05-22 20:53:33 +0200 <geekosaur> I can't say experience with Prolog / logic programming helped me very much
2023-05-22 20:54:06 +0200 <geekosaur> it helped a little, but more because I was already aware of / open to paradigms other than imperative or OO
2023-05-22 20:54:39 +0200 <ghostbuster> interesting
2023-05-22 20:54:59 +0200 <ghostbuster> i have no experience with prolog
2023-05-22 20:55:00 +0200dom0(~u0_a242@cm-81-9-195-53.telecable.es) (Ping timeout: 268 seconds)
2023-05-22 20:55:23 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-05-22 20:55:45 +0200 <geekosaur> (mathematical logic vs. hardware logic)
2023-05-22 20:56:17 +0200 <ghostbuster> yeah it seems from a cursory glance like it might be similar to FP but i guess not
2023-05-22 20:56:49 +0200 <geekosaur> a few similarities and in particular prolog is declarative
2023-05-22 20:57:06 +0200 <geekosaur> but there's a big difference between logic programming and functional programming
2023-05-22 20:58:52 +0200 <[exa]> ghostbuster: I'd say it helps; anything that abstracts you away from "running the process imperatively" to "describing how the process should run" is roughly on the way
2023-05-22 21:00:17 +0200 <ghostbuster> i think i've sufficiently wrapped my head around the basic concept of FP, now i'm a bit hung up on basic syntax
2023-05-22 21:01:06 +0200 <sm> practice grasshopper. I recommend some project euler problems
2023-05-22 21:01:24 +0200 <jade[m]> mhm, the concepts are the most important things
2023-05-22 21:01:33 +0200 <jade[m]> the syntax almost follows from that, in a sense
2023-05-22 21:01:40 +0200 <sm> alongside reading other people's (simple) code
2023-05-22 21:02:12 +0200 <sm> maybe exercism is the one that lets you easily view other solutions ?
2023-05-22 21:02:15 +0200 <ghostbuster> add :: Integer -> Integer -> Integer
2023-05-22 21:02:24 +0200mikoto-chan(~mikoto-ch@ip-213-49-58-19.dsl.scarlet.be)
2023-05-22 21:02:42 +0200 <ghostbuster> ^ using the same symbol to represent inputs and outputs
2023-05-22 21:02:51 +0200 <monochrom> exercism is better than project euler for this.
2023-05-22 21:03:07 +0200dom0(~u0_a242@46.222.94.103)
2023-05-22 21:03:12 +0200 <geekosaur> there's not a lot of difference. consider partial application (e.g. `add 1`)
2023-05-22 21:03:30 +0200 <geekosaur> is the first arrow pointing to an input or an output?
2023-05-22 21:03:34 +0200dom0(~u0_a242@46.222.94.103) (Client Quit)
2023-05-22 21:03:45 +0200smfound project euler nice and simple.. here's a simple number problem, go
2023-05-22 21:04:01 +0200 <monochrom> "simple"
2023-05-22 21:04:23 +0200 <jade[m]> think of function definition `a -> b -> c` as `a -> (b -> c)` and the `->` simply as a way to define a function from something to something else
2023-05-22 21:04:43 +0200 <jade[m]> *instead* of `a -> b -> c` meaning `(a, b) -> c`
2023-05-22 21:04:52 +0200 <monochrom> If you aren't a math major, project euler is just practicing brute-forcing over and over again.
2023-05-22 21:05:05 +0200 <ghostbuster> ah ok that actually makes sense jade[m]
2023-05-22 21:05:40 +0200 <monochrom> If you're a math major, project euler is about thinking very hard, coding up a O(1)-time algorithm that's trivial to code up in any language.
2023-05-22 21:06:00 +0200 <sm> that made no difference for me; they were simple problems that didn't distract from figuring out Haskell syntax and mechanics
2023-05-22 21:06:08 +0200 <sm> eg https://projecteuler.net/problem=1
2023-05-22 21:06:09 +0200 <[exa]> monochrom: you mean "thinking very hard and writing down the result" ? :D
2023-05-22 21:06:13 +0200foul_owl(~kerry@71.212.137.212)
2023-05-22 21:06:14 +0200 <monochrom> Either way I can't see how it learns you good programming.
2023-05-22 21:06:25 +0200 <jade[m]> ghostbuster: this is a lot of my personal experience.
2023-05-22 21:06:25 +0200 <jade[m]> "Why is thing X this weird in haskell, can it not be 'normal'" -> learning a bit more -> "Oh this makes a lot of sense actually, why are all the mainstream imperative languages *not* doing that?"
2023-05-22 21:06:40 +0200 <sm> "good programming" is not the goal of someone trying to write their first Haskell code :)
2023-05-22 21:06:40 +0200ghostbusteris not a math major
2023-05-22 21:06:50 +0200jade[m]is neither
2023-05-22 21:07:18 +0200[exa]is, and avoids all that knowledge in programming by far
2023-05-22 21:07:42 +0200 <ghostbuster> i had a taste of real analysis in one course during undergrad but that was ~10 years ago
2023-05-22 21:07:42 +0200jade[m]aspires to be, some day
2023-05-22 21:07:55 +0200 <[exa]> jade[m]: well good luck
2023-05-22 21:08:21 +0200 <monochrom> Well "trying to write their first Haskell code" is fulfilled by LYAH too. Now why don't you also recommend that? There is a reason.
2023-05-22 21:08:24 +0200 <[exa]> ghostbuster: btw with most confusing syntax things, don't hesitate to ask here (or in #haskell-beginners), people here love explaining stuff
2023-05-22 21:08:35 +0200 <jade[m]> Thank you, I will start a compsci minor in ~2 months
2023-05-22 21:08:45 +0200 <ghostbuster> nice
2023-05-22 21:09:08 +0200 <[exa]> jade[m]: what uni? (just curious, feel free to ignore :D )
2023-05-22 21:09:25 +0200vandita(~vandit@84-236-122-33.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 21:09:26 +0200 <sm> monochrom: I'm not discounting your perspective (a teacher's, I think), but reporting my experience. Project Euler helped me get going and it fit that need ideally. LYAH didn't, nothing useful in there
2023-05-22 21:09:26 +0200 <monochrom> The point is that we are done with recommending resources that can only get you to write your first few lines of Haskell code.
2023-05-22 21:09:40 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg)
2023-05-22 21:10:09 +0200 <geekosaur> but I'm pretty sure PE only works if you know the math
2023-05-22 21:10:17 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 256 seconds)
2023-05-22 21:10:25 +0200 <geekosaur> brute forcing PE works poorly in any language
2023-05-22 21:10:30 +0200 <ghostbuster> project euler is pretty basic math early on isn't it?
2023-05-22 21:10:47 +0200 <jade[m]> [exa]: you probably wouldn't know it, a fairly small german one
2023-05-22 21:10:56 +0200 <sm> yep. "Find the sum of all the multiples of 3 or 5 below 1000." I certainly didn't complete all of it
2023-05-22 21:11:22 +0200vandita(~vandit@87-97-13-52.pool.digikabel.hu)
2023-05-22 21:11:25 +0200 <[exa]> ghostbuster: btw as a mental exercise, it is interesting to have a look why the function types are parenthesized "from right" while function argument application is parenthesized "from left" -- e.g., compare type `sumThree :: Int -> (Int -> (Int -> Int))` with the use: `((sumThree 1) 2) 3`
2023-05-22 21:11:50 +0200 <mauke> s/poorly/great/
2023-05-22 21:12:48 +0200smchecks.. I did the first 18
2023-05-22 21:13:25 +0200 <sm> of.. 834 . I see why I could be giving a wrong impression :)
2023-05-22 21:13:32 +0200 <[exa]> I didn't like Euler problems solely for the fact that all the latter ones follow this style of "yeah let's pull in this advanced finite field theorem out of nowhere and observe how the problem gets trivial again"
2023-05-22 21:13:35 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 240 seconds)
2023-05-22 21:14:08 +0200barzo(~hd@31.223.56.119) (Read error: Connection reset by peer)
2023-05-22 21:14:23 +0200 <monochrom> It is Math Olympiad but you have to write machine-readable solutions.
2023-05-22 21:14:37 +0200barzo(~hd@31.223.56.119)
2023-05-22 21:15:09 +0200 <[exa]> why people recommend it for programming then?
2023-05-22 21:15:16 +0200 <monochrom> Or you can use brute-forcing and have 1000 exercises for list comprehension, 900 of which are too slow.
2023-05-22 21:15:16 +0200 <[exa]> ._.
2023-05-22 21:15:58 +0200 <mauke> nah, just let it run for a few days
2023-05-22 21:16:20 +0200 <sm> [exa]: I've just been saying why.. the first few problems are simple enough and easy enough to view that it's non-distracting. Compare with exercism where it's a whole signup, checkout, learn a process kind of thing
2023-05-22 21:16:41 +0200 <ghostbuster> [exa]: i'm curious to see an example of a PE problem like that
2023-05-22 21:16:50 +0200 <sm> if it weren't for that maybe I'd rate exercism #1. But that's just me, YMMV
2023-05-22 21:17:07 +0200ft(~ft@p4fc2a88b.dip0.t-ipconnect.de)
2023-05-22 21:17:20 +0200 <monochrom> "Find the sum of all the multiples of 3 or 5 below 1000" is already like that. You are not supposed to for i=0 to 1000.
2023-05-22 21:17:30 +0200 <[exa]> sm: ah yeah, true
2023-05-22 21:17:47 +0200 <[exa]> ghostbuster: PE?
2023-05-22 21:18:03 +0200 <mauke> portable euler
2023-05-22 21:18:04 +0200 <monochrom> You are supposed to, like, div 1000 3 + div 1000 5 - div 1000 15
2023-05-22 21:18:33 +0200 <monochrom> Err no sorry, that's just the counts.
2023-05-22 21:18:35 +0200 <sm> my answer was `a1 = sum [n | n <- [1..1000-1], n `mod` 3 == 0 || n `mod` 5 == 0]`, "supposed to" didn't enter my mind
2023-05-22 21:18:52 +0200 <sm> just "here's a problem you can understand, can you write that in haskell ?"
2023-05-22 21:18:56 +0200 <ghostbuster> mauke: what are you some kind of systems programmer? :P
2023-05-22 21:18:58 +0200 <jade[m]> a lot of sum problems are like that, if you can find a closed form, why would you do it programmatically
2023-05-22 21:19:03 +0200 <[exa]> monochrom: you can expand it to the sums (it's kinda triangular)
2023-05-22 21:20:22 +0200 <sm> I think some of you are thinking like a beginner in a CS algorithms class. That's not what I mean by a beginner Haskell programmer.
2023-05-22 21:20:48 +0200foul_owl(~kerry@71.212.137.212) (Ping timeout: 240 seconds)
2023-05-22 21:20:56 +0200 <jade[m]> that's what I think is the tradeoff between beautiful or expressive code and fast code. `sum [1..n]` looks great and is super expressive, but `((n - 1) * n) / 2` is "better"
2023-05-22 21:20:58 +0200 <monochrom> I guess "let n = div 1000 3 in 3*(n*(n-1) `div` 2)" does the sum of multiples of 3. Similarly for the other terms.
2023-05-22 21:21:20 +0200 <ghostbuster> [exa]: trying to write the body for sumThree now haha
2023-05-22 21:21:34 +0200 <[exa]> jade[m]: {-# RULES sum [1..n] = ...... #-} gogogo
2023-05-22 21:21:43 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f)
2023-05-22 21:21:48 +0200 <mauke> shouldn't that be n + 1
2023-05-22 21:21:48 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2023-05-22 21:21:54 +0200 <jade[m]> I haven't worked with rewrite rules yet haha
2023-05-22 21:22:10 +0200 <[exa]> ghostbuster: that was for demonstration but you can just smash the 3 things together with +
2023-05-22 21:22:37 +0200 <[exa]> mauke: yap
2023-05-22 21:22:40 +0200 <ghostbuster> i tried `sumThree x y x = x + y + z`
2023-05-22 21:22:48 +0200 <monochrom> My last stab at PE before I let go (and actually afk and take a shower and have tea):
2023-05-22 21:22:55 +0200 <jade[m]> mauke: ah yeah, I always get that one mixed up
2023-05-22 21:23:05 +0200 <monochrom> If PE began with "count the number of integers from 1 to 10^100 inclusive"
2023-05-22 21:23:13 +0200 <mauke> and that's why sum [1..n] is superior :-)
2023-05-22 21:23:19 +0200 <[exa]> ghostbuster: the type might get a bit too generic there -- haskell will by default make a function that works "for all numeric things"
2023-05-22 21:23:26 +0200 <jade[m]> mauke: yep haha
2023-05-22 21:23:36 +0200 <monochrom> I'm sure programmers would be like "[1 | i<-[1..10^100]] This is a great programming exercise!"
2023-05-22 21:23:54 +0200 <ghostbuster> [exa]: no i mean i included the :: line as well
2023-05-22 21:24:04 +0200 <monochrom> but also say "why is it still too slow under -O2? GHC sucks"
2023-05-22 21:24:05 +0200 <int-e> monochrom: how do I parallelize this?
2023-05-22 21:24:20 +0200 <[exa]> ghostbuster: without the line you might see a type like `Num a => a->a->a->a` which means roughly "if we can assume that some a is Num-eric, this has a type a->a->a->a"
2023-05-22 21:24:34 +0200 <jade[m]> length [0 .. 10^100]
2023-05-22 21:24:45 +0200 <mauke> - 1
2023-05-22 21:24:58 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) (Remote host closed the connection)
2023-05-22 21:25:02 +0200 <ghostbuster> oh i think i see what to do
2023-05-22 21:25:06 +0200 <int-e> > 10^100 - 0 + 1 :: Int
2023-05-22 21:25:08 +0200 <lambdabot> 1
2023-05-22 21:25:32 +0200 <jade[m]> should have used genericLength, heh?
2023-05-22 21:25:34 +0200 <[exa]> ghostbuster: if you have a ghci running, check types of stuff by typing :t something
2023-05-22 21:25:38 +0200 <ghostbuster> hmm no, but i think it's thinking i want x = x + y + z, thus 'Conflicting definitions for x'
2023-05-22 21:25:51 +0200 <mauke> > sum (replicate 10 0.1) :: Rational
2023-05-22 21:25:52 +0200 <ghostbuster> [exa]: trying to load a .hs file
2023-05-22 21:25:52 +0200 <lambdabot> 1 % 1
2023-05-22 21:26:28 +0200 <[exa]> ghostbuster: you may pastebin the file (https://paste.tomsmeding.com/)
2023-05-22 21:27:27 +0200 <ghostbuster> https://paste.tomsmeding.com/URP8HJhI
2023-05-22 21:27:53 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Remote host closed the connection)
2023-05-22 21:27:55 +0200 <mauke> x y x
2023-05-22 21:27:58 +0200 <jade[m]> you have x twice in the parameters
2023-05-22 21:28:03 +0200 <ghostbuster> lol
2023-05-22 21:28:51 +0200 <jade[m]> when this works, try to use :t and apply your sumThree to only two arguments. What do you expect the output will be?
2023-05-22 21:29:35 +0200 <ghostbuster> will the output be a function?
2023-05-22 21:29:52 +0200 <jade[m]> what type will that function have?
2023-05-22 21:29:59 +0200ddellacosta(~ddellacos@143.244.47.88) (Ping timeout: 240 seconds)
2023-05-22 21:30:08 +0200 <ghostbuster> Int -> (Int -> Int)
2023-05-22 21:30:26 +0200 <jade[m]> close, that would be if you applied it to one parameter
2023-05-22 21:30:36 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 250 seconds)
2023-05-22 21:30:37 +0200 <monochrom> [exa]: "PE is meant to be IMO" : "why people recommend it for programming?" :: "cough syrup is meant to relieve cough, opioids are meant to relieve pain, glue is meant to stick" : "so why people recommend them for getting high?" >:)
2023-05-22 21:31:18 +0200 <ghostbuster> lol you wrote that analogy like a functional programmer
2023-05-22 21:31:55 +0200[exa]is enlightened
2023-05-22 21:32:01 +0200 <ghostbuster> jade[m]: hmm, does it apply from the inside out?
2023-05-22 21:32:50 +0200 <ghostbuster> I'm imagining an Int -> ... and a passed argument annihilating each other
2023-05-22 21:33:21 +0200 <[exa]> ghostbuster: yeah that's a good view imo
2023-05-22 21:34:01 +0200 <geekosaur> but they apply from the outside in, not the inside out
2023-05-22 21:34:02 +0200 <jade[m]> not quite, `Int -> ...` means that if you give it an int, then if gives you something else.
2023-05-22 21:34:02 +0200 <jade[m]> `Int -> (Int -> (Int -> Int))` therefore implies that `sumThree 1` gives you back `Int -> (Int -> Int)`.
2023-05-22 21:34:02 +0200 <jade[m]> Applying yet another parameter `(sumThree 1) 2` thus gives you `Int -> Int` :D
2023-05-22 21:34:04 +0200 <ghostbuster> now i'm wondering what happens with a 3-argument function that's not associative
2023-05-22 21:34:12 +0200 <ghostbuster> if you only give 2 arguments i mean
2023-05-22 21:34:13 +0200 <jade[m]> ghostbuster: yes!
2023-05-22 21:34:20 +0200gensyst(~gensyst@user/gensyst)
2023-05-22 21:34:30 +0200Unhammer(~Unhammer@user/unhammer) (Ping timeout: 265 seconds)
2023-05-22 21:34:47 +0200 <ghostbuster> jade[m]: ah ok that makes sense
2023-05-22 21:34:59 +0200 <jade[m]> jade[m]: > <@jade.256:the-apothecary.club> not quite, `Int -> ...` means that if you give it an int, then if gives you something else.
2023-05-22 21:34:59 +0200 <jade[m]> > `Int -> (Int -> (Int -> Int))` therefore implies that `sumThree 1` gives you back `Int -> (Int -> Int)`.
2023-05-22 21:34:59 +0200 <jade[m]> > Applying yet another parameter `(sumThree 1) 2` thus gives you `Int -> Int` :D
2023-05-22 21:34:59 +0200 <jade[m]> and, *all* those parantheses are implicit because of the associativity of definition/application respectively
2023-05-22 21:35:01 +0200 <lambdabot> <hint>:1:1: error: parse error on input ‘`’
2023-05-22 21:35:01 +0200 <lambdabot> <hint>:1:33: error: parse error on input ‘(’
2023-05-22 21:35:40 +0200 <gensyst> Do async exceptions eventually become sync exceptions later? What I mean is, if I (on thread A) throwTo into thread B, thread B therefore crashes, but originally C was the one calling B, will C see the crash from B as a normal sync exception?
2023-05-22 21:36:01 +0200 <gensyst> Hmmmmmmmmm
2023-05-22 21:36:16 +0200foul_owl(~kerry@45.143.82.39)
2023-05-22 21:36:20 +0200 <mauke> what does it mean to call a thread?
2023-05-22 21:36:33 +0200 <ghostbuster> haskellbook.com suggests using :info (^), :info (*), :info(+) etc. to learn about operator precedence but I don't really understand the output format
2023-05-22 21:37:00 +0200 <mauke> ghostbuster: the "infix" line is about operator precedence
2023-05-22 21:37:08 +0200 <gensyst> mauke, good question. So thread B just disappears and that's it? no trace of it.
2023-05-22 21:37:14 +0200 <mauke> the rest is ... fun
2023-05-22 21:37:24 +0200 <[exa]> ghostbuster: a fun exercise is to try to work through why e.g. `id id gcd 5 3` works and try to guess the actual type of the first `id`
2023-05-22 21:37:50 +0200 <jade[m]> [exa]: oh god
2023-05-22 21:37:55 +0200 <ghostbuster> https://paste.tomsmeding.com/Fzp76qUN
2023-05-22 21:38:08 +0200 <jade[m]> I get it, but it's a pain to read
2023-05-22 21:38:18 +0200 <geekosaur> gensyst, if there is no exception handler wrapped around it then yes, it just disappears
2023-05-22 21:38:36 +0200 <mauke> ghostbuster: the relevant information is infixr 8 ^; infixl 7 *; infixl 6 +; infixl 6 -
2023-05-22 21:39:24 +0200 <mauke> type Num :: * -> Constraint is advanced nonsense
2023-05-22 21:39:29 +0200 <mauke> that's not even standard Haskell
2023-05-22 21:39:39 +0200titibandit(~titibandi@user/titibandit)
2023-05-22 21:43:15 +0200 <EvanR> type inferrence, "wavefunction collapse" before it was cool
2023-05-22 21:44:01 +0200 <jade[m]> he
2023-05-22 21:47:36 +0200Unhammer(~Unhammer@user/unhammer)
2023-05-22 21:49:04 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg)
2023-05-22 21:51:43 +0200nate2(~nate@98.45.169.16)
2023-05-22 21:53:09 +0200 <ghostbuster> polymorphism?
2023-05-22 21:53:36 +0200freeside(~mengwong@bb115-66-81-217.singnet.com.sg) (Ping timeout: 248 seconds)
2023-05-22 21:53:51 +0200 <[exa]> (as opposed to monomorphism.)
2023-05-22 21:56:25 +0200nate2(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-05-22 21:56:30 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-05-22 22:02:49 +0200ghostbustergoes back to trying to sum three numbers
2023-05-22 22:04:59 +0200 <monochrom> EvanR: Heh
2023-05-22 22:05:32 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 22:05:42 +0200titibandit(~titibandi@user/titibandit) (Remote host closed the connection)
2023-05-22 22:05:52 +0200 <int-e> ghostbuster: may I suggest 0, 0, and 0?
2023-05-22 22:08:30 +0200chomwitt(~chomwitt@2a02:587:7a07:4f00:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
2023-05-22 22:09:28 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 22:11:41 +0200 <EvanR> gensyst, you can build "I'm making a call to some thread, i.e. waiting for it to return an answer or crash, and if it crashes, I crash (or something)" out of the primitives haskell gives you. The async package has done this. But these are higher level concepts that don't just exist
2023-05-22 22:13:40 +0200 <EvanR> but it's a good way to avoid having silently crashing threads
2023-05-22 22:15:00 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-05-22 22:20:35 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 264 seconds)
2023-05-22 22:23:34 +0200 <sm> "at the start of every offering of the course the professor says that students can use any language that can run on the school servers, but issues a warning that teams using Haskell have the highest variance in mark of any language, with many teams using Haskell overestimating their ability and crashing and burning then getting a terrible mark, more than any other language, while some Haskell teams do quite well and get perfect"
2023-05-22 22:23:48 +0200 <sm> (from this nice language comparison: https://thume.ca/2019/04/29/comparing-compilers-in-rust-haskell-c-and-python)
2023-05-22 22:26:23 +0200 <ghostbuster> lol
2023-05-22 22:27:05 +0200 <ghostbuster> for me, getting a better understanding of compiler internals is sort of a tandem goal of learning FP
2023-05-22 22:27:10 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net)
2023-05-22 22:27:18 +0200cheater_(~Username@user/cheater)
2023-05-22 22:28:22 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3)
2023-05-22 22:28:47 +0200barzo(~hd@31.223.56.119) (Ping timeout: 240 seconds)
2023-05-22 22:29:46 +0200 <jade[m]> that's a good goal imo, it has definitely done that for me
2023-05-22 22:30:11 +0200cheater(~Username@user/cheater) (Ping timeout: 256 seconds)
2023-05-22 22:30:13 +0200cheater_cheater
2023-05-22 22:30:45 +0200Xe(~cadey@tailscale/xe) (Ping timeout: 256 seconds)
2023-05-22 22:31:21 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-05-22 22:32:16 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f)
2023-05-22 22:32:23 +0200 <gensyst> Thanks mates!
2023-05-22 22:32:34 +0200eggplantade(~Eggplanta@2600:1700:38c5:d800:6cda:5d2c:763a:75d3) (Ping timeout: 250 seconds)
2023-05-22 22:34:33 +0200 <gensyst> geekosaur, EvanR, but the question remains... can C catch the async exception that A throwTo into B?
2023-05-22 22:35:20 +0200 <EvanR> I had to do a double take, C is a third thread, not a programming language in this question xD
2023-05-22 22:35:23 +0200 <geekosaur> only if B is started with a wrapper that throwTo's it to C
2023-05-22 22:35:34 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:969e:4407:eb4f:f470) (Quit: WeeChat 2.8)
2023-05-22 22:35:36 +0200merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 250 seconds)
2023-05-22 22:35:41 +0200mei(~mei@user/mei) (Remote host closed the connection)
2023-05-22 22:36:07 +0200 <EvanR> yeah a chain of wrappers that set up this chain of re-throws would do it
2023-05-22 22:36:11 +0200pavonia(~user@user/siracusa)
2023-05-22 22:36:50 +0200 <gensyst> Are you talking about onException, etc?
2023-05-22 22:37:02 +0200 <geekosaur> yes, it would require a handler
2023-05-22 22:37:03 +0200 <gensyst> (that catch async exceptions)
2023-05-22 22:38:06 +0200mei(~mei@user/mei)
2023-05-22 22:38:38 +0200 <EvanR> if C spawned B and B spawned A, you can see where these wrappers go, at the start of each thread, and they rethrow to the spawner or communicate the fact back to them somehow before dying
2023-05-22 22:38:57 +0200 <gensyst> EvanR, geekosaur .. and would I be correct that onException (that catches async exception) I could also put into C itself directly (i..e all the code in C is wrapped in onException).
2023-05-22 22:39:09 +0200 <gensyst> Or of course I ahve the choice to catch it downstream in the code in B
2023-05-22 22:39:23 +0200 <geekosaur> no, a handler in C will not catch an exception thrown in B
2023-05-22 22:39:29 +0200 <geekosaur> even if C started B
2023-05-22 22:39:53 +0200 <EvanR> there's no built-in parent child thread concept aiui
2023-05-22 22:40:35 +0200 <geekosaur> right, async builds one by means of wrappers and such
2023-05-22 22:40:57 +0200Xe(~cadey@tailscale/xe)
2023-05-22 22:41:20 +0200foul_owl(~kerry@45.143.82.39) (Ping timeout: 246 seconds)
2023-05-22 22:43:33 +0200ddellacosta(~ddellacos@146.70.165.240)
2023-05-22 22:46:32 +0200 <gensyst> geekosaur, so if C wanted that stuff, it should start B with async package (for instance)
2023-05-22 22:46:44 +0200 <geekosaur> or wrap it itself
2023-05-22 22:47:02 +0200 <gensyst> and I presume reputable web frameworks (etc.) do stuff like that right? if a thread gets async killed, it logs the failure to log file at least
2023-05-22 22:47:21 +0200 <geekosaur> async will do this for you but it's just using the tools already available, viz. wrapping the function passed to forkIO in a handler that rethrows an exception to C
2023-05-22 22:47:29 +0200 <geekosaur> yes
2023-05-22 22:47:49 +0200 <geekosaur> in general async is nicer to work with than raw threads
2023-05-22 22:48:23 +0200simendsjo(~user@84.211.91.241) (Ping timeout: 240 seconds)
2023-05-22 22:49:02 +0200ddellacosta(~ddellacos@146.70.165.240) (Ping timeout: 250 seconds)
2023-05-22 22:49:16 +0200 <gensyst> very good info, thanks
2023-05-22 22:49:45 +0200 <EvanR> also the details of properly wrapping threads at spawn time, esp in the presence of async exceptions, can be tricky
2023-05-22 22:50:41 +0200 <EvanR> see how async does it for proof xD
2023-05-22 22:51:23 +0200 <EvanR> that it can be tricky, not necessarily that they even get it right!
2023-05-22 22:51:54 +0200 <EvanR> asynchronous exceptions is a wonderful pandoras box
2023-05-22 22:51:55 +0200ddellacosta(~ddellacos@146.70.171.176)
2023-05-22 22:52:56 +0200 <gensyst> it's only 1k LOCs...
2023-05-22 22:53:19 +0200 <EvanR> well I guess I have to find the relevant snippet
2023-05-22 22:53:49 +0200 <monochrom> I believe you. :)
2023-05-22 22:54:08 +0200 <geekosaur> it's not how large the code is, it's how carefully it does the appropriate masking and wrapping
2023-05-22 22:54:20 +0200 <EvanR> withAsyncUsing
2023-05-22 22:54:32 +0200 <EvanR> is where the magic happens
2023-05-22 22:54:40 +0200 <geekosaur> only a couple of characters but the exact placement makes a big difference in correctness/reliability
2023-05-22 22:55:28 +0200 <monochrom> Goes a long way to show that bugfix difficulty is not measured by edit distance.
2023-05-22 22:55:49 +0200 <EvanR> the "built-in" wrapper `mask' runs some code with async exceptions mask, and passes in a restore sub-wrapper to unmask which has to be used at the correct time, plus other stuff
2023-05-22 22:56:04 +0200 <EvanR> masked,*
2023-05-22 22:57:23 +0200 <monochrom> Actually the masking interface is not so hard to use if you're used to dependency injection. This is exactly dependency injection.
2023-05-22 22:58:09 +0200 <EvanR> thread cancellation is implemented using uninterruptibleMask, which is a variant of mask, but the spawning uses mask anyway, for reasons!
2023-05-22 22:59:37 +0200 <EvanR> a thread that is waiting on MVar with async exceptions masked is still interruptible, which could be right or wrong depending on what you're doing
2023-05-22 23:00:30 +0200 <int-e> async exceptions can sometimes be captured in pure values, no throwTo required: https://paste.tomsmeding.com/oHG3m0Fh
2023-05-22 23:03:29 +0200 <int-e> hmm
2023-05-22 23:05:36 +0200 <int-e> Actually I don't understand what's happening there.
2023-05-22 23:06:54 +0200cheater_(~Username@user/cheater)
2023-05-22 23:07:08 +0200trev(~trev@user/trev) (Quit: trev)
2023-05-22 23:07:43 +0200 <int-e> Oh it's getting an exception because the MVar becomes unreachable... not what I'm aiming for.
2023-05-22 23:08:23 +0200 <int-e> (I should print the caught exception)
2023-05-22 23:08:25 +0200cheater(~Username@user/cheater) (Ping timeout: 240 seconds)
2023-05-22 23:08:29 +0200cheater_cheater
2023-05-22 23:09:02 +0200pharonix71(~pharonix7@user/pharonix71) (Remote host closed the connection)
2023-05-22 23:09:45 +0200pharonix71(~pharonix7@user/pharonix71)
2023-05-22 23:11:17 +0200 <gensyst> oh, marlow wrote async...
2023-05-22 23:11:23 +0200 <gensyst> the book author
2023-05-22 23:11:27 +0200 <gensyst> of course
2023-05-22 23:12:51 +0200gensyst(~gensyst@user/gensyst) (Quit: Leaving)
2023-05-22 23:13:11 +0200vulpine(xfnw@tilde.team) (Quit: Connection reset by purr)
2023-05-22 23:13:46 +0200vulpine(xfnw@tilde.team)
2023-05-22 23:17:33 +0200 <int-e> Oh this is the kind of thing I remembered, it was not totally pure (it involves catching exceptions under unsafePerformIO): https://paste.tomsmeding.com/kCUUhAbQ
2023-05-22 23:20:04 +0200 <zzz> what module should i look for if i want to parse date and time and retrieve something like the day of week>
2023-05-22 23:20:21 +0200 <int-e> (`onException` re-raises the exception, but under rare circumstances (like an untimely garbage collection) the re-raise can happen in a different thread here.)
2023-05-22 23:21:32 +0200 <geekosaur> zzz, parseTimeM in the time package comes to mind
2023-05-22 23:21:41 +0200 <geekosaur> or one of its cousins
2023-05-22 23:23:43 +0200foul_owl(~kerry@71.212.137.212)
2023-05-22 23:25:00 +0200 <geekosaur> Data.Time.Clock has the day of week stuff once you've parsed a date+time
2023-05-22 23:25:17 +0200 <geekosaur> sorry Data.Time.Calendar
2023-05-22 23:25:36 +0200 <geekosaur> the parse stuff is Data.Time.Format
2023-05-22 23:26:56 +0200freeside(~mengwong@103.252.202.151)
2023-05-22 23:27:11 +0200vandita(~vandit@87-97-13-52.pool.digikabel.hu) (Ping timeout: 240 seconds)
2023-05-22 23:27:51 +0200 <zzz> geekosaur: thanks!
2023-05-22 23:28:57 +0200vandita(~vandit@87-97-12-226.pool.digikabel.hu)
2023-05-22 23:29:52 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-05-22 23:30:47 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f) (Ping timeout: 264 seconds)
2023-05-22 23:31:01 +0200freeside(~mengwong@103.252.202.151) (Ping timeout: 240 seconds)
2023-05-22 23:32:48 +0200falafel(~falafel@2603-8000-d700-115c-d608-8fcf-453d-62c0.res6.spectrum.com)
2023-05-22 23:34:25 +0200michalz(~michalz@185.246.204.90) (Remote host closed the connection)
2023-05-22 23:41:01 +0200falafel(~falafel@2603-8000-d700-115c-d608-8fcf-453d-62c0.res6.spectrum.com) (Ping timeout: 256 seconds)
2023-05-22 23:42:21 +0200jero98772(~jero98772@2800:484:1d84:9000:8822:84bd:a4f4:947f)
2023-05-22 23:45:11 +0200foul_owl(~kerry@71.212.137.212) (Ping timeout: 264 seconds)
2023-05-22 23:51:16 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-05-22 23:55:28 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-1d2b-cbea-330c-620a.rev.sfr.net) (Remote host closed the connection)
2023-05-22 23:56:34 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2023-05-22 23:58:49 +0200foul_owl(~kerry@45.143.82.40)
2023-05-22 23:59:34 +0200freeside(~mengwong@103.252.202.151)