Home liberachat/#haskell: Logs Calendar

Logs on 2022-08-17 (liberachat/#haskell)

00:02:29 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
00:18:07 sudden joins (~cat@user/sudden)
00:21:36 × xff0x_ quits (~xff0x@2405:6580:b080:900:55a5:3141:91aa:3e87) (Ping timeout: 244 seconds)
00:22:20 Guest9035 joins (~Guest90@221x252x204x99.ap221.ftth.ucom.ne.jp)
00:23:02 matthewmosior joins (~matthewmo@173.170.253.91)
00:24:19 × Guest9035 quits (~Guest90@221x252x204x99.ap221.ftth.ucom.ne.jp) (Client Quit)
00:25:01 snak joins (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp)
00:28:19 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
00:32:12 tomboy64 joins (~tomboy64@user/tomboy64)
00:32:30 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:32:30 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:32:30 wroathe joins (~wroathe@user/wroathe)
00:32:45 <dragestil> are there any tools / scripts cleaning up space used by ghcup/cabal/stack/dist-newstyle etc
00:33:51 <dragestil> they can take up rather large space and grow fast as I do dev work, and i cannot just rm -rf them because there are things i still want
00:34:35 <hpc> the unserious answer is nix-store --gc :D
00:34:59 <dragestil> ha
00:35:43 <hpc> pretty sure all those files exist in a few dotfile directories so you don't have to go searching everywhere
00:36:12 <hpc> but i don't remember how much of it you need to keep to not lose configs and such
00:36:36 <hpc> oh, you said that
00:36:55 <dragestil> for me it's not really the configs, but if i delete the wrong thing then there will be repeated work / compiling / downloading etc.
00:37:27 <hpc> ah, that i definitely don't know
00:38:43 <dragestil> ~/.ghcup/ghc ~/.cabal/store and ~/.stack/{programs,pantry,snapshots} have some of the biggest appetite for diskspace
00:38:44 <hpc> i don't think anything saves reverse dependencies of all those files, so you might just need to deal with repeat work
00:39:02 <hpc> or do some kind of find -atime | xargs rm
00:39:43 <hpc> and let it be a timed cache rather than a reference-counted cache, as it were
00:39:51 PiDelport joins (uid25146@id-25146.lymington.irccloud.com)
00:45:37 × ystael quits (~ystael@user/ystael) (Ping timeout: 268 seconds)
00:46:04 <dragestil> found https://gist.github.com/filterfish/d138fa6cafd515399a54747976da7cc5
00:48:01 king_gs joins (~Thunderbi@187.201.216.244)
00:52:00 Me-me joins (~Me-me@146.102.215.218.dyn.iprimus.net.au)
00:53:07 xff0x_ joins (~xff0x@2405:6580:b080:900:de8c:bb7c:e24e:39b8)
00:58:26 zebrag joins (~chris@user/zebrag)
01:00:24 × xff0x_ quits (~xff0x@2405:6580:b080:900:de8c:bb7c:e24e:39b8) (Ping timeout: 256 seconds)
01:04:35 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
01:07:27 × king_gs quits (~Thunderbi@187.201.216.244) (Read error: Connection reset by peer)
01:07:34 king_gs1 joins (~Thunderbi@2806:103e:29:da7a:c1c9:7ec0:dc35:1f68)
01:09:53 king_gs1 is now known as king_gs
01:10:24 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:15:01 Wstfgl0 joins (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net)
01:16:32 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:16:42 × Me-me quits (~Me-me@146.102.215.218.dyn.iprimus.net.au) (Quit: Going offline, see ya! (www.adiirc.com))
01:16:50 Wstfgl0 is now known as Me-me
01:17:10 × Me-me quits (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host)
01:17:10 Me-me joins (~me-me@user/me-me)
01:18:05 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds)
01:20:16 × Allio84 quits (~Android@79-74-233-27.dynamic.dsl.as9105.com) (Remote host closed the connection)
01:27:24 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
01:30:29 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
01:32:26 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
01:34:38 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
01:34:52 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:37:57 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
01:40:12 [Leary] joins (~Leary]@122-58-223-158-adsl.sparkbb.co.nz)
01:49:23 × dsrt^ quits (~dsrt@50.231.67.43) (Ping timeout: 248 seconds)
01:52:27 × Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
01:53:57 Teacup joins (~teacup@user/teacup)
01:54:43 × vglfr quits (~vglfr@145.224.94.221) (Ping timeout: 248 seconds)
01:59:31 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
02:00:03 × alp_ quits (~alp@user/alp) (Ping timeout: 248 seconds)
02:00:31 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
02:01:06 azimut joins (~azimut@gateway/tor-sasl/azimut)
02:01:34 nate4 joins (~nate@98.45.169.16)
02:06:42 × jespada quits (~jespada@2803:9800:9842:8ca9:697e:9a9e:7c3a:1937) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:09:21 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:09:21 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:09:21 finn_elija is now known as FinnElija
02:15:27 dsrt^ joins (~dsrt@50.231.67.43)
02:17:10 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
02:20:31 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
02:24:49 × td_ quits (~td@muedsl-82-207-238-061.citykom.de) (Ping timeout: 252 seconds)
02:26:44 td_ joins (~td@94.134.91.250)
02:27:51 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:37:45 vglfr joins (~vglfr@145.224.94.221)
02:39:07 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.6)
02:51:45 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
02:51:51 matthewmosior joins (~matthewmo@173.170.253.91)
03:01:01 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
03:04:13 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
03:05:39 × vysn quits (~vysn@user/vysn) (Ping timeout: 256 seconds)
03:08:51 × dsrt^ quits (~dsrt@50.231.67.43) (Ping timeout: 248 seconds)
03:09:53 matthewmosior joins (~matthewmo@173.170.253.91)
03:14:35 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
03:25:24 dsrt^ joins (~dsrt@50.231.67.43)
03:25:32 × aeka quits (~aeka@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 244 seconds)
03:34:41 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:39:20 × texasmynsted quits (~texasmyns@99.96.221.112) (Ping timeout: 255 seconds)
03:39:59 × dsrt^ quits (~dsrt@50.231.67.43) (Ping timeout: 268 seconds)
03:40:18 matthewmosior joins (~matthewmo@173.170.253.91)
03:44:44 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
03:47:26 × mvk quits (~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 255 seconds)
03:47:49 dsrt^ joins (~dsrt@50.231.67.43)
03:55:59 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
04:03:47 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
04:05:07 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
04:05:44 stiell joins (~stiell@gateway/tor-sasl/stiell)
04:08:58 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
04:12:52 matthewmosior joins (~matthewmo@173.170.253.91)
04:15:26 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
04:17:12 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
04:19:44 kannon joins (~NK@135-180-47-54.fiber.dynamic.sonic.net)
04:19:47 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
04:25:00 × dsrt^ quits (~dsrt@50.231.67.43) (Ping timeout: 268 seconds)
04:30:08 × snak quits (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp) (Quit: Client closed)
04:30:33 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
04:36:53 × luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 256 seconds)
04:41:38 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
04:45:26 Pickchea joins (~private@user/pickchea)
04:46:03 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
04:48:09 matthewmosior joins (~matthewmo@173.170.253.91)
04:48:21 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
04:48:25 Midjak joins (~Midjak@82.66.147.146)
04:52:41 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
04:53:41 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
04:53:55 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
04:54:02 stiell joins (~stiell@gateway/tor-sasl/stiell)
04:56:31 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
04:59:11 abraham joins (~abraham@159.89.183.132)
04:59:30 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
05:00:03 stiell joins (~stiell@gateway/tor-sasl/stiell)
05:01:23 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
05:09:59 mbuf joins (~Shakthi@122.165.55.71)
05:13:23 × jargon quits (~jargon@184.101.168.117) (Remote host closed the connection)
05:17:05 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
05:19:14 × abraham quits (~abraham@159.89.183.132) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:20:11 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
05:20:30 × king_gs quits (~Thunderbi@2806:103e:29:da7a:c1c9:7ec0:dc35:1f68) (Ping timeout: 256 seconds)
05:22:14 matthewmosior joins (~matthewmo@173.170.253.91)
05:25:02 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
05:26:44 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
05:27:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
05:27:59 × kannon quits (~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
05:30:33 king_gs joins (~Thunderbi@187.201.216.244)
05:31:04 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
05:35:55 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
05:39:01 jargon joins (~jargon@184.101.168.117)
05:40:20 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
05:42:15 × tompaw quits (~tompaw@static-47-206-100-136.tamp.fl.frontiernet.net) (Ping timeout: 255 seconds)
05:45:38 chomwitt joins (~chomwitt@2a02:587:dc06:ee00:4e2b:7ca9:316d:45c)
05:49:12 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
05:49:13 tompaw joins (~tompaw@static-47-206-100-136.tamp.fl.frontiernet.net)
05:49:39 stiell joins (~stiell@gateway/tor-sasl/stiell)
05:50:33 × chomwitt quits (~chomwitt@2a02:587:dc06:ee00:4e2b:7ca9:316d:45c) (Ping timeout: 256 seconds)
05:52:04 zachel joins (~zachel@user/zachel)
05:55:24 matthewmosior joins (~matthewmo@173.170.253.91)
05:55:46 <sm> dragestil: stack-clean-old
05:55:52 <sm> also ncdu
05:57:24 <dragestil> sm: thanks
05:58:50 aviladev[m] joins (~aviladevm@2001:470:69fc:105::1:cbc7)
05:59:44 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
06:03:32 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
06:05:08 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
06:05:15 coot joins (~coot@213.134.176.158)
06:05:25 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:06:21 × coot quits (~coot@213.134.176.158) (Client Quit)
06:06:48 coot joins (~coot@213.134.176.158)
06:08:35 × jargon quits (~jargon@184.101.168.117) (Remote host closed the connection)
06:14:58 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
06:17:22 jargon joins (~jargon@184.101.168.117)
06:19:15 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 248 seconds)
06:26:50 × jargon quits (~jargon@184.101.168.117) (Remote host closed the connection)
06:28:19 matthewmosior joins (~matthewmo@173.170.253.91)
06:31:27 MajorBiscuit joins (~MajorBisc@c-001-030-027.client.tudelft.eduvpn.nl)
06:32:34 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
06:32:53 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
06:33:01 alternateved joins (~user@staticline-31-183-146-203.toya.net.pl)
06:36:52 × sus quits (zero@user/zeromomentum) (Quit: the lounge - https://webirc.envs.net)
06:39:06 jargon joins (~jargon@184.101.168.117)
06:39:07 × king_gs quits (~Thunderbi@187.201.216.244) (Read error: Connection reset by peer)
06:40:15 chele joins (~chele@user/chele)
06:40:30 king_gs joins (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
06:41:13 × king_gs quits (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Client Quit)
06:41:52 Guest87 joins (~Guest87@cpc77311-basf12-2-0-cust212.12-3.cable.virginm.net)
06:41:56 × jargon quits (~jargon@184.101.168.117) (Remote host closed the connection)
06:42:20 × Guest87 quits (~Guest87@cpc77311-basf12-2-0-cust212.12-3.cable.virginm.net) (Client Quit)
06:43:29 × alternateved quits (~user@staticline-31-183-146-203.toya.net.pl) (Read error: Connection reset by peer)
06:43:56 alternateved joins (~user@staticline-31-183-146-203.toya.net.pl)
06:44:13 acidjnk joins (~acidjnk@p200300d6e7137a0595bd943540671dc0.dip0.t-ipconnect.de)
06:46:50 lottaquestions joins (~nick@104.221.24.83)
06:47:52 jargon joins (~jargon@184.101.168.117)
06:48:47 × lottaquestions_ quits (~nick@2607:fa49:503e:7100:6db8:6536:53f:14df) (Ping timeout: 255 seconds)
06:49:30 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
06:58:05 cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it)
07:00:30 matthewmosior joins (~matthewmo@173.170.253.91)
07:02:20 nate4 joins (~nate@98.45.169.16)
07:04:12 cfricke joins (~cfricke@user/cfricke)
07:04:42 ddellacosta joins (~ddellacos@143.244.47.84)
07:04:59 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
07:05:22 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:05:41 mmhat joins (~mmh@p200300f1c712fb1cee086bfffe095315.dip0.t-ipconnect.de)
07:07:31 yvan-sraka joins (~yvan-srak@57.red-81-44-3.dynamicip.rima-tde.net)
07:07:59 × gdown quits (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
07:08:37 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
07:09:17 snak joins (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp)
07:10:09 lortabac joins (~lortabac@2a01:e0a:541:b8f0:82fa:1061:3168:3965)
07:10:12 riverside joins (~riverside@213.205.241.143)
07:10:16 × ddellacosta quits (~ddellacos@143.244.47.84) (Ping timeout: 268 seconds)
07:10:41 <riverside> hello morning people
07:10:49 <riverside> SO
07:10:55 <riverside> i know what it is now
07:10:57 <riverside> its got
07:10:59 <riverside> goto
07:11:06 <riverside> on a graph
07:11:18 <riverside> as a morphism in a gategory of objects
07:11:32 <riverside> in programing
07:12:01 ddellacosta joins (~ddellacos@89.45.224.34)
07:12:06 <riverside> functional programing by variable dereferencing
07:12:20 <riverside> acheives a nonlinear program graph
07:12:25 × cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Read error: Connection reset by peer)
07:13:40 <riverside> easyest way to explain it is notionally as a "turing graph" by analogy to the "turing tape" style line numbered programming languages like bbc basic
07:14:15 <riverside> and im yammering on because we have lists and not graphs as a language primative!
07:14:44 <riverside> so i cant express it within itself, which is annoying me into articulating this
07:15:58 <riverside> point being about index algebra and pointers
07:16:11 <riverside> which we get by default by abstracting over lenses
07:17:15 alp_ joins (~alp@user/alp)
07:17:49 <riverside> and i think there is a correspondence between a nutszoid re-phrasing of what a graph is, as a monadically tailed list, and a monadically encapsulated deconstructor-reconstructor pair
07:17:56 ccntrq joins (~Thunderbi@172.209.94.92.rev.sfr.net)
07:18:10 <riverside> such as to retain reconstructional positional data as data retained during deconstruction
07:18:36 <riverside> which i think is just a pair of ints for a tree as a free list, modulo something to do with cycles
07:18:41 <riverside> ("just dig")
07:18:55 <riverside> or just, dug
07:20:08 <ski> riverside : lists are not a language primitive. they just have some convenient syntactic sugar
07:20:40 <ski> (and i think most of what you said make little sense to other people in here)
07:20:48 <riverside> and then because toList exists from the traversable implementation, and we need to tackle these damn cycles, you end up with solving a sparks matrix at type level to add connectivity like a wire switchboard
07:21:08 <riverside> between positions in the list
07:21:30 <riverside> and that type level explication by constructor annotation is the thing i think should be primitivised
07:21:56 <riverside> ski it is as union in GADT
07:22:13 <riverside> choice being multiple constructors
07:22:14 <ski> i've no idea what you're talking about, at this point
07:22:29 <riverside> i mean the generic abstraction over cons is a language primative
07:22:37 <riverside> but cant be annotated to explicate cycles
07:22:47 <riverside> ski: thanks for that!
07:22:49 cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it)
07:22:54 <ski> np
07:22:55 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
07:23:13 <Franciman> do you think that teaching functional programming to young people can be effective and useful?
07:23:33 <merijn> Franciman: Sure, why not?
07:23:36 <riverside> im not sure thats the kind of thing you should be asking
07:23:39 <merijn> Also, define "young"
07:23:54 <riverside> awkward
07:23:55 <ski> @quote rules.of.Go
07:23:55 <lambdabot> sarah says: "But I don't _want_ functional programming!" -- Sarah Peyton Jones, age 11, upon hearing the rules of Go
07:24:11 × cosimone quits (~user@93-44-186-171.ip98.fastwebnet.it) (Read error: Connection reset by peer)
07:24:16 <Franciman> merijn: hm sure, i think around 11yo yeah ahha
07:24:28 <riverside> sounds like it was being offered as food
07:25:03 <riverside> what are the rules of Go?
07:25:11 <riverside> "run away!"
07:25:32 <Franciman> it's really interesting how for young people you must find simple semantics, which is basically what the ultra advanced research does to explain super hard programs
07:26:26 <riverside> boring!
07:27:10 <merijn> You can teach 11 year olds basically anything IFF you can get their interest
07:27:12 <riverside> anyway, who else are you going to teach functional programming to?
07:27:33 <earthy> everyone? :)
07:27:38 <riverside> you lot already know the answers
07:27:53 <riverside> wheres my gofur?
07:28:08 <Franciman> eheh that's why i was thinking about frp, so they can make videogames and animations
07:28:09 <riverside> "hes pointing at a graph!"
07:28:25 cosimone joins (~user@93-44-186-171.ip98.fastwebnet.it)
07:28:29 <Franciman> but frp implementations i found are technically challenging, it would require like 1 year of ball busting
07:28:33 <riverside> and all the functions and the programs flowing on the graph, etc.
07:29:01 <riverside> i need connectivity!
07:29:27 <riverside> i think its a list language
07:29:38 <riverside> er, how you implement it, uses union gadt
07:29:59 <riverside> like, its ends up functional by on a datatype its constructed linearly
07:30:10 <riverside> you have to match up the connectivity at the constructor
07:30:27 <riverside> having listified the program graph
07:30:33 jgeerds joins (~jgeerds@55d46bad.access.ecotel.net)
07:31:28 <riverside> i tried to write it - but i broke both my wrists and the steering wheel came off in my hands, with the rest of the car disintegrated on the road around me
07:31:48 <riverside> a type error!
07:31:58 <riverside> bastard list language constructors
07:32:18 <riverside> i want an interface to write those without getting so much type error wrist cramp
07:32:27 <riverside> such that matches the compiler
07:32:34 <riverside> now i should really understand what i mean
07:32:36 <riverside> it evaluates
07:32:47 <riverside> program in a datatype, run it as a function
07:33:04 matthewmosior joins (~matthewmo@173.170.253.91)
07:33:10 <riverside> lexer parser, compiler thing
07:33:48 <riverside> i cant usually get the constraints at the constructor and the recursion which consumes the function list to match up nicely
07:34:07 <riverside> different linear languages being specified by the constraint and evaluation
07:34:39 cfricke joins (~cfricke@user/cfricke)
07:34:54 <riverside> simplest on is just a function list of a->a which folds with . for evaluation with id as a basecase
07:35:03 <riverside> thats the specification of a linear language
07:35:53 <riverside> generally you have functions taking several arguments, with branching and variable reuse for cycles
07:36:22 <riverside> reuse *within itself* *requiering reuse* (which is what the linear types thing is all about)
07:36:30 × ddellacosta quits (~ddellacos@89.45.224.34) (Ping timeout: 256 seconds)
07:36:47 polyphem joins (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17)
07:37:40 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
07:37:50 <riverside> recursive function definitions in functional programing, by reusing variables defined in the recursive call, are nonlinear by nature
07:38:12 <riverside> which defines what we mean by linear types
07:38:21 ddellacosta joins (~ddellacos@143.244.47.71)
07:38:22 <riverside> now, since this is not recursive
07:38:34 <riverside> if we do have linear types
07:38:52 <riverside> then no recursive function definitions, and no nonlinear program graphs
07:39:03 <riverside> which is whats up with all these annotations at the constructor
07:39:22 <riverside> nonlinear languages arising from linear programs
07:39:37 zitkat joins (~zitkat@router-kraduha2-nat-c.pilsfree.net)
07:39:47 <riverside> nonlinear languages arising from linear programing languages such as haskell with linear types
07:40:15 <riverside> or defining program graphs linearly via gadt union constructors
07:41:20 <riverside> this forms the basecase and recursive step elluding to a higherarchy of higher nonlinear languages
07:41:38 <riverside> nonlinear languages arising from linear ones
07:41:49 <riverside> but i need these damn graph primatives!!
07:45:06 <riverside> idk about trying to teach haskell, but i wish someone would do that for me
07:45:09 takuan joins (~takuan@178-116-218-225.access.telenet.be)
07:45:59 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:46:56 <riverside> i want nonlinear types
07:47:26 <riverside> which i have because gadt syntax can be recursive, binding types *linearly* at top level
07:49:15 <riverside> nonlinearly*
07:49:31 <riverside> raising the question of linear kinds#
07:49:41 <Axman6> what on earth is going on
07:49:46 <riverside> idk
07:50:09 <riverside> i think haskell is here
07:51:51 <riverside> basically everything i demand of the type system is here, except higher levity linearity
07:52:15 <riverside> does it make sense?
07:52:24 <riverside> i mean, i motivated it well sure
07:52:32 <riverside> but i cant envisage it
07:52:35 <riverside> what would it be
07:52:55 <riverside> "types you can only use once" doesnt sound right to me
07:53:16 <riverside> its supposed to preclude some nonlinear pointer on a type level program graph
07:53:18 <riverside> oh!
07:53:20 <riverside> cool
07:53:45 <riverside> i swear im onto something!
07:54:14 <riverside> (irony is i think because its such a centeral thing this graph monad in programing languages as programs monad)
07:54:47 <riverside> makes too much sense not to be the thing
07:54:59 <riverside> thats whats doing my head in about it
07:55:03 × yvan-sraka quits (~yvan-srak@57.red-81-44-3.dynamicip.rima-tde.net) (Remote host closed the connection)
07:55:08 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
07:55:38 <riverside> "todo with nonlinear programming at higher levity"
07:55:55 <riverside> "something something language monad"
07:56:34 <riverside> and its going pointers which is cool
07:56:39 <riverside> starts with goto also
07:57:17 <riverside> variable names instead of line numbers is the thing that does it
07:57:22 <riverside> go functional programs!
07:57:28 <riverside> (lambda man away!)
07:58:38 <riverside> so something about kind level polymorphism, according to the name of the language extension
07:58:55 <riverside> PolyKinds? right?
07:58:57 nilradical joins (~nilradica@user/naso)
07:59:34 <riverside> even gives variable re-use (the central thing of linearity) *through* levities
07:59:54 <riverside> then you get dependent programming, yeah im going to smoke
08:00:15 <riverside> linear polykinds? proposal?
08:01:12 fserucas|eod joins (~fserucas|@46.50.4.9)
08:01:26 <riverside> now i just need robots that teach themselves how to imagine reality
08:01:51 × fserucas|eod quits (~fserucas|@46.50.4.9) (Client Quit)
08:02:06 fserucas|eod joins (~fserucas|@46.50.4.9)
08:04:48 <riverside> kind of scared of dying when i hit compile though as reality spawns
08:05:09 matthewmosior joins (~matthewmo@173.170.253.91)
08:05:11 <riverside> its a compile time simulation monad!
08:05:24 <riverside> *argh my mind*
08:05:49 <riverside> "give him less functions"
08:05:52 <riverside> im going...
08:05:53 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
08:07:01 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:07:05 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
08:07:37 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
08:09:47 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
08:13:42 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:14:22 <tdammers> whoa.
08:14:31 benin0 joins (~benin@183.82.30.34)
08:17:50 vysn joins (~vysn@user/vysn)
08:18:37 mvk joins (~mvk@2607:fea8:5ce3:8500::a1ec)
08:23:57 ubert joins (~Thunderbi@178.165.179.220.wireless.dyn.drei.com)
08:24:36 kannon joins (~NK@135-180-47-54.fiber.dynamic.sonic.net)
08:25:30 arjun joins (~arjun@user/arjun)
08:25:35 <arjun> hi
08:26:01 <arjun> where can i read more about newtype wrapping types for orphan instances ?
08:26:31 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
08:26:52 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
08:27:54 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
08:29:08 × kannon quits (~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds)
08:29:57 <chreekat> arjun: do you mean making a newtype for a 3rd party type (something defined in a dependency) so that you can give it a non-orphan instance?
08:32:36 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
08:33:20 × nilradical quits (~nilradica@user/naso) (Remote host closed the connection)
08:34:08 nilradical joins (~nilradica@user/naso)
08:34:12 <arjun> chreekat not exactly but i'd be happy to read that as well. imagine TH thing that automatically makes some boilerplate instances for some types. some more complicated record types end up having some common member types, which end up having multiple instances defined. i was wondering if i could wrap them in a newtype and how would that work ?
08:35:47 <arjun> but the Typeclasses being boilerplated are almost always a third party dep, so you might be right.
08:36:46 CiaoSen joins (~Jura@p200300c95738a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
08:37:56 matthewmosior joins (~matthewmo@173.170.253.91)
08:38:50 × nilradical quits (~nilradica@user/naso) (Ping timeout: 256 seconds)
08:40:39 <dminuoso> tdammers: Oh I bet its just what-was-this-markov-chain-persons-name-again
08:42:15 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
08:48:34 <ski> they've used multiple nicks
08:51:10 alp_ is now known as alpm
08:52:40 × alpm quits (~alp@user/alp) (Quit: Leaving)
08:53:33 alp- joins (~alp@user/alp)
08:53:35 × Me-me quits (~me-me@user/me-me) (Quit: Disconnecting on purpose.)
08:54:05 Me-me joins (~me-me@v.working.name)
08:55:22 × Me-me quits (~me-me@v.working.name) (Changing host)
08:55:22 Me-me joins (~me-me@user/me-me)
08:57:31 × vglfr quits (~vglfr@145.224.94.221) (Ping timeout: 252 seconds)
09:00:23 vglfr joins (~vglfr@145.224.94.221)
09:00:24 × CiaoSen quits (~Jura@p200300c95738a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
09:03:26 × zitkat quits (~zitkat@router-kraduha2-nat-c.pilsfree.net) (Remote host closed the connection)
09:03:28 × vglfr quits (~vglfr@145.224.94.221) (Read error: Connection reset by peer)
09:03:39 zitkat joins (~zitkat@router-kraduha2-nat-c.pilsfree.net)
09:04:00 nilradical joins (~nilradica@user/naso)
09:05:21 ardell joins (~ardell@user/ardell)
09:06:49 × ddellacosta quits (~ddellacos@143.244.47.71) (Ping timeout: 268 seconds)
09:08:10 <tdammers> "drugs" or "youthfulness" seem more plausible explanations to me than "markov chain" in this particular case
09:08:22 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
09:08:45 ddellacosta joins (~ddellacos@89.45.224.216)
09:08:46 <dminuoso> Maybe a regression in their markov chain code? :)
09:09:06 <dminuoso> At times their output was even more gibberish
09:09:25 <[exa]> drugs, youthfulness and monads
09:11:08 matthewmosior joins (~matthewmo@173.170.253.91)
09:11:25 luffy joins (~chenqisu1@183.217.201.23)
09:11:30 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:15:29 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
09:23:55 <merijn> tdammers: I mean, it's like "beaky, but less likable"
09:25:12 × nilradical quits (~nilradica@user/naso) (Remote host closed the connection)
09:26:00 nilradical joins (~nilradica@user/naso)
09:30:43 × nilradical quits (~nilradica@user/naso) (Ping timeout: 248 seconds)
09:34:22 <tdammers> I'd file "monads" under "drugs"
09:36:59 CiaoSen joins (~Jura@p200300c95738a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
09:37:56 nilradical joins (~nilradica@user/naso)
09:42:18 × nilradical quits (~nilradica@user/naso) (Ping timeout: 256 seconds)
09:45:44 <int-e> Hey I can get out of this monad any time I want!
09:45:47 matthewmosior joins (~matthewmo@173.170.253.91)
09:47:16 <tdammers> int-e: unsafePerformIO, not even once
09:48:55 <merijn> tdammers: You mean "unsafePerformIO, maybe once maybe more" :p
09:49:46 <dminuoso> Maybe we should include `unsafePerform :: Monad m => m a -> a` to Monad, that would address so many beginner problems.
09:49:56 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
09:56:10 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:82fa:1061:3168:3965) (Quit: WeeChat 2.8)
09:56:15 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:57:28 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
09:58:00 jpds joins (~jpds@gateway/tor-sasl/jpds)
09:58:44 kuribas joins (~user@ptr-17d51eo65n4u3gc42wc.18120a2.ip6.access.telenet.be)
09:59:02 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
09:59:40 lortabac joins (~lortabac@2a01:e0a:541:b8f0:8880:3b7c:b31c:90c0)
10:00:11 nilradical joins (~nilradica@user/naso)
10:00:58 arjun_ joins (~arjun@user/arjun)
10:01:51 × arjun_ quits (~arjun@user/arjun) (Remote host closed the connection)
10:03:09 × arjun quits (~arjun@user/arjun) (Ping timeout: 252 seconds)
10:04:47 × nilradical quits (~nilradica@user/naso) (Ping timeout: 268 seconds)
10:05:29 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
10:07:11 <tdammers> while we're at it, how about making types optional, allowing destructive variable updates, and automatically injecting unsafePerform as needed
10:07:52 stiell joins (~stiell@gateway/tor-sasl/stiell)
10:09:39 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
10:10:20 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
10:10:22 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:8880:3b7c:b31c:90c0) (Ping timeout: 268 seconds)
10:10:39 <ski> we already have `-fdefer-type-errors', i guess .. but we could ask to get our linear implicit parameters back ?
10:10:42 jpds joins (~jpds@gateway/tor-sasl/jpds)
10:10:43 lortabac joins (~lortabac@2a01:e0a:541:b8f0:603f:e09d:dbc1:db0a)
10:12:09 × mvk quits (~mvk@2607:fea8:5ce3:8500::a1ec) (Ping timeout: 244 seconds)
10:13:53 <kuribas> linear implicit parameters as in idris?
10:14:52 <dminuoso> tdammers: Oh beautiful, so is `f x = x + x where x = 2` going to behave differently depending on optimization level?
10:15:41 <kuribas> dminuoso: where does RHS x refer to?
10:16:44 <dminuoso> We're doing destructive updates, dont ask.
10:16:52 <kuribas> > let f x = x + x where x = 2 in f 3
10:16:53 <lambdabot> 4
10:17:07 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:603f:e09d:dbc1:db0a) (Ping timeout: 248 seconds)
10:17:16 <kuribas> ok, I stumbled into some crazy discussion...
10:18:02 matthewmosior joins (~matthewmo@173.170.253.91)
10:20:49 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
10:21:32 <tdammers> dminuoso: yes, of course. It will also produce different results depending on how often you have called f before.
10:23:37 <dminuoso> tdammers: Also, will calling `f 10` affect a local variable x that is in scope?
10:23:49 <dminuoso> I think making all variables global will avoid scope confusion.
10:24:22 <ski> kuribas : as in e.g. "Fun with Linear Implicit Parameters" by TheHunter in 2005-05 at <https://wiki.haskell.org/The_Monad.Reader/Issue2/FunWithLinearImplicitParameters> (also see <https://downloads.haskell.org/~ghc/6.4.2/docs/html/users_guide/type-extensions.html#linear-implicit-parameters>)
10:24:47 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
10:25:29 <tdammers> ah yes, let's get rid of this stupid "scope" thing, too, and just create variables dynamically when they are first assigned, and then we'll invent some keywords you can use to create them in containing scopes insteads
10:26:35 <ski> i remember, very early on, when learning Haskell, i wondered whether function evaluation was "like CPP macros" (i concluded "no" after testing). what i was wondering was whether it used static/lexical or dynamic scope
10:29:20 <ski> > let f xs | xs <- 0:xs = xs where xs = 1:xs in f (repeat 1)
10:29:22 <lambdabot> [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
10:30:20 <dminuoso> ski: When I taught Haskell to my girlfriend and I explained substitution, she had some similar thoughts.
10:32:16 fef joins (~thedawn@user/thedawn)
10:35:52 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
10:38:59 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:42:33 lortabac joins (~lortabac@2a01:e0a:541:b8f0:82b2:3f67:b114:9dcf)
10:43:30 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
10:47:13 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
10:47:38 vglfr joins (~vglfr@145.224.94.221)
10:49:07 × ubert quits (~Thunderbi@178.165.179.220.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
10:51:10 nilradical joins (~nilradica@user/naso)
10:51:30 ubert joins (~Thunderbi@178.165.179.220.wireless.dyn.drei.com)
10:55:01 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:55:15 __monty__ joins (~toonn@user/toonn)
10:55:24 × nilradical quits (~nilradica@user/naso) (Ping timeout: 256 seconds)
10:55:47 matthewmosior joins (~matthewmo@173.170.253.91)
10:57:45 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
10:58:48 × zitkat quits (~zitkat@router-kraduha2-nat-c.pilsfree.net) (Ping timeout: 256 seconds)
11:05:02 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
11:05:24 nate4 joins (~nate@98.45.169.16)
11:07:47 matthewmosior joins (~matthewmo@173.170.253.91)
11:10:15 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
11:10:27 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds)
11:10:45 jinsun__ joins (~jinsun@user/jinsun)
11:10:45 jinsun is now known as Guest4337
11:10:45 × Guest4337 quits (~jinsun@user/jinsun) (Killed (tantalum.libera.chat (Nickname regained by services)))
11:10:45 jinsun__ is now known as jinsun
11:12:29 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
11:13:51 Feuermagier_ joins (~Feuermagi@213.149.82.60)
11:15:15 xff0x joins (~xff0x@ap007189.d.east.v6connect.net)
11:15:23 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 252 seconds)
11:17:43 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:21:28 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
11:22:35 <qrpnxz> haskell application is like *hygenic* macros :)
11:24:07 <hpc> i just remember that functions are like functions, and it's everyone else that's wrong :D
11:26:34 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
11:31:21 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
11:37:02 × coot quits (~coot@213.134.176.158) (Quit: coot)
11:38:58 zeenk joins (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
11:40:40 matthewmosior joins (~matthewmo@173.170.253.91)
11:41:18 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
11:41:19 × vglfr quits (~vglfr@145.224.94.221) (Read error: Connection reset by peer)
11:42:07 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
11:42:09 nilradical joins (~nilradica@user/naso)
11:42:30 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
11:43:35 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
11:44:57 × nilradical quits (~nilradica@user/naso) (Client Quit)
11:45:07 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:82b2:3f67:b114:9dcf) (Ping timeout: 248 seconds)
11:45:09 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
11:46:23 vglfr joins (~vglfr@145.224.94.221)
11:46:33 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 252 seconds)
11:48:01 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
11:52:18 × ardell quits (~ardell@user/ardell) (Quit: Leaving)
11:54:01 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
11:57:58 jpds joins (~jpds@gateway/tor-sasl/jpds)
12:06:16 × maerwald quits (~maerwald@user/maerwald) (Ping timeout: 268 seconds)
12:10:45 × jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 252 seconds)
12:10:47 × luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 256 seconds)
12:11:21 nattiestnate joins (~nate@180.243.14.130)
12:14:05 matthewmosior joins (~matthewmo@173.170.253.91)
12:15:23 × snak quits (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp) (Quit: Client closed)
12:15:26 maerwald joins (~maerwald@mail.hasufell.de)
12:17:16 azimut joins (~azimut@gateway/tor-sasl/azimut)
12:18:37 luffy joins (~chenqisu1@183.217.201.23)
12:18:42 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
12:19:31 jespada joins (~jespada@2803:9800:9842:8ca9:c4f5:ee5c:649d:9f1f)
12:23:29 lortabac joins (~lortabac@2a01:e0a:541:b8f0:76d2:ba9c:ee52:a684)
12:26:17 chomwitt joins (~chomwitt@2a02:587:dc16:4100:bf02:bf7d:726d:6c5b)
12:26:29 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:27:23 × nattiestnate quits (~nate@180.243.14.130) (Quit: WeeChat 3.6)
12:27:53 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
12:28:59 benin04 joins (~benin@183.82.31.103)
12:30:20 × luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 268 seconds)
12:30:36 × benin0 quits (~benin@183.82.30.34) (Ping timeout: 256 seconds)
12:30:37 benin04 is now known as benin0
12:30:56 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds)
12:31:20 cfricke joins (~cfricke@user/cfricke)
12:34:50 × chomwitt quits (~chomwitt@2a02:587:dc16:4100:bf02:bf7d:726d:6c5b) (Ping timeout: 255 seconds)
12:35:33 nattiestnate joins (~nate@180.243.14.130)
12:45:56 zer0bitz joins (~zer0bitz@2001:2003:f748:2000:9186:336c:b8e1:3e66)
12:47:15 × kuribas quits (~user@ptr-17d51eo65n4u3gc42wc.18120a2.ip6.access.telenet.be) (Read error: Connection reset by peer)
12:51:33 zitkat joins (~zitkat@router-kraduha2-nat-c.pilsfree.net)
12:53:34 × Feuermagier_ quits (~Feuermagi@213.149.82.60) (Quit: Leaving)
12:53:46 Feuermagier joins (~Feuermagi@user/feuermagier)
12:56:24 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
12:56:39 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
12:57:09 matthewmosior joins (~matthewmo@173.170.253.91)
12:57:14 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
12:58:07 Feuermagier joins (~Feuermagi@user/feuermagier)
12:59:08 × Feuermagier quits (~Feuermagi@user/feuermagier) (Max SendQ exceeded)
12:59:09 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
12:59:17 matthewmosior joins (~matthewmo@173.170.253.91)
12:59:47 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
13:02:53 coot joins (~coot@213.134.176.158)
13:09:38 aeka joins (~aeka@2606:6080:1002:8:3285:30e:de43:8809)
13:09:52 luffy joins (~chenqisu1@183.217.201.23)
13:12:09 <qrpnxz> stackoverflow cannot be searched without running proprietary javascript :(
13:13:20 geekosaur doesn't trust stackoverflow much anyway
13:13:48 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
13:13:56 <geekosaur> the way their system works, it always seems like newcomers answer newcomers often with incorrect answers…
13:14:22 <geekosaur> (because the experts have to balance answers with moderation)
13:15:50 alp- is now known as alp
13:18:13 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
13:19:18 ski . o O ( "Why I no longer contribute to StackOverflow" by ttmrichter (aka Michael T. Richter) in 2013-12 at <https://web.archive.org/web/20140104210553/http://michael.richter.name/blogs/why-i-no-longer-contribute-to-stackoverflow/> )
13:19:21 × luffy quits (~chenqisu1@183.217.201.23) (Ping timeout: 256 seconds)
13:20:54 riverside joins (~riverside@213.205.241.143)
13:21:07 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
13:21:07 waldo joins (~waldo@user/waldo)
13:21:09 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
13:22:29 cheater joins (~Username@user/cheater)
13:22:50 <tdammers> for me, SO stopped being fun pretty early on
13:25:14 <geekosaur> my experience is pretty much ttmrichter's. I still have an account but I pulled back a couple weeks after getting elevated to a moderator in a number of stackexchange communities
13:27:16 <geekosaur> (although my tags are mostly accurate because I refused to lmgtfy)
13:27:17 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
13:27:57 ystael joins (~ystael@user/ystael)
13:31:05 matthewmosior joins (~matthewmo@173.170.253.91)
13:31:13 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
13:36:54 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
13:37:29 <riverside> can i get key data?
13:37:51 <riverside> like, without having to press enter
13:38:11 <riverside> does it require frp?
13:38:11 <geekosaur> hSetBuffering stdin NoBuffering
13:38:18 <riverside> tried that, it went mental
13:38:32 <riverside> i think the NoBuffering was up too high
13:38:42 <geekosaur> (sadly the ghc runtime conflates buffering with terminal modes; this occasionally breaks programs that expect or need them to be separate)
13:38:59 <riverside> can do aye
13:39:08 <riverside> good ol' IO
13:39:44 <riverside> i guess it needs some keyboard driver?
13:39:54 <riverside> recalling OpenGL had drivers
13:40:30 <riverside> though no buffering stdin is exactly what i was trying to do
13:40:53 <riverside> its supposed to do a command line call depending on what key is pressed
13:40:56 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
13:41:02 jakalx joins (~jakalx@base.jakalx.net)
13:41:13 <riverside> or something like that, idk how to play sound loops otherwise
13:41:39 <riverside> "turn my keyboard literally into a keyboard"
13:41:44 <geekosaur> works fine in programs like ghcup (see `ghcup tui`, although it doesn't play sound)
13:41:56 <maerwald> geekosaur: we can fix that
13:42:19 <riverside> how would ghcup beat normal ghci repl?
13:42:21 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
13:42:27 <riverside> should be the same right?
13:42:29 <maerwald> I mean wrt playing sounds
13:42:29 ec joins (~ec@gateway/tor-sasl/ec)
13:42:37 <maerwald> piano mode
13:42:49 <riverside> so, OpenGl opens a window, as its running the exe
13:43:05 <riverside> dont actually need the stdio there as they probably have keybaord drivers
13:43:32 <jean-paul[m]> You don't need to get anywhere near keyboard drivers for this
13:43:34 <jean-paul[m]> At least on POSIX
13:43:45 <jean-paul[m]> Your process has a pty, you can do stuff to it.
13:44:29 <riverside> i should just use opengl right?
13:44:37 <riverside> i wonder how i get sound though
13:44:48 <riverside> (basically needs keyboard drivers!)
13:45:05 Pickchea joins (~private@user/pickchea)
13:45:10 <riverside> OpenGL and OpenCL?
13:46:15 <jean-paul[m]> Should you use OpenGL to read key strokes in a terminal application? No, certainly not.
13:47:07 <riverside> well how else am i going to get the unbuffered stdio?
13:47:17 <jean-paul[m]> You just want a library like https://hackage.haskell.org/package/posix-pty-0.2.2/docs/System-Posix-Pty.html but for being on the other side of the pty
13:47:29 <geekosaur[m]> I'd have one thread for reading from the terminal and another for the sound
13:47:46 <jean-paul[m]> Oh right it's probably available via a curses wrapper
13:48:03 <jean-paul[m]> https://hackage.haskell.org/package/hscurses maybe
13:48:11 <geekosaur[m]> Don't need a pty, you already have one
13:48:42 <riverside> geekosaur, how would you comunicate between the threads?
13:48:45 <jean-paul[m]> https://hackage.haskell.org/package/hscurses-1.4.2.0/docs/UI-HSCurses-Curses.html#v:getCh
13:49:15 <jean-paul[m]> geekosaur: Sure. I meant a library for using your pty to do interesting things.
13:49:28 <jean-paul[m]> I don't _love_ "curses" as the answer but ... it is an answer.
13:49:36 <geekosaur[m]> And a Chan connecting them
13:50:12 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
13:50:52 azimut joins (~azimut@gateway/tor-sasl/azimut)
13:51:46 <geekosaur[m]> But then I'm thinking of the sound thread doing things like sound shaping (e.g. decay)
13:52:56 × finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer)
13:53:53 <tomsmeding> maerwald: elevator music while it's installing ghc?
13:53:58 finsternis joins (~X@23.226.237.192)
13:54:11 <tomsmeding> or crappy phone-line-compressed waiting music
13:55:18 <sm> could someone explain point 2 at https://github.com/haskell/core-libraries-committee/blob/main/guides/no-monadfail-st-inst.md#how ? I see that it makes GHC happy, but I'm not sure why
13:56:45 <riverside> i need the dll for windows
13:57:09 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
13:57:50 <tomsmeding> sm: GHC desugars a (<-) pattern match in do-notation to using `fail` if it fails
13:58:23 <tomsmeding> `xs' <- someFunc` clearly never fails, and partial matches in a let-binding are always allowed anyway, and will throw a runtime `error`
13:58:46 <riverside> a makefile, really? https://pdcurses.org/wincon/
13:58:47 <tomsmeding> @undo do { x:xs <- l ; return x }
13:58:47 <lambdabot> l >>= \ a -> case a of { x : xs -> return x; _ -> fail ""}
13:58:51 <tomsmeding> sm: ^
13:58:58 <sm> failed partial matches in a let binding call error, not fail ? Ah I see, thanks tomsmeding
13:59:03 <jean-paul[m]> riverside: Eh... I did say "POSIX".
13:59:15 <riverside> to the wsl!
13:59:25 <tomsmeding> sm: I guess it makes sense that the semantics of failed let bindings do not depend on where said let bindings occur :p
13:59:27 <jean-paul[m]> riverside: If you're on Windows you're not writing a terminal app, you're writing something else.
13:59:32 <riverside> its on spt-get?
13:59:35 <riverside> apt*
13:59:42 <sm> what error message do they show, I wonder
13:59:52 <riverside> they say X11
13:59:55 <tomsmeding> > let x:_ = [] in x
13:59:56 <lambdabot> *Exception: <interactive>:3:5-12: Non-exhaustive patterns in x : _
13:59:57 <sm> I'd better use a case and set my own message
13:59:59 matthewmosior joins (~matthewmo@173.170.253.91)
14:00:23 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
14:00:25 <tomsmeding> > do { x:_ <- Just [] ; return x }
14:00:27 <lambdabot> Nothing
14:00:31 <tomsmeding> oh heh
14:00:37 <tomsmeding> MonadFail for Maybe is kinda boring
14:00:42 o-90 joins (~o-90@gateway/tor-sasl/o-90)
14:01:03 <tomsmeding> % do { x:_ <- return [] ; return x }
14:01:03 <yahb2> *** Exception: user error (Pattern match failure in do expression at <interactive>:66:6-8)
14:01:31 × o-90 quits (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection)
14:01:50 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
14:02:19 <riverside> sudo yum install ncurses-devel
14:02:36 <riverside> sudo apt-get install libncurses5-dev libncursesw5-dev
14:02:51 <riverside> should work for windows under wsl
14:04:19 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
14:04:19 <riverside> ok, so then if that works dont need opengl for the window and keyboard interface
14:04:24 <riverside> but then what about the soundcard?
14:04:27 cheater joins (~Username@user/cheater)
14:10:17 <jean-paul[m]> OpenAL maybe (saying this with a full 10 years since the last time I tried to write a program that plays sound)
14:11:57 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
14:12:43 <qrpnxz> for audio i've used pulseaudio, dunno what to use in windows, openal maybe, but something like SDL seem simpler?
14:12:58 × waldo quits (~waldo@user/waldo) (Quit: quit)
14:13:21 Henson joins (~kvirc@207.136.101.195)
14:14:02 <jean-paul[m]> pulseaudio probably being replaced by pipewire now right?
14:14:07 kuribas joins (~user@ptr-17d51em3ydspl0uuwo7.18120a2.ip6.access.telenet.be)
14:14:18 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:14:40 snak joins (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp)
14:14:51 <Henson> I've got a bit of an obscure question. I'm using Haskell to call into C++ to perform a computation. The C++ has been compiled using OpenMP support and does computations in parallel. OpenMP seems to work when I call the function in Haskell as a thread using "async" and makes use of my computer's multiple cores, but when I call the function without spawning it a separate thread, OpenMP....
14:15:50 <qrpnxz> jean-paul[m]: pretty much yes. I wrote my program just when pipewire was becoming a thing
14:16:13 <Henson> only thinks there's 1 CPU core and does not parallelize. Does anybody have any ideas as to why this might be? The executable is compiled with "+RTS -N" so it's able to make use of multiple cores. I thought this might be irrelevant, though, as OpenMP at the C++ layer should do its own thing, but that doesn't seem to be the case.
14:17:48 Furor joins (~colere@about/linux/staff/sauvin)
14:17:51 <tomsmeding> Henson: that probably depends mostly on how exactly OpenMP decides how many threads to start
14:18:19 Henson tries something
14:18:32 <qrpnxz> no idea, but if it works with async you could make a little wrapper that runs it in async but it looks like just another IO action
14:18:39 <tomsmeding> sounds very fishy though
14:19:31 <lortabac> Henson: maybe it's related to bound/unbound threads? https://hackage.haskell.org/package/base-4.16.2.0/docs/Control-Concurrent.html#g:8
14:20:11 × Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 252 seconds)
14:20:12 <sm> riverside: I had good luck using the sox command line tool for cross platform sound
14:20:24 <sm> "To enable sound effects, install sox in PATH: do apt install sox, brew install sox, choco install sox.portable or similar."
14:20:26 <geekosaur> openmp shouldn't care unless there's a setup function involved plus TLS, and even then it sounds backwards because the async would be using an unbound thread
14:21:14 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
14:21:21 matthewmosior joins (~matthewmo@173.170.253.91)
14:22:42 <Henson> hmm, something fishy /is/ going on. Now it seems to be working properly when called directly.
14:22:43 <qrpnxz> to me it makes a little more sense because bound thread may mean that it just sees that one thread?
14:23:00 <qrpnxz> ah well it may just be openmp doesn't always init threads then
14:23:08 <qrpnxz> which make sense
14:23:12 <qrpnxz> because parallel has overhead
14:23:40 <Henson> lortabac: could potentially be related. When using "async" the following non-async direct call was not parallelizing. When switching to "asyncBound" for the parallel test (which worked) the following non-async direct call suddenly was parallelized.
14:24:20 <qrpnxz> if the first threads were still active it may have decided that making more threads was not worth it because they were already put to work?
14:24:24 <Henson> I'll see if I can get the old behaviour back and then force the non-async version to use multiple threads instead of auto-detecting the number of threads, and see what happens
14:25:07 <geekosaur> bound thread just means that the rts always runs the haskell thread on the same cpu thread
14:25:11 kannon joins (~NK@135-180-47-54.fiber.dynamic.sonic.net)
14:25:14 <geekosaur> doesn't change cpu thread visibility
14:25:16 <Henson> qrpnxz: I was simply calling omp_get_num_threads() within a parallel section, which should tell me how many threads OpenMP thinks are available for use.
14:25:37 <geekosaur> and the c++ side will have no clue about the haskell side
14:25:48 <qrpnxz> geekosaur: makes sense
14:26:12 <Henson> geekosaur: yeah, I don't see how the switch from async to asyncBound could affect the non-async call, but it was just an observation. There definitely seems to be something non-deterministic happening, so I'll see if I can figure it out.
14:28:19 <geekosaur> are you making any other calls? visibility (or not) of data in thread-local storage may matter, and that's what bound threads are about is making sure TLS is maintained for foreign calls
14:28:42 <Henson> hmm, could one thing be that the function I'm calling is an IO function that's behind an "unsafePerformIO"? The foreign import is called as "safe" though, and I'm using no-cse and NO-INLINE on the "pure" version of the function, so I think I'm following best-practices for calling this function. The C++ function is also properly referentially-transparent, so I don't think I'm violating any...
14:29:03 <Henson> immutability requirements by using unsafePerformIO. But that's another avenue I can track down to see where the non-determinism is coming from.
14:29:21 <geekosaur> unsafePerformIO shouldn't matter if it's safe and referentially transparent
14:29:27 × kannon quits (~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
14:29:40 <geekosaur> unless you're wrong about the latter, which can happen all too easily
14:30:35 <geekosaur> oh, it's not allowed to block for any reason and I find that invariant somewhat unlikely if it's managing other threads
14:30:36 <Henson> geekosaur: I don't know if OpenMP makes use of TLS, though. I'm using OpenCV function calls within the parallel sections on the C++ functions. Nonetheless, this wouldn't explain how OpenMP suddenly thinks there are more CPUs available.
14:31:01 <geekosaur> but that shouldn't affect the OpenMP side of things, only the ghc runtime
14:31:46 <Henson> geekosaur: it wouldn't block in a way that will cause a deadlock, as it's just parallelizing over a couple expensive embarrasingly-parallel for loops.
14:32:03 × ubert quits (~Thunderbi@178.165.179.220.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
14:33:19 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:76d2:ba9c:ee52:a684) (Quit: WeeChat 2.8)
14:33:31 <geekosaur> mm, actually the blocking constraint comes from "unsafe" which you;re not doing. unsafePerformIO should be fine if the function is actually pure and referentially transparent
14:33:45 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
14:34:58 <Henson> ok, I'll keep smashing this with some hammers and see what happens. You've all given me some ideas of avenues to investigate. Thank you.
14:37:33 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
14:39:21 × maerwald quits (~maerwald@mail.hasufell.de) (Changing host)
14:39:21 maerwald joins (~maerwald@user/maerwald)
14:40:13 <tomsmeding> Henson: I would also be curious whether std::thread::hardware_concurrency() ever disagrees with omp_get_num_threads()
14:40:24 <geekosaur> the real risk from unsafePerformIO is that ghc might enter the extern call twice from different threads, believing that the result can't change regardless of which one returns
14:40:57 <geekosaur> that might conceivably affect the number of visible threads openmp sees, but it also requires that your haskell code admit that possibility to begin with
14:41:00 × snak quits (~snak@221x252x204x99.ap221.ftth.ucom.ne.jp) (Quit: Client closed)
14:41:01 Furor is now known as Colere
14:41:20 <geekosaur> (i.e. is capable of entering the foreign call twice)
14:43:23 <geekosaur> what might conceivably matter here is that the main thread is special (not merely bound) in all OSes and language runtimes. but that would be an odd restriction to affect openMP
14:43:44 <tomsmeding> I would hope that openmp cares not about that
14:43:58 <geekosaur> seeing as how the point of them is to escape those restrictions
14:44:57 <Henson> tomsmeding: I'll add a call to that function as well
14:46:08 riverside joins (~riverside@213.205.241.143)
14:47:37 examors_ is now known as examors
14:47:44 <Henson> tomsmeding: ok, so now the problem has manifested again, and OpenMP and harware_concurrency disagree. OpenMP is wrong, hardware_concurrency is right.
14:47:53 <tomsmeding> interesting!
14:48:14 <tomsmeding> luckily hardware_concurrency() doesn't do anything fishy
14:50:50 <tomsmeding> Henson: is it just omp_get_num_threads() that is wrong, or does the program actually only use one core?
14:51:02 <tomsmeding> in any case, omp_set_num_threads() apparently exists
14:51:44 <Henson> tomsmeding: just tested that. omp_get_num_threads is wrong, and the program does use one core. Even when explicitly instructed to use 2 cores, it only seems to be able to use 1.
14:51:46 <tomsmeding> I'm looking at the openmp spec ( https://www.openmp.org/spec-html/5.0/openmpsu32.html#x51-710002.5.3 ) and I'm realising that knowing nothing about openmp is _not_ conducive to understanding what's going on
14:51:56 <tomsmeding> "The value of the nthreads-var ICV is a list. The runtime call omp_set_num_threads sets the value of the first element of this list, and omp_get_max_threads retrieves the value of the first element of this list." ???????
14:52:37 <tomsmeding> also stuff like: nthreads-var: "There is one copy of this ICV per data environment." -- I wonder, how many data environments do you have?
14:53:22 tomsmeding is completely confused and closes the website
14:53:35 hippoid joins (~idris@c-98-220-13-8.hsd1.il.comcast.net)
14:53:50 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
14:55:11 <tomsmeding> also omp_get_max_threads vs omp_get_num_threads -- according to the above quote, omp_set_num_threads constrols the value that omp_get_MAX_threads returns
14:55:13 <Henson> switching from async to asyncBound also doesn't seem to affect the non-async behaviour of the call, fortunately.
14:55:24 shriekingnoise joins (~shrieking@186.137.167.202)
14:56:02 geekosaur[m] is starting to think this sounds like an uninitialized variable
14:56:32 <tomsmeding> which feels like thread-local storage issues
14:56:36 <geekosaur[m]> Or similar
14:57:38 <geekosaur[m]> Or just a missing initialization call
14:57:43 <Henson> let me try a trick that worked in the past for TLS issues
14:58:40 <Henson> hmm, no
14:58:58 Henson continues tinkering
15:06:54 nate4 joins (~nate@98.45.169.16)
15:07:03 <ski> > runST (do Just x <- return Nothing; return x)
15:07:04 <lambdabot> *Exception: Pattern match failure in do expression at <interactive>:3:11-16
15:07:11 <ski> > runST (do ~(Just x) <- return Nothing; return x)
15:07:13 <lambdabot> *Exception: <interactive>:3:11-37: Non-exhaustive patterns in Just x
15:07:46 <ski> @undo do ~(Just x) <- return Nothing; return x
15:07:46 <lambdabot> return Nothing >>= \ ~(Just x) -> return x
15:09:10 × alternateved quits (~user@staticline-31-183-146-203.toya.net.pl) (Remote host closed the connection)
15:12:06 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
15:15:32 × coot quits (~coot@213.134.176.158) (Quit: coot)
15:17:00 acidjnk_new joins (~acidjnk@p200300d6e7137a0595bd943540671dc0.dip0.t-ipconnect.de)
15:20:03 × acidjnk quits (~acidjnk@p200300d6e7137a0595bd943540671dc0.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
15:22:53 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
15:23:31 ec joins (~ec@gateway/tor-sasl/ec)
15:25:26 × tinwood_ quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Remote host closed the connection)
15:26:16 Taneb0 joins (~Taneb@runciman.hacksoc.org)
15:26:38 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
15:26:38 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
15:26:38 tinwood joins (~tinwood@canonical/tinwood)
15:27:19 × Taneb quits (~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0) (Ping timeout: 244 seconds)
15:27:55 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:28:33 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
15:28:38 nilradical joins (~nilradica@user/naso)
15:30:19 <qrpnxz> imagine if MonadState RealWord# IO worked. Then we could rewind the universe 😈. STM is a little bit like that. I wonder if you could actually wrap an SQL API (or other transactional API) with STM such that you could do work with them the same way one does TVars. That's be pretty cool.
15:31:38 <geekosaur> STM doesn't work across processes, much less machines
15:31:50 <geekosaur> and anything more than a couple of TVars would work poorly
15:32:02 <c_wraith> It'd be limited in the same ways STM is.. No ability to make decisions based on IO inside a transaction
15:32:25 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
15:32:31 <c_wraith> eh, STM doesn't *need* to be implemented with optimistic locking.
15:34:37 <qrpnxz> STM Tvars don't work across processes doesn't mean other abstractions couldn't.
15:36:02 <c_wraith> the IO thing is a big issue, though. Databases are often used in ways where that would matter.
15:36:49 <c_wraith> And if you decide to allow arbitrary IO inside of transactions, you need to get rid of the automatic retry that makes STM work so nicely.
15:37:53 <qrpnxz> i would ofc want both a way to do sql transactions in both IO and STM, not just STM.
15:38:07 × bliminse quits (~bliminse@user/bliminse) (Quit: leaving)
15:39:41 <qrpnxz> i'm just not sure what it would take to create a safe SQL version in STM. I don't know what way to tell haskell "if the STM fails, do this". I guess it's just not made for that, but it seems general enough to be useful. Like a resourcet but for transactions.
15:39:52 jgeerds joins (~jgeerds@55d46bad.access.ecotel.net)
15:40:25 f-a joins (f2a@f2a.jujube.ircnow.org)
15:40:40 f-a parts (f2a@f2a.jujube.ircnow.org) ()
15:41:11 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:41:40 <c_wraith> there's an idea there, but I'm afraid it wouldn't end up much like STM. It'd be something with relatively different semantics.
15:42:41 <c_wraith> One relatively obvious thing is a wrapper for existing database transactions where you turn up the isolation level all the way to serializable, then provide an interface that doesn't allow IO and does automatic retries
15:43:21 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
15:43:40 <c_wraith> That would cover a lot of use cases with a high degree of safety
15:44:33 <riverside> anyone with any experience with SDL_Audio?
15:44:45 <riverside> https://hackage.haskell.org/package/sdl2-2.5.3.3/docs/SDL-Audio.html
15:45:45 <ski> qrpnxz : fwiw, Mercury can memoize/table world state tokens, for "retry" (going back in time) for debugging. primitive operations will merely repeat the result they gave last time, rather than actually performing the I/O
15:45:50 <riverside> why not just have a propper buffered time window segmentation
15:46:22 <qrpnxz> ski: that's nice.
15:46:24 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
15:46:49 <riverside> its a "live streaming setting" specifically
15:47:01 matthewmosior joins (~matthewmo@173.170.253.91)
15:47:09 <qrpnxz> ski: i can't find the relevant mercury thing
15:47:22 <riverside> mailboxes work from actor models
15:48:13 <riverside> for thread interaction, and they read then synchronously in a one at a time nearest neighbour factorisation of some combination of seperate threads combining to make an overall function graph
15:48:52 <riverside> this requires something like a disk write, though i think a UDP port might work, or something for fixed word sizes
15:49:09 <riverside> otherwise TCP i guess
15:49:13 <ski> qrpnxz : "Idempotent I/O for safe time travel" by Zoltan Somogyi in 2003-09 at <https://www.mercurylang.org/documentation/papers.html#aadebug03-paper>
15:49:36 <qrpnxz> riverside: API seems to take a callback for writing to an audio buffer. What's the problem, exactly?
15:49:51 <qrpnxz> mercury language ah
15:49:53 <qrpnxz> thx
15:50:12 <riverside> i cant get at the soundcard from haskell, i cant make sound come from the speakers or headset
15:50:30 <riverside> code snippit if it exists would be preddy useful
15:50:42 <ski> (iirc, OCaml also has some kind of back-in-time debugging, although i think it relies on regular snapshots, rather than backtracking/trailing or so .. also, i dunno if it does I/O tabling)
15:51:34 <riverside> last time there was a problem with buffers being quite long and introducing lag
15:51:40 <qrpnxz> ski: oh i get that now. Really nice! Sounds kind of expensive tho?
15:52:18 <ski> it says "The overhead of this mechanism is low enough and can be controlled well enough to make it practical to use it to debug computations that do significant amounts of I/O."
15:52:29 <riverside> you really want to be able to follow the build/fold fusion down to emiting actual speaker movements or something
15:52:32 <qrpnxz> but that is neat because it allows you to replay an effectful stream. Which for a lib i'm working on is a big no-no
15:52:44 <riverside> ie not using buffers but being granular through a fold
15:53:33 janus joins (janus@anubis.0x90.dk)
15:54:27 <riverside> and if not, any interface that can emit a buffers worth of sound
15:54:35 <qrpnxz> mmm, no. You need a buffer. I mean, you could abstract away the buffer, but it's always gonna be there. That's how all audio interfaces work. Not buffering (especially in haskell boxed types) would be way too slow.
15:55:06 <riverside> sure, any example of that would do
15:55:31 bliminse joins (~bliminse@user/bliminse)
15:55:47 <riverside> *least sufficient search term straining*
15:56:08 <riverside> the c lib must be easy to build on wsl
15:56:09 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:56:17 <riverside> oh shit and how to do the soundcard through that
15:56:45 <qrpnxz> have you tried not using windows. It's great
15:56:47 <ski> qrpnxz : i guess, vaguely related to lazy I/O as well
15:56:49 <c_wraith> SDL also provides the raw interfaces, direct C bindings of the SDL interfaces
15:56:59 <c_wraith> err, the haskell SDL library also provides....
15:57:10 <riverside> SDL-Audio seemed like it was worth a try
15:57:26 <c_wraith> there's SDL.Raw.Audio
15:58:27 <qrpnxz> sdl haskell lib pretty nice 😃 good to know
15:59:24 <riverside> so this is all a load of givverish to me, is there a higher level interface? https://hackage.haskell.org/package/sdl2-2.5.3.3/docs/SDL-Audio.html
15:59:48 <ski> (fwiw, <https://www.swi-prolog.org/pldoc/man?section=pio> implements lazy I/O, in SWI-Prolog)
16:00:48 <ski> (the lazy list memoizes the characters read from the stream/handle)
16:00:54 <riverside> if your not streaming you can opperato on the transpose of the buffer
16:01:12 <riverside> for the simitanious "per itteration scope"
16:02:01 <riverside> todo with the centrality of state transfer in timeseries
16:02:12 <ski> (and <https://smlfamily.github.io/Basis/stream-io.html> in SML does the same .. although you get a chunk at a time, not just a character)
16:02:49 × nilradical quits (~nilradica@user/naso) ()
16:03:08 <riverside> ski: this is a simple example of monadic tailing
16:03:20 <riverside> they have a sequential graphi in the IO monad emulating a timeseries
16:03:39 <riverside> ListT IO
16:04:17 <c_wraith> funny, that's exactly the type streaming libraries are intended to replace
16:04:49 <riverside> well the IO bit is kind of required for any live interfacing
16:04:55 <riverside> so any interfacing at all i guess
16:05:13 <riverside> could just be an emitter
16:05:23 × jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 248 seconds)
16:05:36 <geekosaur[m]> riverside, I think the only higher level with audio is MIDI patches, which requires MIDI hardware or an emulator
16:05:37 <riverside> oh but yeah, if its to ever have any effect, "the time is now" and if it cant do that
16:05:54 <riverside> needs IO for real woulrd input And output
16:06:14 <riverside> you just dont want to do threading
16:06:46 <riverside> and are having a boundary problem todo with a monad section under bind splitting between within running programs and between them
16:07:20 <riverside> mailboxes partition nicely between running programs in a partitioned program graph
16:07:40 <riverside> implementing a state transfer formalism for "unrolling programs in time"
16:08:02 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:08:02 <riverside> here "time" being its interaction with us here in the real world via IO
16:08:09 <riverside> IO = Time in this setting
16:08:18 <riverside> or like, RealTime
16:08:34 <riverside> as in, when the thread communications happen
16:08:41 <riverside> or their buffered counterpart
16:08:55 <riverside> buffers can transpose so no need for composition of scanners
16:09:14 <riverside> can get column wise calculations that way
16:09:24 <riverside> by using map
16:09:31 <riverside> and transpose
16:09:40 <riverside> transpose somehow neatly doing all the scanning part there
16:09:45 ccapndave joins (~ccapndave@mob-194-230-146-204.cgn.sunrise.net)
16:10:53 kenran joins (~kenran@200116b82b7885000a30634e15848455.dip.versatel-1u1.de)
16:11:31 <riverside> and you can of course scan it aswell, then instead of scanning over the seperate threads, your scanning over the combined heads with one opperation, which has the full "vector" or whatever, of state data for the current time segment
16:12:02 <riverside> per-itteration state transfer within the finite time widthed buffer
16:12:46 <riverside> and then the concurrency is when this spreads between programs
16:13:29 <riverside> again, instead of scanning monoid concatination, which is required usually in generation of blocks of data
16:13:55 <riverside> if able to simply map over an *available* block, then the transpose can be taken instead of the sequential scanning monoid ever appearing
16:14:25 <riverside> well, really, fold over the transposed block into columns
16:14:32 <riverside> with the output IO opperation
16:14:50 <geekosaur> riverside, does this have context?
16:14:52 <riverside> its a scanner still though really
16:14:55 zebrag joins (~chris@user/zebrag)
16:15:31 <riverside> geekosaur: yes, the live streaming context was that of outputing to an api that could play segments of music in a poorted interface from some C lib
16:16:12 <riverside> geekosaur: in order to connect keystrokes to sound triggers
16:16:26 <c_wraith> riverside: maybe take a look at tidal. not as a library necessarily, but look at how it does stuff
16:16:33 <riverside> which required the concurrent threading *between* programs, which is scary cos it splits the graph
16:16:45 <c_wraith> https://hackage.haskell.org/package/tidal
16:16:52 × ccapndave quits (~ccapndave@mob-194-230-146-204.cgn.sunrise.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:16:53 <geekosaur> I'm wondering if you're reinventing MIDI
16:17:15 <riverside> problys
16:17:22 <ski> dunno what you mean by "transpose", here
16:17:23 <geekosaur> last time I checked MIDI emulators came with a very limited selection of patches, but that was in the 90s
16:17:32 <riverside> no, its a live stream with non-overlapping segmentation
16:17:41 <ski> what kind of patches ?
16:17:43 <c_wraith> riverside: really, look at tidal
16:17:52 <riverside> you just waant to be able to push the buffer to a que and ensure it will pllay in a given time segment in real time
16:18:02 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:19:11 <riverside> i super low latency sound prlayer would work if you tricked it with some offsets so it played nicely at the right time
16:19:24 <riverside> but really thats why we want interface to a c lib bound within haskell
16:19:43 <c_wraith> tidal is all about scheduling playback of samples or synths
16:20:13 <riverside> c_wraith: i cant see if they managed to emit sound easily from what i can see of their project nothing obvious
16:20:57 <riverside> a link to anything playing a buffer of sound would be super useful
16:21:46 <riverside> > 60/(3*2^14/44100)
16:21:48 <lambdabot> 53.8330078125
16:22:22 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
16:22:51 <riverside> bpm
16:24:46 <riverside> i think mailboxes introduce a lag that requires a buffer of a particular size
16:25:05 <riverside> to guarantee synchronous reads
16:25:31 <riverside> its always one buffer behind, obviously
16:25:34 ccapndave joins (~ccapndave@mob-194-230-146-204.cgn.sunrise.net)
16:25:44 <geekosaur> ski, a MIDI patch is basically a digitized segment of sound that the MIDI device/emulator can play bback as is or modified (pitch, attack/delay, etc.)
16:26:02 <riverside> and this lag is critical, too much so to use read and write to disk!? how isnt that the fastest thing?
16:26:14 <riverside> have to write just to ram somehow
16:26:23 <geekosaur> spinning rust is slow 🙂
16:26:39 <riverside> i dont think 2 haskel programs can share ram, so write to disk is it really, just standard mailboxes
16:27:27 <riverside> since theres just one stream of output thread, and one responding driven thread, its just one message, a file write, to be read by another part of the program
16:27:52 <riverside> er, well, having it in two programs would mean you would have to do that
16:28:31 <riverside> but if you have them in one program then you just monoid it all together anyway to get the columns and could just use a transposed buffer for that reason, and then it could be kept very short
16:28:51 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
16:29:08 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:29:16 <riverside> or just combine scanners if doing something like zipping or zipping with the streams to try and implement a message passing graph of scanning functions
16:29:33 <riverside> or wrap it all up neatly in transpose
16:29:57 <riverside> so i just need to be able to drop a piece of sound over precisely the correct time.
16:30:08 <riverside> so i implement some kind of crude calculated pause
16:30:21 <riverside> and then it just calls a function
16:30:29 <riverside> which must then play the sound as fast as it can
16:30:44 <riverside> and if there is some delay this can be tracked somehow and compensated for
16:31:11 <riverside> eg if having to call an actual fully fledged sound exe which might be quite large
16:31:29 <riverside> but at least isolates the program we want, which is any haskell program that can play a sound file
16:31:43 <riverside> phrased like that kind of eliminates of this live stream patch sequence stuff
16:31:49 <geekosaur> you want tidal. or to interface with a midi emulator.
16:32:00 <geekosaur> something higher level than bit banging
16:33:12 <albet70> are ST Monad and State Monad different things?
16:33:29 <jean-paul[m]> yes
16:33:57 <albet70> what ST stands for?
16:33:58 <geekosaur> the names are somewhat unfortunate
16:34:02 <geekosaur> "state thread"
16:34:07 <riverside> i think you caould make STM concurrent using mailboxes for graph programs over threads as carried states
16:34:34 <geekosaur> basically, with normal pure code you neither know nor care what's evaluating it whne. a state thread is an imperative-like thread of control
16:34:45 <geekosaur> *when
16:35:14 × ccapndave quits (~ccapndave@mob-194-230-146-204.cgn.sunrise.net) (Quit: Textual IRC Client: www.textualapp.com)
16:35:27 <riverside> you *want* access to the whole vector, data between programs, impossible. you get, the ability to do nearest neighbour message passing with a one step lag on a fully connected program graph corresponding to an unrestricted scope over the state vector
16:36:05 <ski> geekosaur : ah, a sample
16:36:13 <geekosaur> but distinct from CPU threads. it's sequenced like IO but you can do it in pure code as long as the result is pure, which the phantom "s" parameter ensures by "infecting" any impure data
16:36:19 × zitkat quits (~zitkat@router-kraduha2-nat-c.pilsfree.net) (Ping timeout: 248 seconds)
16:36:26 <albet70> what that async/await model is?
16:37:17 × zeenk quits (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
16:37:26 <geekosaur> you fire off a bunch of threads to do computations and await their completion
16:37:42 <geekosaur> simpleminded parallelism
16:38:18 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
16:38:22 <qrpnxz> if you are talking about haskell async lib, that's only potentially parallel
16:38:50 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
16:39:12 <albet70> a lots of languages now have async/await, it's easier to do some coroutine than the old threads
16:39:42 <riverside> erlang style
16:40:09 × fef quits (~thedawn@user/thedawn) (Ping timeout: 268 seconds)
16:40:15 <riverside> no this is buffered mailboxes, can use ports too
16:40:18 <albet70> python 3.4, ES7, kotlin coroutine etc... but old java still using threads
16:40:32 Pickchea joins (~private@user/pickchea)
16:40:35 <riverside> idk how you access between threads
16:40:41 <zzz> is there any automatic parallellism in haskel?
16:40:57 <davean> zzz: define automatic parallellism
16:41:05 <riverside> compilation is very good?
16:41:06 <davean> the answer is both yes and no basicly
16:41:09 <zzz> like mapping over a list for example
16:41:18 <geekosaur> zzz, the closest you get is Control.Parallel.Strategies, I think
16:41:26 <qrpnxz> hypothetically yes, but i think you need `par` and stuff which is :/
16:41:36 <davean> geekosaur: nah, some datatypes are processed inherently parallel
16:41:44 <davean> like some of the array libraries
16:41:53 <davean> (well, tensor? They're more than arrays)
16:41:54 <riverside> where as this way just uses *do this all exactly at the same time* for mailbox reads
16:42:02 <zzz> davean: that's what i'm looking for. can you tell me more about it?
16:42:22 <riverside> writeFile,readFile
16:42:42 <riverside> its not *that* slow, right?
16:42:48 <qrpnxz> first-class coroutines in haskell would be pretty cool
16:43:01 <qrpnxz> built-in, lua style
16:43:05 <riverside> easer not to look for anyway
16:43:06 × benin0 quits (~benin@183.82.31.103) (Quit: The Lounge - https://thelounge.chat)
16:43:08 <davean> zzz: theres thigns like https://hackage.haskell.org/package/massiv but like I don't use any of the less explicite stuff, because why would I? Its easy to be explicite and get way more.
16:43:24 <riverside> well ports for between machines
16:43:24 <zzz> is there a reason why mapping over a list for example, with pure functions and immutability, can't be automatically parallellized?
16:43:42 <riverside> but again, just need cross machine file read and write which like ssh can do so
16:44:01 <davean> zzz: Well what there is is a problem if you do
16:44:05 <davean> zzz: because that changes performance
16:44:10 × kenran quits (~kenran@200116b82b7885000a30634e15848455.dip.versatel-1u1.de) (Quit: WeeChat info:version)
16:44:17 <riverside> mapping should be parallel
16:44:17 <davean> what you can do is explicitely change out a map for a mapConcurrent
16:44:25 <riverside> always
16:44:29 <davean> because you should tell the compiler what you want
16:44:33 <riverside> its scanning thats consecutive
16:44:39 <davean> riverside: really it shouldn't, parallelism can ruin CPU performance
16:44:47 <zzz> davean: lol no. this is haskell :p
16:44:55 <davean> zzz: hum?
16:45:08 <riverside> the values can all be computed on seperate forked threads
16:45:17 <geekosaur> zzz, somewhat infamously it's difficult to determine when the overhead of spawning threads is higher than the benefit from parallelization. not to mention that sometimes you want things to remain lazy
16:45:25 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:45:31 <geekosaur> instead of being forced by parallelization
16:45:34 <qrpnxz> haskell or not, threads are overhead. You certainly would not want to do parallel for just a hundred elements for example
16:45:45 <qrpnxz> and with lists you can't know how many it will be
16:45:57 <riverside> actors does it all for a graph which is all
16:45:57 <zzz> ok
16:45:59 <qrpnxz> (unless you re traverse, which is pretty bad way to start)
16:46:10 <davean> riverside: they CAN but that isn't usually good
16:46:12 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
16:46:14 <riverside> mailboxes, nearest neighbour message passing on a fully connected graph
16:46:23 <riverside> even works between programs and machines
16:46:34 <riverside> uses read and write file, super simple
16:46:39 <zzz> i'm having some trouble parsing some of your sentences
16:46:40 <davean> riverside: And actors have HORRID performance.
16:46:45 <riverside> nope
16:46:48 <davean> Like truly attrocious
16:46:49 <riverside> we do transpose
16:46:49 <geekosaur> yep
16:46:51 <davean> No, seriously
16:47:02 <davean> like several orders of magnitude slower than the compute should be
16:47:02 zitkat joins (~zitkat@router-kraduha2-nat-c.pilsfree.net)
16:47:04 <riverside> its just the fully available state carry
16:47:11 <davean> thousands of times or tens of thousands of times
16:47:11 <qrpnxz> ofc they do. You just said the word "file", automatically this is super overhead that may or may not be worth it sometimes
16:47:29 <riverside> and weer using buffers anyway, so are now opperating on per-time column datat
16:47:35 <davean> riverside: you're just wrong and I don't know why we'd have this discussion anymore.
16:48:01 <riverside> right, but thats the boundry positioning problem
16:48:13 <riverside> keep as much in one program as possible, and one thread aswell then i guess
16:49:00 jgeerds joins (~jgeerds@55d46bad.access.ecotel.net)
16:49:01 <riverside> so this is when you dont have to use mailboxes internally inside a running program
16:49:12 geekosaur sincerely doubts riverside has any clue what they're talking about
16:49:15 <davean> One has to very carefully pick their parallelism to get proper benefit from it.
16:49:24 <davean> geekosaur: oh its deeply clear they have no fucking clue at all
16:49:35 <riverside> we partition the state between programs, and seek to share memory live
16:49:38 <davean> Which is why I was wondering why we were even havign the conversation
16:49:45 ChanServ sets mode +o geekosaur
16:49:50 <riverside> as facilitated by simple mailboxes
16:49:57 <zzz> ok great it's not just me
16:50:14 geekosaur sets mode +q *!~riverside@213.205.241.143
16:50:18 <davean> They seem to think a mailbox interaction somehow isn't larger than most calculations
16:50:28 <geekosaur> when it's much larger, yeh
16:50:30 <davean> which means they know nothing about how syncronization works in CPUs
16:50:41 <davean> Because of like bus locks
16:50:47 <davean> JUST A BUS LOCK ALONE!!!
16:51:04 <davean> You have any idea how many thousands of instructions a bus lock usually turns out to be?
16:51:30 <davean> (ok, often its only hundreds)
16:51:32 <qrpnxz> i think they were talking about making STM concurrent or something, but they were just going on and on?
16:51:37 × Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 252 seconds)
16:51:57 <davean> qrpnxz: I mean STM doesn't remove the atomic operations
16:52:08 <geekosaur> they were doing that before I got up this morning, I found wall-of-nonsense-text in my scrollback
16:52:14 <qrpnxz> lol
16:52:21 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
16:52:29 <davean> and atomic operations on a CPU require a memory controller lock to control said memory (or with HLE at least a cache lock and roll back)
16:52:31 × nattiestnate quits (~nate@180.243.14.130) (Quit: WeeChat 3.6)
16:52:40 <[exa]> davean: it's hundreds on all CPUs right?
16:52:51 × lottaquestions quits (~nick@104.221.24.83) (Quit: Konversation terminated!)
16:52:57 <qrpnxz> oh yeah just scrolled back
16:53:02 <davean> [exa]: Uh, no, sorta but yes in reality? There are WEIRD CPUs where counting instructions is strange like ThreadStorm
16:53:19 <davean> [exa]: and like on ThreadStorm its a bit ... weird
16:53:41 <davean> or some CPUs are slow enough they're in sync with RAM or only access L3 like RAM (Cell processors come to mind but not really)
16:53:50 <davean> [exa]: but any CPU you're thinking of? Yah
16:54:09 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:54:15 geekosaur sets mode -o geekosaur
16:54:20 <davean> Any CPU Haskell is relivent on? Yah
16:54:27 <[exa]> nah I really just asked, didn't know how brutal these are
16:55:03 <davean> [exa]: So there are a few options and a FEW things that can optimize, but MOSTLY you're takign exclusive control of a memory controller for the period to prevent conflicts
16:55:30 <davean> That that OFTEN lasts until the full read/write cycle of actual RAM has completed
16:55:46 <davean> Like theres a pile of caviates, CPUs are complicated
16:55:50 ChanServ sets mode +o litharge
16:55:51 litharge sets mode -qo *!~riverside@213.205.241.143 litharge
16:56:07 <geekosaur> (I set a short timeout)
16:56:17 <geekosaur> will increase it if needed
16:56:51 econo joins (uid147250@user/econo)
16:57:09 <davean> Anyway, the moral of the story is you really only want large blocks of parallelism which generally means making an inteligent choice about waht to parallelize
16:57:33 <davean> because the cordination will kill you and amsdal(sp)'s law will come for you in the night.
16:58:09 Colere joins (~colere@about/linux/staff/sauvin)
16:58:12 <qrpnxz> amdahl?
16:58:18 <geekosaur> was my guess
16:58:26 <qrpnxz> 👍
16:58:34 <davean> qrpnxz: that sounds right
16:59:01 <[exa]> we should make some kind of a nicely named rule of thumb for this task granularity thing, so that it can get popular on hackernews etc and doesn't need to get explained all over again
16:59:32 <davean> [exa]: haha, is this not common knowlege?
16:59:45 <davean> I figured I was boring everyone to tears with programming 101 talk
16:59:48 <[exa]> it is, among people who got hurt by synchronization overhead already
17:00:18 Furor joins (~colere@about/linux/staff/sauvin)
17:00:41 <[exa]> young people are sometimes just like "let's send this addition to thread #5 because that is specialized to additions and we save one if()"
17:00:56 <[exa]> ^mild exaggeration
17:01:10 <davean> Just make it a conditional add
17:01:51 <davean> enable/disable bits are fun
17:02:11 davean looks around
17:02:23 <davean> You don't all plan out the assembly when you right Haskell? What? Just me?
17:03:11 × Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 256 seconds)
17:03:11 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
17:04:31 <davean> Which can I mention 9.4? :)
17:04:49 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 252 seconds)
17:04:49 × zitkat quits (~zitkat@router-kraduha2-nat-c.pilsfree.net) (Quit: Leaving)
17:06:10 <geekosaur[m]> The stuff I usually write, I don't care
17:06:56 <geekosaur[m]> The computer is faster than me, that's good enough 😀
17:08:58 lottaquestions joins (~nick@2607:fa49:503e:7100:17b4:8a9c:cee3:3359)
17:11:50 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
17:12:28 janus parts (janus@anubis.0x90.dk) ()
17:14:55 matthewmosior joins (~matthewmo@173.170.253.91)
17:15:02 davean looks over at htop, sees it reading 700d4h
17:15:08 davean quietly hides htop
17:15:47 k8yun joins (~k8yun@user/k8yun)
17:15:49 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
17:16:05 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
17:17:57 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:17:59 matthewmosior joins (~matthewmo@173.170.253.91)
17:19:51 <davean> When my CPU time is messured in years, I do infact care about factors of 1000x
17:20:46 <davean> I don't plan on dieing young, but I certainly care about a few thousand years of my life
17:21:41 × jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 252 seconds)
17:25:22 kannon joins (~NK@135-180-47-54.fiber.dynamic.sonic.net)
17:26:16 <dolio> Yes, the 'experts' on hackernews would never need to be told 101 level stuff. :þ
17:28:10 <davean> dolio: Of course, never
17:29:03 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
17:29:29 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
17:29:46 × kannon quits (~NK@135-180-47-54.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
17:30:23 × mbuf quits (~Shakthi@122.165.55.71) (Quit: Leaving)
17:35:31 × vysn quits (~vysn@user/vysn) (Ping timeout: 248 seconds)
17:36:01 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
17:36:19 riverside joins (~riverside@213.205.241.143)
17:40:28 <qrpnxz> geekosaur[m]: even when the computer is slower than a person it can be worth it if it's more correct and/or cheaper
17:41:00 <geekosaur> the computer can also keep track of more things than I can, yes, so that's still a win
17:41:25 <geekosaur> but I used to runghc most of my stuff and only compile now because I cabalized everything to teach myself cabal v2 workflow
17:42:33 <qrpnxz> i was doing ghc manually, then i moved to a ninja script, but i wanted more automation for building that, and a few layers of abstraction in i concluded, "wait someone already solved this problem it's called cabal" lol
17:42:58 <qrpnxz> but i didn't really appreciate cabal until i started half reimplementing it
17:43:23 <qrpnxz> and stack is a few levels even above that
17:44:15 <qrpnxz> i guess is something different than what you were talking about, but i was just reminded of this
17:45:01 <qrpnxz> iirc, stack has some nice scripting helpers?
17:46:20 <geekosaur> cabal has mostly caught up with it, I think the only real difference as of 3.8 is the resolver
17:46:35 <geekosaur> in particular, cabal caches the result of building the script now
17:55:03 × MajorBiscuit quits (~MajorBisc@c-001-030-027.client.tudelft.eduvpn.nl) (Ping timeout: 252 seconds)
17:56:30 × Inoperable quits (~PLAYER_1@fancydata.science) (Excess Flood)
18:01:49 Inoperable joins (~PLAYER_1@fancydata.science)
18:06:33 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
18:08:54 × acidjnk_new quits (~acidjnk@p200300d6e7137a0595bd943540671dc0.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
18:09:02 gmg joins (~user@user/gehmehgeh)
18:11:11 × hippoid quits (~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 252 seconds)
18:13:24 <monochrom> I have some ideas what kind of asm code I'm getting from GHC.
18:13:38 <monochrom> And I mostly just make peace with it. :)
18:15:04 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
18:15:43 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
18:17:49 Lord_of_Life_ is now known as Lord_of_Life
18:18:17 × vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr)
18:21:20 jgeerds joins (~jgeerds@55d46bad.access.ecotel.net)
18:23:20 matthewmosior joins (~matthewmo@173.170.253.91)
18:28:20 <geekosaur> same
18:28:59 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
18:29:25 <geekosaur> I have poked a bit at what comes out of the compiler, I just don't care most of the time. I'm the slow/high overhead part of the chain, not the program, so it's irrelevant
18:31:18 matthewmosior joins (~matthewmo@173.170.253.91)
18:31:43 hippoid joins (~idris@c-98-220-13-8.hsd1.il.comcast.net)
18:34:19 × vglfr quits (~vglfr@145.224.94.221) (Remote host closed the connection)
18:34:59 vglfr joins (~vglfr@145.224.94.221)
18:36:20 × kuribas quits (~user@ptr-17d51em3ydspl0uuwo7.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
18:36:37 biberu joins (~biberu@user/biberu)
18:39:00 × Inst quits (~Inst@2601:6c4:4080:3f80:38a1:ad8c:aa85:4bd8) (Ping timeout: 244 seconds)
18:39:29 Inst joins (~Inst@2601:6c4:4080:3f80:e0a9:7049:576:28ef)
18:41:17 mimmy joins (~mimmy@66-46-12-74.dedicated.allstream.net)
18:41:47 codaraxis joins (~codaraxis@user/codaraxis)
18:45:15 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
18:45:21 cfricke joins (~cfricke@user/cfricke)
18:46:44 ubert joins (~Thunderbi@178.165.179.220.wireless.dyn.drei.com)
18:47:38 × vglfr quits (~vglfr@145.224.94.221) (Remote host closed the connection)
18:48:19 vglfr joins (~vglfr@145.224.94.221)
18:49:01 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:54:46 lortabac joins (~lortabac@2a01:e0a:541:b8f0:216d:db30:5bf:3c9c)
18:57:21 matthewmosior joins (~matthewmo@173.170.253.91)
18:59:22 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
19:00:37 <monochrom> After teaching a C-and-Unix course several times, I reckon that there are so many syscalls to make, and on top of that half of them copy humongous data between user space and kernel space, and last but not least you're calling strlen() on the same string over and over again, that the myth of "C code more efficient" is completely bust.
19:01:50 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
19:02:13 <monochrom> At that rate Haskell is no more guilty than real-world C code.
19:02:23 matthewmosior joins (~matthewmo@173.170.253.91)
19:03:47 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
19:04:03 × ubert quits (~Thunderbi@178.165.179.220.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
19:04:03 <geekosaur> "x code is more efficient" iff you put the right amount of effort into it, for any x
19:04:46 × codaraxis quits (~codaraxis@user/codaraxis) (Quit: Leaving)
19:05:10 <monochrom> Oh and I'm still teaching select() for portability haha.
19:05:36 × ski quits (~ski@ext-1-308.eduroam.chalmers.se) (Ping timeout: 268 seconds)
19:06:33 <tomsmeding> monochrom: not sure that point about copying data back and forth between user and kernel space makes sense; clearly that's what's happening, but haskell is not going to avoid the same syscalls
19:06:42 <tomsmeding> *not going to be able to avoid
19:06:53 Tuplanolla joins (~Tuplanoll@91-159-69-12.elisa-laajakaista.fi)
19:07:13 <geekosaur> that's kinda the point, I think: neither one can be more efficient with that overhead
19:07:29 <geekosaur> *than the other
19:07:59 quarkyalice joins (~quarkyali@user/quarkyalice)
19:08:18 <tomsmeding> there is a difference in speed _ceiling_, I guess; for many imperative algorithms, the maximum speed you can get out of C will probably be more than the maximum speed you can get out of Haskell without using custom FFI bindings
19:08:25 nate4 joins (~nate@98.45.169.16)
19:08:34 <tomsmeding> (though the difference need not be large)
19:08:59 <tomsmeding> but monochrom's point is valid that practical business C code vs practical business Haskell code has little to do with that speed ceiling :p
19:09:42 <tomsmeding> also, the speed ceiling of Fortran may even be higher than that of C for certain array-heavy workloads where C's memory model messes with you
19:10:14 × quarkyalice quits (~quarkyali@user/quarkyalice) (Client Quit)
19:12:51 <geekosaur> right. but we also have examples where haskell's speed ceiling can be higher for some workloads
19:13:25 king_gs joins (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
19:13:32 <geekosaur> that said, neither is the general case
19:13:37 <tomsmeding> hence my addition "for many imperative algorithms" -- but yes, good point
19:13:38 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
19:14:01 <tomsmeding> you're not going to do a max-flow algorithm faster in haskell than in C :p
19:14:52 robbert-vdh joins (~robbert@robbertvanderhelm.nl)
19:15:04 matthewmosior joins (~matthewmo@173.170.253.91)
19:15:08 <geekosaur> in general I'd expect well written C code to beat well written Haskell code. (then the question becomes, is it actually well written? Especially for C)
19:15:31 <geekosaur> given the number of programmers who think they produce well written C code
19:15:33 <int-e> For some time, one of the weirdest Haskell-is-faster-than-C niches was big integer arithmetic... I wonder whether that's still the case. Basically, many operations allocate temporaries, and `malloc` was slower than Haskell's heap management...
19:15:35 <tomsmeding> yeah "well-written" is what one quickly reaches for when talking about this stuff, but it's really an ill-defined notion
19:16:12 <tomsmeding> int-e: does haskell's GMP use the haskell heap allocator?
19:16:16 <geekosaur> yes
19:16:22 <tomsmeding> heh that's an interesting case
19:16:24 <int-e> (This was ages ago, when ghc hacked GMP's malloc functions.)
19:16:40 <tomsmeding> doesn't GMP allow overriding malloc and friends?
19:16:40 <geekosaur> with the result that you can't mix haskell gmp with C gmp because you can't specify the allocator on a per function basis
19:16:51 <int-e> The story now is that it uses the mpn_ interface.
19:17:05 <int-e> geekosaur: You can, now.
19:17:07 <geekosaur> ah
19:17:27 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
19:17:47 matthewmosior joins (~matthewmo@173.170.253.91)
19:17:52 × ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec)
19:18:16 <tomsmeding> > Fast low-level functions that operate on natural numbers. These are used by the functions in the preceding groups, and you can also call them directly from very time-critical user programs. These functions’ names begin with mpn_. The associated type is array of mp_ limb_t. There are about 60 (hard-to-use) functions in this class.
19:18:18 <tomsmeding> sounds good! :D
19:18:26 <tomsmeding> (it's been a while I last worked with GMP)
19:19:05 <int-e> Since GHC 8.0? I forgot, it may have been 7.10.
19:19:11 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
19:19:20 ec joins (~ec@gateway/tor-sasl/ec)
19:19:38 acidjnk_new joins (~acidjnk@p200300d6e7137a5774e66b102b0a005a.dip0.t-ipconnect.de)
19:20:11 <Henson> ok, I figured out the OpenMP problem. Apparently running OpenMP from within Haskell causes the various OMP_* environment variables to be ignored. Dynamic thread teams is enabled by default. When my computer has had a bit of a break, OpenMP seems to think that using 2 threads is fine and will use them. Then if I load it up or rebuild the software then it will think 1 thread is better....
19:20:39 <tomsmeding> Henson: the deciding factor is system load? O.o
19:20:45 <Henson> By explicitly disabling dynamic thread teams in the C++ code using omp_set_dynamic(0) and then controlling the desired number of threads with omp_set_num_threads(2) I'm able to get it to work everytime
19:20:48 <tomsmeding> I would _not_ have guessed that
19:20:57 <tomsmeding> heh
19:21:04 <tomsmeding> good sleuthing
19:21:40 matthewmosior joins (~matthewmo@173.170.253.91)
19:21:43 <Henson> tomsmeding: it would appear to be. I ran the executable and OpenMP worked fine. Then I copied the executable, rebuilt the software, and ran the benchmark again. Then OpenMP didn't work. I compared the was-working and now-not-working binaries, and they're exactly the same. The only difference was that my computer was busy rebuilding the software and had a higher load.
19:21:57 <Henson> I also would not have guessed that!
19:22:54 zeenk joins (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f)
19:23:02 <Henson> this still leaves the unusual question of: why does OpenMP make a different choice when the function is called using async", but I think I'll just leave that one a mystery.
19:23:23 <Henson> as I imagine it will take even more time-consuming sleuthing and will not benefit me in the end
19:23:25 <int-e> geekosaur: aha: https://downloads.haskell.org/~ghc/7.10.1/docs/html/users_guide/release-7-10-1.html "The integer-gmp package has been completely rewritten from the ground up. The primary change in this rewrite is that GHC-compiled programs that link to GMP no longer 'hook' GMP allocation routines [...]"
19:23:33 <tomsmeding> 1. if I ever do work with openMP, I hope I'll remember to omp_set_dynamic(0) -- dynamic thread scaling based on current load sounds quite harmful
19:24:02 <tomsmeding> 2. Henson: regarding those environment variables, that also sounds fishy; the variables are set in the environment of the Haskell program, but they've disappeared in the C++ code?
19:24:45 <Henson> tomsmeding: yeah. The software's built with Nix, so I don't know if there's some fishiness going on there
19:25:17 <tomsmeding> it's not the building that matters for env vars, it's the running
19:25:19 <Henson> unless I'm not setting the variables correctly. I assume that "export OMP_FOO=BAR" will do the trick
19:25:25 <tomsmeding> it _should_
19:25:57 <Henson> tomsmeding: yeah but Nix somtimes wraps things up and has nested environments, which I don't think is happening in this case.
19:26:32 <tomsmeding> Henson: you can check the environment of a process by reading /proc/$PID/environ
19:26:32 × hippoid quits (~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
19:26:39 <tomsmeding> "nested environments" is not a thing in unix :p
19:27:15 <tomsmeding> (in that file, the key-value pairs are separated with null bytes)
19:27:28 <Henson> tomsmeding: maybe "layered" environments
19:27:29 <tomsmeding> s/separated/delimited/
19:27:51 <Henson> tomsmeding: I'll have to investigate your suggestion a bit later, got to make a call
19:28:04 <tomsmeding> still, that's not a thing in unix; if nix claims to do something like that, it will have to add and remove things from the actual environment at boundaries of the "layers"
19:28:07 <tomsmeding> sure :)
19:28:24 <tomsmeding> fool-proof way of setting something in the environment of a process is: $ env VAR=value ./binary
19:29:27 <geekosaur[m]> Layered isn't a thing either. Nix nuking environments, sadly, is
19:30:24 jmdaemon joins (~jmdaemon@user/jmdaemon)
19:31:10 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
19:32:13 monochrom joins (~trebla@216.138.220.146)
19:33:23 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
19:34:30 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
19:34:48 riverside joins (~riverside@213.205.241.143)
19:43:35 × mimmy quits (~mimmy@66-46-12-74.dedicated.allstream.net) (Ping timeout: 252 seconds)
19:44:31 mimmy joins (~mimmy@66-46-12-74.dedicated.allstream.net)
19:44:32 × mimmy quits (~mimmy@66-46-12-74.dedicated.allstream.net) (Client Quit)
19:55:49 chomwitt joins (~chomwitt@2a02:587:dc16:4100:1289:3f0b:2a03:948d)
20:03:42 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 264 seconds)
20:04:33 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
20:09:56 × mmhat quits (~mmh@p200300f1c712fb1cee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
20:10:33 <tomsmeding> oh my, I've been bitten by Foldable (a,)
20:10:54 <tomsmeding> this may well have been the first time
20:12:16 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
20:19:36 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 268 seconds)
20:19:45 × king_gs quits (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Ping timeout: 244 seconds)
20:22:13 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:216d:db30:5bf:3c9c) (Quit: WeeChat 2.8)
20:24:12 mmhat joins (~mmh@p200300f1c722777cee086bfffe095315.dip0.t-ipconnect.de)
20:25:29 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
20:25:38 yvan-sraka joins (~yvan-srak@37.168.2.133)
20:27:22 pavonia joins (~user@user/siracusa)
20:27:37 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:28:57 × yvan-sraka quits (~yvan-srak@37.168.2.133) (Remote host closed the connection)
20:29:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
20:31:44 martin02 joins (~silas@141.84.69.76)
20:31:52 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
20:33:24 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
20:33:45 <monochrom> "Get well soon." >:)
20:35:21 <tomsmeding> monochrom: the problem with this particular malady is that you only realise it was this one when you've already recovered :p
20:35:58 <Rembane_> Sounds like depression
20:36:16 <tomsmeding> accurate, for Foldable (a,)
20:41:29 cdsmith joins (~cdsmithma@2001:470:69fc:105::284)
20:43:48 × drdo quits (~drdo@roach0.drdo.eu) (Quit: The Lounge - https://thelounge.chat)
20:44:21 drdo joins (~drdo@roach0.drdo.eu)
20:46:50 gio123 joins (~gio123@94.137.173.75)
20:46:57 <zzz> length (0,0)
20:47:05 <zzz> > length (0,0)
20:47:07 <lambdabot> 1
20:47:21 <tomsmeding> > length (undefined, undefined)
20:47:23 <lambdabot> 1
20:47:29 <zzz> oh no
20:47:35 <tomsmeding> > toList ('a', 42)
20:47:36 <lambdabot> [42]
20:48:04 <zzz> i don't even agree with the Functor instance of (,)
20:48:05 <tomsmeding> it's the only valid instance, but you seldom need it, and it's quite a footgun
20:48:20 <tomsmeding> functor is at least much less of a footgun :p
20:49:08 <zzz> what bit you exaclty, if i may ask?
20:49:12 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 244 seconds)
20:49:41 <tomsmeding> map snd . filter (\col -> length col < 6) $ zip bd [0..]
20:49:59 <tomsmeding> bd :: [[a]], a list of columns. I want the indices of the columns with height < 6
20:50:25 <tomsmeding> given the discussion the mistake is obvious, but y'know
20:51:29 <zzz> heh i get it
20:51:35 Guest93 joins (~Guest93@2603-8000-0401-65cc-654b-133e-fd96-a390.res6.spectrum.com)
20:52:54 <tomsmeding> I found it after some debugging of a _super_ uninformative error, which I tracked down to a 'bd' value with a column of height 7
20:53:01 <tomsmeding> which should have been impossible
20:53:04 <tomsmeding> then I was like, wait...
20:53:18 × gio123 quits (~gio123@94.137.173.75) (Quit: Client closed)
20:55:04 <monochrom> Yeah, valid does not imply desirable.
20:55:30 <tomsmeding> I don't think anybody has ever been bitten in this way by Functor (a,)
20:55:33 <monochrom> Infinite types are valid too, equirecursive types and all that, see TaPL. But hated by all. :)
20:55:54 <tomsmeding> monochrom: because type inference completely breaks down, right?
20:55:57 coot joins (~coot@213.134.176.158)
20:56:05 × zer0bitz quits (~zer0bitz@2001:2003:f748:2000:9186:336c:b8e1:3e66) (Ping timeout: 256 seconds)
20:56:17 <monochrom> I don't know. But it's clearly royally confusing.
20:56:25 <tomsmeding> :D
20:58:17 <monochrom> It might not break type inference. Prolog is happy with omitting occurs check, and type inference is easier than Prolog.
20:59:29 <tomsmeding> let's just keep it at "it's royally confusing" them
20:59:31 <tomsmeding> *then
20:59:54 <monochrom> But if you don't tell beginners "you can't if ... then x else [x]", it's going to be both technical debt and pedagogical debt snowballing down the road.
21:00:45 <tomsmeding> that in particular is a fairly useless infinite type :p
21:01:00 k8yun_ joins (~k8yun@user/k8yun)
21:01:43 × ccntrq quits (~Thunderbi@172.209.94.92.rev.sfr.net) (Read error: Connection reset by peer)
21:01:45 <tomsmeding> newtype Tree a = Tree [Tree a]
21:01:51 <tomsmeding> that is to say, newtype Tree = Tree [Tree]
21:02:51 <monochrom> The useful infinite types can still be made yet clearer by having explicit wrapping and unwrapping, i.e., let's go back to isorecursive types after all.
21:03:27 <tomsmeding> yes
21:03:45 <tomsmeding> I feel like type classes are slightly _too_ implicit sometimes
21:03:58 <monochrom> Similarly Foldable (e,) can be made clearer by rolling your own tuple type.
21:04:11 <tomsmeding> like, sometimes one would like to explicitly control what Ord gets used for some kind of sort or Set; or sometimes you want Foldable (a,), but mostly not
21:04:35 × k8yun quits (~k8yun@user/k8yun) (Ping timeout: 248 seconds)
21:04:41 <tomsmeding> but I don't have a better design, at the very least type classes seem a local optimum, and a good one at that
21:06:17 <monochrom> So somehow we look at "(x,y)" and think "hey that's a length-2 list in funny syntax", and we look at "data MyTuple a b = T a b" we think "this is clearly b with piggybacked a".
21:07:03 <tomsmeding> I don't even think that thinking (x,y) is a funny list is the issue with Foldable (a,)
21:07:18 <tomsmeding> see my mistake above
21:07:26 <tomsmeding> but yeah, names good
21:07:31 × coot quits (~coot@213.134.176.158) (Quit: coot)
21:08:00 <tomsmeding> and haskell is nice in that it's easy to create new names -- except that _sometimes_ one would like Rust's Deref functionality
21:08:11 <tomsmeding> i.e. inherit a bunch of functionality from the contained type
21:08:22 mikoto-chan joins (~mikoto-ch@164.5.249.78)
21:09:07 <monochrom> ooohhh, that one is very close to why infinite types are a bad idea.
21:09:33 <monochrom> valid code that hides a mistake very well
21:10:00 <tomsmeding> it would be strictly opt-in when you create a new type (just like in Rust)
21:10:06 <tomsmeding> for certain types it makes sense, for most it doesn't
21:10:37 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
21:10:41 <monochrom> "then x else [x]" looks obvious, but that's just because I single it out. Imagine it hiding in 20 lines of code, you'll never spot it.
21:10:44 <tomsmeding> but maybe the extra newtype (un)wrapping is worth our sanity :p
21:10:51 <tomsmeding> yeah no recursive types bad
21:11:00 <tomsmeding> eh, infinite types
21:11:19 <tomsmeding> (got confused thinking about the usual notation with Rec)
21:13:12 <zzz> you can?
21:13:31 <tomsmeding> you can what?
21:16:20 dsrt^ joins (~dsrt@50.236.139.178)
21:19:52 Milan joins (~Milan@46.245.79.69)
21:20:01 <zzz> sorry i was scrolled back and didn't notice
21:20:34 <zzz> you can [have infinite types]?
21:21:05 × Milan quits (~Milan@46.245.79.69) (Client Quit)
21:21:08 <tomsmeding> I'm not too sure about the details -- monochrom seems to be surer -- but I think that having infinite types in a type system is not necessarily nonsense
21:21:16 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:21:26 matthewmosior joins (~matthewmo@173.170.253.91)
21:22:00 <tomsmeding> You can have types of the form `Rec a. Maybe (Int, a)`, which transparently unwraps to `Maybe (Int, Rec a. Maybe (Int, a))`
21:22:03 × Guest93 quits (~Guest93@2603-8000-0401-65cc-654b-133e-fd96-a390.res6.spectrum.com) (Quit: Client closed)
21:22:09 <tomsmeding> and which transparently wraps again if needed
21:22:22 <tomsmeding> (this happens to be [Int])
21:22:43 <tomsmeding> this `Rec` might also be called `Roll` sometimes IIRC
21:23:18 <tomsmeding> if you have explicit term formers `roll` and `unroll` which wrap and unwrap the Rec, clearly it should work -- you just have anonymous newtypes then
21:23:27 <tomsmeding> but even without, it might work
21:23:38 <tomsmeding> but, as monochrom said, it would be royally confusing
21:26:01 <monochrom> TaPL has infinite type examples. It says "equirecursive types".
21:26:12 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
21:26:25 <monochrom> Although, it does type inference in an unrelated chapter that doesn't have infinite types.
21:27:17 <tomsmeding> yeah on the one hand it feels like you should be able to exchange the occurs check with construction of a rolled type; on the other hand, it feels like you'll open a can of worms
21:28:12 jmd_ joins (~jmdaemon@user/jmdaemon)
21:28:57 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
21:28:57 <monochrom> For now I'm just at the cheeky level of "just go into your unification algorithm and delete the occurs check, what can possibly go wrong?" :)
21:29:07 <tomsmeding> eh, a lot :p
21:29:33 <monochrom> "Hey you may even be able to support \x -> x x"
21:29:35 <tomsmeding> a compiler written in haskell might fare a bit better than one in a strict language
21:30:06 <tomsmeding> on account of not necessarily immediately reifying the infinite type as a whole -- though that depends heavily on the precise implementation of the type checker
21:30:23 <tomsmeding> I can imagine at least one type checker implementation that will infinite loop
21:30:31 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
21:31:34 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
21:33:50 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
21:34:16 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
21:34:43 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:35:05 MajorBiscuit joins (~MajorBisc@46-229-126.internethome.cytanet.com.cy)
21:35:45 × jmd_ quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
21:37:40 vulpine joins (xfnw@tilde.team)
21:38:45 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:38:49 <Henson> tomsmeding: is looks like when the 15 minute load average (rightmost load average number in "top") goes above 0.9, that's when the number of CPUs chosen by OpenMP changes. Below 0.9 it'll use 2, at or above 0.9 it'll use 1.
21:40:40 geekosaur introduces Henson to `uptime`
21:40:47 × matthewmosior quits (~matthewmo@173.170.253.91) (Remote host closed the connection)
21:41:56 gdown joins (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net)
21:43:30 <Henson> geekosaur: :-)
21:44:33 <tomsmeding> Henson: your machine has 2 cores?
21:44:54 <Henson> tomsmeding: OpenMP seems to ignore the OMP_DYNAMIC variable, unless "false" or "FALSE" or "0" are not valid values. But it does show up in the /proc/$PID/environ variable. It DOES obey the OMP_NUM_THREADS environment variable.
21:45:15 <Henson> tomsmeding: yes, it's an old Thinkpad T430
21:45:19 <Henson> still goin'
21:45:52 <tomsmeding> Henson: seems 'false' should be valid https://www.openmp.org/spec-html/5.0/openmpse51.html#x290-20560006.3
21:45:57 × dsrt^ quits (~dsrt@50.236.139.178) (Ping timeout: 268 seconds)
21:46:42 <tomsmeding> Henson: if it still works, it still works :) -- I wasn't doubting your machine, was clarifying because I thought I recalled you speaking about 4 before
21:47:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
21:48:47 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 255 seconds)
21:48:52 king_gs joins (~Thunderbi@187.201.216.244)
21:49:10 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:52:21 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:54:11 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 248 seconds)
21:54:47 jao joins (jao@gateway/vpn/protonvpn/jao)
21:55:50 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
21:57:02 × jgeerds quits (~jgeerds@55d46bad.access.ecotel.net) (Ping timeout: 268 seconds)
21:57:23 matthewmosior joins (~matthewmo@173.170.253.91)
22:00:09 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
22:00:27 riverside joins (~riverside@213.205.241.143)
22:01:50 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
22:02:05 hippoid joins (~idris@c-98-220-13-8.hsd1.il.comcast.net)
22:03:29 × k8yun_ quits (~k8yun@user/k8yun) (Quit: Leaving)
22:04:39 × mmhat quits (~mmh@p200300f1c722777cee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
22:05:07 × ddellacosta quits (~ddellacos@89.45.224.216) (Ping timeout: 252 seconds)
22:09:26 × zeenk quits (~zeenk@2a02:2f04:a311:2d00:6865:d863:4c93:799f) (Quit: Konversation terminated!)
22:09:33 × king_gs quits (~Thunderbi@187.201.216.244) (Read error: Connection reset by peer)
22:10:10 king_gs joins (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec)
22:18:49 × acidjnk_new quits (~acidjnk@p200300d6e7137a5774e66b102b0a005a.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
22:25:46 mmhat joins (~mmh@p5081a453.dip0.t-ipconnect.de)
22:27:08 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in)
22:27:41 jmdaemon joins (~jmdaemon@user/jmdaemon)
22:30:08 merijn joins (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl)
22:30:20 × mmhat quits (~mmh@p5081a453.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:31:43 matthewmosior joins (~matthewmo@173.170.253.91)
22:35:15 × king_gs quits (~Thunderbi@2806:103e:29:da7a:1f74:531c:dec2:7aec) (Ping timeout: 248 seconds)
22:35:16 × stefan-_ quits (~cri@42dots.de) (Ping timeout: 268 seconds)
22:38:38 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 256 seconds)
22:41:21 jmd_ joins (~jmdaemon@user/jmdaemon)
22:42:03 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
22:44:19 × hippoid quits (~idris@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
22:44:19 × zachel quits (~zachel@user/zachel) (Ping timeout: 248 seconds)
22:44:24 stefan-_ joins (~cri@42dots.de)
22:46:37 × Tuplanolla quits (~Tuplanoll@91-159-69-12.elisa-laajakaista.fi) (Quit: Leaving.)
22:48:01 mmhat joins (~mmh@p200300f1c7248dcdee086bfffe095315.dip0.t-ipconnect.de)
22:48:10 matthewmosior joins (~matthewmo@173.170.253.91)
22:50:11 × jao quits (jao@gateway/vpn/protonvpn/jao) (Ping timeout: 248 seconds)
22:52:01 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
22:52:14 Zmijson joins (~Zmijson@2a00:23c8:7a00:8701:8dd3:3925:ba94:9c79)
22:52:41 × matthewmosior quits (~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
22:54:49 <Zmijson> I am trying to do some exercises - just beginning with haskell and I am beyond confused at what one wants to do in terms of what it says and types it specifies
22:56:36 <Zmijson> any kind patient soul here?
22:56:39 jao joins (jao@gateway/vpn/protonvpn/jao)
22:58:20 <hpc> what's the exercise?
22:59:33 <Zmijson> create a match record between 2 opponents and it gives two styles of doing it
23:00:01 <Zmijson> but the type is already defined and its not a 'record' as in the data structure
23:00:34 <Zmijson> its type LeagueM t = (t, t) -> Maybe t but I fail to see how a tuple giving an outcome is a 'record'
23:03:06 <geekosaur> are you sure they mean "record" as in a record type, vs. a record such that you might print about the outcome of a match?
23:03:24 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:03:44 <Zmijson> there are a few sub tasks and one is "Give the function that inserts the result of a match into the score
23:03:45 <Zmijson> record. If the match result is already present, it is updated."
23:04:42 <Zmijson> unless they mean creating variables at runtime of type LeagueM and changing them if one already exists?
23:04:43 × merijn quits (~merijn@c-001-001-007.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
23:04:57 matthewmosior joins (~matthewmo@173.170.253.91)
23:05:23 <riverside> but it creates ripples back in time, constantly
23:05:59 × Putonlalla quits (~sapekiis@it-cyan.it.jyu.fi) (Ping timeout: 252 seconds)
23:06:25 × jao quits (jao@gateway/vpn/protonvpn/jao) (Ping timeout: 256 seconds)
23:06:33 Putonlalla joins (~sapekiis@it-cyan.it.jyu.fi)
23:06:59 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
23:07:19 Sgeo joins (~Sgeo@user/sgeo)
23:07:54 hippoid joins (~idris@c-98-220-13-8.hsd1.il.comcast.net)
23:08:11 jao joins (~jao@45.134.213.219)
23:08:22 <riverside> like if i say my i's dont work properly
23:09:56 <hpc> get glasses then :D
23:09:58 nate4 joins (~nate@98.45.169.16)
23:10:25 <riverside> gay lenses
23:10:46 × tomgus1 quits (~tomgus1@bcdc7f39.skybroadband.com) (Ping timeout: 244 seconds)
23:10:57 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
23:11:00 <riverside> join the navy
23:11:06 <hpc> ?
23:11:44 <riverside> theres quite a good joke about the space navy
23:12:35 × jao quits (~jao@45.134.213.219) (Ping timeout: 252 seconds)
23:12:35 <riverside> hidly ho, neighberinos
23:13:56 <riverside> my eyes! the goggles do nothing
23:14:11 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
23:14:54 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
23:15:45 <Zmijson> anyone confident and patient I could dm?
23:16:06 <riverside> why, its not like i never get you to do anything for me
23:16:22 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
23:17:45 <hpc> @where ops
23:17:45 <lambdabot> byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski
23:18:04 × riverside quits (~riverside@213.205.241.143) (Remote host closed the connection)
23:18:04 ChanServ sets mode +o dibblego
23:18:55 luffy joins (~chenqisu1@183.217.201.23)
23:21:32 <Zmijson> ?
23:27:03 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:27:15 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:30:46 tryme13f joins (~Thunderbi@2001:8a0:7d92:3b01:34e5:5642:a1e2:df48)
23:31:44 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
23:34:19 <geekosaur> Zmijson, you say it gives two styles. can you create a pastebin showing those styles and any other related types?
23:34:22 <geekosaur> @where paste
23:34:22 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
23:37:44 <Zmijson> https://paste.tomsmeding.com/OTzbBzJG
23:37:54 <Zmijson> her it is
23:37:59 <Zmijson> here* oops
23:38:12 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
23:39:16 <Zmijson> sorry, stuff missing
23:39:59 <Zmijson> https://paste.tomsmeding.com/uVQcgeYm
23:40:00 <Zmijson> fixed now
23:40:03 <geekosaur> right, by "recorded" I conclude they do not mean a Haskell record but a "people" record, e.g. a list you could print out
23:40:15 × mmhat quits (~mmh@p200300f1c7248dcdee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
23:40:48 ChanServ sets mode -o dibblego
23:41:42 ChanServ sets mode +o geekosaur
23:42:23 <Zmijson> with or without creating a literal list to hold them in?
23:42:32 geekosaur sets mode +b riverside!~riverside@213.205.241.143
23:42:49 <Zmijson> can you check whether a record i.e. a variable exists/has been created already without storing it in a list?
23:43:39 <zzz> thats a weird question
23:43:44 <geekosaur> you need a list or similar to hold the results. part 1 shows what you decided on to hold each style of result
23:44:51 <geekosaur> I don't know the full context of this; did this exercise come up in the context of studying lists or sets or maps, etc.?
23:44:52 <hpc> instead of having to check if it exists, perhaps instead structure the rest of your code so you aren't potentially adding duplicates in the first place
23:45:10 geekosaur sets mode -o geekosaur
23:45:16 <hpc> like if you have a league of only two teams, write your code so it's not going to somehow do two matches instead of one
23:45:46 <hpc> or perhaps break the problem down further
23:46:09 <hpc> instead of worrying about computing all the match results, instead start by transforming a list of teams into a list of all the matches that should happen
23:46:24 <Zmijson> it came up studying types/declaring types
23:46:27 <hpc> if you have that, hopefully all the rest of it is just "do something to every element of that list"
23:46:46 <Zmijson> I have no list of teams that is the thing
23:47:01 <Zmijson> so it would be something like you run it and use the function to create the 'record
23:47:39 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
23:48:10 <Zmijson> I imagine the overwriting is there so if you were to really use it you can fix an entry if you make a mistake
23:48:31 <geekosaur> look at the second style of recording again
23:48:48 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:48:52 Guest67 joins (~Guest67@128-193-154-141.ptpg.oregonstate.edu)
23:48:54 mvk joins (~mvk@2607:fea8:5ce3:8500::a1ec)
23:49:13 <Zmijson> I am but I don't understand it haha
23:49:14 <geekosaur> it's keyed by a winning team and contains a list of the dsefeated teams, so you have to update that subsidiary list
23:49:45 <Zmijson> but it boils down to just that list
23:49:50 <geekosaur> "keyed by" should give you some ideas about appropriate data types
23:49:54 <Zmijson> how do you know what team that list belongs to?
23:50:19 <geekosaur> it's part of LeagueL
23:50:53 <geekosaur> type LeagueL t = t -> [t]
23:51:13 <geekosaur> how would you store lists of defeated teams that would make LeagueL easy to implement?
23:51:18 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
23:51:21 <geekosaur> hint: "keyed by"
23:51:37 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
23:51:41 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
23:51:57 <Zmijson> a map?
23:52:00 <geekosaur> yep
23:52:15 <geekosaur> and LeagueL becomes a map lookup
23:52:53 <Zmijson> how ._.
23:53:00 <Zmijson> I know I am being uber stupid here
23:53:19 <Zmijson> but I just don't see how both leagues are datatypes that can hold values/records
23:54:29 <geekosaur> but they are. in the first case (LeagueM) about the best you can do is a list of tuples. in the second case (LeagueL) it's a Map of lists
23:56:05 <geekosaur> hm, actually you could model LeagueM as a map as well.
23:56:21 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
23:56:21 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
23:56:21 wroathe joins (~wroathe@user/wroathe)
23:56:35 <geekosaur> and LeagueL and LeagueM are the types of lookups in their respective Maps
23:56:51 × ystael quits (~ystael@user/ystael) (Ping timeout: 248 seconds)
23:57:00 <geekosaur> so next step is to determine the types of those maps. luckily, that's pretty much given to you by their definitions
23:57:29 <geekosaur> for example, for LeagueL to make sense the Map behind it is Map t [t]
23:57:47 gentauro joins (~gentauro@user/gentauro)
23:59:43 <geekosaur> and LeagueL itself is almost the type of `Map.lookup myResultLMap`

All times are in UTC on 2022-08-17.