2023/01/09

2023-01-09 00:00:24 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 268 seconds)
2023-01-09 00:00:29 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-01-09 00:02:52 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 268 seconds)
2023-01-09 00:04:27 +0100accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-01-09 00:06:04 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-09 00:10:58 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-09 00:10:58 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-09 00:11:06 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2023-01-09 00:12:58 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving)
2023-01-09 00:14:26 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 00:15:58 +0100guisande[m](~guisandem@2001:470:69fc:105::2:f049)
2023-01-09 00:16:38 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-01-09 00:18:47 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 264 seconds)
2023-01-09 00:20:43 +0100guisande[m](~guisandem@2001:470:69fc:105::2:f049) ()
2023-01-09 00:20:52 +0100acidjnk(~acidjnk@p200300d6e715c430f99e79aa35639cab.dip0.t-ipconnect.de)
2023-01-09 00:21:37 +0100clementd-42[m](~clementd-@2001:470:69fc:105::1:65c5)
2023-01-09 00:21:52 +0100fizbin(~fizbin@user/fizbin)
2023-01-09 00:27:30 +0100libertyprime(~libertypr@203.96.203.167)
2023-01-09 00:34:50 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 00:35:34 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 252 seconds)
2023-01-09 00:36:51 +0100mmhat(~mmh@p200300f1c7123c08ee086bfffe095315.dip0.t-ipconnect.de)
2023-01-09 00:36:51 +0100mmhat(~mmh@p200300f1c7123c08ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2023-01-09 00:42:13 +0100fizbin(~fizbin@user/fizbin)
2023-01-09 00:48:14 +0100AlexNoo(~AlexNoo@178.34.160.164) (Read error: Connection reset by peer)
2023-01-09 00:51:43 +0100AlexZenon(~alzenon@178.34.160.164) (Ping timeout: 260 seconds)
2023-01-09 00:52:24 +0100Alex_test(~al_test@178.34.160.164) (Ping timeout: 265 seconds)
2023-01-09 00:52:40 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-09 00:52:47 +0100panovia(~user@user/siracusa)
2023-01-09 00:53:54 +0100tremon(~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
2023-01-09 00:55:24 +0100tcard(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2023-01-09 00:56:51 +0100shriekingnoise(~shrieking@186.137.175.87)
2023-01-09 00:57:46 +0100mud(~mud@user/kadoban) (Quit: quit)
2023-01-09 01:02:12 +0100Alex_test(~al_test@178.34.160.164)
2023-01-09 01:03:16 +0100AlexZenon(~alzenon@178.34.160.164)
2023-01-09 01:04:23 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 264 seconds)
2023-01-09 01:06:03 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-09 01:06:08 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 252 seconds)
2023-01-09 01:06:21 +0100thyriaen(~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection)
2023-01-09 01:08:02 +0100fizbin(~fizbin@user/fizbin)
2023-01-09 01:08:11 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2023-01-09 01:11:17 +0100jero98772(~jero98772@2800:484:1d80:d8ce:dcd4:8c1c:a5d3:c157)
2023-01-09 01:15:14 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
2023-01-09 01:20:40 +0100fizbin(~fizbin@user/fizbin) (Remote host closed the connection)
2023-01-09 01:20:58 +0100fizbin(~fizbin@user/fizbin)
2023-01-09 01:22:44 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2023-01-09 01:30:41 +0100king_gs(~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60)
2023-01-09 01:35:52 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-09 01:37:10 +0100acidjnk(~acidjnk@p200300d6e715c430f99e79aa35639cab.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2023-01-09 01:46:19 +0100mizlan(~mizlan@2607:f010:2a7:1005:ce9:a225:44cb:572f)
2023-01-09 01:47:13 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 01:52:01 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
2023-01-09 01:53:10 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 01:54:47 +0100king_gs(~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60) (Ping timeout: 264 seconds)
2023-01-09 01:58:00 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 260 seconds)
2023-01-09 01:59:00 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-01-09 02:02:56 +0100mizlan(~mizlan@2607:f010:2a7:1005:ce9:a225:44cb:572f) (Ping timeout: 255 seconds)
2023-01-09 02:04:53 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 02:10:27 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-01-09 02:14:47 +0100mud(~mud@user/kadoban)
2023-01-09 02:16:35 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-01-09 02:20:14 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-09 02:28:23 +0100king_gs(~Thunderbi@187.201.110.169)
2023-01-09 02:31:42 +0100kyborg2011(~kyborg201@host-176-36-215-61.b024.la.net.ua)
2023-01-09 02:33:12 +0100kyborg2011(~kyborg201@host-176-36-215-61.b024.la.net.ua) (Client Quit)
2023-01-09 02:37:37 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2023-01-09 02:38:55 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-01-09 02:39:44 +0100king_gs(~Thunderbi@187.201.110.169) (Quit: king_gs)
2023-01-09 02:40:54 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-01-09 02:41:28 +0100razetime(~Thunderbi@49.207.222.244)
2023-01-09 02:45:17 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds)
2023-01-09 02:49:10 +0100mcglk(~mcglk@131.191.49.120) (Ping timeout: 252 seconds)
2023-01-09 02:49:59 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 268 seconds)
2023-01-09 02:51:44 +0100fizbin(~fizbin@user/fizbin)
2023-01-09 02:53:46 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-01-09 02:54:49 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-01-09 02:54:49 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-01-09 02:54:49 +0100wroathe(~wroathe@user/wroathe)
2023-01-09 02:58:33 +0100jero98772(~jero98772@2800:484:1d80:d8ce:dcd4:8c1c:a5d3:c157) (Ping timeout: 260 seconds)
2023-01-09 02:59:41 +0100mcglk(~mcglk@131.191.49.120)
2023-01-09 03:00:28 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 268 seconds)
2023-01-09 03:08:30 +0100tinwood_(~tinwood@general.default.akavanagh.uk0.bigv.io) (Remote host closed the connection)
2023-01-09 03:09:59 +0100jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
2023-01-09 03:10:34 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-09 03:11:33 +0100tinwood(~tinwood@general.default.akavanagh.uk0.bigv.io)
2023-01-09 03:11:33 +0100tinwood(~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
2023-01-09 03:11:33 +0100tinwood(~tinwood@canonical/tinwood)
2023-01-09 03:17:07 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
2023-01-09 03:23:35 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 03:27:30 +0100jakalx(~jakalx@base.jakalx.net) ()
2023-01-09 03:28:36 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-09 03:31:01 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 03:33:04 +0100jakalx(~jakalx@base.jakalx.net)
2023-01-09 03:36:07 +0100Magnus[m](~magthetch@2001:470:69fc:105::d1a7)
2023-01-09 03:37:36 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2023-01-09 03:38:57 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2023-01-09 03:50:49 +0100mcglk(~mcglk@131.191.49.120) (Ping timeout: 252 seconds)
2023-01-09 03:51:52 +0100thongpv(~thongpv87@2402:9d80:34a:6d5:cb81:2d47:bc6c:c725)
2023-01-09 03:56:15 +0100jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Remote host closed the connection)
2023-01-09 04:02:50 +0100libertyprime(~libertypr@203.96.203.167) (Ping timeout: 260 seconds)
2023-01-09 04:04:32 +0100MelMalikReinhilde
2023-01-09 04:07:40 +0100td_(~td@83.135.9.53) (Ping timeout: 265 seconds)
2023-01-09 04:09:25 +0100td_(~td@83.135.9.52)
2023-01-09 04:17:48 +0100mcglk(~mcglk@131.191.49.120)
2023-01-09 04:24:04 +0100ddellacosta(~ddellacos@static-198-44-136-50.cust.tzulo.com) (Ping timeout: 260 seconds)
2023-01-09 04:25:34 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
2023-01-09 04:30:40 +0100mcglk(~mcglk@131.191.49.120) (Ping timeout: 272 seconds)
2023-01-09 04:36:40 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-09 04:38:14 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 04:43:20 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-09 04:44:00 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 04:48:51 +0100shriekingnoise(~shrieking@186.137.175.87) (Quit: Quit)
2023-01-09 04:49:02 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-09 04:50:33 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2023-01-09 04:50:51 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 04:55:40 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-01-09 04:55:58 +0100libertyprime(~libertypr@203.96.203.167)
2023-01-09 04:57:13 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-09 04:58:12 +0100justsomeguy(~justsomeg@user/justsomeguy)
2023-01-09 04:58:19 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-01-09 04:58:19 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-01-09 04:58:19 +0100finn_elijaFinnElija
2023-01-09 05:00:00 +0100Taneb(~Taneb@runciman.hacksoc.org) (Quit: I seem to have stopped.)
2023-01-09 05:00:39 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2023-01-09 05:01:11 +0100Taneb(~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0)
2023-01-09 05:01:38 +0100ub(~Thunderbi@p200300ecdf264ecd2441c48ea8fe3d99.dip0.t-ipconnect.de)
2023-01-09 05:02:34 +0100ubert(~Thunderbi@p548c9ce5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-01-09 05:02:34 +0100ububert
2023-01-09 05:16:59 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-01-09 05:20:09 +0100mbuf(~Shakthi@49.205.80.212)
2023-01-09 05:23:47 +0100justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
2023-01-09 05:25:05 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
2023-01-09 05:25:11 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-01-09 05:29:05 +0100foul_owl(~kerry@193.29.61.203) (Ping timeout: 268 seconds)
2023-01-09 05:31:12 +0100mcglk(~mcglk@131.191.49.120)
2023-01-09 05:40:10 +0100alfonsox(~quassel@103.87.57.65)
2023-01-09 05:46:51 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 05:48:45 +0100 <iqubic> Does anyone have experience with jle``'s conduino Package?
2023-01-09 05:48:57 +0100phma(~phma@host-67-44-208-226.hnremote.net) (Read error: Connection reset by peer)
2023-01-09 05:49:53 +0100phma(phma@2001:5b0:211b:8f58:b197:6512:47e6:c966)
2023-01-09 05:51:55 +0100 <iqubic> I have right now a "(MonadState Int m) => Pipe Int Int u m ()" and I'm trying to figure out how to set the initial state when I run this pipe.
2023-01-09 05:53:17 +0100 <iqubic> I'm using "https://hackage.haskell.org/package/conduino-0.2.2.0"
2023-01-09 05:54:19 +0100johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
2023-01-09 05:54:45 +0100johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Client Quit)
2023-01-09 05:55:29 +0100 <jackdk> Setting aside the fact that my general answer to any streaming question is "Just use `streaming`", once you `runPipe` you'll be left with a `MonadState Int m => m ()` which you can then apply to `runState`.
2023-01-09 05:56:12 +0100 <iqubic> I see.
2023-01-09 05:56:26 +0100 <iqubic> Why is the streaming library better?
2023-01-09 05:56:44 +0100 <jackdk> https://lobste.rs/s/4imhne/parallel_streaming_haskell_part_1_fast#c_n63elb
2023-01-09 05:56:50 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
2023-01-09 05:58:05 +0100 <jackdk> My experience is that streaming libraries built on transformers with `i` and `o` parameters get awkward if you want to do nontrivial things like rechunking without excessive buffering
2023-01-09 05:58:46 +0100 <iqubic> Does the "streaming" library support being a monad transformer?
2023-01-09 05:59:29 +0100 <iqubic> Because eventually I'm going to want to add (MonadError SomeErrorType m) into the list of capabilities the monad m has.
2023-01-09 06:00:21 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 06:00:57 +0100 <jackdk> https://hackage.haskell.org/package/streaming-0.2.3.1/docs/Streaming.html#t:Stream instances: `Functor f => MonadTrans (Stream f)`. I recommend looking up instances in haddocks to answer such questions.
2023-01-09 06:24:59 +0100foul_owl(~kerry@71.212.143.88)
2023-01-09 06:28:24 +0100trev(~trev@user/trev)
2023-01-09 06:29:32 +0100kuttenbrunzer(~kuttenbru@2a02:8108:8b80:1d48:4c:171e:1764:eae9)
2023-01-09 06:33:13 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
2023-01-09 06:41:26 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-01-09 06:46:12 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
2023-01-09 06:50:13 +0100PotatoGim_PotatoGim
2023-01-09 06:55:52 +0100mei_(~mei@user/mei)
2023-01-09 06:56:14 +0100mei(~mei@user/mei) (Ping timeout: 246 seconds)
2023-01-09 07:21:09 +0100 <iqubic> jackdk: The thing I'm not really understanding about the Streaming library is if I can pass input to a stream.
2023-01-09 07:21:21 +0100 <iqubic> Does it have the concept of a consumer?
2023-01-09 07:21:32 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 255 seconds)
2023-01-09 07:26:45 +0100 <iqubic> Basically, I'm not seeing anything like "await"
2023-01-09 07:30:23 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2023-01-09 07:30:40 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-01-09 07:31:22 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 07:33:47 +0100mechap(~mechap@user/mechap) (Ping timeout: 264 seconds)
2023-01-09 07:35:41 +0100mechap(~mechap@user/mechap)
2023-01-09 07:39:27 +0100johnw(~johnw@2600:1700:cf00:db0:9c9b:5bf6:77a6:530c)
2023-01-09 07:40:17 +0100coot(~coot@213.134.171.3)
2023-01-09 07:41:18 +0100coot(~coot@213.134.171.3) (Client Quit)
2023-01-09 07:43:26 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-01-09 07:50:51 +0100johnw(~johnw@2600:1700:cf00:db0:9c9b:5bf6:77a6:530c) (Ping timeout: 248 seconds)
2023-01-09 07:51:22 +0100abhixec(~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
2023-01-09 07:51:52 +0100johnw(~johnw@2600:1700:cf00:db0:6c83:de6b:5cc5:500b)
2023-01-09 07:57:13 +0100lewisje(~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f) (Read error: Connection reset by peer)
2023-01-09 07:57:38 +0100lewisje(~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f)
2023-01-09 07:58:50 +0100kuttenbrunzer(~kuttenbru@2a02:8108:8b80:1d48:4c:171e:1764:eae9) (Quit: Leaving)
2023-01-09 07:59:40 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 08:00:04 +0100califax(~califax@user/califx)
2023-01-09 08:12:00 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-09 08:23:09 +0100 <jackdk> iqubic: streaming solves that by taking any inputs as regular function arguments. So you can either write things using something like `Streaming.Prelude.mapM` or `Streaming.Prelude.uncons` if you want to peel off a single item.
2023-01-09 08:23:40 +0100 <iqubic> I see. That makes a ton of sense.
2023-01-09 08:25:50 +0100johnw(~johnw@2600:1700:cf00:db0:6c83:de6b:5cc5:500b) (Ping timeout: 246 seconds)
2023-01-09 08:27:11 +0100 <jackdk> https://git.sr.ht/~jack/codec-hostile-waters/tree/7e26b2d9/item/src/Codec/Game/HostileWaters/Mng.h… here I parse a header from a stream, and return the remainder if the parse succeeds. (`ByteStream`, from `streaming-bytestring`, is like a specialised, unpacked `Stream (Of ByteString)` that's just for binary data.) You could put the stream you're consuming from inside a `MonadState`, but I've never felt the need and it probably won't compose well.
2023-01-09 08:27:20 +0100 <iqubic> Is it possible to write a function of the type "(a -> b) -> Stream (Of a) m r -> Stream (Of b) m r" without explicitly pattern matching on the Stream?
2023-01-09 08:28:41 +0100 <iqubic> That's not quite fmap, because of the order of type parameters
2023-01-09 08:28:57 +0100 <mauke> S.map
2023-01-09 08:30:57 +0100 <iqubic> What's the point of this function? "maps :: (Monad m, Functor f) => (forall x. f x -> g x) -> Stream f m r -> Stream g m r"
2023-01-09 08:31:19 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 252 seconds)
2023-01-09 08:31:22 +0100 <iqubic> Is that just so that S.map works?
2023-01-09 08:35:21 +0100 <jackdk> nah, you can do a bunch of other stuff. Have a look in `Streaming` - `S.maps eitherToSum` would turn `Stream (Of (Either a b)) m r` -> `Stream (Sum (Of a) (Of b)) m r`, at which point you could break it apart using `separate`. I'm sure there are other uses.
2023-01-09 08:36:19 +0100 <jackdk> The other answer is that it's not "for" anything, but it exists as a direct consequence of the `Stream` data type, so why not provide it? Someone's gonna find something useful to do with it
2023-01-09 08:37:37 +0100 <iqubic> Why would you ever want to use a stream with a functor that's not (Of a)?
2023-01-09 08:39:52 +0100mncheckm(~mncheck@193.224.205.254)
2023-01-09 08:40:18 +0100 <jackdk> There's an example in the lobsters comment, but also unzip in the library itself
2023-01-09 08:41:56 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-01-09 08:42:43 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-09 08:47:40 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 08:50:58 +0100 <iqubic> What is lobsters? It looks a bit like reddit.
2023-01-09 08:54:47 +0100mmhat(~mmh@p200300f1c7123c08ee086bfffe095315.dip0.t-ipconnect.de)
2023-01-09 08:54:49 +0100mmhat(~mmh@p200300f1c7123c08ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2023-01-09 08:55:19 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 256 seconds)
2023-01-09 08:57:39 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 260 seconds)
2023-01-09 08:58:29 +0100Xeroine(~Xeroine@user/xeroine)
2023-01-09 09:06:25 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f47a:1477:2a05:556f)
2023-01-09 09:08:50 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 09:14:11 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-01-09 09:14:39 +0100scoopahdoopah(~quassel@050-089-109-059.res.spectrum.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-01-09 09:15:24 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 255 seconds)
2023-01-09 09:18:57 +0100 <[exa]> mauke: haha you welcome. :D :D
2023-01-09 09:22:14 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-01-09 09:22:37 +0100gmg(~user@user/gehmehgeh)
2023-01-09 09:33:01 +0100Philonous_(~Philonous@user/philonous) (Quit: ZNC - https://znc.in)
2023-01-09 09:33:31 +0100Philonous(~Philonous@user/philonous)
2023-01-09 09:35:45 +0100dsrt^(~dsrt@76.145.190.81)
2023-01-09 09:39:28 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-09 09:42:06 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-01-09 09:43:12 +0100m1dnight(~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.7.1)
2023-01-09 09:43:35 +0100m1dnight(~christoph@78-22-0-121.access.telenet.be)
2023-01-09 09:45:37 +0100acidjnk(~acidjnk@p200300d6e715c430085fdf7975302115.dip0.t-ipconnect.de)
2023-01-09 09:45:57 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 09:46:25 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-01-09 09:49:22 +0100wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com) (Remote host closed the connection)
2023-01-09 09:50:31 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 252 seconds)
2023-01-09 09:50:48 +0100cfricke(~cfricke@user/cfricke)
2023-01-09 09:54:37 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32)
2023-01-09 09:55:45 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2023-01-09 09:55:59 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-01-09 09:58:03 +0100Guest6780(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2023-01-09 10:00:01 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-01-09 10:00:07 +0100ei30metry[m](~ei30metry@2001:470:69fc:105::2:d5ee) (Quit: You have been kicked for being idle)
2023-01-09 10:02:52 +0100cheater_(~Username@user/cheater)
2023-01-09 10:04:14 +0100barak(~barak@77.125.90.25)
2023-01-09 10:05:09 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 10:05:20 +0100cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2023-01-09 10:05:28 +0100cheater_cheater
2023-01-09 10:08:09 +0100foul_owl(~kerry@71.212.143.88) (Ping timeout: 252 seconds)
2023-01-09 10:14:33 +0100zeenk(~zeenk@2a02:2f04:a110:ac00::7fe)
2023-01-09 10:15:16 +0100barak(~barak@77.125.90.25) (Ping timeout: 252 seconds)
2023-01-09 10:17:19 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-01-09 10:17:35 +0100nschoe(~q@141.101.51.197)
2023-01-09 10:20:31 +0100chele(~chele@user/chele)
2023-01-09 10:21:24 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-09 10:22:16 +0100foul_owl(~kerry@157.97.134.63)
2023-01-09 10:22:43 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 10:25:29 +0100teddyc(theodorc@cassarossa.samfundet.no)
2023-01-09 10:26:36 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-01-09 10:27:07 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 260 seconds)
2023-01-09 10:33:47 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-01-09 10:33:47 +0100mzan(~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-01-09 10:35:51 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-01-09 10:47:04 +0100mzan(~quassel@mail.asterisell.com)
2023-01-09 10:57:02 +0100ubert(~Thunderbi@p200300ecdf264ecd2441c48ea8fe3d99.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2023-01-09 10:57:22 +0100ubert(~Thunderbi@p548c9ce5.dip0.t-ipconnect.de)
2023-01-09 10:59:35 +0100coldtom(~coldtom@coldrick.cc) (Quit: Ping timeout (120 seconds))
2023-01-09 11:02:03 +0100Square(~a@user/square) (Ping timeout: 252 seconds)
2023-01-09 11:02:15 +0100coldtom(~coldtom@coldrick.cc)
2023-01-09 11:02:54 +0100Square(~a@user/square)
2023-01-09 11:03:25 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2023-01-09 11:06:20 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 260 seconds)
2023-01-09 11:16:55 +0100acidjnk_new(~acidjnk@p200300d6e715c43040ccabc07de96856.dip0.t-ipconnect.de)
2023-01-09 11:17:58 +0100acidjnk(~acidjnk@p200300d6e715c430085fdf7975302115.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2023-01-09 11:21:11 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 246 seconds)
2023-01-09 11:21:48 +0100 <zzz> i often find some ghc process eating away at resources and i have no idea what it is. normally some thing i did which apparently failed to terminate. is this normal?
2023-01-09 11:21:55 +0100 <zzz> i keep doing pkill -9 ghc
2023-01-09 11:22:22 +0100 <merijn> zzz: hls starting them, maybe?
2023-01-09 11:23:27 +0100 <zzz> that's a possibility. i remember this happening to me a few years ago before using hls though. but now that may be it. is there a way to verify it?
2023-01-09 11:23:58 +0100 <Franciman> lol zzz
2023-01-09 11:24:12 +0100 <Franciman> what cpu do you use?
2023-01-09 11:24:31 +0100 <Franciman> and do you directly run ghc?
2023-01-09 11:24:41 +0100 <zzz> i'm on an i7 atm
2023-01-09 11:25:10 +0100 <zzz> but this has also happened on amd
2023-01-09 11:25:27 +0100 <zzz> i frequently run ghcid
2023-01-09 11:25:35 +0100 <Franciman> maybe it's ghcid
2023-01-09 11:25:50 +0100 <zzz> that's my suspicion
2023-01-09 11:26:55 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 11:27:33 +0100 <merijn> Almost certainly it's ghcid
2023-01-09 11:27:33 +0100 <zzz> is this a known issue?
2023-01-09 11:27:55 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-09 11:28:04 +0100 <zzz> shouldn't the process be killed with ghcid?
2023-01-09 11:28:27 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 11:31:02 +0100 <merijn> Should, sure :p
2023-01-09 11:31:04 +0100 <merijn> Is it? :p
2023-01-09 11:31:07 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 248 seconds)
2023-01-09 11:32:53 +0100 <zzz> i think that's the culprit. i won't worry about it too much then
2023-01-09 11:33:09 +0100 <zzz> thanks
2023-01-09 11:34:14 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2023-01-09 11:34:34 +0100__monty__(~toonn@user/toonn)
2023-01-09 11:35:27 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de)
2023-01-09 11:45:00 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 11:47:19 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
2023-01-09 11:51:04 +0100kenran(~user@user/kenran)
2023-01-09 11:57:28 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-01-09 11:58:16 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2023-01-09 11:59:24 +0100elevenkb(~elevenkb@105.224.38.20)
2023-01-09 12:00:20 +0100troydm(~troydm@user/troydm) (Ping timeout: 272 seconds)
2023-01-09 12:04:36 +0100teo(~teo@user/teo)
2023-01-09 12:06:03 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 12:07:43 +0100califax(~califax@user/califx)
2023-01-09 12:14:25 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com)
2023-01-09 12:17:38 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 12:18:39 +0100Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2023-01-09 12:18:51 +0100califax(~califax@user/califx)
2023-01-09 12:22:54 +0100Teacup(~teacup@user/teacup)
2023-01-09 12:31:40 +0100Teacup(~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.)
2023-01-09 12:41:30 +0100Guest3770(~textual@pool-100-11-18-203.phlapa.fios.verizon.net)
2023-01-09 12:41:34 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2023-01-09 12:44:42 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2023-01-09 12:46:55 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 252 seconds)
2023-01-09 12:50:00 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-09 12:51:26 +0100Guest3770(~textual@pool-100-11-18-203.phlapa.fios.verizon.net) (Changing host)
2023-01-09 12:51:26 +0100Guest3770(~textual@user/polo)
2023-01-09 12:51:26 +0100ChanServ+o litharge
2023-01-09 12:51:27 +0100litharge+b *!*@100.11.18.203
2023-01-09 12:51:36 +0100Guest3770(~textual@user/polo) ()
2023-01-09 12:51:37 +0100litharge-o litharge
2023-01-09 12:53:04 +0100Teacup(~teacup@user/teacup)
2023-01-09 12:54:15 +0100Guest6780(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
2023-01-09 13:00:59 +0100cheater_(~Username@user/cheater)
2023-01-09 13:03:18 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer)
2023-01-09 13:04:04 +0100cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2023-01-09 13:04:06 +0100cheater_cheater
2023-01-09 13:14:17 +0100elevenkb(~elevenkb@105.224.38.20) (Quit: Client closed)
2023-01-09 13:16:43 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 13:20:12 +0100mei(~mei@user/mei)
2023-01-09 13:21:05 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 255 seconds)
2023-01-09 13:21:19 +0100libertyprime(~libertypr@203.96.203.167) (Ping timeout: 260 seconds)
2023-01-09 13:21:42 +0100mei_(~mei@user/mei) (Read error: Connection reset by peer)
2023-01-09 13:21:50 +0100MajorBiscuit(~MajorBisc@145.94.157.175)
2023-01-09 13:22:34 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 13:23:37 +0100cheater_(~Username@user/cheater)
2023-01-09 13:25:55 +0100cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2023-01-09 13:25:59 +0100YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Ping timeout: 260 seconds)
2023-01-09 13:26:03 +0100cheater_cheater
2023-01-09 13:29:15 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 13:32:08 +0100bontaq(~user@ool-45779fe5.dyn.optonline.net)
2023-01-09 13:33:10 +0100kmein(~weechat@user/kmein) (Quit: ciao kakao)
2023-01-09 13:33:36 +0100MajorBiscuit(~MajorBisc@145.94.157.175) (Quit: WeeChat 3.6)
2023-01-09 13:34:41 +0100Guest6780(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2023-01-09 13:35:18 +0100kmein(~weechat@user/kmein)
2023-01-09 13:38:18 +0100MajorBiscuit(~MajorBisc@145.94.157.175)
2023-01-09 13:41:49 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2023-01-09 13:47:24 +0100 <freeside> dumbo question. I'm trying to work with RWST, and have written a function intended to run in that context, but now I feel n00b because what the heck are those binds doing inside do? Shouldn't they be unnecessary? https://github.com/smucclaw/complaw/blob/primary/doc/ex-de-20221220/detax/src/Lib.hs#L107-L112
2023-01-09 13:48:08 +0100 <dminuoso> freeside: you could do it without them, but then you would have to name the intermediate values.
2023-01-09 13:48:16 +0100MajorBiscuit(~MajorBisc@145.94.157.175) (Quit: WeeChat 3.6)
2023-01-09 13:48:28 +0100 <dminuoso> The `do` itself is redundant, but sometimes people use it to emphasie monadic code.
2023-01-09 13:48:32 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2023-01-09 13:48:50 +0100 <freeside> maybe i'm misremembering, but i thought do notation gives you >>= for free between lines
2023-01-09 13:48:56 +0100 <freeside> or is it that it gives you >> between lines
2023-01-09 13:49:00 +0100 <dminuoso> The latter.
2023-01-09 13:49:29 +0100 <freeside> oh. then if i want to have x <- f1; y <- f2 x; z <- f3 y, how would i sugar that
2023-01-09 13:49:30 +0100 <dminuoso> It is `a <- f; ...` that desugars desugars into `a >>= \f -> ...`
2023-01-09 13:49:42 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2023-01-09 13:49:50 +0100 <dminuoso> Note they just used an eta-reduced variant
2023-01-09 13:49:50 +0100 <freeside> some sort of fish-like operator, i will go read
2023-01-09 13:50:10 +0100 <dminuoso> In fact, with a bit of discipline you can make >>= look very similar to <- this way
2023-01-09 13:50:17 +0100 <dminuoso> in principle voiding the need for do-expressions for it
2023-01-09 13:51:16 +0100MajorBiscuit(~MajorBisc@145.94.157.175)
2023-01-09 13:51:18 +0100 <dminuoso> freeside: https://gist.github.com/dminuoso/838f5df5a8ea8473b6661b0444ca332b
2023-01-09 13:51:26 +0100 <mauke> :t (>=>)
2023-01-09 13:51:28 +0100 <lambdabot> Monad m => (a -> m b) -> (b -> m c) -> a -> m c
2023-01-09 13:51:34 +0100 <freeside> thank you, i am grasping after elixir's |> i htink
2023-01-09 13:51:40 +0100 <dminuoso> the former desugars into the latter. note that I use a particular line break style to make it look very similar to <-
2023-01-09 13:52:18 +0100 <dminuoso> The latter style is *very* commonly used in JavaScript with promises
2023-01-09 13:52:35 +0100 <dminuoso> Except instead of >>= you would use .then
2023-01-09 13:53:39 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 252 seconds)
2023-01-09 13:53:45 +0100 <dminuoso> It's a bit cute because `async` then takes the role of `do`, and `= await` takes the role of <-
2023-01-09 13:56:51 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 265 seconds)
2023-01-09 13:58:20 +0100 <freeside> grateful, thank you
2023-01-09 14:00:45 +0100 <freeside> in the history of haskell has anyone ever suggested a "dodo" syntax that has >>= between the lines instead of >> ?
2023-01-09 14:03:25 +0100 <ncf> that's what <- does
2023-01-09 14:04:08 +0100 <dminuoso> freeside: well you could use RebindableSyntax or a QQ to that effect.
2023-01-09 14:04:52 +0100 <dminuoso> Or I guess you would rather need full TH rather than QQ. But RebindableSyntax should work
2023-01-09 14:04:56 +0100 <ncf> what
2023-01-09 14:05:21 +0100 <freeside> or i could play stupid games with State as the carrier from one line to the next, but that would feel dirty
2023-01-09 14:05:32 +0100 <dminuoso> freeside: Another way to reformulate the code you are looking in a similar style would be:
2023-01-09 14:06:14 +0100 <ncf> freeside: do notation desugars to a bunch of >>= and >>, you don't need rebindable syntax for this
2023-01-09 14:06:37 +0100 <dminuoso> ncf: they appear to be asking for `do x; y; z` to desugar into `x >>= y >>= z`
2023-01-09 14:06:50 +0100 <freeside> yes, that's right
2023-01-09 14:07:12 +0100 <ncf> that would be weird
2023-01-09 14:07:25 +0100 <dminuoso> freeside: what you can also do is `foldr (>=>) id [y, z]`
2023-01-09 14:07:31 +0100 <dminuoso> err, not `id` but `pure`
2023-01-09 14:07:38 +0100 <dminuoso> `foldr (>=>) pure [y, z]`
2023-01-09 14:07:45 +0100 <dminuoso> That would give you a sort of list that you could align vertically
2023-01-09 14:08:26 +0100 <dminuoso> for 2 elements this is obviously nonsense, but Im just guessing you are looking for ways to rewrite the code linked above
2023-01-09 14:08:30 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-09 14:09:40 +0100 <dminuoso> freeside: The only odd thing about the code is just the do honestly.
2023-01-09 14:10:26 +0100 <ncf> FWIW i would write that as runRWST $ (0, mkNod...) & w >=> x >=> y >=> z
2023-01-09 14:11:08 +0100clementd-42[m](~clementd-@2001:470:69fc:105::1:65c5) ()
2023-01-09 14:11:18 +0100 <dminuoso> Mmm, yeah I guess that is cleanest
2023-01-09 14:13:45 +0100mncheckm(~mncheck@193.224.205.254) (Ping timeout: 255 seconds)
2023-01-09 14:15:04 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2023-01-09 14:18:27 +0100 <freeside> yes, thank you. I just want things to line up.
2023-01-09 14:24:01 +0100Feuermagier_(~Feuermagi@87.249.132.178)
2023-01-09 14:26:12 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2023-01-09 14:26:49 +0100Feuermagier(~Feuermagi@user/feuermagier) (Ping timeout: 265 seconds)
2023-01-09 14:29:35 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 252 seconds)
2023-01-09 14:31:40 +0100 <dminuoso> validateEveryToJSONWithPatternChecker :: forall proxy api. TMap (Every [Typeable, Show, Arbitrary, ToJSON, ToSchema]) (BodyTypes JSON api) => (Pattern -> Text -> Bool) -> proxy api -> Spec
2023-01-09 14:31:53 +0100 <dminuoso> How far is satire acceptable?
2023-01-09 14:31:56 +0100Lycurgus(~juan@user/Lycurgus)
2023-01-09 14:32:28 +0100YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
2023-01-09 14:34:41 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-01-09 14:35:48 +0100mncheckm(~mncheck@193.224.205.254)
2023-01-09 14:37:35 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2023-01-09 14:40:31 +0100 <dminuoso> Can you evaluate a type family within TemplateHaskell?
2023-01-09 14:40:38 +0100 <dminuoso> (Or well, an application of a type family of course)
2023-01-09 14:41:12 +0100razetime(~Thunderbi@49.207.222.244) (Ping timeout: 272 seconds)
2023-01-09 14:46:14 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2023-01-09 14:47:51 +0100merijnstarts rolling up a newspaper
2023-01-09 14:48:06 +0100jinsun__(~jinsun@user/jinsun)
2023-01-09 14:48:06 +0100jinsunGuest2988
2023-01-09 14:48:06 +0100Guest2988(~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services)))
2023-01-09 14:48:06 +0100jinsun__jinsun
2023-01-09 14:49:00 +0100califax(~califax@user/califx)
2023-01-09 14:49:17 +0100Feuermagier_(~Feuermagi@87.249.132.178) (Quit: Leaving)
2023-01-09 14:49:28 +0100Feuermagier(~Feuermagi@user/feuermagier)
2023-01-09 14:49:48 +0100 <dminuoso> merijn: Im guessing the newspaper is the Lambda Daily, and the headline reads "groundbreaking function "applyTyFam" backported to GHC 9.0.2"
2023-01-09 14:50:14 +0100 <eldritchcookie[4> <dminuoso> "Can you evaluate a type family..." <- yes on a [t| |] quotation you can splice a type and use your type family
2023-01-09 14:50:52 +0100 <dminuoso> eldritchcookie[4: Ohh! Yes that will work nicely.
2023-01-09 14:51:02 +0100 <dminuoso> Presumably I can reify that back?
2023-01-09 14:51:32 +0100 <dminuoso> Im just hoping to break out of this typeclass nightmare that servant is, turn everything into reified types, and then write normal haskell code to turn this forsaken servant thing into an OpenAPI schema
2023-01-09 14:52:38 +0100jinsun__(~jinsun@user/jinsun)
2023-01-09 14:52:38 +0100jinsunGuest9640
2023-01-09 14:52:38 +0100jinsun__jinsun
2023-01-09 14:52:59 +0100 <merijn> dminuoso: Sounds like the line of questioning that leads to people needing to be swatted with a newspaper for being bad boys :p
2023-01-09 14:53:19 +0100 <dminuoso> Only for having chosen servant in the first place.
2023-01-09 14:53:24 +0100 <dminuoso> Not that I know of a better solution...
2023-01-09 14:53:47 +0100 <merijn> dminuoso: yeah, but I can't blame people for using servant when I'm still tied to persistent xD
2023-01-09 14:53:54 +0100 <eldritchcookie[4> yes however you can't perform a splice of a splice in a quotation with a definition from the same module
2023-01-09 14:54:27 +0100 <dminuoso> eldritchcookie[4: thats just stage restriction, no?
2023-01-09 14:54:35 +0100 <eldritchcookie[4> yes
2023-01-09 14:55:36 +0100Guest9640(~jinsun@user/jinsun) (Ping timeout: 255 seconds)
2023-01-09 14:55:52 +0100 <eldritchcookie[4> i mentioned because i was trying to get the number of args of a function from its type and got met with stage restriction
2023-01-09 14:55:58 +0100 <dminuoso> Heh
2023-01-09 15:00:50 +0100 <eldritchcookie[4> how can i marshall a c structure from c to haskell and back i want to create bindings for raylib and its associated libraries and they use many times small structures which contain pointers
2023-01-09 15:01:13 +0100 <eldritchcookie[4> both in reterns and as arguments
2023-01-09 15:01:22 +0100 <eldritchcookie[4> *returns
2023-01-09 15:02:06 +0100 <dminuoso> eldritchcookie[4: You can use hsc2hs or c2sh to help generating boiler plate for bindings.
2023-01-09 15:05:10 +0100 <dminuoso> Its very low level, so if you expect higher level types (say a Text instead of a CString), you will need to write your own glue code
2023-01-09 15:05:23 +0100 <eldritchcookie[4> do they work on ghc 9.4? the last update on both of them is a year and a half ago
2023-01-09 15:05:35 +0100 <dminuoso> I havent tried 9.4, but I dont see any reason why it shouldnt
2023-01-09 15:05:36 +0100festive_kurbus(~festive_k@user/kurbus)
2023-01-09 15:06:16 +0100 <dminuoso> hsc2hs receives regular updates, though
2023-01-09 15:06:20 +0100 <dminuoso> https://github.com/haskell/hsc2hs/issues
2023-01-09 15:07:26 +0100 <Inst> how functional is IO code? How can code in the IO monad be made more functional, as opposed to procedural?
2023-01-09 15:07:56 +0100 <dminuoso> Inst: IO code is pure.
2023-01-09 15:07:59 +0100 <merijn> Inst: "It Depends (TM)" to all of those
2023-01-09 15:07:59 +0100 <Inst> I'm curious about this, because, unfortunately
2023-01-09 15:08:21 +0100 <Inst> some code is very heavily in IO, and I think everyone is familiar with Eric Normand crapping on bad Haskell codebases, right?
2023-01-09 15:08:33 +0100 <dminuoso> So?
2023-01-09 15:08:43 +0100 <dminuoso> That is not contradictory to functional code
2023-01-09 15:08:50 +0100 <dminuoso> GHC is extremely IO heavy too
2023-01-09 15:08:55 +0100 <merijn> Inst: Dunno who Eric Normand is, so...meh
2023-01-09 15:09:14 +0100 <merijn> Inst: There is a reason the running joke is "Haskell is my favourite imperative language"
2023-01-09 15:09:16 +0100 <Inst> Eric Normand is a Clojure programmer who worked as an intermediate level Haskeller
2023-01-09 15:09:36 +0100 <Inst> https://ericnormand.me/podcast/is-haskell-the-best-procedural-language
2023-01-09 15:09:37 +0100 <merijn> Is IO heavy code very imperative feeling? Sure. Is that bad? Yes, no, maybe, it depends.
2023-01-09 15:09:38 +0100 <dminuoso> Inst: But really, the important bit is to realize that IO itself is pure. Evaluating an IO action does not execute it.
2023-01-09 15:09:57 +0100 <Inst> The breakthrough I'm trying to make is that I ran into Haskellers bashing me for calling code in the IO type
2023-01-09 15:10:04 +0100 <merijn> Beginners are too obsessed with avoiding IO and then get in their own way of writing useful stuff
2023-01-09 15:10:13 +0100 <merijn> Inst: Where?
2023-01-09 15:10:16 +0100 <Inst> effectively an eDSL for procedural programming
2023-01-09 15:10:30 +0100 <Inst> arguing that it's important to think of IO as values
2023-01-09 15:10:31 +0100 <dminuoso> Its definitely not an eDSL.
2023-01-09 15:10:35 +0100 <merijn> Inst: tbh, I'd discount the opinions of anyone calling IO heavy code bad
2023-01-09 15:10:42 +0100 <dminuoso> Or.. mmm maybe it is.
2023-01-09 15:10:46 +0100 <merijn> Inst: I mean, IO *is* a value
2023-01-09 15:11:00 +0100 <merijn> but that doesn't strike me as particularly relevant
2023-01-09 15:11:08 +0100 <Inst> I'd have to discount my own opinions, then. :)
2023-01-09 15:11:10 +0100 <dminuoso> I think calling it an eDSL is a bit of a red herring
2023-01-09 15:11:22 +0100 <Inst> Their counterargument was that it was more important to think of IO as values
2023-01-09 15:11:23 +0100 <dminuoso> Because while you can interpret it that way, Im not sure you can draw useful conclusions or knowledge from it
2023-01-09 15:11:50 +0100 <Inst> that's why I went on a tirade about trying to figure out how to program with lists of IO
2023-01-09 15:11:54 +0100 <merijn> I think "haskell is an eDSL for IO" can be a helpful viewpoint, but who cares :p
2023-01-09 15:12:01 +0100shriekingnoise(~shrieking@186.137.175.87)
2023-01-09 15:12:43 +0100 <merijn> Inst: Lots of things inherently involve a lot of IO (concurrency, networking, etc.) so you're gonna use IO all over every way. But you're also gonna separate lots of logic from the IO
2023-01-09 15:13:00 +0100 <dminuoso> And sometimes that separation might not be good.
2023-01-09 15:13:10 +0100festive_kurbus(~festive_k@user/kurbus) (Quit: Client closed)
2023-01-09 15:13:25 +0100kurbus(~kurbus@user/kurbus)
2023-01-09 15:13:25 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 15:13:38 +0100 <dminuoso> GHC for examples has IO almost everywhere, and part of that enables a) diagnostics or debugging in any part of the logic, and b) simplifies a lot of mutability
2023-01-09 15:13:52 +0100 <Inst> I mean the basic strong point of Haskell, for me, is the foo = bar name / function declaration syntax
2023-01-09 15:14:06 +0100 <Inst> with where and let clauses, it allows really powerful compartmentalization of code
2023-01-09 15:14:16 +0100 <dminuoso> If you have that big module of 20,000 lines of pure code, its probably going to be an nightmare to debug with just randomly adding trace and hoping the inliner doenst do anything quirky
2023-01-09 15:14:17 +0100nschoe(~q@141.101.51.197) (Ping timeout: 246 seconds)
2023-01-09 15:14:44 +0100 <Inst> but while I've done a big module of 2,000 lines of pure code with 5-10 lines of IO
2023-01-09 15:14:46 +0100nschoe(~q@2a04:cec0:11e2:c730:8c07:5864:fe66:6807)
2023-01-09 15:14:52 +0100 <Inst> it's hard for me to understand the value of FP
2023-01-09 15:14:58 +0100 <dminuoso> Inst: I agree, `where` clauses (which in principle seem to demand lazyness to work right) are one of the best things in Haskell.
2023-01-09 15:15:00 +0100 <Inst> when you also have crud apps that are like 80% IO
2023-01-09 15:15:25 +0100 <dminuoso> Writing defining code first, followed by surrogate bindings feels much more readable than 40 lines of helper variables, and then the high level definition of a thing.
2023-01-09 15:15:27 +0100 <merijn> Inst: I mean, you could use IO (nearly) everywhere and Haskell would still be a great language to work in
2023-01-09 15:15:50 +0100dminuosois involved in two very IO centric apps
2023-01-09 15:15:56 +0100dminuosois happy with Haskell as the language
2023-01-09 15:16:09 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-01-09 15:16:18 +0100 <merijn> aggressively avoiding is definitely an anti-pattern I see in many beginners
2023-01-09 15:16:34 +0100 <Inst> that was how I ticked off monochrome when I suggested that Haskell has an IO problem; i.e, for someone who's done tons of Codewars Kata in Haskell, learned FP via textbook exercises, it just feels like "what's the point" or "I'm being scammed!" when I'm stuck facing code that's either intensively in the IO monad or intensively in a wrapper around IO
2023-01-09 15:16:40 +0100 <merijn> Like there's some kinda purity test for being "allowed" to write Haskell and if you use IO everywhere, you "don't belong"
2023-01-09 15:17:03 +0100 <Inst> for me, tbh, programming makes no sense without FP
2023-01-09 15:17:07 +0100 <Inst> I can't do complex state manipulation
2023-01-09 15:17:10 +0100 <mniip> dminuoso, evaluating type families from TH has led me to create https://hackage.haskell.org/package/th-tc
2023-01-09 15:17:15 +0100 <mniip> it's probably outdated now though
2023-01-09 15:17:16 +0100 <merijn> Inst: The point is that you *can* write code that is not IO
2023-01-09 15:17:47 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 246 seconds)
2023-01-09 15:17:50 +0100 <Inst> This recent binge of trying to learn programming, I started with C++, then ran away to Haskell because IP seemed unintuitive
2023-01-09 15:18:01 +0100 <dminuoso> mniip: Ah that's very interesting. Ill take a deeper look at it thanks
2023-01-09 15:18:03 +0100 <Inst> but if IO is sort of procedural, imperative, and you still need lots of IO for certain applications
2023-01-09 15:18:13 +0100 <Inst> i'm back in IO land ;_;
2023-01-09 15:18:16 +0100 <Inst> erm, imperative land
2023-01-09 15:18:17 +0100 <Inst> ;_;
2023-01-09 15:18:43 +0100 <Inst> dminuoso: but the question is, what are good practices for handling IO in Haskell, because you'll always need it?
2023-01-09 15:18:57 +0100 <dminuoso> Inst: I use IO whenever I want its effects.
2023-01-09 15:19:15 +0100 <dminuoso> And I dont have some rule to avoid it at all costs.
2023-01-09 15:19:42 +0100 <kuribas> Inst: if you find you can separate your code into (meaningful) pure and IO code, then do it.
2023-01-09 15:19:47 +0100 <kuribas> Inst: not much else to it.
2023-01-09 15:19:47 +0100 <dminuoso> Usually I run IO centric when I want diagnostics/logging or exceptions.
2023-01-09 15:20:17 +0100thegeekinside(~thegeekin@189.217.82.244)
2023-01-09 15:20:19 +0100 <Inst> yeah, i know, the folks avoiding monad transformers because of performance and unpredictability penalties, stuff like snoyman turning his back on monad transformers because an exception causes the loss of state
2023-01-09 15:20:31 +0100 <Inst> resorting to readerT only pattern
2023-01-09 15:20:43 +0100 <eldritchcookie[4> if i have a c function that returns/uses a struct without pointers do i need glue code in c or is there some way to make a foreign import declaration use non scalar types
2023-01-09 15:21:01 +0100 <kuribas> RIO is a pretty good default for your app monad.
2023-01-09 15:21:02 +0100 <dminuoso> eldritchcookie[4: You can use an ffi import directly
2023-01-09 15:21:14 +0100 <dminuoso> Ah hold on, strucft.
2023-01-09 15:21:25 +0100 <dminuoso> No you pretty much want c2hs or hsc2hs
2023-01-09 15:21:26 +0100kee(~~kee@user/wizzwizz4) (Read error: Connection reset by peer)
2023-01-09 15:21:26 +0100nschoe_(~q@141.101.51.197)
2023-01-09 15:21:26 +0100nschoe(~q@2a04:cec0:11e2:c730:8c07:5864:fe66:6807) (Ping timeout: 265 seconds)
2023-01-09 15:21:38 +0100 <merijn> eldritchcookie[4: #CursedQuestion
2023-01-09 15:21:41 +0100 <kuribas> Monad transformers are nice for avoiding boilerplate code when creating a DSL.
2023-01-09 15:21:47 +0100 <Inst> and matt parsons has written about it, i.e, the getArgs / Env pattern, processing it lightly, then pushing it to readerT
2023-01-09 15:22:15 +0100kee(~~kee@user/wizzwizz4)
2023-01-09 15:22:16 +0100 <dminuoso> eldritchcookie[4: Unless you *know* and dont mind writing a storable instance by hand, and can handle byte order and alignment inside the strucft.
2023-01-09 15:22:23 +0100 <merijn> eldritchcookie[4: There is no portable/stable ABI for passing/returning structs (or really any non-scalar type) from C functions
2023-01-09 15:22:41 +0100 <mniip> dminuoso, the function you're looking for is `tryExpandTyFam` (unexported unfortunately), but of note, there's a delicate mutual recursion between tryExpandTyFam and unifyTysResultE
2023-01-09 15:22:45 +0100 <Inst> i guess i should just accept that IO etc is just traditional programming, FP is pushing stuff from IO
2023-01-09 15:22:47 +0100 <merijn> Which is why the FFI doesn't support it. The FFI just follows the platform C ABI
2023-01-09 15:22:54 +0100 <Inst> into functional data processing
2023-01-09 15:22:59 +0100 <Inst> and I can't run away from traditional programming forever
2023-01-09 15:23:18 +0100 <merijn> Notably, you cannot even reliably pass structs to/from functions by code compiled with different C compilers
2023-01-09 15:23:37 +0100 <dminuoso> merijn: I consider this a fundamental C bug, though.
2023-01-09 15:23:56 +0100 <merijn> Most C compilers follow the platform ABI for portability, but since structs aren't in that there's nothing making compilers handling them the same way
2023-01-09 15:24:05 +0100 <merijn> dminuoso: That's not really a C bug, but an ABI bug
2023-01-09 15:24:13 +0100 <Inst> thank you for trying to help
2023-01-09 15:24:14 +0100 <kuribas> Inst: meh, mainstream languages don't have ADTs, pattern matching, type classes, etc, ...
2023-01-09 15:24:15 +0100 <merijn> C doesn't specify *anything*
2023-01-09 15:24:15 +0100 <dminuoso> merijn: Yes, lack of an ABI is the language's fault.
2023-01-09 15:24:25 +0100 <dminuoso> Or rather, lack of a stable ABI.
2023-01-09 15:24:53 +0100razetime(~Thunderbi@49.207.222.244)
2023-01-09 15:25:15 +0100 <dminuoso> But luckily any interop problem can be solved by just tossing enough XML at it and calling it dbus.
2023-01-09 15:25:25 +0100 <kuribas> Inst: IO is still functional, since "bind" is not "function apply".
2023-01-09 15:25:25 +0100 <eldritchcookie[4> :Inst i IO code is functional as long as you don't abuse do notation to just write a imperative program
2023-01-09 15:25:42 +0100 <kuribas> Inst: in the sense that functions are really functions.
2023-01-09 15:26:34 +0100 <Inst> i mean right now, my biggest problem is figuring out how to integrate blaze, servant, and a postgre server, when i don't know blaze / postgre / sql
2023-01-09 15:26:52 +0100 <Inst> the stuff about IO as theory is more a long-term issue
2023-01-09 15:27:07 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 15:27:14 +0100 <eldritchcookie[4> i am lazy how can i use template haskell with hsc2hs ?
2023-01-09 15:27:50 +0100 <dminuoso> eldritchcookie[4: You cant, hsc2hs is a preprocessor
2023-01-09 15:28:16 +0100 <dminuoso> Or rather, you can use the primitives generated by hsc2hs in TemplateHaskell, as long as you respect binding groups of course.
2023-01-09 15:28:25 +0100nschoe_(~q@141.101.51.197) (Quit: Switching off)
2023-01-09 15:28:26 +0100dka(~code-is-a@ns3059207.ip-193-70-33.eu)
2023-01-09 15:28:28 +0100 <kuribas> Inst: FP doesn't replace mainstream programming. You still need to know SQL, databases, architecture, etc... It just offers a cleaner way to write your code and reason about it.
2023-01-09 15:29:31 +0100 <kuribas> Inst: if your attitude is "Imperative is bad", you are not going to get far. A better way to think about it is "how can I make this code easier to understand, to reason about it".
2023-01-09 15:29:41 +0100jero98772(~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
2023-01-09 15:30:23 +0100 <Inst> through the magic of function composition and lambda calculus as an algebra
2023-01-09 15:30:41 +0100 <kuribas> yes
2023-01-09 15:30:54 +0100MajorBiscuit(~MajorBisc@145.94.157.175) (Quit: WeeChat 3.6)
2023-01-09 15:31:08 +0100 <kuribas> I don't like the term "magic", for me that's the opposite of "understanding".
2023-01-09 15:31:36 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 255 seconds)
2023-01-09 15:31:41 +0100 <kuribas> For me it means "something happens that seems to do what I want, but I don't understand how".
2023-01-09 15:31:50 +0100 <kuribas> all of python programming in a nutshell.
2023-01-09 15:32:56 +0100nschoe(~q@141.101.51.197)
2023-01-09 15:33:26 +0100 <kuribas> FP is the opposite, make the code more well behaved, well understandable. By reducing the input set with ADTs, making corner cases clear, making state explicit rather then implicit, make it explicit when side effects happen (bind vs apply).
2023-01-09 15:34:35 +0100 <Inst> is it reasonable to try to think of Haskell then as just an "advanced imperative language"?
2023-01-09 15:35:53 +0100Guest6780(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2023-01-09 15:36:11 +0100 <zzz> definitely not
2023-01-09 15:36:25 +0100 <dminuoso> What is the most minimalistic http server library around? I want something really simple to serve prometheus metrics, and Im very close to just writing a simple TCP server that outputs the HTTP statically..
2023-01-09 15:36:44 +0100 <Inst> the >>= vs $ is interesting; I had'nt thought about it, like how <$> doesn't cause side effects in WriterT
2023-01-09 15:36:47 +0100 <dminuoso> (by minimalistic I care about transitive dependencies)
2023-01-09 15:37:14 +0100 <Inst> but >>= does, by updating the log in the tuple
2023-01-09 15:37:19 +0100shriekingnoise(~shrieking@186.137.175.87) (Quit: Quit)
2023-01-09 15:38:17 +0100cheater_(~Username@user/cheater)
2023-01-09 15:39:12 +0100 <Inst> also, is this a useful judgment on let vs where?
2023-01-09 15:39:14 +0100 <dminuoso> Ah maybe Ill just write a bare WAI app and run it in warp.
2023-01-09 15:39:37 +0100 <Inst> let works better in monadic code, since it often resembles mutation
2023-01-09 15:39:55 +0100 <Inst> the order of "define terms first, then use" is more intuitive when you're thinking procedural
2023-01-09 15:40:11 +0100 <Inst> where is more useful when you're doing things purely functionally, i.e, it's declarative
2023-01-09 15:40:35 +0100 <Inst> moreover, the let is more important due to how the scoping works
2023-01-09 15:40:48 +0100 <Inst> let only exists in the following scope, whereas where applies to the entire function
2023-01-09 15:40:57 +0100 <Inst> or rather entire name / definition
2023-01-09 15:41:19 +0100cheater(~Username@user/cheater) (Ping timeout: 260 seconds)
2023-01-09 15:41:24 +0100cheater_cheater
2023-01-09 15:41:39 +0100 <eldritchcookie[4> say how likely is knowing the internals of the c FFI to help me possibly in the future write a C# one? and would writing my own storable instances and glue code help in learning it?
2023-01-09 15:42:46 +0100 <dminuoso> Does c-sharp even have a stable FFI?
2023-01-09 15:42:51 +0100 <dminuoso> Dont you usually go via .NET?
2023-01-09 15:43:03 +0100justsomeguy(~justsomeg@user/justsomeguy)
2023-01-09 15:44:09 +0100cfricke(~cfricke@user/cfricke)
2023-01-09 15:44:11 +0100Sgeo(~Sgeo@user/sgeo)
2023-01-09 15:44:28 +0100 <eldritchcookie[4> well i would probably need to target the dotnet virtual machine so probably i would instead interface with ist intermediate language
2023-01-09 15:44:29 +0100 <eldritchcookie[4> *its
2023-01-09 15:45:17 +0100 <dminuoso> Do you want to call from Haskell into C#?
2023-01-09 15:45:18 +0100 <merijn> eldritchcookie[4: So, the harsh reality is: almost no language bothers with complicated FFI mappings
2023-01-09 15:45:25 +0100 <dminuoso> That would require hosting the CLR.
2023-01-09 15:45:39 +0100 <merijn> eldritchcookie[4: What you simply do is use the C# FFI to export a "C" function and in Haskell you import a "C" function
2023-01-09 15:45:59 +0100 <dminuoso> merijn: to be fair, C# does! that's what .net is for.
2023-01-09 15:46:02 +0100 <dminuoso> :p
2023-01-09 15:46:15 +0100 <dminuoso> but I dont know of a library to host the C# CLR
2023-01-09 15:46:21 +0100 <dminuoso> so calling into C# will be hard
2023-01-09 15:46:31 +0100 <merijn> eldritchcookie[4: The advantage of every platform having a standard C ABI that everyone uses is that once you implement a C FFI, you can simply use other languages C FFI to call them without implementing a new FFI
2023-01-09 15:46:34 +0100 <dminuoso> *.NET CLR I meant
2023-01-09 15:46:53 +0100 <dminuoso> eldritchcookie[4: https://hackage.haskell.org/package/clr-host
2023-01-09 15:46:55 +0100 <dminuoso> Guess I was wrong.
2023-01-09 15:47:16 +0100 <dminuoso> But the package and related appear to have been abandoned
2023-01-09 15:47:37 +0100 <merijn> Like, if you wanna call Haskell from Python, you're not gonna implement a Haskell FFI for python. You use Haskell's C FFI to foreign export code as C functions, then use Python's C FFI to call those and move on with your life :p
2023-01-09 15:47:37 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28)
2023-01-09 15:49:33 +0100 <eldritchcookie[4> like rust has a c++ interoperation library
2023-01-09 15:51:00 +0100dka(~code-is-a@ns3059207.ip-193-70-33.eu) (Ping timeout: 260 seconds)
2023-01-09 15:52:54 +0100 <merijn> "C++" "interoperation"
2023-01-09 15:52:54 +0100 <eldritchcookie[4> and i prefer to write a massive amount of haskell code to writing a non trivial amount of c code
2023-01-09 15:53:25 +0100 <merijn> Anyone claiming C++ interoperation without *giant* footnote warnings is a liar :)
2023-01-09 15:57:56 +0100 <Franciman> lol
2023-01-09 15:58:12 +0100 <Franciman> what about the extern "C" { } construct?
2023-01-09 15:58:20 +0100 <merijn> Fucking C++ compilers aren't even interoperable
2023-01-09 15:58:26 +0100 <loonycyborg> That's C interoperation :P
2023-01-09 15:58:27 +0100 <merijn> Franciman: That's C++'s C FFI
2023-01-09 15:58:53 +0100 <merijn> So sure, you can interoperate with C++ through 'extern "C"' code, but only because that's just C interoperability :p
2023-01-09 15:59:06 +0100 <loonycyborg> Basically there is no language interoperation without using C as proxy. Still.
2023-01-09 15:59:13 +0100 <merijn> Arguably that's also the *only* way you can interoperate with C++ if you want to remain sane
2023-01-09 15:59:45 +0100 <merijn> loonycyborg: You're not really using C as proxy, though. Just using the platform C ABI as a "standard FFI ABI" which is what you really need
2023-01-09 16:01:08 +0100 <geekosaur> even C has interop problems. go look at how few languages can pass or return a struct directly instead of via a pointer
2023-01-09 16:01:22 +0100 <geekosaur> and what platform restrictions the ones that can have
2023-01-09 16:01:31 +0100 <loonycyborg> C is de factor standard FFI ABI. I'm not sure anything that isn't variant of C has a chance of taking off ever. Sadly.
2023-01-09 16:01:56 +0100 <merijn> geekosaur: Right, because structs aren't part of the ABI
2023-01-09 16:02:04 +0100 <merijn> at least not for function calls/returns
2023-01-09 16:02:31 +0100 <loonycyborg> Was there any work on interop with other languages done in GHC recently?
2023-01-09 16:03:13 +0100 <mauke> structs are part of the ABI, at least on x86-64
2023-01-09 16:04:13 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
2023-01-09 16:05:30 +0100cfricke(~cfricke@user/cfricke)
2023-01-09 16:08:26 +0100cfricke(~cfricke@user/cfricke) (Client Quit)
2023-01-09 16:08:34 +0100alfonsox(~quassel@103.87.57.65) (Ping timeout: 268 seconds)
2023-01-09 16:08:39 +0100 <eldritchcookie[4> i do not believe in this kind of defeatism going via c is a local maxima. where do i go to learn what i would need to do to create my own ABI supporting more things than C's?
2023-01-09 16:09:25 +0100Inst_(~Inst@2601:6c4:4081:54f0:497e:5356:95d7:76d0)
2023-01-09 16:10:50 +0100 <mauke> huh? you can use whatever calling convention you like. the trick is getting others to agree with you
2023-01-09 16:11:57 +0100 <eldritchcookie[4> yes to do that i would need to be better by atleast as much as the work to support a new calling convention is worth
2023-01-09 16:12:03 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-01-09 16:12:38 +0100 <mauke> you don't need to be better, you need to be more popular
2023-01-09 16:13:03 +0100 <mauke> the two aren't necessarily correlated
2023-01-09 16:13:10 +0100Inst(~Inst@2601:6c4:4081:54f0:d621:5cdd:9051:c240) (Ping timeout: 260 seconds)
2023-01-09 16:13:14 +0100 <eldritchcookie[4> unfortunately
2023-01-09 16:13:25 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-01-09 16:14:32 +0100 <eldritchcookie[4> but being better increases the odds, and i don't want to just replace c i want to replace it with something better.
2023-01-09 16:15:15 +0100 <merijn> mauke: Structs are, but *not* passing structs as function arguments/returning them
2023-01-09 16:15:32 +0100 <mauke> who is your target audience for this new ABI?
2023-01-09 16:15:43 +0100 <geekosaur> there is already at least one tool for low level API (not web api) generation, whose name I am forgetting at the moment, but it's not widely used because it's more work than just using the C API
2023-01-09 16:16:07 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2023-01-09 16:16:12 +0100 <geekosaur> and "more work than" means nobody will use an alternative
2023-01-09 16:16:19 +0100 <merijn> mauke: Well, the discussion started by the question "can I directly call C functions that take/return structs from Haskell's FFI"
2023-01-09 16:16:36 +0100boxscape_(~boxscape_@213.52.37.155)
2023-01-09 16:16:37 +0100underlap(~user@213.31.186.20)
2023-01-09 16:16:41 +0100 <mauke> merijn: https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/3434029393/artifacts/raw/x86-64-ABI/abi.pdf 3.2.3
2023-01-09 16:16:43 +0100 <merijn> To which the answer is "no, because that's not part of the calling convention of most (all?) C ABIs)
2023-01-09 16:16:44 +0100 <[exa]> eldritchcookie[4: you might like reading the AMD's amd64 architecture programming reference, they define a lot of stuff that directly shapes all the ABIs out there. (Same for other architectures but AMD's manuals are comparatively easy to find and read very well.)
2023-01-09 16:16:57 +0100 <mauke> it's all there, both passing and returning
2023-01-09 16:17:57 +0100 <boxscape_> for years I was thinking "How did Oleg write FP papers 20 years ago, he looks too young for that
2023-01-09 16:17:59 +0100 <boxscape_> I just now realized *it's two different Olegs*
2023-01-09 16:18:12 +0100 <boxscape_> really could have thought of that earlier
2023-01-09 16:18:31 +0100 <mauke> it's also a requirement for any system with a libc because there are standard functions that return structs
2023-01-09 16:19:37 +0100 <underlap> What's the simplest way of running HUnit tests? Issuing `runTestTT tests` inside an interpreter works, but I need to keep reloading the code as it changes.
2023-01-09 16:19:45 +0100 <merijn> mauke: Are gcc and clang actually following *that* ABI?
2023-01-09 16:20:21 +0100 <mauke> merijn: to my knowledge, yes
2023-01-09 16:20:27 +0100 <merijn> hmm, now I need to go dig up a bunch of stuff on when this changed >.<
2023-01-09 16:20:37 +0100 <mauke> (modulo bugs)
2023-01-09 16:22:06 +0100 <mauke> https://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions
2023-01-09 16:22:16 +0100 <eldritchcookie[4> don't gcc and clang follow the itanium abi?
2023-01-09 16:22:42 +0100 <merijn> eldritchcookie[4: Almost certainly not (except on Itanium :p)
2023-01-09 16:22:59 +0100 <merijn> Since Itanium was *wildly* different from AMD64 and x86_64
2023-01-09 16:23:34 +0100 <merijn> eldritchcookie[4: Note that compilers use the ABI of the platform, not a compiler specific ABI
2023-01-09 16:24:23 +0100 <eldritchcookie[4> https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html itanium abi for c++
2023-01-09 16:25:09 +0100 <mauke> yes, for C++
2023-01-09 16:25:40 +0100 <merijn> C++ and C are wildly different, though
2023-01-09 16:25:55 +0100 <dminuoso> eldritchcookie[4: Honestly, there's a reason why things like gRPC exist.
2023-01-09 16:26:07 +0100 <dminuoso> Or even simple JSON based APIs
2023-01-09 16:26:36 +0100 <mauke> "Although it was initially developed for the Itanium architecture, it is not platform-specific and can be layered portably on top of an arbitrary C ABI. Accordingly, it is used as the standard C++ ABI for many major operating systems on all major architectures, and is implemented in many major C++ compilers, including GCC and Clang."
2023-01-09 16:26:39 +0100 <dminuoso> If you want native calling, C is pretty much the only route, and its still a quite shitty route for so many reasons.
2023-01-09 16:26:54 +0100 <merijn> mauke: I still use your poly.poly to language lawyer people when they say C and C++ are the same sub-/supersets :p
2023-01-09 16:27:42 +0100 <mauke> heh, that claim can be disproved with just int new;
2023-01-09 16:28:09 +0100 <dminuoso> eldritchcookie[4: And regarding itanium abi, that's great if you only ever intend to target GCC and EDG. VC++ users exist too.
2023-01-09 16:31:02 +0100tremon(~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
2023-01-09 16:32:26 +0100 <eldritchcookie[4> suppose i care only about windows and linux how hard would it be to implement my own ABI and then code some languages to use it? assume that to implement my own ABI i would use the platform's abi's and just wrap it to support a richer interface could it be done in haskell?
2023-01-09 16:32:58 +0100 <merijn> eldritchcookie[4: I mean, if you only care about interfacing with yourself "pretty easy"
2023-01-09 16:33:20 +0100 <merijn> the hard part about ABIs is not inventing/implementing one
2023-01-09 16:33:23 +0100 <dminuoso> Honestly it depends. Implementing your own ABI amounts to modifying the compilers.
2023-01-09 16:33:27 +0100 <merijn> It's getting everyone to agree and use the same one :p
2023-01-09 16:33:29 +0100 <mauke> the "in haskell" part confuses me
2023-01-09 16:33:30 +0100 <dminuoso> So its not completely trivial.
2023-01-09 16:33:47 +0100 <dminuoso> It begins with something mundane as "what calling convention do you use for calling a native function in language XYZ"
2023-01-09 16:34:00 +0100 <mauke> the whole point of an ABI is the I
2023-01-09 16:34:21 +0100 <dminuoso> So you have to modify the compiler or if the ABI is replacable via plugin using that.
2023-01-09 16:34:35 +0100 <dminuoso> And that can, for the other side, introduce a lot of problems if they require linkage
2023-01-09 16:34:58 +0100 <dminuoso> Say if you modify the ABI of GCC for C++, and then attempt to link against the standard library, that will produce buggy code.
2023-01-09 16:35:38 +0100 <dminuoso> So yes, I think even the mere ABI modification itself is going to be a lot of work, since that possibly means you must propagate that ABI into anything that is transitively linked.
2023-01-09 16:35:51 +0100panovia(~user@user/siracusa) (Quit: Bye!)
2023-01-09 16:35:51 +0100 <dminuoso> And it may not be simple to do that in the compiler
2023-01-09 16:36:04 +0100 <dminuoso> It can also interfere and break debugging tools
2023-01-09 16:36:47 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 16:37:13 +0100 <dminuoso> merijn's point is only relevant if you want it to be public, if you dont want to share your artifacts it doesnt matter whether you find adoption.
2023-01-09 16:37:20 +0100 <dminuoso> (but it can impede collaboration with others)
2023-01-09 16:37:34 +0100 <eldritchcookie[4> ok so if i understand correctly worst case i need to write a new compiler for every language used?
2023-01-09 16:38:00 +0100 <dminuoso> not just that, possibly code too.
2023-01-09 16:38:10 +0100 <eldritchcookie[4> or at least modify existing compilers?
2023-01-09 16:38:37 +0100 <dminuoso> If you change abi, it can break code that makes assumptions about things like alignment, calling convention, etc..
2023-01-09 16:38:44 +0100califax(~califax@user/califx)
2023-01-09 16:39:58 +0100 <dminuoso> It can also have performance impacts, since libraries might be designed under the assumption of particular calling conventions (say because you know under a given convention in a situation all arguments are passed in a register, if you start spilling them all on the stack, that will have an effect)
2023-01-09 16:40:44 +0100 <VOID[m]> Speaking of C/C++, I want to call `opencv4` from Haskell, but opencv seems to be using stuff that would be way easier when wrapped (like returning class instance by value). I wanted to wrap it, so I get easier interfaces for stuff I want to use, but I am getting a lot of `header must be compiled as C++` now, and I am not sure how to deal with it (also stuff like `array: No such file or directory`). If anyone has any ideas how I might deal
2023-01-09 16:40:44 +0100 <VOID[m]> with that stuff, that'd be great
2023-01-09 16:40:44 +0100 <VOID[m]> I mostly want to know if I should fight with compilation options to make what I have now work, or if it'd be easier to change
2023-01-09 16:40:44 +0100 <VOID[m]> approach and there is an easier way, different from what I am trying to do
2023-01-09 16:40:45 +0100 <dminuoso> changing alignment can have drastic performance impacts on some architectures, down to crashing on others.
2023-01-09 16:41:24 +0100 <dminuoso> Lots of fun implications if you want to come up with your own ABI
2023-01-09 16:42:29 +0100 <merijn> VOID[m]: Returning class "by value" is a great way to turn your life into a nightmare when it comes to FFI ;)
2023-01-09 16:42:47 +0100 <merijn> VOID[m]: I'm pretty sure there are already opencv bindings for Haskell, though?
2023-01-09 16:42:58 +0100 <dminuoso> eldritchcookie[4: There's good reason why roundtripping through C is a *very* common thing.
2023-01-09 16:43:00 +0100 <merijn> ah, but those are 3.x
2023-01-09 16:43:03 +0100 <dminuoso> It greatly reduces the set of things you need to represent.
2023-01-09 16:43:16 +0100 <dminuoso> For example, in case of C++ you no longer need to worry about name namling
2023-01-09 16:43:19 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 16:43:33 +0100 <dminuoso> or representing any number of things that the language supports but C not.
2023-01-09 16:43:36 +0100 <merijn> VOID[m]: But looking at the 3.x Haskell bindings might help figure out how do opencv4 yourself
2023-01-09 16:44:12 +0100 <dminuoso> (i.e. whats the binary layout for a haskell ADT? if we roundtrip through a c struct, then we "only" need to talk about struct layout, alignment and sizses)
2023-01-09 16:44:25 +0100califax(~califax@user/califx)
2023-01-09 16:44:35 +0100barak(~barak@2a0d:6fc2:68c0:8900:d451:95c9:60da:f004)
2023-01-09 16:44:48 +0100 <merijn> VOID[m]: Oh, good news for you, the opencv package has the following github issue: "While OpenCV 4 is supported, the description indicates that this package has nothing to do with OpenCV 4. Also OpenCV 4 should be the default as it's the current major version of OpenCV."
2023-01-09 16:45:24 +0100 <dminuoso> But like it has been pointed out, even C by itself does not give rise to a stable ABI.
2023-01-09 16:45:51 +0100trev(~trev@user/trev) (Read error: Connection reset by peer)
2023-01-09 16:45:54 +0100 <underlap> I found one solution - runTestTTAndExit which I can run from main and then run the file with runghc. This is better. Any superior solutions gratefully accepted.
2023-01-09 16:46:03 +0100trev(~trev@user/trev)
2023-01-09 16:46:52 +0100 <dminuoso> To some degree, this is what Qt and .NET address to an extend, since they achieve interoperability on an internal protocol level, that is implemented for each language separately.
2023-01-09 16:47:05 +0100barak_(~barak@77.125.90.25)
2023-01-09 16:47:16 +0100 <dminuoso> (Or things like dbus, grpc, etc for remote RPCs)
2023-01-09 16:47:46 +0100 <dminuoso> Or why all the modern kids fling around JSON encoded stuff inside HTTP left and right
2023-01-09 16:47:47 +0100 <VOID[m]> merijn: I have trouble with opencv because of the 3.0 version, I think it might be caused because I have 4 and 3 installed?
2023-01-09 16:47:51 +0100 <VOID[m]> either way it doesn't compile
2023-01-09 16:49:07 +0100 <VOID[m]> Wanted to wrap stuff by myself, but with each version of OpenCV they remove C API and move towards newer C++ standards, both of which makes FFI harder ;_;
2023-01-09 16:49:53 +0100barak(~barak@2a0d:6fc2:68c0:8900:d451:95c9:60da:f004) (Ping timeout: 255 seconds)
2023-01-09 16:50:58 +0100mizlan(~mizlan@2607:f010:2a7:1005:21e8:5466:444e:7d28) (Ping timeout: 260 seconds)
2023-01-09 16:51:50 +0100VOID[m]sent a code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/747cf9113d2f2001c599ba981648757bed2c…
2023-01-09 16:52:37 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2023-01-09 16:55:18 +0100thongpv87(~thongpv87@2402:9d80:3c0:fde:78b9:edbd:78c2:6bcc)
2023-01-09 16:56:04 +0100AlexNoo(~AlexNoo@178.34.160.164)
2023-01-09 16:58:00 +0100thongpv(~thongpv87@2402:9d80:34a:6d5:cb81:2d47:bc6c:c725) (Ping timeout: 255 seconds)
2023-01-09 16:59:17 +0100 <dminuoso> I have decided. My favourite logging library is https://hackage.haskell.org/package/hsyslog
2023-01-09 16:59:42 +0100 <dminuoso> With every passing year, Im beginning to embrace more and more the old standards.
2023-01-09 16:59:53 +0100dsrt^(~dsrt@76.145.190.81) (Remote host closed the connection)
2023-01-09 17:01:53 +0100 <merijn> VOID[m]: I think you might have to fiddle with the opencv config to make it use opencv4
2023-01-09 17:02:40 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 17:03:28 +0100boxscape_(~boxscape_@213.52.37.155) (Quit: Ping timeout (120 seconds))
2023-01-09 17:03:51 +0100 <VOID[m]> I need to recognize text, I just wanted few functions from OpenCV to prepare the image, and then tesseract to recognize it, do you think reconfiguring opencv will be easier than wrapping those few functions myself?
2023-01-09 17:04:10 +0100califax(~califax@user/califx)
2023-01-09 17:05:12 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2023-01-09 17:06:29 +0100myyo(~myyo@71-211-142-215.hlrn.qwest.net)
2023-01-09 17:07:03 +0100myyo(~myyo@71-211-142-215.hlrn.qwest.net) (Client Quit)
2023-01-09 17:08:28 +0100 <merijn> VOID[m]: It might be easier to write some simple wrappers directly in C++ via extern "C" and then call those from Haskell if you only need a few functions, yeah
2023-01-09 17:09:57 +0100boxscape_(~boxscape_@213.52.37.155)
2023-01-09 17:11:27 +0100 <VOID[m]> merijn: I was trying to do that, and add them with `c-sources` etc, but then I have problems with including C++11 headers
2023-01-09 17:11:27 +0100 <VOID[m]> I'd have to configure C++ compilation inside `stack`, it is possible right? Do you have any suggestions where to look? `stack` docs? GHC docs?
2023-01-09 17:11:48 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 17:12:25 +0100 <merijn> VOID[m]: So, atm the support for calling C++ via GHC/from CABAL is kinda...scuffed
2023-01-09 17:12:54 +0100 <merijn> which is to say "you can't really make it work right, reliably"
2023-01-09 17:13:39 +0100califax(~califax@user/califx)
2023-01-09 17:13:48 +0100 <merijn> VOID[m]: What I would do is manually compile + link said extern "C" wrappers via Makefile/CMake/whatever, then just have GHC link the resulting library into your Haskell
2023-01-09 17:14:29 +0100 <VOID[m]> merijn: Ok, that works for me. Thank you very much, you probably saved me hours of frustration <3
2023-01-09 17:14:39 +0100 <merijn> there's some open issues on GHC to make C++ compilation a bit more sane, but I don't think there's anything truly polished yet
2023-01-09 17:15:08 +0100 <merijn> Whereas "just linking a dynamic (or static) library that already exists" is pretty straightforward
2023-01-09 17:15:22 +0100 <VOID[m]> I am not surprised C++ is not a priority
2023-01-09 17:15:22 +0100 <VOID[m]> FFI is supposed to be written in C, no?
2023-01-09 17:15:56 +0100 <merijn> VOID[m]: the problem is that someone added some support for C++ flags, but then no way to specify a compiler, so GHC tries to compile C++ code by calling whatever is configured as C compiler
2023-01-09 17:16:22 +0100 <merijn> Which of course leads to problems if: 1) your C compiler can't compile C++ or 2) your own C++ code is compiled with a different C++ compiler than GHC invokes
2023-01-09 17:16:46 +0100 <merijn> Because linking clang++ and g++ code together is a good recipe for cryptic segfaults
2023-01-09 17:17:40 +0100 <merijn> (in my case clang++ was using a different C++ stdlib than g++, and then suddenly everything using std::vector and what not crashes)
2023-01-09 17:18:06 +0100 <merijn> VOID[m]: So for sanity's sake it's easier to just build it yourself and hand GHC the binary
2023-01-09 17:19:02 +0100 <VOID[m]> There is something like cabal build --with-gcc=g++, but I wasn't able to do anything useful with it so far
2023-01-09 17:19:51 +0100 <[exa]> dminuoso: +1 for syslog
2023-01-09 17:23:40 +0100alfonsox(~quassel@103.87.57.76)
2023-01-09 17:31:06 +0100underlap(~user@213.31.186.20) (ERC 5.4 (IRC client for GNU Emacs 28.2))
2023-01-09 17:32:16 +0100cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2023-01-09 17:34:12 +0100cheater_(~Username@user/cheater)
2023-01-09 17:34:47 +0100nschoe(~q@141.101.51.197) (Quit: Switching off)
2023-01-09 17:38:18 +0100cheater_cheater
2023-01-09 17:41:37 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-01-09 17:42:55 +0100boxscape_(~boxscape_@213.52.37.155) (Ping timeout: 268 seconds)
2023-01-09 17:44:54 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 17:45:24 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-09 17:46:43 +0100Luj3(~Luj@2a01:e0a:5f9:9681:4a08:e5d4:539b:20f) (Quit: The Lounge - https://thelounge.chat)
2023-01-09 17:47:43 +0100Luj3(~Luj@2a01:e0a:5f9:9681:4a08:e5d4:539b:20f)
2023-01-09 17:48:13 +0100mbuf(~Shakthi@49.205.80.212) (Quit: Leaving)
2023-01-09 17:49:13 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2023-01-09 17:50:06 +0100troydm(~troydm@user/troydm)
2023-01-09 17:51:15 +0100Luj3(~Luj@2a01:e0a:5f9:9681:4a08:e5d4:539b:20f) (Client Quit)
2023-01-09 17:53:09 +0100johnw(~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
2023-01-09 17:56:41 +0100Luj3(~Luj@2a01:e0a:5f9:9681:6d0e:6ef6:7a2d:fd77)
2023-01-09 17:57:47 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f47a:1477:2a05:556f) (Ping timeout: 248 seconds)
2023-01-09 17:59:58 +0100razetime(~Thunderbi@49.207.222.244) (Remote host closed the connection)
2023-01-09 18:03:38 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-01-09 18:04:14 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-09 18:07:55 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-01-09 18:08:22 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2023-01-09 18:09:30 +0100teo(~teo@user/teo) (Ping timeout: 252 seconds)
2023-01-09 18:11:36 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de) (Quit: Leaving.)
2023-01-09 18:13:35 +0100Batzy(~quassel@user/batzy)
2023-01-09 18:15:30 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving)
2023-01-09 18:15:56 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 246 seconds)
2023-01-09 18:19:08 +0100alfonsox(~quassel@103.87.57.76) (Remote host closed the connection)
2023-01-09 18:21:06 +0100Dominik[m]12(~dschrempf@2001:470:69fc:105::2:bbb6)
2023-01-09 18:22:06 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
2023-01-09 18:23:44 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2023-01-09 18:25:42 +0100nut(~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2023-01-09 18:27:17 +0100Luj3(~Luj@2a01:e0a:5f9:9681:6d0e:6ef6:7a2d:fd77) (Quit: The Lounge - https://thelounge.chat)
2023-01-09 18:28:00 +0100 <monochrom> A decade ago the Windows bindist of GHC came with a C++ compiler. When it was unincluded, someone was actually unhappy. https://mail.haskell.org/pipermail/glasgow-haskell-users/2007-April/012409.html
2023-01-09 18:28:02 +0100underlap(~user@213.31.186.20)
2023-01-09 18:29:06 +0100 <monochrom> But I think the C++ compiler was included just because GHC came with mingw and they didn't bother to minimize it until later or switching to msys.
2023-01-09 18:29:35 +0100 <monochrom> One of those times when a side effect became a standard feature.
2023-01-09 18:29:51 +0100 <dolio> That's 50% more than a decade at this point. :þ
2023-01-09 18:30:02 +0100 <monochrom> OK 1.5 decades ago heh
2023-01-09 18:30:11 +0100 <monochrom> "dacade-ish"
2023-01-09 18:30:33 +0100freeside_(~mengwong@103.252.202.159)
2023-01-09 18:31:43 +0100Luj3(~Luj@2a01:e0a:5f9:9681:7266:6c28:8ab:f9df)
2023-01-09 18:32:22 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-09 18:34:43 +0100 <dolio> Oh, it was Bulat.
2023-01-09 18:34:55 +0100 <monochrom> hee hee
2023-01-09 18:36:02 +0100kurbus(~kurbus@user/kurbus)
2023-01-09 18:36:35 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-09 18:37:52 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2023-01-09 18:39:58 +0100slack1256(~slack1256@186.11.41.156)
2023-01-09 18:54:23 +0100trev(~trev@user/trev) (Remote host closed the connection)
2023-01-09 18:56:14 +0100thongpv(~thongpv87@2402:9d80:300:8c21:d979:8534:70e1:1f79)
2023-01-09 18:58:15 +0100thongpv87(~thongpv87@2402:9d80:3c0:fde:78b9:edbd:78c2:6bcc) (Ping timeout: 260 seconds)
2023-01-09 18:58:31 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 19:06:45 +0100h2017(~h2017@D171-N108.gen.queensu.ca)
2023-01-09 19:06:47 +0100 <h2017> hi
2023-01-09 19:07:37 +0100 <h2017> what's the essential difference between Control.Monad.Except and Control.MonadTrans.Except ? When do I use one vs the other?
2023-01-09 19:09:45 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-09 19:13:38 +0100 <geekosaur> the latter is from the `transformers` package; it's the low level implementation, that is intended to be wrapped in a higher level API (`mtl` or `mtl-tf` `Control.Monad.Except`, or various effects packages' versions)
2023-01-09 19:14:14 +0100 <h2017> Thanks!
2023-01-09 19:15:15 +0100h2017(~h2017@D171-N108.gen.queensu.ca) (Quit: Leaving)
2023-01-09 19:20:44 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-01-09 19:23:35 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2023-01-09 19:25:19 +0100 <eldritchcookie[4> assuming scope similar to raylib how long would it take to make a pure haskell cross platform GUI library?
2023-01-09 19:27:13 +0100cheater_(~Username@user/cheater)
2023-01-09 19:30:21 +0100cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2023-01-09 19:30:29 +0100cheater_cheater
2023-01-09 19:31:10 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 19:32:00 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-01-09 19:33:29 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-01-09 19:35:26 +0100califax(~califax@user/califx)
2023-01-09 19:36:16 +0100shapr(~user@68.54.166.125) (Ping timeout: 252 seconds)
2023-01-09 19:39:52 +0100Speedbird(~Speedbird@94.230.79.152)
2023-01-09 19:41:51 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-01-09 19:47:57 +0100 <sm> define "finished" ? :)
2023-01-09 19:48:11 +0100barak_(~barak@77.125.90.25) (Ping timeout: 248 seconds)
2023-01-09 19:48:46 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 19:49:20 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 19:49:55 +0100smreads up on raylib
2023-01-09 19:50:02 +0100freeside_(~mengwong@103.252.202.159) (Ping timeout: 246 seconds)
2023-01-09 19:51:12 +0100 <dminuoso> And how cross-platform should it be?
2023-01-09 19:51:45 +0100 <eldritchcookie[4> at least windows and linux i don't care about mac
2023-01-09 19:51:46 +0100 <geekosaur> also, how completely "pure haskell"? assuming you don't include the display server implementation, there are already low level generated bindings for both X11 (xhb) and OpenGL (gl)
2023-01-09 19:51:52 +0100 <darkling> BeOS, RiscOS, OS/2 3.0 :)
2023-01-09 19:51:54 +0100 <sm> raylib seems to be supported on a ton of platforms, I'll assume installation is relatively smooth on all of them, and that installing games built with it is also. That all takes a very long time
2023-01-09 19:52:24 +0100 <geekosaur> but as soon as you add Windows to the mix, you make it very complicated
2023-01-09 19:52:26 +0100 <dminuoso> "raylib does not provide the typical API documentation [...]. The library [is] learned just from a cheatsheet"
2023-01-09 19:52:30 +0100 <dminuoso> Jeez..
2023-01-09 19:53:00 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 19:53:32 +0100 <sm> sounds like a nice project though
2023-01-09 19:53:36 +0100 <dminuoso> How people put up with that I dont know. But I suspect the brevity of average messages and videos in social media has drastically reduced attention span of the average developer to the point they cannot focus for a minute to either a) document his or her public API function, or b) consult an existing API functions documentation.
2023-01-09 19:54:37 +0100 <sm> devs are burned out on over featureful, long-winded frameworks, especially game devs wanting to build small things fast. I can understand it
2023-01-09 19:55:05 +0100glguy(~glguy@libera/staff-emeritus/glguy) (Quit: Quit)
2023-01-09 19:55:22 +0100califax(~califax@user/califx)
2023-01-09 19:55:45 +0100 <eldritchcookie[4> who needs documentation ? like can't you just maintain in your head all signatures and uses of every function and its post and pre conditions for 10000 different functions /s
2023-01-09 19:56:05 +0100smwould ask #haskell-game too
2023-01-09 19:56:09 +0100 <dminuoso> eldritchcookie[4: That's the thing. What are the post and pre conditions for any of those functions?
2023-01-09 19:56:11 +0100 <dminuoso> I dont know.
2023-01-09 19:56:24 +0100glguy(~glguy@libera/staff-emeritus/glguy)
2023-01-09 19:56:47 +0100 <dminuoso> Its all part of the "90% correct software gives us a MVP, bug fixing has less priority than pushing new 90% complete features afterwards"
2023-01-09 19:56:48 +0100 <dminuoso> Mentality.
2023-01-09 19:57:19 +0100 <dminuoso> Who cares how to use it correctly, as long as on average you appear to be using it right and appear to be producing the right answer. In some way it is a legit way to write software
2023-01-09 19:57:49 +0100 <geekosaur> just imagine chatgpt learning that
2023-01-09 19:58:25 +0100 <dminuoso> sm: another thing is, I dont buy that argument for one simple reason: If some dont care for documentation and just want a cheatsheet, why not provide both?
2023-01-09 19:58:32 +0100 <eldritchcookie[4> well don't worry i won't make something with no documentation or tests i just mentioned the project because it seems to work with relatively few code lines <100.000
2023-01-09 19:58:39 +0100 <dminuoso> Intentionally not supplying thorough documentation is just indicative of intentionally shipping a shitty product.
2023-01-09 19:59:25 +0100 <dminuoso> It's not like the developer that insists on just using a cheatsheet will be turned away because the software has quality documentation.
2023-01-09 19:59:27 +0100 <darkling> While we're beating on documentation, function-by-function API docs are not sufficient. You also need a high-level view of the workflow involved.
2023-01-09 19:59:34 +0100 <dminuoso> Or maybe they do and want to use apparently hastily written software?
2023-01-09 19:59:34 +0100 <sm> dminuoso: you can say so, but apparently a lot of people like this lib and have given it awards
2023-01-09 20:00:00 +0100 <sm> moving on..
2023-01-09 20:00:35 +0100 <dminuoso> A lot of people appear to like npmjs.com/package/left-pad too. :>
2023-01-09 20:01:22 +0100 <sm> using inadvertently and liking/awarding are different :)
2023-01-09 20:02:18 +0100 <eldritchcookie[4> as previously said popularity isn't necessarily correlated with quality
2023-01-09 20:02:30 +0100 <dminuoso> Well I am sure it is a quality library for one reason or another.
2023-01-09 20:02:34 +0100 <eldritchcookie[4> ok assuming windows and linux at least
2023-01-09 20:02:50 +0100 <eldritchcookie[4> how to make a library to ddraw stuff on screen and respond to input
2023-01-09 20:02:53 +0100 <dminuoso> That is, its probably robust internally and easy to use - which would explain why Epic Games helps support its development.
2023-01-09 20:03:54 +0100 <sm> eldritch cookie: is this a new scope ? a few minutes, install gloss
2023-01-09 20:04:10 +0100kurbus(~kurbus@user/kurbus)
2023-01-09 20:05:29 +0100 <dminuoso> Perhaps wxcore is still usable as well?
2023-01-09 20:06:07 +0100 <dminuoso> (or wx in general)
2023-01-09 20:06:35 +0100 <sm> I would be money it's not
2023-01-09 20:06:43 +0100 <sm> s/be/bet/
2023-01-09 20:08:57 +0100 <geekosaur> someone triied it a couple months ago and it was bitrotted
2023-01-09 20:09:27 +0100 <sm> eldritch cookie: I think that would be quite interesting to have for haskell, but do check in #haskell-game too - there are a lot of graphics/game libs and quite possibly someone is already working on it quietly
2023-01-09 20:10:02 +0100mizlan(~mizlan@89.46.114.168)
2023-01-09 20:12:02 +0100mc47(~mc47@xmonad/TheMC47)
2023-01-09 20:13:38 +0100 <sm> and to answer your original q, here's my wild guess making a bunch of assumptions: 1-2 years for linux & windows, 5 years for the rest
2023-01-09 20:20:29 +0100underlap(~user@213.31.186.20) (Ping timeout: 255 seconds)
2023-01-09 20:20:49 +0100mizlan(~mizlan@89.46.114.168) (Ping timeout: 252 seconds)
2023-01-09 20:21:34 +0100wafflepirateyandere
2023-01-09 20:23:58 +0100trev(~trev@user/trev)
2023-01-09 20:24:20 +0100 <eldritchcookie[4> does anyone know how to use the parametric continuation monad to invert control for when there are more than one callback?
2023-01-09 20:24:47 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 20:25:39 +0100 <eldritchcookie[4> like i made template haskell to generate for one callback and many possible arguments but i really i am not able to invert control when there are 2 or more callbacks
2023-01-09 20:25:50 +0100slack1256(~slack1256@186.11.41.156) (Remote host closed the connection)
2023-01-09 20:27:46 +0100califax(~califax@user/califx)
2023-01-09 20:29:41 +0100mizlan(~mizlan@169.150.203.43)
2023-01-09 20:30:46 +0100mei(~mei@user/mei) (Remote host closed the connection)
2023-01-09 20:31:12 +0100mei(~mei@user/mei)
2023-01-09 20:31:24 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 252 seconds)
2023-01-09 20:31:40 +0100 <VOID[m]> Does anyone know about a tutorial for linking my own C++ code (that I compiled by myself with CMake) in a haskell project managed with stack? All tutorials I found describe ghc options, which I am not sure how to nicely translate to stack (considering I am pretty sure I am supposed to use smth like extra-lib-dirs?) or do not mention anything but just how to write haskell referencing foreign C
2023-01-09 20:32:13 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-01-09 20:32:23 +0100 <VOID[m]> I just want to avoid learning everything about all the compilers, I want to wrap some stuff in C++, compile it with a nice CMake and call it from haskell ;_;
2023-01-09 20:33:15 +0100 <tomsmeding> VOID[m]: have you put the C++ functions you want to use from Haskell in an 'extern "C" {}' block?
2023-01-09 20:34:05 +0100 <VOID[m]> In header I have `extern "C" {}`, then I have implementation without `extern "C"`
2023-01-09 20:35:28 +0100 <tomsmeding> if you've done so, I think putting 'extra-lib-dirs: directory/of/.so' and 'extra-libraries: foo' in your .cabal should be sufficient
2023-01-09 20:35:35 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
2023-01-09 20:35:41 +0100 <tomsmeding> or the equivalent for hpack if you have a package.yaml
2023-01-09 20:35:44 +0100 <VOID[m]> I can have the .so file, but how do I give .so to stack, and do I need the header? If yes, where do I give it too?
2023-01-09 20:36:04 +0100 <VOID[m]> `extra-include-dirs` -> dir with header, `extra-lib-dirs` -> dir with `.so`?
2023-01-09 20:36:42 +0100 <tomsmeding> correct
2023-01-09 20:36:54 +0100 <tomsmeding> and then use this to get the functions in haskell https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/ffi.html#the-capi-calling-convention
2023-01-09 20:37:32 +0100 <tomsmeding> you can also use the ccall thing described higher up that page if you want, but there's little reason not to use capi
2023-01-09 20:37:49 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 20:39:10 +0100 <VOID[m]> yeee, so that didn't work for me
2023-01-09 20:39:10 +0100 <VOID[m]> I have `int inc(int x);` in my header, inside `extern "C"`
2023-01-09 20:39:10 +0100 <VOID[m]> I have `foreign import capi "wrapper.h inc" c_inc :: Int -> Int`
2023-01-09 20:39:10 +0100 <VOID[m]> When I try to build, I get `error: undefined reference to 'inc'`
2023-01-09 20:39:33 +0100 <tomsmeding> is that all the output?
2023-01-09 20:40:01 +0100 <monochrom> "undefined reference" is a link-time error. So the *.so is somehow not included.
2023-01-09 20:40:35 +0100 <VOID[m]> Whole output:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/dd132dea297eb25413e441dcbf7a7e03cf4d…>)
2023-01-09 20:40:52 +0100 <monochrom> On the flip side, it also means that all the *.h files and the capi thing were compiled fine.
2023-01-09 20:41:31 +0100 <VOID[m]> I thought `.so` will be added by putting these inside my `stack.yaml`:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/7e0a8477b889b3aee79261affb466c0d8a6e…>)
2023-01-09 20:42:02 +0100Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-09 20:42:14 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 246 seconds)
2023-01-09 20:42:19 +0100 <tomsmeding> VOID[m]: 99% sure those need to go in the .cabal or the package.yaml, not the stack.yaml
2023-01-09 20:42:38 +0100econo(uid147250@user/econo)
2023-01-09 20:42:39 +0100 <tomsmeding> stack.yaml is for describing where to get haskell stuff from, .cabal is for compile config
2023-01-09 20:42:39 +0100 <monochrom> Actually, I need to weaken my claim to: the *.so or the *.o, I don't know which, was somehow not included.
2023-01-09 20:42:58 +0100 <tomsmeding> monochrom: I would be surprised if ghc is looking for an .o
2023-01-09 20:43:08 +0100 <VOID[m]> tomsmeding: IIRC when I put `extra-lib-dirs` in `package.yaml` it said unrecognized key, but I can check
2023-01-09 20:43:13 +0100 <tomsmeding> VOID[m]: what do you get if you 'stack build -v'
2023-01-09 20:43:25 +0100 <monochrom> Oh just playing safe, I don't understand stack, it works in mysterious ways. :)
2023-01-09 20:44:17 +0100 <tomsmeding> VOID[m]: extra-lib-dirs seem to be a thing in package.yaml? https://github.com/sol/hpack#common-fields
2023-01-09 20:44:46 +0100 <VOID[m]> tomsmeding: Do you want me to send you whole output? I don't see anything helpful, but I might just be missing something...
2023-01-09 20:44:53 +0100 <tomsmeding> please do
2023-01-09 20:44:59 +0100 <tomsmeding> @where paste
2023-01-09 20:44:59 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2023-01-09 20:45:44 +0100 <VOID[m]> https://paste.tomsmeding.com/D5K5SdxY
2023-01-09 20:46:25 +0100 <tomsmeding> why does it not display the one thing that a user is interested in: the arguments to invoked commands
2023-01-09 20:46:32 +0100 <VOID[m]> tomsmeding: oh, there is `include-dirs` and `extra-include-dirs` 🤔
2023-01-09 20:46:44 +0100 <tomsmeding> "Linking" yeah I figured, HOW :p
2023-01-09 20:47:20 +0100 <VOID[m]> XD
2023-01-09 20:47:26 +0100 <VOID[m]> Yeee
2023-01-09 20:47:32 +0100 <tomsmeding> does it accept -vvv
2023-01-09 20:47:55 +0100 <VOID[m]> I mean, we already are getting [debug], so I'd be surprised, but I'll try
2023-01-09 20:48:01 +0100 <tomsmeding> true
2023-01-09 20:48:03 +0100 <VOID[m]> nope
2023-01-09 20:49:19 +0100mechap(~mechap@user/mechap) (Ping timeout: 256 seconds)
2023-01-09 20:49:42 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de)
2023-01-09 20:50:40 +0100 <tomsmeding> it does seem extra-lib-dirs is the correct key
2023-01-09 20:50:57 +0100 <tomsmeding> where are you putting it in package.yaml, and can you post the generated sudoku.cabal?
2023-01-09 20:51:00 +0100mizlan(~mizlan@169.150.203.43) (Ping timeout: 268 seconds)
2023-01-09 20:51:24 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-01-09 20:51:28 +0100mechap(~mechap@user/mechap)
2023-01-09 20:51:45 +0100shapr(~user@68.54.166.125)
2023-01-09 20:52:35 +0100 <VOID[m]> Maybe related? https://github.com/commercialhaskell/stack/issues/1151
2023-01-09 20:52:44 +0100 <VOID[m]> I can post those, give me a second
2023-01-09 20:54:33 +0100codaraxis(~codaraxis@user/codaraxis)
2023-01-09 20:54:52 +0100 <VOID[m]> https://paste.tomsmeding.com/CcLEN3NZ
2023-01-09 20:55:05 +0100 <VOID[m]> Inside package.yaml I tried toplevel and I tried inside library:
2023-01-09 20:55:39 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 20:55:56 +0100 <tomsmeding> VOID[m]: uh, are you sure you regenerated the .cabal file by doing stack build or similar?
2023-01-09 20:56:21 +0100 <tomsmeding> I see neither the include dir nor the lib dir in the .cabal file :p
2023-01-09 20:57:00 +0100 <tomsmeding> VOID[m]: you posted stack.yaml
2023-01-09 20:57:00 +0100 <VOID[m]> I did stack build, I am getting undefined reference to 'inc'
2023-01-09 20:57:05 +0100 <tomsmeding> not package.yaml
2023-01-09 20:58:03 +0100 <VOID[m]> oops, you're right, here you go https://paste.tomsmeding.com/EH0glwdX
2023-01-09 20:58:37 +0100 <tomsmeding> VOID[m]: and in your package.yaml I don't see the extra-lib-dirs key :p
2023-01-09 20:58:38 +0100 <VOID[m]> I added CMakeLists, if you want to check it out too...
2023-01-09 20:58:39 +0100 <VOID[m]> Am building shared library, idk if that's a good choice either
2023-01-09 20:59:05 +0100 <tomsmeding> put thoes two keys in package.yaml, not stack.yaml
2023-01-09 20:59:10 +0100 <tomsmeding> those are _different_ files with different content
2023-01-09 20:59:18 +0100 <VOID[m]> right now I have those only in stack.yaml, I tried with them inside library: and at toplevel
2023-01-09 20:59:28 +0100 <tomsmeding> PUT THEM IN PACKAGE.YAML INSTEAD
2023-01-09 20:59:41 +0100 <tomsmeding> ._.
2023-01-09 20:59:47 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-01-09 21:00:43 +0100 <VOID[m]> ok, sure, no need to scream :c , I'll try those again and can send you all those files again
2023-01-09 21:00:50 +0100 <tomsmeding> stack.yaml doesn't even have a concept of 'library:', I'm surprised it didn't complain
2023-01-09 21:00:54 +0100 <tomsmeding> sorry :p
2023-01-09 21:01:22 +0100 <VOID[m]> wait a second
2023-01-09 21:01:22 +0100 <VOID[m]> In stack I put it in toplevel
2023-01-09 21:01:25 +0100 <VOID[m]> as per documentation...
2023-01-09 21:01:30 +0100 <tomsmeding> which documentation?
2023-01-09 21:01:34 +0100 <VOID[m]> https://docs.haskellstack.org/en/stable/yaml_configuration/#extra-lib-dirs
2023-01-09 21:01:42 +0100 <VOID[m]> stack stable documentation
2023-01-09 21:01:47 +0100 <tomsmeding> wait wat
2023-01-09 21:01:58 +0100 <tomsmeding> oh
2023-01-09 21:02:03 +0100 <tomsmeding> interesting
2023-01-09 21:02:17 +0100 <VOID[m]> it says stack.yaml
2023-01-09 21:02:20 +0100 <tomsmeding> it does
2023-01-09 21:02:24 +0100 <VOID[m]> so that's where I put those
2023-01-09 21:03:07 +0100 <tomsmeding> sorry I hadn't looked closely enough at that page
2023-01-09 21:03:31 +0100 <tomsmeding> feels nonsensical to me to put that in stack.yaml, but anyway
2023-01-09 21:04:03 +0100 <tomsmeding> any luck with extra-lib-dirs and extra-libraries and extra-include-dirs in package.yaml?
2023-01-09 21:04:05 +0100 <tomsmeding> all three
2023-01-09 21:04:40 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 21:04:47 +0100 <VOID[m]> https://github.com/ethereon/Zef <- here someone puts them inside library, but it's in cabal directly
2023-01-09 21:05:01 +0100 <tomsmeding> right, and the cabal file gets generated from package.yaml without looking at stack.yaml
2023-01-09 21:05:16 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2023-01-09 21:05:25 +0100 <tomsmeding> hence my surprise at seeing that key in the stack.yaml documentation
2023-01-09 21:05:55 +0100 <tomsmeding> oh, maybe the stack.yaml keys are not for your project but for dependencies?
2023-01-09 21:06:03 +0100 <VOID[m]> If I put it in package.yaml inside library: it appears similar to the Zef sample
2023-01-09 21:06:07 +0100 <tomsmeding> hence the presence of extra-lib-dirs but the absence of extra-libraries
2023-01-09 21:06:09 +0100 <glguy> extra-lib-dirs is something specific to a particular build environment
2023-01-09 21:06:11 +0100 <tomsmeding> VOID[m]: good
2023-01-09 21:06:24 +0100 <VOID[m]> But it still doesn't compile with the same error...
2023-01-09 21:06:28 +0100 <tomsmeding> hm
2023-01-09 21:06:35 +0100 <tomsmeding> did you put extra-libraries as well?
2023-01-09 21:06:41 +0100 <VOID[m]> it feels like extra-libraries might be missing
2023-01-09 21:06:47 +0100 <tomsmeding> yeah you need that one too
2023-01-09 21:06:47 +0100califax(~califax@user/califx)
2023-01-09 21:06:51 +0100 <VOID[m]> no?
2023-01-09 21:06:57 +0100 <VOID[m]> what do I put there ;_;
2023-01-09 21:07:02 +0100 <VOID[m]> wrapper?
2023-01-09 21:07:10 +0100 <tomsmeding> if you library is libfoo.so, put foo there
2023-01-09 21:07:24 +0100 <tomsmeding> you _may_ have luck putting libfoo.so there, but not sure if that will work
2023-01-09 21:07:42 +0100 <tomsmeding> typically if you write X then it will look for libX.so
2023-01-09 21:08:34 +0100 <VOID[m]> that worked
2023-01-09 21:08:39 +0100 <VOID[m]> That was the missing piece
2023-01-09 21:08:41 +0100 <tomsmeding> yay!
2023-01-09 21:08:43 +0100 <VOID[m]> Thank you very much <3
2023-01-09 21:09:11 +0100 <VOID[m]> I've been fighting with C++ for hours now... How is that language still used everywhere ;_;
2023-01-09 21:09:15 +0100 <tomsmeding> happy haskelling
2023-01-09 21:09:27 +0100 <VOID[m]> thx <3
2023-01-09 21:09:30 +0100 <tomsmeding> eh
2023-01-09 21:09:36 +0100 <tomsmeding> it has good things to go for it too
2023-01-09 21:09:55 +0100 <tomsmeding> they exist, even if they're hard to see
2023-01-09 21:10:13 +0100 <tomsmeding> or drowned out by the disadvantages
2023-01-09 21:10:19 +0100 <tomsmeding> ;)
2023-01-09 21:11:16 +0100 <VOID[m]> I'd respond, but I don't want to offtopic here :P
2023-01-09 21:11:17 +0100 <VOID[m]> anyway, thanks again for helping with that, I am so happy it finally compiled
2023-01-09 21:11:50 +0100 <tomsmeding> cheers!
2023-01-09 21:15:23 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:e3f:2ae2:2cb2:8786)
2023-01-09 21:15:27 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:e3f:2ae2:2cb2:8786) (Client Quit)
2023-01-09 21:17:22 +0100oldfashionedcow(~oldfashio@2.120.174.52)
2023-01-09 21:23:56 +0100 <oldfashionedcow> Hi folks! I am going to be honest - I am a new python programmer of ~6 months (my latest project has been an irc bot). I always thought haskell was a dead language of the past, but I have heard it time and time again recently. So I just wanted to ask the people who use it - a) is it a 'useful' lanuage these days still? b) What are examples of
2023-01-09 21:23:57 +0100 <oldfashionedcow> applications for it?
2023-01-09 21:24:41 +0100 <sm> welcome oldfashionedcow ... nope still not dead, and increasingly useful :)
2023-01-09 21:24:49 +0100kurbus(~kurbus@user/kurbus)
2023-01-09 21:25:07 +0100 <oldfashionedcow> sm thank you :) I came across it in xmonad and idk why I just decided I wanted to learn it
2023-01-09 21:25:39 +0100 <sm> what sort of applications are you thinking.. things you'd use on your computer ? industrial apps ?
2023-01-09 21:25:59 +0100 <geekosaur> there are more popular projects that use it, too: hledger and especially pandoc
2023-01-09 21:28:15 +0100 <hololeap> oldfashionedcow: do you want to see my solution for the "diamond problem" I wrote in haskell yesterday?
2023-01-09 21:28:53 +0100 <sm> a few more of those: shellcheck, git-annex, aura package manager
2023-01-09 21:29:17 +0100gmg(~user@user/gehmehgeh)
2023-01-09 21:29:33 +0100 <monochrom> I keep forgetting pandoc. Ironically I actually use it. As opposed to say xmonad...
2023-01-09 21:30:09 +0100 <[exa]> pandoc is pretty omnipresent now, true
2023-01-09 21:30:11 +0100 <Clint> xmonad's the reason i'm still not using wayland
2023-01-09 21:30:22 +0100 <hololeap> a lot of times when I mention haskell, people think I'm talking about PASCAL
2023-01-09 21:30:54 +0100 <oldfashionedcow> hololeap I gotta solve it first myself :D
2023-01-09 21:30:56 +0100 <monochrom> "foreign import pascall" is a great pun I thought up. :)
2023-01-09 21:31:16 +0100 <oldfashionedcow> sm Computer apps mostly
2023-01-09 21:31:31 +0100 <oldfashionedcow> sm Maybe an irc bot too - I am having a lot of fun with my python one
2023-01-09 21:31:44 +0100 <oldfashionedcow> sm (I run gentoo, and prefer gtk personally)
2023-01-09 21:32:07 +0100 <sm> there some irc bots on hackage/github
2023-01-09 21:32:23 +0100 <sm> lambdabot is the best known
2023-01-09 21:32:36 +0100 <monochrom> lambdabot right here is an IRC bot written in Haskell. Other people have written personal IRC bots.
2023-01-09 21:32:42 +0100 <[exa]> oldfashionedcow: AFAIK a decent part of the bitcoin ecosystem runs on haskell
2023-01-09 21:32:47 +0100 <oldfashionedcow> Hmm nice - I'll check it out
2023-01-09 21:32:56 +0100 <oldfashionedcow> [exa] Wow it really is everywhere :)
2023-01-09 21:33:01 +0100 <sm> [exa]: uh.. are you thinking of the cardano blockchain ?
2023-01-09 21:33:20 +0100 <monochrom> or perhaps s/bitcoin/blockchain/ more generally, I don't think they limit themselves to bitcoin.
2023-01-09 21:33:26 +0100 <oldfashionedcow> Clint I use sway personally but there is a fork of trying to make a xmonad like wayland wm in progress
2023-01-09 21:33:30 +0100 <oldfashionedcow> excited about that one
2023-01-09 21:33:35 +0100 <[exa]> not sure, I just permanently saw cryptocurrency+haskell stuff on twitter before I shut the account down there
2023-01-09 21:33:43 +0100 <monochrom> haha
2023-01-09 21:33:58 +0100 <[exa]> yes, blockchain in general more than bitcoin. :D
2023-01-09 21:34:02 +0100 <sm> it's cardano. That's an extremely successful large-scale haskell project
2023-01-09 21:35:12 +0100 <[exa]> oh wait, purescript is in haskell right?
2023-01-09 21:35:46 +0100 <sm> yup
2023-01-09 21:36:06 +0100 <monochrom> That is somehow very meta.
2023-01-09 21:37:54 +0100wrengr(~wrengr@201.59.83.34.bc.googleusercontent.com)
2023-01-09 21:38:41 +0100 <[exa]> well, given the amount of people who use purescript I guess it counts
2023-01-09 21:38:41 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-01-09 21:39:33 +0100 <[exa]> (also Elm)
2023-01-09 21:40:59 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-09 21:43:52 +0100kurbus(~kurbus@user/kurbus)
2023-01-09 21:46:50 +0100acidjnk_newacidjnk
2023-01-09 21:47:18 +0100Speedbird(~Speedbird@94.230.79.152) (Ping timeout: 260 seconds)
2023-01-09 21:47:34 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 21:47:56 +0100mizlan(~mizlan@169.150.203.46)
2023-01-09 21:50:41 +0100califax(~califax@user/califx)
2023-01-09 21:52:04 +0100mizlan(~mizlan@169.150.203.46) (Ping timeout: 252 seconds)
2023-01-09 21:54:11 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2023-01-09 21:54:11 +0100ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2023-01-09 21:54:34 +0100kurbus(~kurbus@user/kurbus) (Quit: Client closed)
2023-01-09 21:55:57 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2023-01-09 21:56:19 +0100avicenzi(~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 265 seconds)
2023-01-09 21:56:22 +0100ec_(~ec@gateway/tor-sasl/ec)
2023-01-09 21:58:30 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-09 21:59:30 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 22:01:07 +0100califax(~califax@user/califx)
2023-01-09 22:06:01 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 22:06:20 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de) (Remote host closed the connection)
2023-01-09 22:07:36 +0100califax(~califax@user/califx)
2023-01-09 22:12:21 +0100 <Clint> oldfashionedcow: which one is that?
2023-01-09 22:12:59 +0100 <oldfashionedcow> Clint https://github.com/waymonad/waymonad - its a wip
2023-01-09 22:13:03 +0100 <Clint> thanks
2023-01-09 22:13:18 +0100ikervagyok[m](~ikervagyo@2001:470:69fc:105::2:f119)
2023-01-09 22:13:59 +0100 <oldfashionedcow> Clint np :)
2023-01-09 22:17:59 +0100oldfashionedcow(~oldfashio@2.120.174.52) (Changing host)
2023-01-09 22:17:59 +0100oldfashionedcow(~oldfashio@user/oldfashionedcow)
2023-01-09 22:18:23 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 22:21:31 +0100 <geekosaur> that fork is pretty much dead, https://github.com/L-as/waymonad has a slightly more up to date version
2023-01-09 22:21:58 +0100 <geekosaur> but there have been a number of improvements to wlroots that neither takes into account as yet
2023-01-09 22:29:16 +0100 <dminuoso> oldfashionedcow: Facebook's central spamfighting system Sigma classifies user interactions at a rate of several million requests per second, written in Haskell. https://engineering.fb.com/2015/06/26/security/fighting-spam-with-haskell/
2023-01-09 22:29:22 +0100larrythecow(~Rahul_San@user/oldfashionedcow)
2023-01-09 22:29:32 +0100 <oldfashionedcow> dminuoso I love all these uses for it
2023-01-09 22:29:40 +0100oldfashionedcow(~oldfashio@user/oldfashionedcow) (Quit: Client closed)
2023-01-09 22:30:14 +0100larrythecowoldfashionedcow
2023-01-09 22:30:52 +0100 <shapr> I keep meaning to write a blog post about the amount of property based testing in popular Haskell applications
2023-01-09 22:30:56 +0100 <shapr> result: not much at all
2023-01-09 22:32:31 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-01-09 22:32:46 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
2023-01-09 22:33:39 +0100mizlan(~mizlan@169.150.203.59)
2023-01-09 22:33:49 +0100Lord_of_Life_Lord_of_Life
2023-01-09 22:38:42 +0100Inst_Inst
2023-01-09 22:39:22 +0100mizlan_(~mizlan@169.150.203.66)
2023-01-09 22:40:46 +0100mizlan(~mizlan@169.150.203.59) (Ping timeout: 268 seconds)
2023-01-09 22:41:30 +0100mei(~mei@user/mei) (Quit: mei)
2023-01-09 22:41:30 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-09 22:43:56 +0100oldfashionedcow(~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
2023-01-09 22:44:26 +0100mizlan_(~mizlan@169.150.203.66) (Ping timeout: 272 seconds)
2023-01-09 22:44:27 +0100oldfashionedcow(~Rahul_San@user/oldfashionedcow)
2023-01-09 22:45:25 +0100mizlan(~mizlan@89.46.114.100)
2023-01-09 22:45:47 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 248 seconds)
2023-01-09 22:50:08 +0100mizlan(~mizlan@89.46.114.100) (Ping timeout: 272 seconds)
2023-01-09 22:56:43 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-01-09 23:01:56 +0100mizlan(~mizlan@169.150.203.53)
2023-01-09 23:04:34 +0100oldfashionedcow(~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
2023-01-09 23:04:56 +0100trev(~trev@user/trev) (Remote host closed the connection)
2023-01-09 23:07:29 +0100oldfashionedcow(~Rahul_San@user/oldfashionedcow)
2023-01-09 23:07:41 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-01-09 23:08:31 +0100mizlan(~mizlan@169.150.203.53) (Ping timeout: 268 seconds)
2023-01-09 23:10:36 +0100underlap(~user@213.31.186.20)
2023-01-09 23:10:38 +0100troydm(~troydm@user/troydm) (Ping timeout: 246 seconds)
2023-01-09 23:11:55 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
2023-01-09 23:12:27 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-01-09 23:14:03 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-01-09 23:14:25 +0100 <sm> I read FB is retiring some haskell system.. not sure which
2023-01-09 23:16:08 +0100malc(~malc@109-252-130-144.dynamic.spd-mgts.ru) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50))
2023-01-09 23:16:37 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-01-09 23:17:25 +0100 <monochrom> Probably the spam filter because it was the only Haskell system :) But on the bright side the new system is still Simon Marlow's Haskell-inspired invention, just more targetted to spam filters.
2023-01-09 23:18:00 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-01-09 23:20:10 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-01-09 23:20:40 +0100underlap(~user@213.31.186.20) (Ping timeout: 252 seconds)
2023-01-09 23:22:22 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-01-09 23:26:39 +0100mizlan(~mizlan@89.46.114.52)
2023-01-09 23:28:06 +0100ec_(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2023-01-09 23:28:06 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-01-09 23:28:06 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-09 23:28:35 +0100jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2023-01-09 23:28:46 +0100 <sclv> iirc there’s a new haskell system now that simon has been focusing on
2023-01-09 23:28:56 +0100califax(~califax@user/califx)
2023-01-09 23:29:02 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-09 23:29:04 +0100 <Hecate> Glean: Facts about Code
2023-01-09 23:29:07 +0100 <Hecate> indeed
2023-01-09 23:29:30 +0100 <Hecate> https://glean.software/
2023-01-09 23:29:36 +0100 <Hecate> https://github.com/facebookincubator/Glean
2023-01-09 23:29:57 +0100ec_(~ec@gateway/tor-sasl/ec)
2023-01-09 23:30:47 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 264 seconds)
2023-01-09 23:31:48 +0100 <monochrom> Haha, when God closes a Haskell project, another one is opened.
2023-01-09 23:32:52 +0100 <hpc> what about when lambda closes a variable?
2023-01-09 23:33:27 +0100 <monochrom> It opens a heap object? :)
2023-01-09 23:37:37 +0100 <maerwald[m]> sm: where?
2023-01-09 23:38:42 +0100 <Hecate> monochrom: haha
2023-01-09 23:41:53 +0100 <sm> HN probably, but it's gone
2023-01-09 23:42:49 +0100 <geekosaur> https://www.reddit.com/r/haskell/comments/103v4hc/companies_abandoning_haskell/ ?
2023-01-09 23:43:52 +0100freeside(~mengwong@103.252.202.159)
2023-01-09 23:45:41 +0100nut(~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 255 seconds)
2023-01-09 23:48:24 +0100mizlan(~mizlan@89.46.114.52) (Ping timeout: 272 seconds)
2023-01-09 23:50:38 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-01-09 23:54:55 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-09 23:56:20 +0100phma(phma@2001:5b0:211b:8f58:b197:6512:47e6:c966) (Read error: Connection reset by peer)
2023-01-09 23:57:05 +0100 <dsal> I updated from stack LTS-19.16 to LTS-20.5 and things went kind of bad. Guess I need to look into this at some point. https://usercontent.irccloud-cdn.com/file/lWPQc4HC/mems.png
2023-01-09 23:57:19 +0100phma(~phma@2001:5b0:210b:f228:90ee:6ca1:3fdb:df)
2023-01-09 23:57:37 +0100 <dsal> The most significant change there is ghc-9.0.2 to 9.2.5.
2023-01-09 23:58:29 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-01-09 23:58:36 +0100 <monochrom> Do you mean with 9.0.2 you did not see this kind of memory growth?
2023-01-09 23:58:55 +0100 <dsal> Right. I'm looking at 30 days of history and just this window where I rolled out the new bin is doing that. Then I rolled it back this morning.
2023-01-09 23:59:38 +0100 <dsal> I've not started investigating, but that's… undesirable. :)
2023-01-09 23:59:47 +0100 <monochrom> I misread "mems.png" as "meme.png" heh