Home liberachat/#haskell: Logs Calendar

Logs on 2023-01-09 (liberachat/#haskell)

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

All times are in UTC on 2023-01-09.