Home liberachat/#haskell: Logs Calendar

Logs on 2021-11-16 (liberachat/#haskell)

00:02:50 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:d1ec:e4ac:744a:8e08) (Ping timeout: 265 seconds)
00:09:33 × mark__ quits (~a@p200300ef973db1d9502293e1a26d2ca1.dip0.t-ipconnect.de) (Quit: WeeChat 3.0.1)
00:11:30 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 276 seconds)
00:14:13 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 250 seconds)
00:14:36 × zava quits (~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) (Quit: WeeChat 3.3)
00:19:25 × jkaye quits (~jkaye@2601:281:8300:7530:7289:19f7:f3fa:e188) (Ping timeout: 250 seconds)
00:22:27 × zincy_ quits (~zincy@2a00:23c8:970c:4801:2831:8d93:d152:2332) (Remote host closed the connection)
00:22:35 × emf_ quits (~emf@2620:10d:c090:400::5:91bf) (Ping timeout: 264 seconds)
00:23:28 × max22- quits (~maxime@2a01cb08833598005714d2986a3eb6d2.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
00:23:58 stiell joins (~stiell@gateway/tor-sasl/stiell)
00:25:09 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
00:29:40 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
00:30:01 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
00:30:27 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
00:32:06 mimmy joins (~mimmy@2607:fea8:6e0:7f90:e4cb:5a57:fd6e:e655)
00:33:10 renzhi joins (~xp@2607:fa49:6500:b100::6e7f)
00:33:34 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
00:36:19 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
00:38:03 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 250 seconds)
00:39:02 mimmy_ joins (~mimmy@2607:fea8:6e0:7f90:20d6:2b3a:ce41:e0b6)
00:41:47 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:e4cb:5a57:fd6e:e655) (Ping timeout: 264 seconds)
00:42:03 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2d58:181a:7f09:e906)
00:46:53 mimmy joins (~mimmy@2607:fea8:6e0:7f90:fc41:a35f:792:b57c)
00:48:27 × mimmy_ quits (~mimmy@2607:fea8:6e0:7f90:20d6:2b3a:ce41:e0b6) (Ping timeout: 250 seconds)
00:53:08 sagax joins (~sagax_nb@user/sagax)
00:54:57 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
00:58:26 mvk joins (~mvk@2607:fea8:5cc3:e900::df92)
01:11:15 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:17:22 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:23:53 × Guest4530 quits (~Guest45@185.16.69.203) (Ping timeout: 256 seconds)
01:25:51 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:26:41 <shapr> OH: Don't use comments. Use PackageImports
01:27:31 <dsal> PackageImports looks weird to me. I'm not sure it's valuable enough for mem.
01:27:51 <geekosaur> either one is scary imo
01:28:21 × burnsidesLlama quits (~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
01:28:45 <geekosaur> comments are too easy to miss, PackageImports is "wtf are you doin mate?"
01:28:53 burnsidesLlama joins (~burnsides@client-8-81.eduroam.oxuni.org.uk)
01:29:08 <glguy> Given that we have PackageImports, using comments is just a way to have wrong comments
01:30:09 <dsal> I don't know that I could argue against PackageImports in anyway that would be consistent with arguing against unqualified/naked imports
01:32:37 <dsal> I guess my only argument is that it sounds hard to do.
01:33:13 × burnsidesLlama quits (~burnsides@client-8-81.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
01:43:13 JonasTripps joins (~user@bras-base-crnwon2435w-grc-27-76-70-40-124.dsl.bell.ca)
01:43:17 <JonasTripps> https://youtu.be/ykT_g0-bgZo
01:44:34 × JonasTripps quits (~user@bras-base-crnwon2435w-grc-27-76-70-40-124.dsl.bell.ca) (K-Lined)
01:47:10 mimmy_ joins (~mimmy@2607:fea8:6e0:7f90:ec1e:7b74:9028:2102)
01:47:43 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:fc41:a35f:792:b57c) (Ping timeout: 265 seconds)
01:52:36 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 245 seconds)
01:52:46 yauhsien joins (~yauhsien@49.216.238.61)
01:53:24 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
01:54:28 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
01:58:44 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
01:59:19 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
02:00:08 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
02:10:23 ec joins (~ec@gateway/tor-sasl/ec)
02:15:34 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:15:34 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
02:15:34 wroathe joins (~wroathe@user/wroathe)
02:20:35 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
02:21:37 × renzhi quits (~xp@2607:fa49:6500:b100::6e7f) (Ping timeout: 250 seconds)
02:26:03 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:26:03 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:26:03 finn_elija is now known as FinnElija
02:28:00 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 276 seconds)
02:34:11 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
02:34:30 jkaye joins (~jkaye@2601:281:8300:7530:6f4:bc42:8be5:e20d)
02:37:01 × mimmy_ quits (~mimmy@2607:fea8:6e0:7f90:ec1e:7b74:9028:2102) (Ping timeout: 265 seconds)
02:39:31 mimmy_ joins (~mimmy@185.244.215.86)
02:40:03 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
02:40:24 alzgh joins (~alzgh@user/alzgh)
02:42:42 × alx741 quits (~alx741@181.196.68.87) (Quit: alx741)
02:47:32 Lycurgus joins (~juan@98.4.112.204)
02:47:36 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Ping timeout: 245 seconds)
02:48:04 lavaman joins (~lavaman@98.38.249.169)
02:48:23 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 264 seconds)
02:49:02 × mimmy_ quits (~mimmy@185.244.215.86) (Ping timeout: 268 seconds)
02:49:30 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
02:50:11 × xff0x quits (~xff0x@2001:1a81:52ee:6600:288d:876:4868:af07) (Ping timeout: 264 seconds)
02:51:42 xff0x joins (~xff0x@2001:1a81:5330:8c00:519e:34db:fab7:a573)
02:52:50 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
02:54:03 chexum joins (~quassel@gateway/tor-sasl/chexum)
02:54:13 mimmy_ joins (~mimmy@185.244.215.86)
02:56:17 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 250 seconds)
03:03:50 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
03:03:58 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
03:17:57 × yauhsien quits (~yauhsien@49.216.238.61) (Ping timeout: 250 seconds)
03:18:33 <pop3> tomsmeding, thanks
03:26:29 asivitz joins (uid178348@tinside.irccloud.com)
03:31:22 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
03:36:36 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:36:36 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:36:36 finn_elija is now known as FinnElija
03:36:56 <asivitz> not sure what the right place to ask is, but stack is segfaulting when I use it for basically anything. I got stack from nixpkgs. this is on an m1 mac. anyone seen this before?
03:37:27 <dsal> asivitz: What system?
03:38:03 <asivitz> system?
03:38:14 <dsal> You can override the system in /etc/nix/nix.conf
03:38:40 <asivitz> hm no override there. (I am brand new to nix)
03:39:05 <dsal> Ah. It used to ship as aarch64, but it works natively now. I've not done a recent install, so I don't know where it leaves you.
03:39:20 <dsal> What does "file `which nix`" say?
03:39:42 <asivitz> `/nix/var/nix/profiles/default/bin/nix: Mach-O 64-bit executable arm64`
03:39:58 <dsal> Huh. What about stack?
03:40:09 <asivitz> same
03:40:38 <asivitz> it can run --help and --version. seems to die when running ghc
03:40:39 <dsal> Interesting. I'm not using a global install, but otherwise that's basically what I'm doing. Is this a recent project?
03:40:55 <dsal> i.e., that combination would only work on a fairly recent LTS.
03:41:10 <dsal> e.g., lts-18.16
03:41:11 Nolrai2 joins (~Nolrai2@c-76-27-202-218.hsd1.or.comcast.net)
03:41:18 <asivitz> looks like my resolver is nightly-2021-03-01
03:41:29 <dsal> That probably won't work.
03:41:43 <dsal> If you want to build older stuff, you can do it with rosetta if you change your nix config to amd64
03:42:25 <dsal> Basically echo "system = x86_64-darwin" > /etc/nix/nix.conf
03:42:29 × mimmy_ quits (~mimmy@185.244.215.86) (Quit: WeeChat 3.3)
03:42:46 <dsal> Then `nix-env -iA nixpkgs.nix`
03:43:07 <asivitz> hm, I think I can handle the latest stackage. but, just tried the latest nightly and it still bombs
03:43:15 <dsal> I built under emulation for a long time. Only the last month or so has it been useful.
03:43:24 <dsal> Yeah, so *newer* GHCs are differently bad. :)
03:43:32 <asivitz> haha oh dear
03:44:05 <dsal> I've been building with LTS-18.16 just fine.
03:44:10 <dsal> Using haskell.nix
03:44:24 <asivitz> well, am I right in thinking the problem is in the ghc that built stack when I installed that with nix-env?
03:44:25 motherfsck joins (~motherfsc@user/motherfsck)
03:44:55 <asivitz> stack hasn't even attempted to download a ghc binary I don't think
03:45:01 <dsal> I don't know for sure.
03:45:30 <dsal> stack doesn't *come* with a ghc, but the LTS will define one.
03:45:30 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
03:46:07 × slack1256 quits (~slack1256@186.11.99.34) (Ping timeout: 250 seconds)
03:46:11 <dsal> There are a few different ways to configure things, so it can get confusing. It works pretty well for me with stack nix integration.
03:46:17 mbuf joins (~Shakthi@223.178.89.16)
03:47:29 <asivitz> yea. FWIW I'm familar with stack. but... it bombs immediately when I run any non-trivial command (other than help or version). like it should read my stack.yaml and download the defined ghc and then use that to build other stuff, but it never gets to any of that. so the stack binary itself is messed up somehow... but it is the right arch seemingly :(
03:48:39 <dsal> stack nix integration is slightly different.
03:48:48 <asivitz> for your setup- you skip stack and turn the stack.yaml into a nix derivation? (do I have that right?)
03:48:55 <asivitz> I thought just using stack would be simpler but maybe not
03:49:02 <Lycurgus> lol
03:49:30 <Lycurgus> (you saved me a status check)
03:49:44 <dsal> my ~/.stack/config.nix has "nix:\n enable: true" and my stack projects look like... let me find one.
03:50:06 <dsal> Basically this: https://github.com/dustin/waitforsocket/blob/master/stack.yaml
03:50:13 <dsal> You'll pretty much always need that zlib thing. heh
03:50:25 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
03:50:42 <Nolrai2> So afaict, the mutable unboxed fixed length boolean vectors in vector-fixed just don't work at all, freezing then thawing sets both the original and the resultant immutable vectors to all FALSE. If I want to make a local version of the library so I can fix the issue how would I do that?
03:50:57 <Nolrai2> *False
03:50:58 azimut joins (~azimut@gateway/tor-sasl/azimut)
03:50:59 <dsal> Oh, you might need network-3.1.2.5 as well, because that fixes M1 builds.
03:54:24 <asivitz> dsal: welp. it still segfaults even with enabling nix in stack
03:54:38 <dsal> asivitz: How did you get stack?
03:56:15 <dsal> I wonder if you have an older, broken one. You could try: [sudo] nix-channel --update && nix-shell -p stack
03:56:32 <asivitz> I think I did the equivalent of `nix-env -iA nixpkgs.stack`
03:56:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:56:52 × td_ quits (~td@muedsl-82-207-238-041.citykom.de) (Ping timeout: 256 seconds)
03:56:56 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
03:56:59 <Lycurgus> dsal, are you using nixos or just nix?
03:57:04 <dsal> I run both.
03:57:09 <Lycurgus> figured
03:57:11 <dsal> This is a Mac, though.
03:57:16 alzgh joins (~alzgh@user/alzgh)
03:57:51 <asivitz> ok interesting. that does not segfault
03:57:56 <dsal> nix-env -u
03:58:02 <dsal> It sounds like you just have something old and broken.
03:58:20 <Axman6> Nolrai2: that sounds... unfortunate
03:58:37 td_ joins (~td@94.134.91.233)
04:00:25 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:00:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
04:00:25 wroathe joins (~wroathe@user/wroathe)
04:03:43 <Nolrai2> Axman6 : It is somewhat.
04:04:07 <Axman6> maybe it's a statement on the state of the world, everything is truly false
04:04:13 <Nolrai2> >.<
04:04:35 <Nolrai2> I mean it works if I don't use a fixed sized vector, so what does that mean? :P
04:04:46 <asivitz> dsal: well if you don't mind taking a look, here's basically the set of nix things I'm doing. I'm probably doing something really stupid here. just kind of picking things off the internet. https://paste.tomsmeding.com/hgvAv0QV
04:05:26 jinsun joins (~quassel@user/jinsun)
04:06:13 <asivitz> maybe I should just read the nix manual and stop bothering #haskell lol
04:06:32 <dsal> Oh interesting. I use home-manager. I don't exactly understand how that installs stuff. You said it works OK in a nix-shell, though?
04:07:43 <asivitz> yea it does. so I'm doing something silly. maybe I should just use home-manager
04:07:57 <asivitz> thanks so much for your help! I'm on the right track now at least
04:09:10 puke joins (~puke@user/puke)
04:12:07 × zaquest quits (~notzaques@5.130.79.72) (Quit: Leaving)
04:19:55 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
04:22:18 zaquest joins (~notzaques@5.130.79.72)
04:24:41 × jkaye quits (~jkaye@2601:281:8300:7530:6f4:bc42:8be5:e20d) (Ping timeout: 250 seconds)
04:27:33 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
04:31:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
04:32:11 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 264 seconds)
04:33:30 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 265 seconds)
04:35:19 rkrishnan joins (~user@122.167.19.65)
04:36:20 × welterde quits (welterde@thinkbase.srv.welterde.de) (Ping timeout: 268 seconds)
04:39:50 × hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
04:40:04 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
04:42:31 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
04:44:43 deadmarshal joins (~deadmarsh@95.38.114.190)
04:45:22 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
04:46:08 hughjfchen joins (~hughjfche@vmi556545.contaboserver.net)
04:47:16 welterde joins (welterde@thinkbase.srv.welterde.de)
04:50:58 ralu joins (~ralu@static.211.245.203.116.clients.your-server.de)
04:51:22 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 260 seconds)
04:52:34 MoC_ joins (~moc@user/moc)
04:52:50 × MoC quits (~moc@user/moc) (Ping timeout: 265 seconds)
04:53:43 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 250 seconds)
04:55:46 pfurla joins (~pfurla@2804:14d:5c81:4104:54e1:e6c6:79ac:779c)
04:58:32 × mvk quits (~mvk@2607:fea8:5cc3:e900::df92) (Ping timeout: 268 seconds)
04:59:07 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 265 seconds)
05:00:43 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
05:01:46 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 245 seconds)
05:08:25 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
05:08:41 img joins (~img@user/img)
05:12:20 × EvanR quits (~evan@user/evanr) (Quit: Leaving)
05:12:25 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
05:17:01 <jackdk> Given `x :: Lens' a (Maybe b)` and `y :: Lens' b (Maybe c)`, is there a combinator that produces a `Lens' a (Maybe c)`?
05:18:35 <nshepperd> There is not
05:19:19 <jackdk> darn. feels like there should
05:19:36 <awpr> hm, I don't think that can be a valid Lens -- when setting to Nothing, it can't distinguish outer Nothing from inner Nothing
05:19:43 × atlas quits (~jbox@user/jbox) (Ping timeout: 250 seconds)
05:21:47 <nshepperd> also, putting Just (x :: c) into such a lens if it was initially Nothing would not tell it how to make the required b
05:21:51 <jackdk> fair. this is distilled from an example using amazonka-dynamodb's AttributeValue type, which (because of codegen reasons) badly implements a sumtype by providing a set of lenses in lieu of prisms.
05:23:12 deadmarshal joins (~deadmarsh@95.38.114.190)
05:23:18 <jackdk> If you parsed AttributeValue into a better AST and then had `x :: Prism' a b` and `y :: Lens' b (Maybe c)`, could you then get a `Lens' a (Maybe c)`? Feels more plausible, anyway
05:24:16 <nshepperd> however i think if you have a concept of a "default value" for b, you can convert Lens' a (Maybe b) to Lens' a b
05:31:09 chexum joins (~quassel@gateway/tor-sasl/chexum)
05:31:18 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 276 seconds)
05:32:32 <glguy> :t non
05:32:33 <lambdabot> (Eq a, Profunctor p, Functor f) => a -> p a (f a) -> p (Maybe a) (f (Maybe a))
05:33:11 <glguy> Like: at 'k' . non 0
05:37:22 <asivitz> dsal: lol this was the problem: https://github.com/commercialhaskell/stack/issues/5607
05:38:12 <dsal> Ah, I don't run zsh
05:41:54 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:51:03 <dibblego> jackdk: there is a traversal
05:52:58 <dibblego> @type \x y -> x . _Just . y
05:52:59 <lambdabot> (Choice p, Applicative f) => (p (Maybe a1) (f (Maybe b)) -> c) -> (a2 -> p a1 (f b)) -> a2 -> c
05:53:06 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:04:10 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
06:09:49 <jackdk> dibblego: thanks but i particularly want to be able to write back in . but I think I need to write a proper AST type for amazonka-dynamodb's attributevalue type. After I get around to everything else I need to write
06:16:29 × cjb quits (~cjbayliss@user/cjb) ()
06:20:00 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
06:20:26 mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi)
06:25:38 × phma quits (phma@2001:5b0:210f:6c88:14c5:503:d6e5:c919) (Read error: Connection reset by peer)
06:26:35 phma joins (phma@2001:5b0:2172:a9b8:34c1:76b3:d477:41fd)
06:27:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:29:50 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 260 seconds)
06:37:06 Guest8054 joins (~Guest80@pd9ed79bf.dip0.t-ipconnect.de)
06:43:24 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:43:53 <turlando> Hello everyone. I'm not sure what's wrong with this code https://pastebin.com/raw/2H6dmtqE GHC says "Could not deduce (Simulation state event0 result)" ... "The type variable ‘event0’ is ambiguous" in the "simulation" function definition
06:48:15 <sm> AllowAmbiguousTypes extension makes it go away..
06:49:17 atlas joins (~jbox@user/jbox)
06:51:32 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
06:52:30 <sm> ..or maybe just moves it around ? not sure
06:53:52 atlas is now known as jbox
07:01:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
07:06:35 <turlando> sm: I have AllowAmbiguousTypes enabled for the Simulator module (not enabled globally)
07:06:54 max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
07:07:16 <turlando> I also have FunctionalDependencies for the module and MultiParamTypeClasses and RankNTypes globally
07:12:49 deadmarshal joins (~deadmarsh@95.38.114.190)
07:14:06 <sm> turlando: I'm playing with this much:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/b695ad494f768676bc5b4018dff0490c9be681c3)
07:14:43 sm2n_ joins (~sm2n@user/sm2n)
07:14:56 × sm2n quits (~sm2n@user/sm2n) (Read error: Connection reset by peer)
07:15:01 <sm> I may have wrong terminology: the rule seems to be that if one of the class type variables is not mentioned in the a type signature, it must be declared as a dependent variable with a functional dependency
07:15:26 × ystael quits (~ystael@user/ystael) (Ping timeout: 268 seconds)
07:15:27 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 268 seconds)
07:15:59 ystael joins (~ystael@user/ystael)
07:16:38 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
07:18:51 <turlando> sm: now it cannot deduce result0 in finalState :\
07:18:59 <turlando> May I need to define multiple fundeps?
07:20:12 <turlando> Sorry, I misread your comment, that's exactly what you proposed. It worked, thank you a lot
07:21:04 <sm> excellent
07:22:00 lortabac joins (~lortabac@2a01:e0a:541:b8f0:c480:7b03:c5d:3876)
07:26:16 retro_ joins (~retro@97e2ba2e.skybroadband.com)
07:27:04 lavaman joins (~lavaman@98.38.249.169)
07:29:33 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
07:30:14 × retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
07:31:38 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
07:34:16 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 265 seconds)
07:41:49 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
07:44:25 × xff0x quits (~xff0x@2001:1a81:5330:8c00:519e:34db:fab7:a573) (Ping timeout: 265 seconds)
07:44:53 xff0x joins (~xff0x@2001:1a81:5330:8c00:614e:b47b:9eaf:eaca)
07:49:18 × the_finn quits (uid526334@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
07:54:28 × max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection)
07:56:05 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:59:06 zincy_ joins (~zincy@2a00:23c8:970c:4801:2831:8d93:d152:2332)
08:00:51 Everything joins (~Everythin@37.115.210.35)
08:03:53 chele joins (~chele@user/chele)
08:07:25 slice joins (~slice@user/slice)
08:07:34 pfurla_ joins (~pfurla@2804:14d:5c81:4104:6cc4:7b65:8ee1:2dd3)
08:08:44 pfurla__ joins (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced)
08:10:31 × pfurla quits (~pfurla@2804:14d:5c81:4104:54e1:e6c6:79ac:779c) (Ping timeout: 265 seconds)
08:12:27 × pfurla_ quits (~pfurla@2804:14d:5c81:4104:6cc4:7b65:8ee1:2dd3) (Ping timeout: 265 seconds)
08:12:54 michalz joins (~michalz@185.246.204.41)
08:17:30 chomwitt joins (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374)
08:18:05 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:25:19 × zincy_ quits (~zincy@2a00:23c8:970c:4801:2831:8d93:d152:2332) (Remote host closed the connection)
08:29:31 cfricke joins (~cfricke@user/cfricke)
08:30:02 kuribas joins (~user@ptr-25vy0i87u19ttsdwrve.18120a2.ip6.access.telenet.be)
08:30:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:33:19 Midjak joins (~Midjak@82-65-111-221.subs.proxad.net)
08:35:34 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2d58:181a:7f09:e906) (Remote host closed the connection)
08:36:23 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 264 seconds)
08:40:32 × johnjay quits (~pi@192.142.100.50) (Ping timeout: 268 seconds)
08:42:28 johnjay joins (~pi@192.142.100.50)
08:42:40 wei2912 joins (~wei2912@138.75.71.147)
08:47:38 gehmehgeh joins (~user@user/gehmehgeh)
08:48:21 neurocyte0132889 joins (~neurocyte@45.131.36.116)
08:48:21 × neurocyte0132889 quits (~neurocyte@45.131.36.116) (Changing host)
08:48:21 neurocyte0132889 joins (~neurocyte@user/neurocyte)
08:50:57 smunix joins (~smunix@static.26.70.12.49.clients.your-server.de)
08:53:08 mmhat joins (~mmh@55d47041.access.ecotel.net)
08:55:35 × jbox quits (~jbox@user/jbox) (Ping timeout: 264 seconds)
08:56:43 jumper149 joins (~jumper149@static.6.71.203.116.clients.your-server.de)
08:58:35 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
08:58:36 chele_ joins (~chele@user/chele)
09:00:00 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
09:00:08 × stoicswe[m] quits (~deadlette@2001:470:69fc:105::d277) (Quit: You have been kicked for being idle)
09:01:16 × chele quits (~chele@user/chele) (Ping timeout: 265 seconds)
09:02:16 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
09:02:33 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
09:08:37 × aegon quits (~mike@174.127.249.180) (Remote host closed the connection)
09:09:18 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
09:12:09 AlexNoo_ joins (~AlexNoo@178.34.150.115)
09:14:26 × AlexNoo quits (~AlexNoo@178.34.150.115) (Read error: Connection reset by peer)
09:19:15 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:20:13 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 250 seconds)
09:36:21 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
09:36:53 <zincy> davean: Hey
09:37:02 <zincy> Good meeting?
09:39:58 vysn joins (~vysn@user/vysn)
09:40:55 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
09:41:47 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Ping timeout: 264 seconds)
09:42:27 × vysn quits (~vysn@user/vysn) (Client Quit)
09:42:44 vysn joins (~vysn@user/vysn)
09:44:22 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:48:52 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:49:25 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
09:49:58 chele joins (~chele@user/chele)
09:52:01 × chele_ quits (~chele@user/chele) (Ping timeout: 265 seconds)
09:53:36 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Remote host closed the connection)
09:54:28 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
09:54:38 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
09:55:43 <carbolymer> will `act >>= (\x -> x `seq` pure x)` evalute x in this case?
09:57:27 <Axman6> for one, it depends on which monad you're using
09:57:46 <carbolymer> a stack, with IO on the bottom
09:58:58 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 256 seconds)
09:59:13 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 250 seconds)
09:59:28 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
09:59:35 <tomsmeding> in plain IO, it would because bindIO is strict IIRC
09:59:48 <tomsmeding> in a stack it might depend on what exactly is above it?
09:59:59 <kuribas> carbolymer: That doesn't evaluate the function, it creates a new IO monad.
10:00:20 <carbolymer> kuribas: by function you mean x?
10:00:29 <carbolymer> tomsmeding: damn, I forgot that bind can be lazy
10:00:29 <kuribas> carbolymer: no (\x -> ..)
10:01:54 <tomsmeding> kuribas: point is whether writing that will ensure that x is evaluated before any further evaluation is done in the monad
10:02:44 <carbolymer> yeah, going step back, I have `act :: m a`, I want to evaluate `a` when evaluating `act`
10:02:45 <kuribas> tomsmeding: yes, to hnf
10:02:46 <tomsmeding> like, readFile "a.txt" >>= (\x -> x `deepseq` pure x) >>= (\x -> deleteFile "a.txt" >> doSomethingWith x)
10:02:56 <tomsmeding> kuribas: point is, depends on the monad
10:03:06 <tomsmeding> >>= may be lazy, in which case no, it will not evaluate
10:03:52 <tomsmeding> oh I misplaced some parens
10:04:03 <tomsmeding> like, readFile "a.txt" >>= (\x -> x `deepseq` pure x >>= (\x -> deleteFile "a.txt" >> doSomethingWith x))
10:04:05 <tomsmeding> I think
10:04:52 <tomsmeding> carbolymer: what kind of monads are on top, if they require sequencing in the underlying IO monad for every >>= of the stack, then it'll probably evaluate
10:05:04 <tomsmeding> but I think there are other monads that have lazy bind
10:05:39 <tomsmeding> s/have lazy bind/do their bind magic within itself, only calling underlying >>= once in a while or something/
10:05:44 <carbolymer> tomsmeding: ReaderT and ExceptT, I guess you're right, this should evaluate in my case
10:05:51 <tomsmeding> yeah those are well-behaving
10:06:11 <tomsmeding> was thinking along the lines of ContT or LogicT or what have you
10:06:18 tomsmeding doesn't actually know how those things work
10:07:02 <carbolymer> yeah, in our team we aren't eager into jumping into that voodoo stuff, we have a lot of fun with laziness already ;]
10:07:18 <tomsmeding> sounds smart :p
10:14:00 <tomsmeding> carbolymer: example of non-strict >>= https://hackage.haskell.org/package/base-4.16.0.0/docs/src/GHC.Base.html#line-1176
10:14:15 × xff0x quits (~xff0x@2001:1a81:5330:8c00:614e:b47b:9eaf:eaca) (Ping timeout: 265 seconds)
10:14:33 AlexNoo_ is now known as AlexNoo
10:15:05 xff0x joins (~xff0x@2001:1a81:5330:8c00:7ee9:82eb:bec8:3505)
10:15:44 <carbolymer> tomsmeding: hmm, well, this works, i.e. GHCi sees exception: `(foo (pure undefined :: [Int]) >> pure 2)` where `foo act = act >>= (\x -> x `seq` pure x)`
10:15:46 <tomsmeding> or hm, maybe it ends up being strict anyway
10:15:51 <carbolymer> yeah, seems to be strict
10:17:37 <carbolymer> hmm, but why?
10:18:48 <tomsmeding> because even >> traverses its left argument
10:18:59 <tomsmeding> I believe
10:21:00 <carbolymer> > ((pure undefined :: [Int]) >> pure 2)
10:21:02 <lambdabot> [2]
10:21:06 <carbolymer> tomsmeding: ^
10:21:25 <tomsmeding> yeah traverses its left _monad_ argument
10:21:35 <tomsmeding> Control.Monad.Writer.Lazy is an example though
10:21:51 <tomsmeding> % foo act = act >>= (\x -> x `seq` pure x)
10:21:51 <yahb> tomsmeding:
10:22:25 <tomsmeding> % Control.Monad.Trans.Writer.Strict.mapWriter (second (const "")) $ foo (pure undefined :: Writer String Int) >> pure 2
10:22:25 <yahb> tomsmeding: ; <interactive>:78:67: error:; * Couldn't match type: WriterT String Identity; with: Control.Monad.Trans.Writer.Strict.WriterT w0 Identity; Expected: Control.Monad.Trans.Writer.Strict.Writer w0 a; Actual: WriterT String Identity a; NB: `Control.Monad.Trans.Writer.Strict.WriterT' is defined in `Control.Monad.Trans.Writer.Strict'; `WriterT' is defined
10:22:46 <tomsmeding> % Control.Monad.Trans.Writer.Strict.mapWriter (second (const "")) $ foo (pure undefined :: Control.Monad.Trans.Writer.Strict.Writer String Int) >> pure 2
10:22:47 <yahb> tomsmeding: WriterT (Identity (*** Exception: Prelude.undefined; CallStack (from HasCallStack):; error, called at libraries/base/GHC/Err.hs:75:14 in base:GHC.Err; undefined, called at <interactive>:79:77 in interactive:Ghci34
10:22:57 <tomsmeding> % Control.Monad.Trans.Writer.Lazy.mapWriter (second (const "")) $ foo (pure undefined :: Control.Monad.Trans.Writer.Lazy.Writer String Int) >> pure 2
10:22:57 <yahb> tomsmeding: WriterT (Identity (2,""))
10:22:59 <tomsmeding> boom
10:23:29 <tomsmeding> (you need the mapWriter here because otherwise there is still, of course, a bottom in the written log)
10:23:37 MarcoZ[m] joins (~ocramzmat@2001:470:69fc:105::1:35b0)
10:23:43 MarcoZ[m] is now known as ocramz[m]
10:23:51 <ocramz[m]> o/
10:23:51 <tomsmeding> s/of course/I think/
10:24:12 <tomsmeding> yeah there is because of how >>= works
10:24:20 <tomsmeding> carbolymer: ^
10:24:54 <tomsmeding> ocramz[m]: \o
10:25:35 deadmarshal joins (~deadmarsh@95.38.114.190)
10:26:16 <kuribas> @hoogle $>
10:26:17 <lambdabot> Data.Functor ($>) :: Functor f => f a -> b -> f b
10:26:17 <lambdabot> Data.Functor.Compat ($>) :: Functor f => f a -> b -> f b
10:26:17 <lambdabot> Data.Functor.Apply ($>) :: Functor f => f a -> b -> f b
10:26:25 <kuribas> @hoogle <$
10:26:25 <lambdabot> Prelude (<$) :: Functor f => a -> f b -> f a
10:26:25 <lambdabot> Control.Monad (<$) :: Functor f => a -> f b -> f a
10:26:25 <lambdabot> Control.Applicative (<$) :: Functor f => a -> f b -> f a
10:26:31 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 250 seconds)
10:26:47 <tomsmeding> clearly, you only need <$ when you rose above the world of functors
10:27:07 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
10:27:50 <kuribas> what do you mean?
10:28:17 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
10:28:35 × slice quits (~slice@user/slice) (Quit: cya)
10:28:37 <tomsmeding> dumb joke, because <$ is in Control.{Applicative,Monad} while $> is in Data.Functor
10:29:02 <kuribas> right, strange indeed
10:31:33 <carbolymer> tomsmeding: yeah, but https://hackage.haskell.org/package/transformers-0.6.0.2/docs/src/Control.Monad.Trans.Writer.Lazy.html#line-206 has irrefutable patterns, so it kind of explicitly encodes laziness in Monad instance - so `>>` is strict by default?
10:31:48 <ocramz[m]> imagine what kind of shouting match if we were to move <$ and $> to the same module
10:32:21 <tomsmeding> carbolymer: note that WriterT doesn't specialise >>
10:32:27 <tomsmeding> so the strictness can't come from >>
10:32:37 <tomsmeding> ocramz[m]: heh yes
10:33:49 <tomsmeding> carbolymer: note that the irrefutable patterns are not essential; that >>= can also be written: m >>= k = WriterT $ runWriterT m >>= \p -> runWriterT (k (fst p)) >>= \q -> return (fst q, snd p `mappend` snd q)
10:34:00 <tomsmeding> using fst/snd instead of irrefutable patterns, same semantics
10:34:29 <carbolymer> tomsmeding: but you demonstrated the laziness of `>>` in lazy Writer
10:34:49 <tomsmeding> which inherits laziness from >>=
10:34:50 lavaman joins (~lavaman@98.38.249.169)
10:35:55 <tomsmeding> I wonder if lazy Writer becomes strict if you do 'WriterT StrictIdentity', where StrictIdentity doesn't have 'm >>= k = k (runIdentity m)' but '!m >>= k = k (runIdentity m)'
10:36:17 <carbolymer> tomsmeding: so that bind oneliner you wrote is also lazy?
10:36:26 <tomsmeding> the fst/snd one? yes
10:36:34 <tomsmeding> it's completely equivalent to the ~() version
10:38:05 <carbolymer> I think I don't see it (yet)
10:38:43 <tomsmeding> that equivalence? or where the laziness comes from
10:38:49 <tomsmeding> I'm also not completely sure yet about the latter
10:38:59 <carbolymer> the laziness
10:45:39 <tomsmeding> ah, making Identity strict indeed defeats the laziness of lazy Writer
10:46:10 <tomsmeding> carbolymer: https://paste.tomsmeding.com/iVwhUJ6g
10:46:28 <tomsmeding> only difference between Identity and SIdentity is that SIdentity's bind operator is strict, as you can see
10:46:40 <tomsmeding> mapWriter' is just mapWriter but then for SIdentity
10:47:03 <tomsmeding> thing1 produces 'WriterT (Identity (2,""))', while thing2 produces WriterT (SIdentity (*** Exception: Prelude.undefined'
10:47:17 <carbolymer> so now I don't understand why list's `>>` is strict ;]
10:48:10 <tomsmeding> carbolymer: >> = *> for lists, and in *> you see that in order to produce items of the result list, you have to evaluate the spine of the left-hand argument to *>
10:49:12 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
10:49:16 <tomsmeding> so the spine (i.e. monad structure) of the result list is dependent on the spine (monad structure) of the left argument
10:49:33 <carbolymer> tomsmeding: so this is because of this pattern match: `xs *> ys = [y | _ <- xs, y <- ys]` ?
10:49:40 <tomsmeding> yeah talking about that one
10:50:16 <tomsmeding> if xs is [], the result is []; if xs is _ : _, the result depends on ys
10:50:28 <carbolymer> so this means that list comprehension is strict?
10:50:38 <tomsmeding> so evaluating (xs >> ys) to WHNF requires evaluation of xs to WHNF -- to check whether it's [] or _:_
10:51:00 <tomsmeding> it must be! because the outermost constructor of the result depends on the inputs :p
10:51:00 ubert joins (~Thunderbi@p200300ecdf0ba2663873d9a1bfed1dd8.dip0.t-ipconnect.de)
10:51:21 <carbolymer> ok, now everything makes sense
10:51:22 <carbolymer> ;]
10:51:23 <tomsmeding> bit like 'if isJust x then 1 else 2' is strict in x, because, well, it must be
10:51:29 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
10:51:34 <tomsmeding> even if there is no seq in sight
10:51:48 <tomsmeding> carbolymer: does it? it only half does for me
10:51:50 <tomsmeding> :p
10:52:14 <tomsmeding> but yeah, lazy bind exists shrugs
10:52:59 <carbolymer> tomsmeding: I mean, it still feels that "haskell is lazy, except [list of dozen corner cases"
10:53:08 <tomsmeding> haskell is call-by-need
10:53:16 <tomsmeding> stuff gets evaluated when the result depends on it
10:53:33 <tomsmeding> and you can create artificial dependencies using seq/BangPatterns
10:53:46 <kuribas> carbolymer: well, stuff has to be evaluated *some* time :)
10:54:09 <tomsmeding> carbolymer: and then you have https://gitlab.haskell.org/ghc/ghc/-/issues/20687
10:54:18 × ubert quits (~Thunderbi@p200300ecdf0ba2663873d9a1bfed1dd8.dip0.t-ipconnect.de) (Client Quit)
10:54:27 geekosaur joins (~geekosaur@xmonad/geekosaur)
10:55:53 max22- joins (~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr)
10:56:12 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
10:56:22 <carbolymer> kuribas: well yes, until you use `void` ;]
10:56:32 <carbolymer> or similar thing
10:58:28 <tomsmeding> carbolymer: my feeling with stuff like this is more, I think I'm okay enough with the low-level rules, like I know what irrefutable patterns do in the common cases and things like that. But then people build skyscrapers on top of that, and hell if I know what the resonance index of a skyscraper is given the resonance indices of all the individual metal panels
10:59:03 <tomsmeding> WriterT s Identity is fairly low building still
10:59:15 <carbolymer> tomsmeding: that's when abstractions failed you, because you need to know internals to properly use them
10:59:17 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 268 seconds)
10:59:25 <tomsmeding> I guess
10:59:35 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
11:00:03 <carbolymer> tomsmeding: and then you stick chewing gum to the metal panel - and resonance avoided!
11:00:07 <tomsmeding> though Writer in particular also allows you to reason on a higher level: strict WriterT adds strictness, while lazy WriterT doesn't. So it's lazy only if the underlying monad is lazy and you're using lazy WriterT
11:00:12 <tomsmeding> :D
11:00:37 <tomsmeding> but that high-level reasoning doesn't transfer to other monads
11:00:39 alx741 joins (~alx741@181.196.68.87)
11:00:45 <carbolymer> yeah
11:01:39 <maerwald> "laziness is a leaky abstraction"?
11:01:44 <maerwald> I think I might agree on that
11:02:24 <maerwald> at least when you reason operationally
11:02:35 <kuribas> laziness isn't an abstraction
11:02:35 × m1dnight quits (~christoph@christophe.dev) (Quit: WeeChat 3.1)
11:03:00 <carbolymer> pipes are monads, so they sometimes leak
11:03:24 <maerwald> kuribas: I think it is
11:03:41 <maerwald> you can write lazy code in other languages like C, but it requires manual effort
11:03:44 <tomsmeding> laziness is an abstraction, but for something else than we're talking about here
11:03:56 <tomsmeding> the topic here was how monads abstract over certain instances of laziness
11:03:59 m1dnight joins (~christoph@christophe.dev)
11:04:24 <tomsmeding> what laziness abstracts over is the evaluation model, which we're not even talking about currently
11:13:39 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
11:13:49 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
11:14:09 alzgh joins (~alzgh@user/alzgh)
11:17:41 __monty__ joins (~toonn@user/toonn)
11:21:44 × Guest8054 quits (~Guest80@pd9ed79bf.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
11:23:43 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 250 seconds)
11:23:44 × kaychaks__ quits (sid236345@helmsley.irccloud.com) (Quit: Connection closed for inactivity)
11:30:03 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:34:17 nschoe joins (~quassel@178.251.84.79)
11:37:26 jakalx parts (~jakalx@base.jakalx.net) ()
11:38:07 mark__ joins (~a@p200300ef973db1d9502293e1a26d2ca1.dip0.t-ipconnect.de)
11:39:04 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
11:41:55 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 250 seconds)
11:42:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:42:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:43:35 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Ping timeout: 264 seconds)
11:53:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
11:53:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:54:10 × dfip^ quits (~dfip@h50.174.139.63.static.ip.windstream.net) (Remote host closed the connection)
12:01:33 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 265 seconds)
12:04:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
12:04:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:05:11 machinedgod joins (~machinedg@24.105.81.50)
12:05:15 × jmorris quits (uid433911@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
12:09:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:10:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:11:23 dlbh^ joins (~dlbh@h50.174.139.63.static.ip.windstream.net)
12:13:43 jakalx joins (~jakalx@base.jakalx.net)
12:15:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
12:15:25 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:18:54 Lycurgus joins (~juan@98.4.112.204)
12:20:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
12:21:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:21:15 fef joins (~thedawn@user/thedawn)
12:24:21 <dminuoso> Is there a simple way to have a const generic over the number of arguments?
12:24:48 Guest4216 joins (~Guest42@wificampus-098145.grenet.fr)
12:24:57 <dminuoso> Background: Im writing out some servant code, and I have a bunch of handlers where Im writing: { foo = \_ _ _ -> forbidden, bar = \_ -> forbidden, quux = \_ _ _ _ _ -> forbidden } and so on
12:25:26 <dminuoso> And it'd be much simpler if I could just write `API { foo = constG forbidden; bar = constG forbidden; quux = constG forbidden }`
12:26:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
12:26:11 Guest80 joins (~Guest80@pd9ed79bf.dip0.t-ipconnect.de)
12:26:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:27:34 boxscape_ joins (~boxscape_@134.171.69.87)
12:28:11 × Codaraxis quits (~Codaraxis@user/codaraxis) (Remote host closed the connection)
12:28:36 Codaraxis joins (~Codaraxis@user/codaraxis)
12:32:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
12:32:11 × vysn quits (~vysn@user/vysn) (Ping timeout: 264 seconds)
12:32:32 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:33:39 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
12:36:20 × wei2912 quits (~wei2912@138.75.71.147) (Quit: Lost terminal)
12:36:51 jespada joins (~jespada@252-155-231-201.fibertel.com.ar)
12:47:45 × jespada quits (~jespada@252-155-231-201.fibertel.com.ar) (Quit: Textual IRC Client: www.textualapp.com)
12:50:45 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
12:55:41 <tomsmeding> I think the only way would be with a printf-like type class, but that won't work here because the final return type doesn't have anything to distinguish it
12:56:41 <tomsmeding> or hm, does seem to work?
12:56:41 <dminuoso> Indeed, Ive been trying to crack this nut for a while now
12:56:46 <dminuoso> How would you?
12:57:04 <tomsmeding> % :set -XFlexibleInstances -XMultiParamTypeClasses
12:57:04 <yahb> tomsmeding:
12:57:11 <tomsmeding> % class GenConst a t where constG :: a -> t
12:57:12 <yahb> tomsmeding:
12:57:12 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
12:57:15 <tomsmeding> % instance GenConst a a where constG = id
12:57:16 <yahb> tomsmeding:
12:57:19 <tomsmeding> % instance GenConst a t => GenConst a (s -> t) where constG x = const (constG x)
12:57:20 <yahb> tomsmeding:
12:57:24 <merijn> I missed the preamble
12:57:27 <merijn> What's the goal?
12:57:39 <tomsmeding> % constG 42 'a' [] () :: Int
12:57:39 <yahb> tomsmeding: ; <interactive>:85:1: error:; * No instance for (GenConst Integer Int) arising from a use of `constG'; * In the expression: constG 42 'a' [] () :: Int; In an equation for `it': it = constG 42 'a' [] () :: Int
12:57:55 <tomsmeding> % (constG :: Int -> a -> b -> c -> Int) 42 'a' [] () :: Int
12:57:55 <yahb> tomsmeding: 42
12:58:12 <tomsmeding> okay type inference breaks completely so doesn't help
12:58:25 <tomsmeding> merijn: https://ircbrowse.tomsmeding.com/day/lchaskell/2021/11/16?id=274123#trid274123
12:58:39 <opqdonut> % constG (42::Int) 'a' [] () :: Int
12:58:39 <yahb> opqdonut: 42
12:58:43 <opqdonut> not completely
12:58:44 <tomsmeding> oh!
12:58:52 <tomsmeding> oh lol defaulting
12:58:59 <opqdonut> yeh
12:58:59 <tomsmeding> dminuoso: ^
12:59:08 <merijn> ah
12:59:32 <tomsmeding> this seems deceptively simple
12:59:33 × max22- quits (~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
12:59:47 Kaiepi joins (~Kaiepi@156.34.44.192)
12:59:58 <tomsmeding> how are those instances not overlapping, by the way?
12:59:59 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
13:00:10 <dminuoso> tomsmeding: Yeah no: https://gist.github.com/dminuoso/3465f25002106f618cf2d69a6deda9e8
13:00:14 Kaiepi joins (~Kaiepi@156.34.44.192)
13:00:16 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
13:00:26 <dminuoso> Mmm
13:00:31 Kaiepi joins (~Kaiepi@156.34.44.192)
13:00:33 <dminuoso> Probably doesn't help that `forbidden` is polymorphic either
13:00:44 <tomsmeding> dminuoso: the problem is precisely that 'forbidden' is polymorphic
13:00:53 <tomsmeding> are you ever going to put a function value in that?
13:00:53 <dminuoso> Given the problem domain, it has to be
13:01:03 <dminuoso> tomsmeding: forbidden just throws an exception.
13:01:14 <tomsmeding> like, are you ever going to write 'constG f' with f of function type
13:01:16 <dminuoso> You can think of it as type `IO a`
13:01:19 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
13:01:33 lavaman joins (~lavaman@98.38.249.169)
13:01:34 <dminuoso> No
13:01:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
13:01:57 <tomsmeding> if not, make the '->' instance OVERLAPPING and rewrite the first instance to 'instance {-# OVERLAPPABLE #-} a ~ b => GenConst a b where constG = id'
13:02:07 <tomsmeding> untested :D
13:02:28 × Kaiepi quits (~Kaiepi@156.34.44.192) (Client Quit)
13:02:36 × Guest4216 quits (~Guest42@wificampus-098145.grenet.fr) (Ping timeout: 256 seconds)
13:02:43 Kaiepi joins (~Kaiepi@156.34.44.192)
13:02:56 <dminuoso> tomsmeding: Ah yes, that did the trick.
13:03:04 <tomsmeding> \o/
13:03:07 kmein_ is now known as kmein
13:03:07 <dminuoso> My typeclass-fu is not good enough to understand why that even worked.
13:03:29 <tomsmeding> it now always selects the -> instance if possible, which gives the const another argument
13:03:33 × Kaiepi quits (~Kaiepi@156.34.44.192) (Client Quit)
13:03:39 <tomsmeding> if it's not a function anymore, it always selects the first instance
13:03:51 <dminuoso> That much I understand, but why did you move the `a ~ b` into a constraint?
13:03:57 Kaiepi joins (~Kaiepi@156.34.44.192)
13:04:05 <tomsmeding> the difference between 'instance GenConst a a' and 'instance a ~ b => GenConst a b' is that with the 'a a' version, ghc has to have proven already that the two arguments are equal
13:04:11 <tomsmeding> before being able to use the instance
13:04:14 <dminuoso> Is that because instance selection occurs first, and you want that instance to be not preferred?
13:04:30 <tomsmeding> with the ~ version, ghc can always select the instance, and then _learn_ that it must also have equality
13:04:43 <tomsmeding> which then, subsequently, forces the polymorphic 'forbidden' to have the right type
13:04:48 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
13:04:49 ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
13:04:51 <dminuoso> Ohh
13:04:56 <dminuoso> I kind of..
13:04:59 <dminuoso> Not quite.
13:05:05 <tomsmeding> ghc can't prove that GuardM a ~ GuardM [Server], but it can _instantiate_ a to [Server]
13:05:28 <dminuoso> Alright. Next up, I have to cook up generic code that can generically set `forbidden` on any handler with this!
13:05:35 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
13:05:43 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
13:05:51 <dminuoso> (Arguably, if I have generics, I could just generically do a nested const...)
13:06:16 <dminuoso> 14:05:05 tomsmeding | ghc can't prove that GuardM a ~ GuardM [Server], but it can _instantiate_ a to [Server]
13:06:19 <dminuoso> Mmm
13:06:49 <dminuoso> I think there's an earlier piece that Im missing
13:06:52 <tomsmeding> the key thing here, I believe, is that type classes are _open_
13:07:18 <tomsmeding> if they were closed, i.e. ghc could be sure there are no more instances floating around that it doesn't know of, then the ~ version and the 'a a' version would be equivalent
13:07:45 <tomsmeding> but because type classes are open, ghc doesn't know that there might not be some other 'GenConst a b' instance around that it should select if the two arguments are _not_ equal
13:08:00 <dminuoso> Maybe Im actually confused about your construction of the base case to begin with
13:08:07 <tomsmeding> so ghc can't pick the 'GenConst a a' instance if it isn't already sure that the arguments are the same
13:08:36 <tomsmeding> whereas writing 'GenConst a b' precludes the existence of any other such instance, so ghc can freely pick this one
13:08:48 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
13:08:57 <tomsmeding> dminuoso: the base case, as in, const with zero ignored arguments is id?
13:09:01 <dminuoso> Yes
13:09:22 × nschoe quits (~quassel@178.251.84.79) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:09:25 <dminuoso> Oh.
13:09:31 <dminuoso> I get it.
13:09:40 tomsmeding is not quite sure what your confusion as
13:09:51 <tomsmeding> but "I get it" sounds good :D
13:09:53 <dminuoso> Yeah no, I think Ive looked at this problem for far too long
13:10:09 <tomsmeding> 13:59 <tomsmeding> this seems deceptively simple
13:10:10 <merijn> dminuoso: My advice would be: just write the lambdas :p
13:10:17 <tomsmeding> I didn't expect this to work
13:10:30 <dminuoso> merijn: I have a lot of them with varying arguments.
13:10:50 <merijn> dminuoso: Write a TH function or just write them out once? :p
13:10:51 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
13:10:51 <tomsmeding> dminuoso: do you see why this breaks completely if you ever pass a function value to constG ?
13:11:14 <tomsmeding> % constG (id :: Int -> Int) () [] :: Int -> Int
13:11:14 <yahb> tomsmeding: ; <interactive>:88:1: error:; * Overlapping instances for GenConst (Int -> Int) (Int -> Int) arising from a use of `constG'; Matching instances:; instance [safe] forall a. GenConst a a -- Defined at <interactive>:83:10; instance [safe] forall a t s. GenConst a t => GenConst a (s -> t) -- Defined at <interactive>:84:10; * In the expression: constG (id :: Int -> Int) () [] ::
13:11:15 <merijn> Write a helper for 1-10 (or whatever) arguments with a number at the end of the name and don't think about it again
13:11:25 <merijn> Utils.hs to the rescue
13:11:57 <tomsmeding> yeah, functions not working make me sort of prefer merijn's suggestion of const3 const4 const5 const6
13:12:17 <dminuoso> Perhaps if this was ever needed
13:12:34 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
13:15:46 neurocyte0132889 joins (~neurocyte@45.131.36.116)
13:15:46 × neurocyte0132889 quits (~neurocyte@45.131.36.116) (Changing host)
13:15:46 neurocyte0132889 joins (~neurocyte@user/neurocyte)
13:16:45 <merijn> I mean, is it ugly to handwrite that function 10 times? Sure. It's also foolproof and unlikely to ever break or need any maintenance
13:16:48 <merijn> so who cares
13:17:08 mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
13:17:16 <dminuoso> Perhaps you're right. Another reason is that it doesnt require a trip to #haskell and having luck whether tomsmeding is around to make sense of it.
13:17:22 <dminuoso> Mmm
13:17:52 <tomsmeding> :p
13:18:19 <dminuoso> tomsmeding: To continue the previous, why would it have to prove `GuardM a ~ GuardM [Server]`?
13:18:26 <tomsmeding> who knew that I would be in a position to spread type class fu
13:18:42 <tomsmeding> dminuoso: for the original 'GenConst a a' instance
13:19:17 <tomsmeding> the constraint at that point is 'GenConst (GuardM a) (GuardM [Server])', because the value it's passed is 'forbidden', and the value it should produce is GuardM [Server]
13:19:37 <tomsmeding> to be allowed to even look at that 'GenConst a a' instance, ghc has to prove that those arguments are equal
13:19:54 <tomsmeding> because there might be another 'GenConst a b' instance around, technically
13:20:03 wmacmil joins (~wmacmil@83-233-165-97.cust.bredband2.com)
13:20:10 <tomsmeding> overlapping instances notwithstanding, I guess
13:20:45 kupi joins (uid212005@hampstead.irccloud.com)
13:20:53 <wmacmil> whats the easiest way to work with vanilla mutually inductive datatypes in haskell? for gadts?
13:20:54 <dminuoso> tomsmeding: But why cant GHC simply insert its `a ~ [Server]` constraint itself?
13:21:13 <tomsmeding> dminuoso: because there might be another 'GenConst a b' instance around :p
13:21:13 <dminuoso> This might sound a bit dumb, and perhaps ignorant of what you just wrote
13:21:15 <dminuoso> Mmm
13:21:22 <tomsmeding> which it might have to select if it turns out that a ~ () or something
13:21:23 <wmacmil> i.e. how do you replicate the mutual keyword from agda
13:21:41 <tomsmeding> wmacmil: gadts are already mutually recursive by default in haskell?
13:22:09 <tomsmeding> everything is mutually recursive in haskell, except for template haskell stuff
13:22:20 <wmacmil> cool :)
13:22:54 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
13:23:35 <dminuoso> tomsmeding: But GHC already sees all instances in scope, the resolution happens right here. My use of constG doesnt produce any GenConst constraint, why would GHC care whether someone on the moon wrote an instance for that?
13:23:48 <tomsmeding> dminuoso: no, type classes are open, ghc cannot assume it sees all instances in scope
13:24:02 <tomsmeding> compare 'type family F a ; type instance F Int = ... ; ...' with 'type family F a where ...'
13:24:06 <tomsmeding> the first is open, the second is closed
13:24:10 <tomsmeding> type classes are always open
13:24:42 <tomsmeding> type classes are supposed to be coherent
13:24:43 <dminuoso> tomsmeding: That cant be entirely true, since clearly you can have more specific instances in some cases.
13:25:06 <tomsmeding> ghc isn't allowed to instantiate the same type class with two different dictionaries in two different situations
13:25:11 <tomsmeding> so it has to be careful
13:25:23 <tomsmeding> dminuoso: with overlapping instances you mean?
13:26:07 <tomsmeding> indeed, I believe ghc actively optimises code based on the assumption that two dictionaries of the same type class are always equal
13:26:43 <dminuoso> Well you can write this:
13:26:43 × Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Remote host closed the connection)
13:26:47 <dminuoso> % class F a where f :: a
13:26:47 <yahb> dminuoso:
13:26:48 <tomsmeding> see the Note [NOINLINE someNatVal] here: https://hackage.haskell.org/package/base-4.15.0.0/docs/src/GHC-TypeNats.html
13:26:52 <dminuoso> % instance F [a] where f = []
13:26:52 <yahb> dminuoso:
13:26:58 Kaiepi joins (~Kaiepi@156.34.44.192)
13:27:21 <tomsmeding> in particular the second-to-last paragraph of that Note
13:27:36 <dminuoso> tomsmeding: If GHC was in a complete open world assumption, GHC was *never* allowed to select that instance for `[T]`, since someone on the moon - outside the scope of the compilation unit - could have written an instance F [T]
13:27:49 <dminuoso> (Which would be more specific)
13:27:55 <dminuoso> These are not overlapping, mind you
13:28:01 <dminuoso> Just more specific
13:28:04 <tomsmeding> they are, right?
13:28:13 <tomsmeding> % instance F [Int] where f = Maybe
13:28:13 <yahb> tomsmeding: ; <interactive>:6:28: error:; * Data constructor not in scope: Maybe :: [Int]; * Perhaps you meant variable `maybe' (imported from Prelude)
13:28:17 <dminuoso> Well sure
13:28:21 <tomsmeding> % instance F [Int] where f = ()
13:28:21 <yahb> tomsmeding: ; <interactive>:7:28: error:; * Couldn't match expected type `[Int]' with actual type `()'; * In the expression: (); In an equation for `f': f = (); In the instance declaration for `F [Int]'
13:28:29 <tomsmeding> OH it's a class
13:28:35 <tomsmeding> % instance F [Int] where f = []
13:28:35 <yahb> tomsmeding:
13:28:35 <dminuoso> % instance F String where f = "foo"
13:28:35 <yahb> dminuoso:
13:28:43 <dminuoso> % f @String
13:28:44 <yahb> dminuoso: ; <interactive>:10:1: error:; * Overlapping instances for F String arising from a use of `f'; Matching instances:; instance [safe] F [a] -- Defined at <interactive>:5:10; instance [safe] F String -- Defined at <interactive>:9:10; * In the expression: f @String; In an equation for `it': it = f @String
13:28:46 tomsmeding is confused
13:28:47 <dminuoso> Oh
13:28:48 <tomsmeding> right
13:28:49 <dminuoso> Hold on
13:28:50 <tomsmeding> there you go
13:29:04 <tomsmeding> which you can fix with OVERLAPPING and OVERLAPPABLE pragmas
13:29:15 <tomsmeding> which are more specific versions of the earlier INCOHERENT pragma
13:29:16 <tomsmeding> ;)
13:30:21 <dminuoso> tomsmeding: The error message was that the type variable 'a0' is ambiguous though
13:30:34 <dminuoso> But I guess your point is:
13:31:11 <dminuoso> GHC doesnt have a mechanism to monomorphize and introduce that constraint in the type checker in general, since in the general case it doesnt make sense in an open world assumption
13:31:31 <dminuoso> Since I might as well have written something like `f = genConst forbidden` and exported `f`
13:31:46 <dminuoso> Err `f = constG forbidden`, and exported `f`. here we go.
13:32:00 <tomsmeding> I think so, yes
13:32:13 <tomsmeding> the justifications and details of the algorithm I also don't know :p
13:32:19 <dminuoso> Strictly speaking, inside this compilation unit, GHC could have safely made that unfiication
13:32:31 <dminuoso> Or introduced that constraint
13:32:50 <tomsmeding> I suspect that writing that F [T] instance in another module would be technically invalid
13:33:14 <tomsmeding> just like defining the same name in two different compilation units in C/C++ might work sometimes but is technically undefined behaviour
13:33:40 <tomsmeding> but this is my feeling, not anything concrete
13:34:23 <merijn> Looks like there might be a 2022 NL-FP \o/
13:34:28 <merijn> But it won't be in January >.>
13:34:44 <tomsmeding> \o/
13:34:47 <tomsmeding> saw the email
13:35:15 <maerwald> merijn: like... remote?
13:35:23 <merijn> I think wouter forgot to replace 2021 with 2022 though xD
13:36:02 <tomsmeding> heh yes
13:36:10 <merijn> I see basically zero value in a remote NL-FP. Better off cancelled than remote
13:36:37 <maerwald> I haven't checked whether my front door still works
13:37:18 <merijn> Remote conferences already suck with conferences that have actual money to pay for online infrastructure/streaming >.>
13:39:21 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
13:40:00 × pfurla__ quits (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced) (Quit: gone to sleep. ZZZzzz…)
13:40:44 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
13:41:17 <dminuoso> Id rather spend 800EUR on a national compulsory vaccination, and then spend another 800 on a cool conference, than some remote conference where you cant hang out with people and talk to them over a beer.
13:42:26 <maerwald> Does tea not work for you?
13:42:28 <maerwald> :D
13:43:08 <dminuoso> Tea, beer, combined, I dont care.
13:43:45 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
13:44:00 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
13:45:23 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Ping timeout: 264 seconds)
13:45:33 Carras joins (~carras@2001:f40:904:54b9:f507:3f1e:f14f:9046)
13:45:45 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
13:45:50 ec joins (~ec@gateway/tor-sasl/ec)
13:46:27 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
13:46:47 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
13:48:17 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
13:51:32 × fef quits (~thedawn@user/thedawn) (Quit: Leaving)
13:53:04 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
13:57:59 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
13:58:01 × Carras quits (~carras@2001:f40:904:54b9:f507:3f1e:f14f:9046) (Remote host closed the connection)
13:58:32 Carras joins (~carras@2001:f40:904:54b9:cc2c:1730:8d25:ddca)
13:59:07 deadmarshal joins (~deadmarsh@95.38.114.190)
14:00:09 slowButPresent joins (~slowButPr@user/slowbutpresent)
14:03:27 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:03:37 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 250 seconds)
14:05:24 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
14:06:31 jippiedoe joins (~david@2a02-a44c-e14e-1-12d4-e982-14bb-9a24.fixed6.kpn.net)
14:07:39 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
14:08:36 aman joins (~aman@user/aman)
14:08:57 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
14:10:09 pfurla joins (~pfurla@201.17.118.230)
14:12:16 shriekingnoise joins (~shrieking@186.137.144.80)
14:12:32 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:13:11 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
14:14:31 × emerson quits (~emerson@libera/staff/emerson) (Quit: Quitting)
14:14:40 benin joins (~benin@183.82.27.20)
14:18:13 × sprout_ quits (~quassel@2a02:a467:ccd6:1:e14a:d90e:46d2:87c4) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:19:03 sprout joins (~quassel@2a02:a467:ccd6:1:e14a:d90e:46d2:87c4)
14:19:07 lavaman joins (~lavaman@98.38.249.169)
14:23:30 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
14:23:40 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:26:07 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
14:31:49 × eruditass quits (uid248673@uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
14:33:07 cfricke joins (~cfricke@user/cfricke)
14:35:01 acarrico1 joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
14:38:42 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:38:42 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:38:42 wroathe joins (~wroathe@user/wroathe)
14:39:58 Guest42 joins (~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
14:41:08 thyriaen joins (~thyriaen@dynamic-077-013-170-047.77.13.pool.telefonica.de)
14:42:00 <Guest42> if `(+) :: Num a => a -> a -> a`, then is this a function defined somewhere in Prelude, or is it a compiler intrinsic?
14:43:45 <Guest42> all I could find from hackage was the Num type class definition
14:43:46 <Guest42> https://hackage.haskell.org/package/base-4.16.0.0/docs/src/GHC.Num.html#%2B
14:44:18 vysn joins (~vysn@user/vysn)
14:44:21 <maerwald> Guest42: the instance are right below that
14:45:53 <Guest42> so for example Integer defines `(+) = integerAdd`
14:46:45 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Excess Flood)
14:46:47 <Guest42> trying to click it leads me nowhere, I'll try cloning the source for myself I guess
14:46:48 <Guest42> https://hackage.haskell.org/package/base-4.16.0.0/ghc-bignum-1.2/src/GHC-Num-Integer.html#integerAdd
14:46:52 × asm quits (~alexander@burner.asm89.io) (Changing host)
14:46:52 asm joins (~alexander@user/asm)
14:47:15 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
14:48:11 <Guest42> 640k objects o_O
14:48:36 <maerwald> there's also integer-simple
14:48:37 <Guest42> ghc's my favourite compiler, it always feels like pure magic
14:48:48 <maerwald> https://hackage.haskell.org/package/integer-simple-0.1.1.1/docs/src/GHC.Integer.Type.html#plusInteger
14:48:49 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:48:52 <maerwald> different bignum backend
14:48:53 <Guest42> maerwald: yes but what are they?
14:49:10 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
14:49:29 <maerwald> ghc-bignum depends on libgmp
14:50:00 <Guest42> so compiler instrinsics?
14:50:31 <Guest42> integerAdd is in the end a call into GMP?
14:50:46 <Guest42> or is there something below integerAdd too
14:51:09 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:51:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
14:52:22 zincy_ joins (~zincy@host-92-8-239-246.as13285.net)
14:52:50 × zincy_ quits (~zincy@host-92-8-239-246.as13285.net) (Remote host closed the connection)
14:52:55 servytor joins (uid525486@hampstead.irccloud.com)
14:54:14 × [Kalisto] quits (~nico@user/kalisto/x-8968079) (Ping timeout: 268 seconds)
14:54:15 × acarrico1 quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Quit: Leaving.)
14:54:15 [Kalisto]_ joins (~nico@user/kalisto/x-8968079)
14:54:31 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
14:54:31 <lortabac> Guest42: most of these primitives are just FFI calls to C code
14:54:39 [Kalisto]_ is now known as [Kalisto]
14:56:02 × pfurla quits (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…)
14:56:13 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Client Quit)
14:56:31 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
14:58:42 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
14:58:50 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Client Quit)
14:59:09 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
15:00:48 nvmd joins (~nvmd@user/nvmd)
15:00:54 <merijn> lortabac: Most of them are primitives that are just primitives in the compiler, tbh
15:01:30 <merijn> But the Integer stuff is just libgmp calls, yeah
15:01:35 × mark__ quits (~a@p200300ef973db1d9502293e1a26d2ca1.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
15:01:57 mark__ joins (~a@p200300ef973db186502293e1a26d2ca1.dip0.t-ipconnect.de)
15:02:52 <merijn> Guest42: Most of the primitives are "in" ghc-prim (which mostly exists for typechecking, the primitives themselves are implemented inside GHC's codegen)
15:02:57 <merijn> Guest42: See, for example, https://hackage.haskell.org/package/ghc-prim-0.8.0/docs/GHC-PrimopWrappers.html
15:03:25 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Remote host closed the connection)
15:03:47 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
15:03:48 <merijn> Guest42: Which also shows that Int/Word/Float/Double/Char/etc. are just thing wrappers around primitive types: https://hackage.haskell.org/package/ghc-prim-0.8.0/docs/GHC-Types.html#t:Int
15:05:13 <lortabac> the definition of Int# is: data Int# :)
15:05:13 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
15:05:15 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
15:05:58 <merijn> Same for stuff like "gtChar# = gtChar#"
15:07:34 <boxscape_> IIRC it used to be a lot of `gtChar# = let x = x in x` - I wonder why it was changed
15:07:55 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:07:55 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:07:55 wroathe joins (~wroathe@user/wroathe)
15:08:24 <merijn> I don't recall it being that, so that must've been a *long* time ago
15:08:32 <boxscape_> hmm
15:09:55 × Carras quits (~carras@2001:f40:904:54b9:cc2c:1730:8d25:ddca) (Ping timeout: 250 seconds)
15:10:09 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Excess Flood)
15:10:34 jkaye joins (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net)
15:10:36 gentauro joins (~gentauro@user/gentauro)
15:10:56 mimmy joins (~mimmy@146.70.75.156)
15:11:02 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
15:11:30 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 265 seconds)
15:11:53 <boxscape_> looking through the commits there's not a ton of instances of this so maybe I'm misremembering
15:12:05 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
15:12:39 <boxscape_> wait I need to grep the ghc-prim submodule
15:13:01 <boxscape_> okay no difference
15:13:14 × Unode quits (~Unode@194.94.44.220) (Quit: Not that cable)
15:13:52 <boxscape_> https://stackoverflow.com/questions/15893524/what-is-the-meaning-of-let-x-x-in-x-and-data-float-in-ghc-prim-in-haskell
15:14:35 <boxscape_> https://hackage.haskell.org/package/ghc-prim-0.3.1.0/docs/src/GHC-Prim.html has a lot of `let x = x in x`
15:15:16 <boxscape_> ...clearly I need to hone my grepping skills if I wasn't able to find this with grepping through commits
15:15:17 cosimone joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
15:15:55 Unode joins (~Unode@194.94.44.220)
15:17:28 <boxscape_> merijn it was changed in ghc-prim 0.5.0.0, uploaded 2016-05-21
15:18:59 × srk quits (~sorki@user/srk) (Quit: ZNC 1.8.1 - https://znc.in)
15:19:18 srk joins (~sorki@user/srk)
15:20:39 John_Ivan joins (~John_Ivan@user/john-ivan/x-1515935)
15:20:56 <John_Ivan> hi. anyone want to teach me haskell?
15:21:50 × dlbh^ quits (~dlbh@h50.174.139.63.static.ip.windstream.net) (Remote host closed the connection)
15:22:15 <sm> https://wiki.haskell.org/Haskell , ready set go!
15:22:33 × wmacmil quits (~wmacmil@83-233-165-97.cust.bredband2.com) (Quit: Leaving)
15:23:04 <John_Ivan> sm, without inkhorn please.
15:23:08 <dminuoso> John_Ivan: Depends, are you ready to pay usual developer consulting fees?
15:23:43 <dminuoso> @where cis194
15:23:44 <lambdabot> https://www.seas.upenn.edu/~cis194/spring13/lectures.html
15:24:16 <dminuoso> This is a high quality haskell course that is widely regarded in this community
15:24:21 <John_Ivan> dminuoso, sorry. I don't abide by inkhorns ;/
15:24:30 <dminuoso> Im not sure why you think there's an inkhorn here, but okay
15:24:32 <sm> @where htac
15:24:32 <lambdabot> "Haskell Tutorial and Cookbook" by Mark Watson in 2017-09-04 at <https://leanpub.com/haskell-cookbook>
15:25:19 <John_Ivan> right. more inkhorn material.
15:25:25 John_Ivan sighs
15:25:33 <dminuoso> Not sure what you're asking for.
15:25:55 <John_Ivan> I suppose I'm not asking for anything.
15:26:17 geekosaur suddenly wants to misquote Hillel
15:27:10 <shapr> oh yeah?
15:30:01 <dminuoso> "That which is yummy to you, do cook it for another. That is the whole dish. The rest is just side dishes. Now go and eat"
15:30:04 <dminuoso> geekosaur: ^- this?
15:30:17 <geekosaur> roughly yes
15:30:18 <geekosaur> https://www.chabad.org/library/article_cdo/aid/689306/jewish/On-One-Foot.htm
15:30:58 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
15:31:03 <geekosaur> problem being I can't come up with a pithy enough Haskellism to teach on one foot :)
15:31:21 John_Ivan removes his mask
15:31:30 <John_Ivan> it is I, Scooby.
15:31:35 dminuoso idly wonders about the lack of division of powers in old religion.
15:31:57 <merijn> Now I'm curious what the hell an inkhorn is in this context
15:32:10 <dminuoso> Maybe anything that closely resembles writing?
15:32:23 <dminuoso> Who knows, they could be illiterate
15:32:46 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 265 seconds)
15:32:53 geekosaur thinking they're the opposite of me, they want a youtube or something
15:33:11 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
15:33:38 <John_Ivan> I already know Haskell, sorry to break your bubble.
15:33:51 John_Ivan plot twist.
15:33:56 <dminuoso> That's what I thought too
15:34:04 <dminuoso> Then I discovered functions.
15:34:47 <maerwald> John_Ivan: that's amazing
15:35:54 <John_Ivan> dminuoso, yeah. damn inkhorns. them applicative functors and their monadic rules.
15:36:09 <John_Ivan> burn all higher order level functions
15:36:40 <John_Ivan> "function pointer" was a better substitute
15:36:43 John_Ivan slaps Jill
15:36:53 <John_Ivan> you had one job Jill. one job
15:37:03 <John_Ivan> and that was to not go apeshit with your terminology.
15:37:08 <John_Ivan> I don't care if math is your background
15:37:13 <geekosaur> wat
15:37:16 <John_Ivan> when in Rome, you do as the Romans do.
15:37:38 <John_Ivan> don't ever let a mathematician touch a compiler
15:37:45 × aman quits (~aman@user/aman) (Quit: aman)
15:37:47 <John_Ivan> they will start producing the plague
15:38:48 <yushyin> What is going on? o.O
15:39:37 <merijn> yushyin: (an attempt at) trolling, presumably
15:39:52 <maerwald> I could see this happening from a mile away
15:40:23 <dminuoso> maerwald: Is that a nautic mile?
15:40:54 <Franciman> hi maerwald how are you?
15:40:59 <John_Ivan> side effects my ass and zypper my balls
15:41:03 <maerwald> So... after I've read some non-trivial code using freer-simple, I'm starting to form the opinion that I dislike effects systems that are used for high-level effects
15:41:08 <merijn> @where ops
15:41:08 <lambdabot> byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski
15:41:24 ChanServ sets mode +o geekosaur
15:41:27 <merijn> maerwald: See, I just skipped all that effort
15:41:33 geekosaur sets mode +b *!*@*user/john-ivan/x-1515935
15:41:34 John_Ivan is kicked by geekosaur (John_Ivan)
15:41:34 <boxscape_> what counts as a high-level effect?
15:41:38 <merijn> maerwald: And went straight to "I don't think they're worth the effort"
15:41:48 <merijn> boxscape_: The various composable effects stuff
15:41:55 <boxscape_> I see
15:41:56 <maerwald> it's impossible to understand what the code does, unless you constantly jump back and forth between the effect handlers and re-examine the code over and over again
15:42:21 geekosaur sets mode -o geekosaur
15:42:25 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
15:42:32 <geekosaur> and I think I already like litharge :)
15:43:19 <maerwald> I mean... low-level effects like filesystem operations, maybe
15:43:24 max22- joins (~maxime@2a01cb0883359800502e2c31bca551ab.ipv6.abo.wanadoo.fr)
15:43:35 <maerwald> but complex effects make it really impossible to understand behavior
15:44:59 <maerwald> and... you can't understand an effect handler isolated
15:45:22 <Franciman> that's the curse of delconts, right?
15:45:26 <Franciman> you jumping around
15:45:29 <maerwald> so the code structure is bad as well
15:46:18 <maerwald> if the domain is spaghetti... better keep it in one pot
15:46:49 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
15:47:08 Kaiepi joins (~Kaiepi@156.34.44.192)
15:47:11 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Ping timeout: 264 seconds)
15:47:59 <Franciman> is mtl style better, tho maerwald ?
15:48:12 <maerwald> Franciman: mtl are not high-level effects
15:48:23 <Franciman> ah I don't know what they are then
15:48:25 <Franciman> sorry
15:49:14 <maerwald> think of effects as business domain effects
15:49:45 <Franciman> like, downloadPirateMusic
15:49:48 <Franciman> for a clone of napsters?
15:49:57 <maerwald> now you read the code... and your functions fire different effects everywhere and they are intertwined, maybe through remote state... so you jump to the handler, but that doesn't make sense on its own
15:51:03 <Franciman> so you are basically arguing that having this concept gets you nothing because it's so powerful you get fully side effected code
15:51:05 <Franciman> it's like coding in C
15:51:39 <maerwald> no, the separation of effects code and interpreters clouds control flow and breaks reasoning about actual behavior
15:51:41 <Hecate> merijn: oh, I was looking for you!
15:51:51 merijn hides
15:51:52 <Hecate> merijn: What are you doing these days, Haskell-wise?
15:52:14 <merijn> atm nothing :p
15:52:30 <Hecate> merijn: needing to rest, or is boredom eating at you? :p
15:52:42 <Franciman> maerwald: to be more clear, you don't know what the heck is going on in your code, when using the damn abstraction?
15:52:56 <maerwald> Franciman: I don't use effects systems in my own code
15:53:34 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
15:54:46 <merijn> Hecate: thesis is at the committee, so no need to touch my phd code for awhile and I still haven't fixed any of my CIs from Travis breaking, so I can't be arsed to update stuff until I fix that >.>
15:55:01 <Franciman> merijn: what is your phd thesis about?
15:55:14 × thyriaen quits (~thyriaen@dynamic-077-013-170-047.77.13.pool.telefonica.de) (Quit: Leaving)
15:55:16 <Franciman> maerwald: wise
15:55:18 <Franciman> I see
15:55:53 <maerwald> merijn: I might have broken your travis xD
15:56:14 <merijn> Franciman: Supposedly graph processing on GPUs. In reality it's me whining that everyone's terrible at empirical computer science and showing that 5 years is just enough time to built infrastructure to *begin* research :p
15:56:32 <maerwald> Franciman: I mean... to understand effects code, you either need an *intuition* about the effects or *total understanding* of the interpreters
15:56:40 <merijn> maerwald: Naah, ran out of free minutes in half a month after they limited open source CI time
15:56:44 <Franciman> ggwp merijn
15:56:52 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
15:56:52 <merijn> maerwald: So I should migrate to github actions
15:57:20 <Franciman> maerwald: unfortunately I am still miles away from learning about these stuff
15:57:24 <Franciman> that's why I asked
15:57:27 <maerwald> intuition is difficult if your effects are very high-level
15:57:49 <Franciman> i like conal's idea of denotational semantics design
15:58:02 <Franciman> for very high level things
15:58:12 <dminuoso> Franciman: The idea is good and noble, but I think its hard to employ in a lot of situations.
15:58:14 <Franciman> if I interpret it correctly, sorry if I don't
15:58:23 <Franciman> you deliver a dumbass easy model
15:58:26 <merijn> Hecate: tbh, I haven't really done any programming "as hobby" since, like, Advent of Code last year and with a new round of semi-lockdown, I doubt I will do any any time soon
15:58:27 burnsidesLlama joins (~burnsides@dhcp168-035.wadham.ox.ac.uk)
15:58:27 <dminuoso> The example frequently picked, namely that of an image transformation library, is extremely cherry picked.
15:58:32 <maerwald> merijn: I mean I broke github actions
15:58:43 <Franciman> I see dminuoso
15:58:45 <Franciman> thanks
15:58:54 <merijn> Hecate: I have plans to try and sucker the people on my new project into letting me do it in Haskell, but we'll have to see :p
15:59:09 <maerwald> merijn: github actions environments are not fixed... they are rebuilt every week and may change randomly
15:59:22 <maerwald> that has some merits though
15:59:29 <Franciman> dminuoso: I mostly think about it liek this, you define your language, your laws
15:59:34 <merijn> maerwald: Well, that's one reason why I haven't bothered fixing anything :p
15:59:36 <Franciman> and give a dumbass easy model for it
15:59:36 <dminuoso> Franciman: And on a high level it becomes quickly hard, because at some point you need to prove an equivalence of your implementation to mathematical models.
15:59:45 <dminuoso> Franciman: so it's easier on a small level
15:59:48 <Franciman> I see
15:59:52 <merijn> I made a new command to migrate the Travis setups from Haskell-CI to the github ones
16:00:00 <merijn> But phadej hasn't commented on that PR yet
16:00:00 <Franciman> for high level we should then give up to the our lord compositionality?
16:00:02 <Franciman> I hope
16:00:06 dyeplexer joins (~dyeplexer@user/dyeplexer)
16:00:08 × afotgkmnzj7asv3r quits (~afotgkmnz@2001:470:69fc:105::c24b) (Quit: You have been kicked for being idle)
16:00:12 <merijn> Not sure if he's still working much on Haskell-CI
16:00:16 <dminuoso> What does "compositionality" even mean?
16:00:25 <Franciman> that's the lord part
16:00:27 afotgkmnzj7asv3r joins (~afotgkmnz@2001:470:69fc:105::c24b)
16:00:27 afotgkmnzj7asv3r parts (~afotgkmnz@2001:470:69fc:105::c24b) ()
16:00:31 <Franciman> I don'tu nderstand what it means
16:00:35 <Franciman> just try to make things compose
16:00:39 <dminuoso> Denotational semantics has little to do with expression effects, it's more about linking a programs meaning to mathematical models.
16:00:40 <Franciman> and say hey that's from CT
16:00:43 <Franciman> that's why it works
16:01:30 <maerwald> high-level effects are like microservices... if you get the boundaries wrong, you're f****d
16:02:11 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
16:02:42 × jippiedoe quits (~david@2a02-a44c-e14e-1-12d4-e982-14bb-9a24.fixed6.kpn.net) (Quit: Leaving)
16:03:00 <Franciman> I understand thanks dminuoso
16:03:04 <Franciman> and maerwald
16:03:15 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
16:03:17 <Franciman> I will probably try to use comonads to infer purity, on the other hand, in my journey
16:03:29 <Franciman> seems easier to start with
16:06:47 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
16:07:04 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
16:07:06 × boxscape_ quits (~boxscape_@134.171.69.87) (Ping timeout: 260 seconds)
16:07:37 zebrag joins (~chris@user/zebrag)
16:08:00 × benin quits (~benin@183.82.27.20) (Quit: The Lounge - https://thelounge.chat)
16:09:00 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
16:09:14 Vajb joins (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi)
16:10:08 justsomeguy joins (~justsomeg@user/justsomeguy)
16:11:55 ec joins (~ec@gateway/tor-sasl/ec)
16:13:40 MidAutumnMoon3 joins (~MidAutumn@user/midautumnmoon)
16:14:06 × MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (Ping timeout: 256 seconds)
16:14:06 MidAutumnMoon3 is now known as MidAutumnMoon
16:15:46 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:16:04 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:17:14 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
16:19:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Quit: Reconnecting)
16:19:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:20:39 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
16:22:45 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:23:01 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:23:03 xkuru joins (~xkuru@user/xkuru)
16:24:43 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:27:05 ec joins (~ec@gateway/tor-sasl/ec)
16:27:32 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:31:40 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:31:58 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:35:38 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:35:56 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:36:58 <dolio> "Compositionality" means that you can understand something by understanding smaller pieces of it individually, together with understanding the ways of combining those pieces.
16:37:24 <dolio> Rather than having to understand the entire system as an irreducible unit.
16:39:36 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:39:53 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:40:17 <dolio> For instance, some category theorists are trying to figure out how Petri nets form a topos, so that instead of just figuring out an entire net as a blob, you might be able to analyze it as a product/sum/exponential/... of smaller nets.
16:40:48 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
16:43:21 lavaman joins (~lavaman@98.38.249.169)
16:44:18 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 265 seconds)
16:44:23 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 250 seconds)
16:45:21 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
16:46:09 Guest68 joins (~Guest68@2401:4900:1f2a:2065:285b:1f0c:e2ab:1175)
16:46:35 ec joins (~ec@gateway/tor-sasl/ec)
16:47:51 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
16:48:11 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
16:48:36 <Guest68> Iam trying to create an API using servant
16:48:37 <Guest68> To begin I want to load some config which includes config db creds
16:48:37 <Guest68> What is the best practice to do so
16:48:38 <Guest68> 1. create a config.json file read interpret it as a data type and pass it to server
16:48:38 <Guest68> 2. read each parameter from env variables and create a data type or map and pass it to the server
16:49:37 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:c480:7b03:c5d:3876) (Ping timeout: 265 seconds)
16:49:37 × Vajb quits (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
16:49:47 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
16:50:33 <ocramz[m]> @Guest68 I made a little utility package to embed environment variables into the binary itself https://hackage.haskell.org/package/include-env-0.4.0.0 . I use it for building on CI
16:50:33 <lambdabot> Unknown command, try @list
16:50:39 EvanR joins (~evan@user/evanr)
16:50:47 <ocramz[m]> s/@//
16:51:39 moet joins (~moet@mobile-166-171-251-187.mycingular.net)
16:51:56 <ocramz[m]> this requires you trust your CI agent. I use repo secrets, works well with github actions
16:52:25 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:52:35 <Guest68> Sounds cool I'll check it out ..
16:53:37 <Guest68> But wouldn't this be a problem if I dockerize the app
16:54:03 <Guest68> if it was env vars I could deploy from the same image to all envs
16:55:27 <ocramz[m]> where do you build your docker images?
16:57:10 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
16:57:28 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
16:57:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
16:57:49 × rkrishnan quits (~user@122.167.19.65) (Ping timeout: 250 seconds)
16:58:28 pfurla joins (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced)
16:59:17 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving)
16:59:39 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
17:00:52 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
17:01:11 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
17:01:20 <Guest68> Oh I am learning
17:01:24 <Guest68> now locally
17:01:42 <Guest68> but eventually some CI pipeline
17:03:22 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
17:05:27 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
17:05:35 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
17:06:53 zincy_ joins (~zincy@host86-181-60-139.range86-181.btcentralplus.com)
17:09:16 <moet> as a general rule, don't put secrets in env-vars .. any process on the same machine can read your secrets out of the env-vars
17:10:14 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
17:11:22 × zincy_ quits (~zincy@host86-181-60-139.range86-181.btcentralplus.com) (Ping timeout: 265 seconds)
17:11:39 <Guest68> Ok but what is the best way to do include creds
17:11:43 <EvanR> imagine sharing a machine with literal other users that you can't trust xD
17:14:19 <Guest68> embed to binary?
17:14:46 <EvanR> how many levels of paranoia are we on
17:14:57 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
17:15:18 <Guest68> wont docker containers give enough isolation to prevent that
17:15:39 × mbuf quits (~Shakthi@223.178.89.16) (Quit: Leaving)
17:15:49 <Guest68> And why would we share a machine with others we dont trust
17:16:49 <EvanR> if someone got access to any user at all, then you could be thinking of ways to mitigate the fallout of that
17:19:06 × son0p quits (~ff@181.136.122.143) (Ping timeout: 265 seconds)
17:19:45 × MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (Read error: Connection reset by peer)
17:19:48 MidAutumnMoon6 joins (~MidAutumn@user/midautumnmoon)
17:21:51 × Nolrai2 quits (~Nolrai2@c-76-27-202-218.hsd1.or.comcast.net) (Quit: Client closed)
17:22:14 × tired quits (~tired@user/tired) (Ping timeout: 268 seconds)
17:22:16 tired- joins (~tired@user/tired)
17:23:26 <moet> Guest68: the way this is done in larger companies is: after your production service starts up it requests credentials scoped to the task it needs to perform from some credentialing service.. there needs to be material provided to auth against the credentialing service, and the credentialing service should also look up the identity of the requester in a table, etc.. all of that might be too much for your use
17:23:32 <moet> case
17:24:13 <moet> Guest68: a simpler approach would be to have your deployment system provide the creds to the production service at startup, though instead of envvars or the cli, write them to stdin
17:24:27 desantra joins (~skykanin@user/skykanin)
17:25:51 <Guest68> something like aws secrets manager right?
17:25:52 <Guest68> So what about the creds for authenticating with thta service ?
17:26:06 × alzgh quits (~alzgh@user/alzgh) (Ping timeout: 256 seconds)
17:26:33 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds)
17:26:34 <Guest68> moet You mean giving them as arguments while running
17:27:46 × pfurla quits (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced) (Quit: gone to sleep. ZZZzzz…)
17:27:56 <moet> Guest68: the heavyweight approach is to give credentials after startup, the lightweight approach is to give credentials at startup, but never via envvars or cli
17:29:18 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.3)
17:29:24 <moet> aws secrets manager falls into the heavyweight approach, but that's probably the right approach if you're building on aws.. if you're building on aws you can dictate access to secrets via the requester iam role
17:29:42 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
17:30:05 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Remote host closed the connection)
17:30:20 emf joins (~emf@2620:10d:c090:400::5:69fc)
17:31:23 jpds joins (~jpds@gateway/tor-sasl/jpds)
17:31:55 <Guest68> moet thank you
17:31:56 <Guest68> could you please elaborate a little on the lightweight approach
17:32:35 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:32:50 alzgh joins (alzgh@user/alzgh)
17:33:58 deadmarshal joins (~deadmarsh@95.38.114.190)
17:34:17 <EvanR> how do you provide the material the authenticate with the credentially service
17:34:36 <EvanR> oof
17:35:37 × Guest80 quits (~Guest80@pd9ed79bf.dip0.t-ipconnect.de) (Quit: Client closed)
17:36:25 <moet> EvanR: you could embed a key in the binary or some other less secure path, but the point is that the credentialing service doesn't only use that data, it also checks a table using the identity of the requester .. this isn't foolproof.. if you want to go the really heavyweight approach, you'd have a TOFU key exchanged for an expiring key and the production service is responsible for continually updating the
17:36:26 Guest80 joins (~Guest80@pd9ed79bf.dip0.t-ipconnect.de)
17:36:31 <moet> expiring key forever
17:37:26 × burnsidesLlama quits (~burnsides@dhcp168-035.wadham.ox.ac.uk) (Remote host closed the connection)
17:37:34 <moet> Guest68: lightweight approach: on startup, your production service reads stdin; your deployment service starts your production service and then writes data to its stdin
17:37:52 burnsidesLlama joins (~burnsides@dhcp168-035.wadham.ox.ac.uk)
17:37:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
17:38:05 <EvanR> the more over engineered it is, the less I believe it's secure xD
17:38:07 <moet> it's hard to elaborate further because i don't know what deployment service you're using .. also, your deployment service should have documentation about how to provide secrets to your production service
17:38:25 <moet> EvanR: you're gonna be surprised when you take a look at encryption code <3
17:38:39 <moet> s/surprised/horrified/g
17:39:26 <EvanR> steps taken in encryption are always for a good reason though, sort of another topic from configuring web apps
17:39:44 burnside_ joins (~burnsides@dhcp168-035.wadham.ox.ac.uk)
17:39:53 × burnsidesLlama quits (~burnsides@dhcp168-035.wadham.ox.ac.uk) (Remote host closed the connection)
17:39:53 <moet> sure
17:40:19 <moet> Guest68: if the stdin thing doesn't seem like it'll work, you could always use a file with permissions locked down, as long as you have a secure way to put the file in place
17:41:03 <moet> really, don't go nuts with this; the security precautions you take should reflect the risk of a breach.. if you're not risking anything, then you don't need to worry about this as much..
17:42:08 <maerwald> You should at least follow IEC 62443
17:46:20 lavaman joins (~lavaman@98.38.249.169)
17:48:23 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
17:49:54 × mmhat quits (~mmh@55d47041.access.ecotel.net) (Quit: WeeChat 3.3)
17:53:04 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 268 seconds)
17:53:30 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
17:54:58 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Remote host closed the connection)
17:56:24 <maerwald> is there a version of hp2ps that doesn't suck? (e.g. doesn't cut off half of the graph/legend)
17:57:01 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
17:59:30 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
17:59:43 <glguy> maerwald: have you used this? https://hackage.haskell.org/package/hp2html
17:59:47 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:01:01 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
18:02:38 × Guest68 quits (~Guest68@2401:4900:1f2a:2065:285b:1f0c:e2ab:1175) (Quit: Client closed)
18:02:57 fef joins (~thedawn@user/thedawn)
18:03:30 <maerwald> it seems to leak memory... let's see if it finishes
18:04:13 epolanski joins (uid312403@helmsley.irccloud.com)
18:05:34 gensyst joins (gensyst@user/gensyst)
18:05:39 <maerwald> 27mb html file, let's see how that goes
18:05:44 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
18:05:56 <gensyst> Hi, how come Data.Finite (https://hackage.haskell.org/package/finite-typelits-0.1.4.2/docs/Data-Finite.html) has no monadic indexing? Is it someplace else or do I have to write my own utility func?
18:05:56 <maerwald> well, it doesn't: entirely broken page :D
18:06:12 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
18:06:17 <gensyst> (such a utility func would unwrap it and rewrap it..)
18:06:52 geekosaur joins (~geekosaur@xmonad/geekosaur)
18:08:32 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:08:50 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:10:31 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:10:48 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:13:12 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:13:30 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:18:13 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds)
18:18:50 × drewolson quits (~drewolson@user/drewolson) (Quit: Ping timeout (120 seconds))
18:19:01 drewolson joins (~drewolson@user/drewolson)
18:19:36 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 276 seconds)
18:19:41 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 245 seconds)
18:20:01 × cfebs quits (~cfebs@user/cfebs) (Quit: ZNC 1.8.2 - https://znc.in)
18:20:06 × thaumavorio_ quits (~thaumavor@thaumavor.io) (Ping timeout: 260 seconds)
18:20:21 dragestil_ joins (~znc@user/dragestil)
18:20:50 × dragestil quits (~znc@user/dragestil) (Ping timeout: 246 seconds)
18:20:56 × eldritch quits (~eldritch@user/eldritch/x-9272577) (Ping timeout: 245 seconds)
18:20:56 × Aleksejs quits (~Aleksejs@haskell.lv) (Ping timeout: 245 seconds)
18:21:26 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
18:21:46 FragByte joins (~christian@user/fragbyte)
18:22:02 Aleksejs joins (~Aleksejs@haskell.lv)
18:22:23 dragestil_ is now known as dragestil
18:22:23 cfebs joins (~cfebs@user/cfebs)
18:22:30 × gensyst quits (gensyst@user/gensyst) (Quit: Leaving)
18:24:54 × Guest80 quits (~Guest80@pd9ed79bf.dip0.t-ipconnect.de) (Quit: Client closed)
18:25:13 eldritch_ joins (~eldritch@user/eldritch/x-9272577)
18:25:36 Guest80 joins (~Guest80@pd9ed79bf.dip0.t-ipconnect.de)
18:25:55 boxscape_ joins (~boxscape_@i59F67A72.versanet.de)
18:26:05 thaumavorio joins (~thaumavor@thaumavor.io)
18:26:16 <boxscape_> Can i tell cabal to use a particular ghc executable rather than the one in path?
18:26:35 <glguy> boxscape_: -w
18:26:40 <boxscape_> thanks!
18:27:05 × mimmy quits (~mimmy@146.70.75.156) (Ping timeout: 250 seconds)
18:27:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:27:56 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
18:28:18 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
18:28:21 aegon joins (~mike@174.127.249.180)
18:33:02 econo joins (uid147250@user/econo)
18:33:23 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:35:01 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:35:18 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:35:42 <dminuoso> 18:09:16 moet | as a general rule, don't put secrets in env-vars .. any process on the same machine can read your secrets out of the env-vars
18:35:46 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
18:35:48 <dminuoso> This is grossly misleading.
18:36:08 alzgh joins (alzgh@user/alzgh)
18:36:13 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
18:36:17 <moet> dminuoso: okay?
18:36:23 <moet> dminuoso: any more? :)
18:36:23 <dminuoso> On linux the only API you have to access this is via procfs, but /proc/$pid/environ has permissions matching the owner of the process.
18:36:43 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:36:45 <dminuoso> And if you have *that* much access, you can pretty much get access to its credentials anyway
18:36:55 <dminuoso> In other words: environment variables are perfectly safe.
18:36:55 lavaman joins (~lavaman@98.38.249.169)
18:38:27 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
18:38:28 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Remote host closed the connection)
18:39:22 <dminuoso> And arguably "credential manager" are a double edged sword. Poor security can result to a much larger leak, and now you have additional runtime dependencies on services and on networking.
18:39:31 <boxscape_> You love to see it: "Could not deduce (Braided JSFunc (Product JSFunc)) from the context: Braided JSFunc (Product JSFunc)"
18:40:19 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:40:33 lavaman joins (~lavaman@98.38.249.169)
18:40:41 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:40:46 <boxscape_> (problem is invisible kind arguments are different)
18:41:02 <dminuoso> And it dramatically increases the security implications, since if you have wide spread credentials, are they all accessible via a singular host?
18:41:34 <EvanR> all your eggs in one basket / are belong to us
18:42:05 ChanServ sets mode +o litharge
18:42:05 litharge sets mode -bo *!*@*user/john-ivan/x-1515935 litharge
18:42:23 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
18:43:23 <dminuoso> And then you quickly get to the point "why do we want another poor reimplementation of kerberos, when you should be using kerberos instead"
18:43:33 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 250 seconds)
18:44:22 <dminuoso> Or having all your services depend on an additional network path/firewall/routers/hypervisor/VM/credential service to potentially come up. If that service goes down, how much of your infrastructure will follow?
18:45:06 dminuoso finds it ridiculous how some people overengineer
18:49:12 × chele quits (~chele@user/chele) (Remote host closed the connection)
18:51:16 fef joins (~thedawn@user/thedawn)
18:51:21 × xff0x quits (~xff0x@2001:1a81:5330:8c00:7ee9:82eb:bec8:3505) (Ping timeout: 250 seconds)
18:51:41 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
18:52:17 xff0x joins (~xff0x@port-92-195-74-242.dynamic.as20676.net)
18:54:16 mimmy joins (~mimmy@146.70.75.158)
18:55:34 × deadmarshal quits (~deadmarsh@95.38.114.190) (Ping timeout: 260 seconds)
18:57:18 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
18:57:36 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
18:57:40 jespada joins (~jespada@252-155-231-201.fibertel.com.ar)
18:58:19 eruditass joins (uid248673@uxbridge.irccloud.com)
18:59:00 × mimmy quits (~mimmy@146.70.75.158) (Ping timeout: 256 seconds)
18:59:03 × Guest42 quits (~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
18:59:25 <moet> dminuoso: fwiw, i recommended that Guest68 not overengineer it and suggested two lightweight approaches
18:59:40 <dminuoso> moet: Absolutely.
19:00:05 <dminuoso> That wasn't really meant as criticsm towards you
19:01:45 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:01:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:02:04 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
19:02:16 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Remote host closed the connection)
19:03:15 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
19:03:37 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
19:03:51 fef joins (~thedawn@user/thedawn)
19:05:48 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:05:55 × max22- quits (~maxime@2a01cb0883359800502e2c31bca551ab.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds)
19:06:06 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
19:07:46 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:08:03 jkhs joins (~jkhs@94-255-217-215.cust.bredband2.com)
19:09:02 unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
19:10:18 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
19:11:11 lavaman joins (~lavaman@98.38.249.169)
19:11:13 × Guest80 quits (~Guest80@pd9ed79bf.dip0.t-ipconnect.de) (Quit: Client closed)
19:11:58 Guest80 joins (~Guest80@pd9ed79bf.dip0.t-ipconnect.de)
19:13:12 × jkhs quits (~jkhs@94-255-217-215.cust.bredband2.com) (Remote host closed the connection)
19:13:27 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 250 seconds)
19:14:10 mimmy joins (~mimmy@146.70.75.158)
19:15:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
19:16:07 × asivitz quits (uid178348@tinside.irccloud.com) (Quit: Connection closed for inactivity)
19:17:36 pfurla joins (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced)
19:21:11 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
19:23:19 desantra joins (~skykanin@user/skykanin)
19:42:10 max22- joins (~maxime@2a01cb0883359800fa2f4e7c9f6204ba.ipv6.abo.wanadoo.fr)
19:42:47 zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3)
19:43:50 Guest42 joins (~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
19:46:03 lavaman joins (~lavaman@98.38.249.169)
19:50:27 × kupi quits (uid212005@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
19:50:52 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
20:02:00 <moet> totally. and you're totally right that awsthings are easy to misuse and create gaping security holes.. thanks for pointing out the thing about /proc/$pid/environ .. now I want to follow up with the people who taught me this and figure out what they were referring to
20:02:51 <monochrom> Perhaps a long long time ago in a unix version far far away it was true.
20:03:08 × zincy_ quits (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) (Remote host closed the connection)
20:03:50 <monochrom> You should still check it on Solaris, Mac, various BSDs, etc.
20:04:20 <monochrom> But the over-arching lesson is: check before speaking up.
20:04:45 × Guest80 quits (~Guest80@pd9ed79bf.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
20:05:05 <monochrom> You would be surprised how many conventional wisdoms are outdated or even prejudiced.
20:05:39 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 268 seconds)
20:06:11 × pop3 quits (~pop3@user/pop3) (Remote host closed the connection)
20:06:43 juhp joins (~juhp@128.106.188.82)
20:06:52 pop3 joins (~pop3@user/pop3)
20:08:29 <monochrom> Even I am surprised once in a while, e.g., https://mail.haskell.org/pipermail/haskell-cafe/2013-April/107775.html
20:10:00 mc47 joins (~mc47@xmonad/TheMC47)
20:11:39 × moet quits (~moet@mobile-166-171-251-187.mycingular.net) (Ping timeout: 265 seconds)
20:15:59 <boxscape_> is there a way to refer to (%1 ->) with LinearHaskell just like how you can refer to (->) for regular functions usually?
20:16:03 <boxscape_> that particular syntax doesn't seem to wkr
20:16:03 <Rembane_> monochrom: That's so good.
20:16:08 <boxscape_> s/wkr/work
20:16:33 <boxscape_> oh I suppose maybe I have to use FUN from GHC.Exts
20:16:43 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 250 seconds)
20:17:27 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Remote host closed the connection)
20:17:53 <boxscape_> s/GHC.Exts/Data.Kind
20:18:42 moet joins (~moet@mobile-166-171-249-243.mycingular.net)
20:20:59 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
20:21:24 × kuribas quits (~user@ptr-25vy0i87u19ttsdwrve.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
20:21:41 × kaizen quits (sid501599@helmsley.irccloud.com) (Ping timeout: 268 seconds)
20:22:16 <boxscape_> yeah that works
20:22:17 × mimmy quits (~mimmy@146.70.75.158) (Ping timeout: 265 seconds)
20:22:33 kaizen joins (sid501599@helmsley.irccloud.com)
20:25:35 × burnside_ quits (~burnsides@dhcp168-035.wadham.ox.ac.uk) (Remote host closed the connection)
20:27:15 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
20:28:19 pavonia joins (~user@user/siracusa)
20:28:52 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
20:31:02 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:31:02 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
20:31:02 wroathe joins (~wroathe@user/wroathe)
20:31:33 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
20:31:53 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 250 seconds)
20:33:04 × carter quits (sid14827@helmsley.irccloud.com) (Ping timeout: 256 seconds)
20:34:31 carter joins (sid14827@helmsley.irccloud.com)
20:34:46 × nrr__ quits (sid20938@lymington.irccloud.com) (Ping timeout: 256 seconds)
20:36:09 nrr__ joins (sid20938@lymington.irccloud.com)
20:36:18 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
20:36:51 <boxscape_> Am I seeing this right that I cannot have {-# OVERLAPPING #-} instances for classes with associated types, because GHC would always complain about conflicting family instance declarations?
20:37:06 <boxscape_> (i.e. I would have to make it a non-associated type family?)
20:37:45 <c_wraith> Well, you can't create conflicting type families. Doesn't matter whether you put them inside a class or not.
20:38:03 <boxscape_> but GHC won't let me compile it :(
20:38:09 <boxscape_> oh wait
20:38:12 <boxscape_> I thought you wrote "can"
20:38:37 <boxscape_> I know I can't do it anyway, it's just that the type family instances happen to match for the overlapping and the overlapped instance
20:38:46 <boxscape_> so separating it out would work in this case, I think
20:43:08 × EvanR quits (~evan@user/evanr) (Quit: Leaving)
20:46:28 werner100 joins (~werner100@2601:2c2:400:4440:517c:b3d6:3517:bdd4)
20:48:59 mimmy joins (~mimmy@146.70.75.156)
20:49:48 jmorris joins (uid433911@hampstead.irccloud.com)
20:54:06 Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com)
20:54:17 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
20:55:35 × Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Client Quit)
20:56:12 Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com)
20:56:31 yauhsien joins (~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
20:56:35 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 250 seconds)
20:58:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:01:26 × yauhsien quits (~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 265 seconds)
21:02:30 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
21:03:11 zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3)
21:04:20 rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438)
21:05:36 × zincy_ quits (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) (Remote host closed the connection)
21:05:54 zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3)
21:07:38 × eruditass quits (uid248673@uxbridge.irccloud.com) (Ping timeout: 256 seconds)
21:07:38 × obviyus quits (sid415299@user/obviyus) (Ping timeout: 256 seconds)
21:07:58 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
21:08:32 obviyus joins (sid415299@user/obviyus)
21:09:21 eruditass joins (uid248673@uxbridge.irccloud.com)
21:10:40 coolnickname joins (~omg@user/coolnickname)
21:11:32 × jespada quits (~jespada@252-155-231-201.fibertel.com.ar) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:16:16 × eruditass quits (uid248673@uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
21:16:43 wootehfoot joins (~wootehfoo@user/wootehfoot)
21:18:53 burnsidesLlama joins (~burnsides@dhcp168-035.wadham.ox.ac.uk)
21:22:14 × werner100 quits (~werner100@2601:2c2:400:4440:517c:b3d6:3517:bdd4) (Quit: Ping timeout (120 seconds))
21:23:25 × zincy_ quits (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) (Remote host closed the connection)
21:23:53 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:23:53 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
21:23:53 wroathe joins (~wroathe@user/wroathe)
21:24:34 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
21:26:46 jurjen joins (~jurjen@62-133-96-120.mobile.kpn.net)
21:27:02 zincy_ joins (~zincy@host86-181-60-139.range86-181.btcentralplus.com)
21:28:14 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
21:32:07 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
21:32:51 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
21:35:54 lavaman joins (~lavaman@98.38.249.169)
21:36:56 son0p joins (~ff@181.136.122.143)
21:38:52 Pickchea joins (~private@user/pickchea)
21:40:30 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
21:42:45 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:49:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:49:29 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
21:49:29 wroathe joins (~wroathe@user/wroathe)
21:54:07 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
21:56:23 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 250 seconds)
21:59:38 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Remote host closed the connection)
21:59:38 × jurjen quits (~jurjen@62-133-96-120.mobile.kpn.net) (Read error: Connection reset by peer)
22:00:38 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
22:03:11 <__monty__> Has anyone written up the potential for confusion of $?
22:03:18 × pop3 quits (~pop3@user/pop3) (Remote host closed the connection)
22:04:00 <dsal> :t ($?)
22:04:01 <lambdabot> error:
22:04:01 <lambdabot> • Variable not in scope: $?
22:04:01 <lambdabot> • Perhaps you meant one of these:
22:04:57 <monochrom> I think it would be just one short sentence.
22:05:17 <monochrom> I mean, if there were any confusion in the first place.
22:05:32 <dsal> What is the confusion?
22:05:49 <int-e> ($) is just an ordinary infix operator
22:06:02 <int-e> `otherwise` is a Prelude function defined as True
22:06:36 <int-e> what other things do we have that could be mistaken for syntax but really aren't?
22:06:38 <dsal> `otherwise` has confused me a few times.
22:06:41 <geekosaur> newcomers often get confused about (.) vs. ($)?
22:07:22 <int-e> newcomers need to learn about types
22:07:27 <int-e> so... that's expected
22:07:51 <dsal> I find people tend to just put $ everywhere because it often does what they expect as a `(` kind of thing.
22:07:52 <monochrom> To be sure, I speak against overused of ($) too, but the root issue is people going out of their way to hate parentheses, and digging deeper, people going out of their way to hate math. If ($) didn't exist, people would still find other ways to hate math (and they do).
22:08:08 <dsal> I just hate money.
22:08:16 <int-e> @src ($)
22:08:16 <lambdabot> f $ x = f x
22:08:55 <maerwald> monochrom: people also think using lambdas (the core of our language) is uncool
22:11:07 × mimmy quits (~mimmy@146.70.75.156) (Ping timeout: 250 seconds)
22:11:36 <monochrom> Regarding being confused about (.) vs ($): I see that as comparable to math newcomers confusing "x*(y+z) = x*y + x*z" with "sqrt(y+z) = sqrt(y) + sqrt(z)", too. Does that mean the former is confusing, therefore we should just never teach distributivity, period?
22:11:40 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Quit: So long and thanks for all the fish)
22:12:41 <monochrom> People always look for oversimplifications to comfort themselves. They will always confused by facts.
22:13:40 Axman6 needs to remember to return otherwise more often, and also use it as a binder name sometimes
22:14:23 <geekosaur> meh. we're writing haskell, not perl
22:14:36 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:19:11 × burnsidesLlama quits (~burnsides@dhcp168-035.wadham.ox.ac.uk) (Remote host closed the connection)
22:19:34 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
22:19:43 burnsidesLlama joins (~burnsides@client-8-84.eduroam.oxuni.org.uk)
22:20:12 × Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep)
22:21:55 <dsal> The thing that's a little confusing about operators is that their precedence is invisible.
22:22:27 <maerwald> if unsure about precedence, use ($) :D
22:24:05 × burnsidesLlama quits (~burnsides@client-8-84.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
22:26:46 <int-e> > ((succ $ 2) + (pred $ 3))
22:26:47 <lambdabot> 5
22:27:02 <int-e> (better safe than sorry)
22:27:38 <monochrom> > (((succ) $ (2)) + ((pred) $ (3))) -- really, really safe >:)
22:27:39 <lambdabot> 5
22:27:56 <hpc> this is why i always write ((-)1) instead of (-1)
22:28:06 <monochrom> heh
22:28:15 <kronicmage> int-e: "($) is just an infix operator" I thought there was special casing for higher rank types?
22:28:20 <monochrom> But you should write ((-) (1)) >:)
22:28:35 <kronicmage> So you can't actually define your own ($) that works the same way
22:28:48 <hpc> ((-) ( ) (1)), just to be sure
22:29:04 <monochrom> haha that's the best
22:29:24 <janus> kronicmage: the workaround has been removed with the new quick look impredicativity i think?
22:29:48 × mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds)
22:29:51 <int-e> kronicmage: Yes there is an ad-hoc hack that makes runST $ foo work
22:30:02 <janus> int-e: even in 9.2? why?
22:30:05 <geekosaur> supposedly the only part that remains is that ($) is alway simpredicative
22:30:06 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
22:30:26 <int-e> janus: Sorry I checked 8.10.7
22:31:48 × michalz quits (~michalz@185.246.204.41) (Remote host closed the connection)
22:32:07 <int-e> And now 9.0.1 as well...
22:32:24 <int-e> 9.2 is way too new :P
22:32:47 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 250 seconds)
22:33:51 <hpc> maybe a dependent-typed ($) will fix runST
22:33:59 <hpc> just wait for ghc 10
22:36:06 mimmy joins (~mimmy@146.70.75.156)
22:36:42 <maerwald> hpc: hopefully we'll get the long awaited No-Neq patch by then
22:37:11 × jkaye quits (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net) (Quit: Leaving)
22:38:54 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
22:39:15 alzgh joins (alzgh@user/alzgh)
22:41:11 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Quit: So long and thanks for all the fish)
22:45:17 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
22:46:15 × alzgh quits (alzgh@user/alzgh) (Ping timeout: 256 seconds)
22:47:14 <monochrom> No-Neq is a little bit of witch-hunting IMO. Although, it's a pretty small issue either way, so I won't make a big fuss about it.
22:47:47 <monochrom> But if they try to apply the same thinking to the "redundant" methods of Ord, now that will be very alarming.
22:47:47 × Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Remote host closed the connection)
22:48:08 <maerwald> No-Neq is irrelevant as a proposal
22:48:16 <maerwald> but the discussion is relevant
22:48:31 <monochrom> Yeah that's true.
22:48:41 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
22:48:59 <maerwald> Not that I envy the CLC stepping into that discussion on their first decision, haha
22:49:32 × cosimone quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Quit: ERC (IRC client for Emacs 27.1))
22:49:54 <maerwald> like on a landmine
22:50:19 <maerwald> "this probably won't be controversial..."
22:50:23 alzgh joins (~alzgh@user/alzgh)
22:50:24 <unit73e> I need to simplify this: https://paste.tomsmeding.com/iDgRrIMF
22:50:32 <unit73e> all that occurs to me is mapAccumR
22:50:41 <[exa]> wth, like removing /= from the typeclass?
22:51:03 <monochrom> Oh, every ideology believer also believes that their ideology is uncontroverial.
22:51:04 <hpc> we should save our brainpower for more important proposals, like (<>) = getLine like every other sane language has
22:51:50 <monochrom> Yes I'm saying that No-Neq is driven by ideology. It's why I conclude that it's witch-hunting.
22:52:07 <monochrom> haha hpc
22:52:32 <monochrom> Yes [exa].
22:53:07 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:53:31 <[exa]> actually in hs you lose functionality if you remove either of == or /= right? (for partial results)
22:53:49 <[exa]> s/partial results/non-total comparisons)
22:55:44 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
22:56:24 <unit73e> nvm I was being dumb, as usual
22:57:08 <int-e> janus: 9.2 does the same thing (runST $ return () type-checks; replacing $ by a custom operator doesn't)
22:57:08 × Pickchea quits (~private@user/pickchea) (Remote host closed the connection)
22:57:33 <int-e> (that's without enabling any extra extensions)
23:00:02 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9)
23:00:06 × adium quits (adium@user/adium) (Ping timeout: 260 seconds)
23:00:35 <monochrom> unit73e: I think it's a foldr
23:01:34 <unit73e> monochrom, yeah seems like it. I'm converting that.
23:01:45 <unit73e> but I'll do the newbie way first
23:02:22 <monochrom> It is also OK to leave the code as is. We don't need to foldr-ize everything that can be foldr-ized.
23:03:21 <unit73e> I just don't like that empty list function there doing nothing
23:03:28 × ystael quits (~ystael@user/ystael) (Read error: Connection reset by peer)
23:04:25 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:85c4:4386:63fc:8e9) (Ping timeout: 250 seconds)
23:04:42 <monochrom> Ah. Maybe you like this middle ground: renderSprites' r t xs p = go xs where go [] = return (); go (x:xs) = do ... ; go xs
23:06:07 × rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed)
23:06:10 <monochrom> (I'm too lazy to type out "renderer", "position", etc. You should still stick to the longer, better names :) )
23:06:21 <unit73e> that's fine I get it lol thanks
23:06:37 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 265 seconds)
23:07:11 <unit73e> this is just for an example to print all "idle" animation sprites in sequence anyway
23:07:16 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
23:07:21 <unit73e> it's not going to be used in pratice
23:07:58 <unit73e> maybe I should just print the texture positions instead
23:08:01 <monochrom> Ho hrm, it may be actually a mapM_
23:08:31 <unit73e> the problem with mapM_ is I need to accumulate the sum of points
23:08:32 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
23:08:46 <unit73e> but I can first convert the list
23:08:50 <unit73e> and then use mapM_
23:09:11 <unit73e> which makes more sense than that thing I pulled off
23:09:20 <monochrom> Oh oops, I forgot that position is not pos.
23:09:27 × zincy_ quits (~zincy@host86-181-60-139.range86-181.btcentralplus.com) (Remote host closed the connection)
23:09:42 <unit73e> but you know what? I'll just print the texture positions lol
23:09:49 <monochrom> haha OK
23:09:56 <unit73e> since it doesn't really matter lol
23:10:13 <janus> int-e: but what is the 'same thing'? geekosaur said that there still is a workaround that forces ($) to always be impredicative, probably even if the (fixed) extension ImpredicativeTypes is off
23:10:40 <geekosaur> that is my understanding, yes
23:11:22 <geekosaur> the main difference is ImpredicativeTypes always had a very vague specification, and by itself it wasn't always sufficient to make ($) impredicative even when turned on, so there was a hack to always make it work
23:11:25 <int-e> janus: so there's still an ad-hoc hack of some kind
23:12:02 <geekosaur> with QuickLook, there is now a sane impredicative types story *and* it makes ($) work as expected, so the hack has been reduced to always making it impredicative even whne quicklook is disabled
23:12:24 <janus> hehe imagine if ghc devs forced everybody to turn ImpredicativeTypes on by removing this hack :P
23:12:34 <janus> would be an even larger outcry than for the not-eq stuff :O
23:12:43 <geekosaur> runST isn't used *that* often, I think
23:12:44 × servytor quits (uid525486@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
23:12:57 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Read error: Connection timed out)
23:13:06 <geekosaur> but still, they do at least try to avoid breaking older programs
23:13:23 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
23:13:29 <int-e> geekosaur: oh but when I use it, doing runST $ do [...] is a very common pattern
23:13:31 <geekosaur> (which is one reason there's a shitstorm brewing over neq)
23:15:03 <monochrom> BlockArguments was a solution to "runST do", but people decided to hate it.
23:15:06 <int-e> There's the BlockArguments thing too and I hate it.
23:15:13 <monochrom> See? :)
23:15:17 <hpc> what's wrong with block arguments?
23:15:19 <geekosaur> nice timing
23:15:22 <int-e> monochrom: Happy to confirm.
23:16:59 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3)
23:17:09 <glguy> hpc: what's wrong is I have to them them on all the time to use them rather than just getting the better syntax
23:17:17 <int-e> hpc: it's irrational, it goes against decades of training and habits :P
23:17:44 <glguy> I learned that they were a good idea from writing Agda
23:18:19 <monochrom> Hrm, is BlockArguments included in GHC2021?
23:18:24 <int-e> hpc: the way things are, when I see runST do I read `do` as a variable and then I have to resolve a clash between that and it being a keyword. This is *not* the case for the *familiar* runST $ do
23:18:31 <int-e> habits die hard
23:18:38 <hpc> heh, that's fair
23:18:45 <yushyin> monochrom: no :/
23:18:46 <monochrom> sob sob no
23:19:02 <janus> hmm you have the same situation with all kinda of other keywords
23:19:11 <geekosaur> I don't have that problem but I'm conditioned to see do as a keyword. It just looks weird
23:19:13 <monochrom> Well, at least ScopedTypeVariables is in.
23:19:16 <janus> keywords always need special casing in your brain , and syntax highlighting helps with that
23:19:21 ec joins (~ec@gateway/tor-sasl/ec)
23:19:22 <glguy> > 1 * do 3 + 4
23:19:24 <lambdabot> 7
23:19:57 <janus> int-e: i think you just turned me into a BlockArguments fan ;)
23:20:20 int-e shrugs
23:20:38 <monochrom> I'm OK with BlockArguments when there are line breaks to help, e.g., "x = runST do \n", "y = withYYY \h -> \n".
23:20:39 <janus> i thought there would be some elaborate argument about how it makes it harder to parse or something :P
23:20:58 × pfurla quits (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced) (Quit: gone to sleep. ZZZzzz…)
23:21:03 <monochrom> If you don't have those \n's, the code is harder to eyeball, yes.
23:21:26 <monochrom> But who would omit those \n's in practice?
23:21:55 <glguy> f \x -> x + 1
23:22:02 <int-e> janus: Well it's harder to parse for me personally. I'm grown-up to realize that this is not the case for everyone. And I usually don't care how hard things are to parse for a compiler; if I did I wouldn't touch Haskell at all, the whole indentation story is crazy from that perspective.
23:22:06 <glguy> function applied to lambdas
23:22:07 Pickchea joins (~private@user/pickchea)
23:22:08 <geekosaur> janus, it's actually easier
23:22:12 × jumper149 quits (~jumper149@static.6.71.203.116.clients.your-server.de) (Quit: WeeChat 3.3)
23:22:13 <janus> monochrom: there was a person here a couple of months ago who removed all the spacing he could ;)
23:22:17 <int-e> s/grown-up to/grown-up enough to/
23:22:20 <geekosaur> it eliminates an unnecessary production rule in the grammar
23:22:30 <monochrom> "f \x -> x + 1" is short enough that I would support "f (\x -> x + 1)".
23:22:45 <monochrom> For longer examples you would have line breaks in the first place.
23:22:57 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
23:23:04 <geekosaur> but as monochrom shows, some uses are harder for *people* to parse
23:23:08 <glguy> monochrom: It works well to have something like: thing \x y z -> \n function body
23:23:35 <glguy> It's silly to argue that is harder to parse because you're not used to it; that's just how things go when change happens and then you get used to it
23:24:14 <janus> we must sample the innocent purescript programmers who have never lived the NoBlockArguments life to find out how their brains work
23:25:22 <Rembane_> Quite well thank you.
23:25:26 × ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec)
23:25:31 <monochrom> haha
23:25:51 <int-e> janus: does it involve electrodes
23:25:57 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 265 seconds)
23:26:21 pfurla joins (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced)
23:27:19 <janus> only if you include 'tesla coil' in your definition of electrodes. *evil merkel/burns pose*
23:27:44 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Read error: No route to host)
23:28:08 <monochrom> "GHC2021 is used by GHC if neither Haskell98 nor Haskell2010 is turned on explicitly." Haha, I'm surprised no one made a bigger fuss about this than about no-/=
23:28:43 <monochrom> (I just tried in ghci-9.2, "data F a = F a a deriving Functor" is gladly accepted under default settings)
23:28:51 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:29:53 <monochrom> Ugh why is PostfixOperators included?!
23:31:00 <int-e> > let (!) = product . enumFromTo 1 in (5!)
23:31:01 <geekosaur> I think nobody made a fuss because people normally use cabal files and cabal defaults to haskell2010. but that's supposed to change in an upcoming cabal version and *then* we may hear about it
23:31:02 <lambdabot> 120
23:31:08 whatsupdoc joins (uid509081@hampstead.irccloud.com)
23:31:17 × mark__ quits (~a@p200300ef973db186502293e1a26d2ca1.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
23:31:26 <janus> monochrome: there is still time for Snoyman to get annoyed by a GHC2021 extension and choose to set Haskell2010 by default in stack ;)
23:31:42 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:34:35 <int-e> monochrom: Have you been bitten by PostfixOperators? (It's just an eta reduction in the desugaring of (foo ?), right? Which is one of those things that is usually fine...)
23:34:55 <monochrom> No.
23:35:23 <monochrom> I haven't been bitten by PostfixOperators.
23:36:19 <int-e> I mean it's not all that useful either... I'd never write the above in real code.
23:36:39 <monochrom> Right, I don't think people actually use it.
23:36:40 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
23:37:18 <monochrom> I guess the selection criterion was simply "widely agreed to be totally harmless".
23:38:23 <janus> would it make it possible to have a postfix lift that is exclamation mark?
23:38:29 <janus> then haskell would look like rust :P
23:38:38 <janus> if used with e.g. ExceptT
23:38:48 <janus> oh my, the calamity
23:38:52 <monochrom> I use that criterion too to argue against people who make a big fuss about "why is 'let {} in 5' legal? this makes no sense!"
23:39:20 <geekosaur> let (!) = liftIO in ...
23:39:39 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Read error: Connection timed out)
23:39:57 <monochrom> Heh
23:40:01 <geekosaur> or unsafePerformIO if you really want to call out the dogs :)
23:40:24 pfurla_ joins (~pfurla@16.191.255.173.client.dyn.strong-mf37.as54203.net)
23:40:40 <janus> oh no, i meant question mark. which is used in rust to escalate the error of their Either (called Result)
23:40:47 <int-e> janus: it's a bit of a misnomer because the ? in (foo ?) isn't really a standalone postfix operator; the parentheses are required
23:41:00 Sgeo joins (~Sgeo@user/sgeo)
23:41:10 <geekosaur> because it's a special case of an operator section
23:41:33 <janus> oh, then it's harder to use and misuse
23:41:34 <int-e> so no, it won't look like Rust.
23:41:51 <monochrom> It looks like (Rust!) :)
23:41:54 × pfurla quits (~pfurla@2804:14d:5c81:4104:8de2:1993:a832:eced) (Ping timeout: 265 seconds)
23:42:10 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
23:42:29 <int-e> EtaReducedLeftSections
23:45:35 × pfurla_ quits (~pfurla@16.191.255.173.client.dyn.strong-mf37.as54203.net) (Ping timeout: 250 seconds)
23:46:15 × max22- quits (~maxime@2a01cb0883359800fa2f4e7c9f6204ba.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
23:47:38 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
23:48:17 × glguy quits (x@libera/staff/glguy) (Quit: Quit)
23:50:30 pfurla joins (~pfurla@2804:14d:5c81:4104:a029:e568:3465:8d9f)
23:51:51 glguy joins (x@libera/staff/glguy)
23:54:23 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Quit: So long and thanks for all the fish)
23:54:43 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
23:55:36 mark__ joins (~a@p200300ef973db186502293e1a26d2ca1.dip0.t-ipconnect.de)

All times are in UTC on 2021-11-16.