2022/12/22

2022-12-22 00:04:55 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-22 00:06:10 +0100mncheck(~mncheck@193.224.205.254) (Ping timeout: 260 seconds)
2022-12-22 00:06:39 +0100Topsi(~Topsi@dialin-80-228-141-053.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-12-22 00:06:52 +0100morb(~morb@pool-72-80-94-112.nycmny.fios.verizon.net)
2022-12-22 00:09:12 +0100mastarija(~mastarija@188.252.197.9) (Quit: WeeChat 3.7.1)
2022-12-22 00:09:39 +0100bor0(~bor0@user/bor0) (Quit: This computer has gone to sleep)
2022-12-22 00:10:39 +0100zeenk(~zeenk@82.79.126.109) (Quit: Konversation terminated!)
2022-12-22 00:13:31 +0100morb(~morb@pool-72-80-94-112.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2022-12-22 00:29:15 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 248 seconds)
2022-12-22 00:32:08 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-22 00:35:17 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-22 00:35:32 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-22 00:37:32 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-12-22 00:39:13 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-22 00:43:34 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 00:44:15 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 00:46:16 +0100random-jellyfish(~random-je@user/random-jellyfish)
2022-12-22 00:47:51 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
2022-12-22 00:57:20 +0100bjourne(~bjorn@94.191.153.229) (Read error: Connection reset by peer)
2022-12-22 00:57:23 +0100random-jellyfish(~random-je@user/random-jellyfish) (Ping timeout: 260 seconds)
2022-12-22 00:57:24 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 268 seconds)
2022-12-22 00:58:50 +0100 <EvanR> type YoDawga p a b = Yoneda (Yoneda p) a b
2022-12-22 00:59:37 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-22 01:01:20 +0100 <monochrom> haha
2022-12-22 01:01:44 +0100 <monochrom> I was also thinking: Yoda p b a = Yoneda p a b
2022-12-22 01:02:12 +0100 <monochrom> "contramap this you must"
2022-12-22 01:03:04 +0100[Leary](~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2022-12-22 01:03:19 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 01:04:21 +0100[Leary](~Leary]@user/Leary/x-0910699)
2022-12-22 01:04:30 +0100 <EvanR> a contravariant functor is a functor as explained by yoda
2022-12-22 01:05:09 +0100TonyStone(~TonyStone@cpe-74-76-57-186.nycap.res.rr.com)
2022-12-22 01:09:48 +0100 <monochrom> :)
2022-12-22 01:12:37 +0100 <hpc> actually, does that mean a bidirectional mapping... contradicts itself? :D
2022-12-22 01:13:17 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-22 01:13:41 +0100 <geekosaur> only if it actually says anything?
2022-12-22 01:13:44 +0100 <EvanR> doesn't matter, george lucas will just retcon it
2022-12-22 01:13:58 +0100 <EvanR> or disney
2022-12-22 01:20:14 +0100gurkenglas(~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-12-22 01:24:10 +0100monochrom(trebla@216.138.220.146) (Quit: NO CARRIER)
2022-12-22 01:24:11 +0100jludwig(~justin@li657-110.members.linode.com) (Remote host closed the connection)
2022-12-22 01:24:25 +0100jludwig(~justin@li657-110.members.linode.com)
2022-12-22 01:24:25 +0100monochrom(trebla@216.138.220.146)
2022-12-22 01:27:55 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 248 seconds)
2022-12-22 01:29:14 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2022-12-22 01:40:26 +0100son0p(~ff@2604:3d08:5b7f:5540::e96e) (Ping timeout: 255 seconds)
2022-12-22 01:40:53 +0100myShoggoth(~myShoggot@97-120-71-74.ptld.qwest.net) (Ping timeout: 246 seconds)
2022-12-22 01:42:43 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
2022-12-22 01:44:00 +0100burger_flipper(~burger_fl@lib-04-subnet-50.rdns.cenic.net)
2022-12-22 01:45:50 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-22 01:46:02 +0100burger_flipper(~burger_fl@lib-04-subnet-50.rdns.cenic.net) (Client Quit)
2022-12-22 01:50:43 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-22 01:54:35 +0100foul_owl(~kerry@71.212.143.88) (Quit: WeeChat 2.3)
2022-12-22 01:54:56 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-22 02:03:44 +0100foul_owl(~kerry@71.212.143.88)
2022-12-22 02:06:38 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-22 02:09:08 +0100pa_ath(~pa_ath@p57979e0e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-12-22 02:10:24 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
2022-12-22 02:11:28 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-22 02:11:28 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-22 02:11:28 +0100wroathe(~wroathe@user/wroathe)
2022-12-22 02:22:39 +0100xff0x(~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 260 seconds)
2022-12-22 02:36:33 +0100foul_owl(~kerry@71.212.143.88) (Ping timeout: 260 seconds)
2022-12-22 02:39:02 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-22 02:41:17 +0100califax(~califax@user/califx)
2022-12-22 02:43:56 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2022-12-22 02:44:48 +0100 <dgpratt[m]> is there a way to "lift" a function over a newtype wrapper? I mean without doing an explicit unwrap/wrap sequence?
2022-12-22 02:44:51 +0100Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-12-22 02:48:52 +0100Wstfgl0(~me-me@v.working.name) (Quit: Disconnecting on purpose.)
2022-12-22 02:48:55 +0100 <EvanR> :t coerce . f . coerce
2022-12-22 02:48:56 +0100 <lambdabot> error:
2022-12-22 02:48:56 +0100 <lambdabot> • Variable not in scope: coerce :: b1 -> c
2022-12-22 02:48:56 +0100 <lambdabot> • Perhaps you meant ‘coerced’ (imported from Control.Lens)
2022-12-22 02:49:28 +0100 <EvanR> :t coerced
2022-12-22 02:49:29 +0100 <lambdabot> (Profunctor p, Functor f, Coercible s a, Coercible t b) => p a (f b) -> p s (f t)
2022-12-22 02:49:51 +0100foul_owl(~kerry@157.97.134.158)
2022-12-22 02:53:16 +0100 <dgpratt[m]> very interesting, thanks EvanR
2022-12-22 02:54:05 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 246 seconds)
2022-12-22 02:55:03 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2022-12-22 02:55:43 +0100ddellacosta(~ddellacos@89.45.224.142)
2022-12-22 02:56:35 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-22 03:01:20 +0100razetime(~quassel@49.207.230.181)
2022-12-22 03:03:06 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-22 03:03:34 +0100erisco(~erisco@d24-141-66-165.home.cgocable.net)
2022-12-22 03:06:38 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 246 seconds)
2022-12-22 03:06:52 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-12-22 03:07:49 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-22 03:08:32 +0100erisco(~erisco@d24-141-66-165.home.cgocable.net) (Ping timeout: 272 seconds)
2022-12-22 03:10:09 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2022-12-22 03:10:51 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-12-22 03:16:44 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Read error: Connection reset by peer)
2022-12-22 03:17:01 +0100ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-12-22 03:18:14 +0100nehsou^(~nehsou@76.145.185.103)
2022-12-22 03:22:09 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 03:24:24 +0100Lycurgus(~juan@user/Lycurgus)
2022-12-22 03:25:39 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2022-12-22 03:27:34 +0100 <jackdk> EvanR: from `bifunctors:Data.Bifunctor.Joker`: `newtype Joker g a b = Joker :: { runJoker :: g b }`
2022-12-22 03:48:39 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-12-22 03:50:33 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 256 seconds)
2022-12-22 03:50:50 +0100son0p(~ff@2604:3d08:5b7f:5540:98a9:2169:15a1:4c7f)
2022-12-22 03:53:44 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2022-12-22 03:56:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-22 03:57:59 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 04:11:27 +0100myShoggoth(~myShoggot@97-120-71-74.ptld.qwest.net)
2022-12-22 04:11:29 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Remote host closed the connection)
2022-12-22 04:13:08 +0100Kaiepi(~Kaiepi@108.175.84.104) (Quit: Leaving)
2022-12-22 04:15:21 +0100urdh(~urdh@user/urdh) (Ping timeout: 268 seconds)
2022-12-22 04:21:33 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
2022-12-22 04:21:51 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2022-12-22 04:22:17 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
2022-12-22 04:23:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 04:28:08 +0100td_(~td@83.135.9.45) (Ping timeout: 252 seconds)
2022-12-22 04:30:06 +0100td_(~td@83.135.9.52)
2022-12-22 04:34:27 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Remote host closed the connection)
2022-12-22 04:36:12 +0100Inst_(~Inst@2601:6c4:4081:54f0:5c02:2b13:b462:4536)
2022-12-22 04:36:15 +0100Inst_Inst
2022-12-22 04:36:32 +0100 <Inst> did anyone else read "A Pythonista tries Haskell?"
2022-12-22 04:39:00 +0100codaraxis___(~codaraxis@user/codaraxis)
2022-12-22 04:42:11 +0100codaraxis(~codaraxis@user/codaraxis)
2022-12-22 04:42:54 +0100codaraxis__(~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
2022-12-22 04:45:28 +0100codaraxis___(~codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
2022-12-22 04:46:42 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-12-22 04:47:06 +0100codaraxis(~codaraxis@user/codaraxis) (Ping timeout: 265 seconds)
2022-12-22 04:49:36 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:9dfe:df53:2b6:85ce) (Remote host closed the connection)
2022-12-22 04:49:55 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:9dfe:df53:2b6:85ce)
2022-12-22 04:50:08 +0100 <EvanR> :k Data.Bifunctor.Joker
2022-12-22 04:50:09 +0100 <lambdabot> error:
2022-12-22 04:50:09 +0100 <lambdabot> Not in scope: type constructor or class ‘Data.Bifunctor.Joker’
2022-12-22 04:50:09 +0100 <lambdabot> No module named ‘Data.Bifunctor’ is imported.
2022-12-22 04:53:33 +0100 <Inst> Well, I'm a Haskell baby that tried Python; anyone want impressions?
2022-12-22 04:54:08 +0100 <Clint> i do not
2022-12-22 04:54:49 +0100 <EvanR> not really
2022-12-22 04:55:00 +0100 <EvanR> oh, I thought you meant about python
2022-12-22 04:55:51 +0100 <Inst> https://bytes.yingw787.com/posts/2020/01/30/a_review_of_haskell/ that was the pythonista tries Haskell stuff
2022-12-22 04:55:59 +0100 <Inst> for me, it basically comes down to, Python has great libs
2022-12-22 04:56:03 +0100 <Inst> the coding style is shit, though
2022-12-22 04:56:20 +0100 <Inst> and Haskell needs more EDSLs and should bother to teach an imperative style beforehand
2022-12-22 04:57:13 +0100 <Inst> assignment and hidden state is ugly
2022-12-22 04:57:24 +0100 <Inst> but really, great libs
2022-12-22 04:57:31 +0100 <Inst> nothing new was said here
2022-12-22 04:57:33 +0100 <EvanR> luckily this is haskell
2022-12-22 04:57:40 +0100 <EvanR> and not python
2022-12-22 04:58:51 +0100 <Inst> I mean I've always wanted to investigate Python to understand how they ended up being the second most popular language on the planet, after JS
2022-12-22 04:58:59 +0100 <Inst> it's incredible the things they get right
2022-12-22 04:59:07 +0100 <Inst> including how absolutely brain-dead this textbook I bought is
2022-12-22 04:59:26 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-22 05:00:36 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-12-22 05:00:55 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-22 05:04:25 +0100morb(~morb@pool-72-80-94-112.nycmny.fios.verizon.net)
2022-12-22 05:06:12 +0100beefbambi(~beefbambi@183.82.207.16) (Read error: Connection reset by peer)
2022-12-22 05:07:17 +0100shriekingnoise(~shrieking@186.137.167.202) (Quit: Quit)
2022-12-22 05:08:42 +0100jargon(~jargon@174-22-192-24.phnx.qwest.net)
2022-12-22 05:11:42 +0100beefbambi(~beefbambi@183.82.207.16)
2022-12-22 05:13:21 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-22 05:14:11 +0100 <monochrom> Libraries are caused by network effects (after you chase down multiple intermediate causes along multiple pathways).
2022-12-22 05:14:37 +0100 <monochrom> One day you will be surprised (or not) to find that almost every popularity is caused by networking effects.
2022-12-22 05:14:59 +0100 <monochrom> And yes it also means randomized initial conditions.
2022-12-22 05:17:01 +0100 <monochrom> If you already know about "history is written by victors", consider also "success stories are written by victors".
2022-12-22 05:18:19 +0100 <Inst> yeah, i'm the one to call Python the ultimate network effects library
2022-12-22 05:18:32 +0100 <Inst> it doesn't matter if the language is flawed, as long as it can get marketed and build a massive ecosystem on top of it
2022-12-22 05:18:48 +0100Guest17(~Guest17@2601:642:c000:2670:9a63:d40c:964:f8c9)
2022-12-22 05:19:09 +0100 <Inst> the more interesting thing is, well, libraries tend to comprise a kind of EDSL, and Haskell actually is a better EDSL language
2022-12-22 05:19:16 +0100 <Inst> since we don't have parens, in certain ways, we're better than Lisps
2022-12-22 05:20:06 +0100 <Inst> Haskell marketed as an EDSL language, though, gets into the m-word problem, and it sort of makes me think that not being able to navigate the m-word problem is almost by design
2022-12-22 05:20:41 +0100 <Inst> see this guy:
2022-12-22 05:20:42 +0100 <Inst> https://hasura.io/blog/parser-combinators-walkthrough/#fn1
2022-12-22 05:20:47 +0100morb(~morb@pool-72-80-94-112.nycmny.fios.verizon.net) (Remote host closed the connection)
2022-12-22 05:24:54 +0100thegeekinside(~thegeekin@189.128.148.159) (Ping timeout: 260 seconds)
2022-12-22 05:27:08 +0100Guest17(~Guest17@2601:642:c000:2670:9a63:d40c:964:f8c9) (Quit: Client closed)
2022-12-22 05:27:49 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2022-12-22 05:29:44 +0100AlexNoo(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 05:30:08 +0100AlexNoo(~AlexNoo@94.233.241.57)
2022-12-22 05:32:03 +0100 <EvanR> m-word problem sounds like something from abstract algebra
2022-12-22 05:33:01 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 05:34:29 +0100 <zzz> @pl h (g (f a) a)
2022-12-22 05:34:29 +0100 <lambdabot> h (g (f a) a)
2022-12-22 05:34:55 +0100 <zzz> wasn't there a command to further explore this kind of expressions?
2022-12-22 05:37:02 +0100pflanze(~pflanze@159.100.249.232) (Read error: Connection reset by peer)
2022-12-22 05:38:27 +0100pflanze(~pflanze@159.100.249.232)
2022-12-22 05:38:28 +0100Vajb(~Vajb@2001:999:250:c9:8588:6e93:7809:7816) (Read error: Connection reset by peer)
2022-12-22 05:38:38 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-12-22 05:38:51 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
2022-12-22 05:41:27 +0100segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds)
2022-12-22 05:41:45 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 05:41:48 +0100 <monochrom> heh
2022-12-22 05:42:22 +0100 <zzz> was it yahb maybe?... can't recall
2022-12-22 05:42:23 +0100 <monochrom> zzz, you want something like @pl \h g f a -> h (g (f a) a)
2022-12-22 05:43:06 +0100 <zzz> oi that'll do! thanks
2022-12-22 05:43:38 +0100 <zzz> not that it was that useful...
2022-12-22 05:44:27 +0100 <Inst> yeah, usual monoid / monad joke
2022-12-22 05:46:17 +0100 <zzz> this year i learned that APL-like languages use "monadic" and "dyadic" to refer to arity
2022-12-22 05:46:30 +0100 <zzz> that confused me
2022-12-22 05:46:33 +0100 <zzz> for a brief moment
2022-12-22 05:47:31 +0100ddellacosta(~ddellacos@89.45.224.142) (Ping timeout: 265 seconds)
2022-12-22 05:48:11 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 264 seconds)
2022-12-22 05:48:28 +0100Vajb(~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Ping timeout: 268 seconds)
2022-12-22 05:48:34 +0100 <monochrom> Yes, consider "monadic second-order logic" :)
2022-12-22 05:48:46 +0100Vajb(~Vajb@2001:999:250:c9:8588:6e93:7809:7816)
2022-12-22 05:50:10 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 05:52:12 +0100AlexNoo(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 05:52:34 +0100AlexNoo(~AlexNoo@94.233.241.57)
2022-12-22 05:54:54 +0100 <zzz> interesting
2022-12-22 05:55:38 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 05:57:09 +0100AlexNoo__(~AlexNoo@94.233.241.57)
2022-12-22 05:59:21 +0100 <EvanR> I saw something called a Dyad in old dusty physics tomes. It only stands to reason there are Monads
2022-12-22 05:59:32 +0100AlexNoo(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 06:00:03 +0100AlexNoo(~AlexNoo@94.233.241.57)
2022-12-22 06:01:26 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 06:02:42 +0100AlexNoo__(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 06:03:07 +0100 <mauke> I once saw a dye ad
2022-12-22 06:04:38 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 06:05:08 +0100beefbambi(~beefbambi@183.82.207.16) (Ping timeout: 246 seconds)
2022-12-22 06:06:48 +0100 <EvanR> Not to be confused with a Dryad
2022-12-22 06:07:35 +0100AlexNoo(~AlexNoo@94.233.241.57) (Ping timeout: 246 seconds)
2022-12-22 06:10:59 +0100finsternis(~X@23.226.237.192)
2022-12-22 06:15:12 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 06:15:35 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 06:17:06 +0100AlexNoo__(~AlexNoo@94.233.241.57)
2022-12-22 06:20:26 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 06:21:29 +0100AlexNoo__AlexNoo
2022-12-22 06:22:42 +0100masterbu1lder(~master@user/masterbuilder)
2022-12-22 06:25:37 +0100 <maerwald> can exceptions leak out of unsafeInterleaveIO?
2022-12-22 06:25:53 +0100beefbambi(~beefbambi@183.82.207.16)
2022-12-22 06:26:59 +0100 <maerwald> as in: unsafeInterleaveIO $ handle (\e -> ...) action
2022-12-22 06:27:05 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 06:30:34 +0100AlexNoo(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 06:33:08 +0100AlexNoo_AlexNoo
2022-12-22 06:35:20 +0100zmt01(~zmt00@user/zmt00)
2022-12-22 06:37:02 +0100thongpv87(~thongpv87@2402:9d80:320:a717:feaf:9f69:bb0b:e288) (Read error: Connection reset by peer)
2022-12-22 06:37:17 +0100thongpv(~thongpv87@123.31.184.254)
2022-12-22 06:39:08 +0100zmt00(~zmt00@user/zmt00) (Ping timeout: 246 seconds)
2022-12-22 06:43:45 +0100urdh(~urdh@user/urdh)
2022-12-22 06:44:03 +0100AkechiShiro(~licht@user/akechishiro)
2022-12-22 06:45:44 +0100 <monochrom> You have handle around action directly, so no leak.
2022-12-22 06:46:10 +0100 <monochrom> Leak is when handle (\e -> ...) (unsafeInterleaveIO action) heh
2022-12-22 06:57:03 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2022-12-22 07:20:53 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:9dfe:df53:2b6:85ce) (Remote host closed the connection)
2022-12-22 07:21:11 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:9dfe:df53:2b6:85ce)
2022-12-22 07:22:47 +0100myShoggoth(~myShoggot@97-120-71-74.ptld.qwest.net) (Quit: Leaving)
2022-12-22 07:31:41 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2022-12-22 07:38:16 +0100Guest8974(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 07:38:44 +0100zeenk(~zeenk@82.79.126.109)
2022-12-22 07:41:12 +0100 <EvanR> because unsafeInterleaveIO eats all exceptions?
2022-12-22 07:42:08 +0100shachaf(~shachaf@user/shachaf) (Ping timeout: 246 seconds)
2022-12-22 07:42:33 +0100beefbambi(~beefbambi@183.82.207.16) (Ping timeout: 268 seconds)
2022-12-22 07:43:05 +0100shachaf(~shachaf@user/shachaf)
2022-12-22 07:44:15 +0100 <opqdonut> EvanR: no, because the IO gets deferred and is only run later when the result is forced, but then handle has already finished
2022-12-22 07:45:12 +0100 <EvanR> oh
2022-12-22 07:45:38 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-22 07:46:33 +0100 <opqdonut> cf. withFile "/etc/passwd" ReadMode hGetContents
2022-12-22 07:46:57 +0100 <opqdonut> if you try using the result of that, you get "illegal operation (delayed read on closed handle)"
2022-12-22 07:47:10 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-12-22 07:48:11 +0100 <maerwald> monochrom: I don't think it works as expected when threads are involved and the value is accessed in a thread
2022-12-22 07:51:03 +0100 <maerwald> e.g. if your handler re-throws
2022-12-22 07:51:18 +0100 <maerwald> then your thread will crash instead of your main
2022-12-22 07:52:22 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.7.1)
2022-12-22 07:52:57 +0100 <monochrom> Ugh /etc/passwd is a bad example because it's world-readable, you won't have a problem.
2022-12-22 07:54:39 +0100 <opqdonut> right yeah I was demonstrating a resource leak, not an exception
2022-12-22 07:55:15 +0100 <monochrom> Ah sorry, you're right, the hClose in withFile.
2022-12-22 07:55:20 +0100 <opqdonut> but if you try that with a non-readable file you'll get an exception from openFile within withFile, the hGetContents won't get to run
2022-12-22 07:57:18 +0100 <monochrom> maerwald: That's my expectation.
2022-12-22 07:57:24 +0100 <maerwald> My issue is not with streaming. I can't pass an IO action, because it would be executed multiple times. Fully evaluating the value is not desired, because not all code-paths actually need it. Changing that would be a major refactor.
2022-12-22 07:58:14 +0100 <maerwald> but yeah, the error handling is trash now
2022-12-22 07:58:43 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-12-22 08:01:03 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-12-22 08:02:43 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-22 08:08:44 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.7.1)
2022-12-22 08:17:49 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2022-12-22 08:22:07 +0100sympt(~sympt@user/sympt)
2022-12-22 08:28:57 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Ping timeout: 265 seconds)
2022-12-22 08:29:28 +0100phma(phma@2001:5b0:212a:e338:ae0d:e356:1f10:5820) (Read error: Connection reset by peer)
2022-12-22 08:30:59 +0100phma(~phma@2001:5b0:211c:a268:62ac:d67:a277:8a2)
2022-12-22 08:31:07 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-12-22 08:35:07 +0100mncheckm(~mncheck@193.224.205.254)
2022-12-22 08:55:43 +0100Guest8974(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds)
2022-12-22 08:59:59 +0100Midjak(~Midjak@82.66.147.146)
2022-12-22 09:01:07 +0100Unhammer(~Unhammer@user/unhammer)
2022-12-22 09:03:22 +0100 <Unhammer> Is there a wasmer lib (like https://github.com/dirkschumacher/wasmr#example ) for haskell?
2022-12-22 09:04:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 09:06:07 +0100 <Inst> EvanR: the Witcher type, the Warcraft 3 type, or the Greek mythology type?
2022-12-22 09:10:30 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f8ed:343d:34ac:2e79)
2022-12-22 09:11:57 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-12-22 09:12:38 +0100mncheckm(~mncheck@193.224.205.254) (Remote host closed the connection)
2022-12-22 09:12:57 +0100mncheck(~mncheck@193.224.205.254)
2022-12-22 09:16:46 +0100 <Hecate> int.h>)
2022-12-22 09:16:54 +0100 <Hecate> https://gustedt.wordpress.com/2022/12/18/checked-integer-arithmetic-in-the-prospect-of-c23/
2022-12-22 09:17:02 +0100 <Hecate> that article is interesting from a correctness perspective
2022-12-22 09:17:33 +0100 <Hecate> I'll probably write bindings to offer these operations in Haskell-land
2022-12-22 09:18:10 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-22 09:30:47 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2022-12-22 09:32:52 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2022-12-22 09:37:29 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds)
2022-12-22 09:42:26 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-12-22 09:42:30 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
2022-12-22 09:44:34 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-22 09:45:43 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 252 seconds)
2022-12-22 09:50:14 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
2022-12-22 09:51:44 +0100vpan(~0@212.117.1.172)
2022-12-22 09:52:08 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2022-12-22 09:56:06 +0100jinsun(~jinsun@user/jinsun)
2022-12-22 10:04:00 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 272 seconds)
2022-12-22 10:09:43 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl)
2022-12-22 10:12:25 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 10:12:31 +0100 <ArtsAndLeisure> Hi folks! I was wondering: what is the current best practice for benchmarking Wai applications? Thanks!
2022-12-22 10:13:39 +0100 <Hecate> ArtsAndLeisure: locust ;-D
2022-12-22 10:14:00 +0100 <Hecate> now if you want profiling, do you want time profiling or space profiling?
2022-12-22 10:16:48 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 260 seconds)
2022-12-22 10:17:51 +0100thongpv87(~thongpv87@123.31.184.254)
2022-12-22 10:18:34 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 272 seconds)
2022-12-22 10:19:12 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 10:21:04 +0100 <ArtsAndLeisure> I want it all! But currently space is the most relevant for us.
2022-12-22 10:21:06 +0100thongpv(~thongpv87@123.31.184.254) (Ping timeout: 272 seconds)
2022-12-22 10:23:30 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-22 10:24:47 +0100thongpv87(~thongpv87@123.31.184.254) (Ping timeout: 264 seconds)
2022-12-22 10:26:33 +0100 <Hecate> ArtsAndLeisure: do you know how to enable profiling?
2022-12-22 10:27:15 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-12-22 10:39:40 +0100lagash(lagash@lagash.shelltalk.net) (Ping timeout: 260 seconds)
2022-12-22 10:53:34 +0100nyr(~nyr@user/nyr)
2022-12-22 11:02:39 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-22 11:12:50 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 11:12:50 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Ping timeout: 255 seconds)
2022-12-22 11:14:36 +0100MajorBiscuit(~MajorBisc@c-001-009-017.client.tudelft.eduvpn.nl)
2022-12-22 11:18:02 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 11:18:47 +0100__monty__(~toonn@user/toonn)
2022-12-22 11:19:22 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-12-22 11:23:04 +0100nyr(~nyr@user/nyr) (Ping timeout: 252 seconds)
2022-12-22 11:26:40 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2022-12-22 11:26:48 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-12-22 11:27:36 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 272 seconds)
2022-12-22 11:28:06 +0100Lord_of_Life_Lord_of_Life
2022-12-22 11:30:43 +0100xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
2022-12-22 11:32:25 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 11:32:47 +0100danza(~francesco@151.35.107.15)
2022-12-22 11:36:59 +0100danza(~francesco@151.35.107.15) (Ping timeout: 248 seconds)
2022-12-22 11:43:40 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2022-12-22 11:56:20 +0100mniip(mniip@libera/staff/mniip) (Quit: This page is intentionally left blank)
2022-12-22 11:56:25 +0100mniip(mniip@libera/staff/mniip)
2022-12-22 12:00:19 +0100Xeroine(~Xeroine@user/xeroine) (Ping timeout: 268 seconds)
2022-12-22 12:00:59 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-22 12:03:00 +0100nyr(~nyr@user/nyr)
2022-12-22 12:04:54 +0100Xeroine(~Xeroine@user/xeroine)
2022-12-22 12:05:11 +0100nek0(~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
2022-12-22 12:05:20 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-12-22 12:06:33 +0100nek0(~nek0@2a01:4f8:222:2b41::12)
2022-12-22 12:08:23 +0100nyr(~nyr@user/nyr) (Ping timeout: 252 seconds)
2022-12-22 12:09:38 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-22 12:10:32 +0100stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
2022-12-22 12:10:59 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-22 12:13:13 +0100stiell_(~stiell@gateway/tor-sasl/stiell)
2022-12-22 12:17:31 +0100xff0x(~xff0x@ai071162.d.east.v6connect.net)
2022-12-22 12:32:57 +0100zeenk(~zeenk@82.79.126.109) (Quit: Konversation terminated!)
2022-12-22 12:33:55 +0100danza(~francesco@151.35.107.15)
2022-12-22 12:40:23 +0100danza(~francesco@151.35.107.15) (Ping timeout: 256 seconds)
2022-12-22 12:42:10 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-22 12:44:06 +0100anpad(~pandeyan@user/anpad) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-22 12:44:07 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-22 12:45:53 +0100anpad(~pandeyan@user/anpad)
2022-12-22 13:04:54 +0100thongpv87(~thongpv87@2402:9d80:3f2:d2b5:9ab5:74c4:5552:affd)
2022-12-22 13:04:55 +0100bjourne(~bjorn@94.191.153.229.mobile.tre.se)
2022-12-22 13:09:23 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 268 seconds)
2022-12-22 13:18:34 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-22 13:21:41 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-22 13:25:26 +0100son0p(~ff@2604:3d08:5b7f:5540:98a9:2169:15a1:4c7f) (Ping timeout: 246 seconds)
2022-12-22 13:26:41 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-22 13:27:05 +0100dextaa7(~DV@user/dextaa)
2022-12-22 13:28:35 +0100dextaa(~DV@user/dextaa) (Ping timeout: 246 seconds)
2022-12-22 13:28:35 +0100dextaa7dextaa
2022-12-22 13:33:52 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 13:37:37 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-22 13:38:08 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 13:42:20 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
2022-12-22 13:43:10 +0100trev(~trev@user/trev)
2022-12-22 13:43:43 +0100ec(~ec@gateway/tor-sasl/ec)
2022-12-22 13:45:34 +0100 <albet70> Inst, wang yin is a famous person lol, I don't know he writed an article about haskell
2022-12-22 13:45:55 +0100 <Inst> what's the name order again?
2022-12-22 13:46:04 +0100 <Inst> wang, ying, or ying, wang?
2022-12-22 13:46:13 +0100 <Inst> wang, ying seems more probable
2022-12-22 13:47:09 +0100 <albet70> my mistake, the author is ying wang, not yin wang
2022-12-22 13:47:56 +0100 <albet70> the chinese name's order is the last name come first
2022-12-22 13:48:41 +0100 <albet70> so Ying Wang's Chinese name should be Wang Ying
2022-12-22 13:53:04 +0100slack1256(~slack1256@186.11.25.60)
2022-12-22 13:54:29 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 246 seconds)
2022-12-22 13:55:27 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 13:59:50 +0100kenran(~user@user/kenran)
2022-12-22 14:00:35 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-22 14:04:02 +0100danza(~francesco@151.35.107.15)
2022-12-22 14:11:32 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-22 14:16:03 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 14:18:27 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-12-22 14:18:54 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2022-12-22 14:19:22 +0100danza(~francesco@151.35.107.15) (Ping timeout: 265 seconds)
2022-12-22 14:20:45 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 260 seconds)
2022-12-22 14:24:32 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 255 seconds)
2022-12-22 14:36:34 +0100fizbin(~fizbin@user/fizbin) (Remote host closed the connection)
2022-12-22 14:36:53 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 14:41:15 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-12-22 14:42:02 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 272 seconds)
2022-12-22 14:47:53 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 256 seconds)
2022-12-22 14:51:28 +0100bontaq(~user@71.27.75.65)
2022-12-22 14:55:17 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 14:55:20 +0100elkcl(~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru) (Ping timeout: 272 seconds)
2022-12-22 14:58:07 +0100elkcl(~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru)
2022-12-22 15:00:43 +0100jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-12-22 15:01:32 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-22 15:12:38 +0100pavonia(~user@user/siracusa)
2022-12-22 15:12:46 +0100shriekingnoise(~shrieking@186.137.167.202)
2022-12-22 15:16:12 +0100thegeekinside(~thegeekin@189.128.148.159)
2022-12-22 15:24:31 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:9dfe:df53:2b6:85ce) (Remote host closed the connection)
2022-12-22 15:24:32 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-22 15:24:50 +0100use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2022-12-22 15:25:36 +0100danza(~francesco@151.47.168.96)
2022-12-22 15:27:29 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2022-12-22 15:30:02 +0100danza(~francesco@151.47.168.96) (Read error: Connection reset by peer)
2022-12-22 15:30:45 +0100raym(~ray@user/raym) (Quit: server maintenance, will be back in a jiffy)
2022-12-22 15:32:20 +0100trev(~trev@user/trev) (Remote host closed the connection)
2022-12-22 15:32:38 +0100nyr(~nyr@user/nyr)
2022-12-22 15:34:42 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2022-12-22 15:34:42 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2022-12-22 15:34:42 +0100wroathe(~wroathe@user/wroathe)
2022-12-22 15:35:39 +0100 <stefan-_> whats the preferred way/library to fetch xml from an http endpoint and parse it?
2022-12-22 15:36:21 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2022-12-22 15:38:37 +0100son0p(~ff@2604:3d08:5b7f:5540:98a9:2169:15a1:4c7f)
2022-12-22 15:39:24 +0100jinsun(~jinsun@user/jinsun)
2022-12-22 15:42:56 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2022-12-22 15:53:17 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-22 15:53:18 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2022-12-22 15:59:06 +0100nschoe(~q@141.101.51.197)
2022-12-22 15:59:35 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 268 seconds)
2022-12-22 16:07:36 +0100nyr(~nyr@user/nyr) (Ping timeout: 268 seconds)
2022-12-22 16:09:49 +0100 <maerwald[m]> That would be the time to look for a new job
2022-12-22 16:12:11 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-22 16:12:52 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 16:18:25 +0100thongpv87(~thongpv87@2402:9d80:3f2:d2b5:9ab5:74c4:5552:affd) (Ping timeout: 252 seconds)
2022-12-22 16:18:40 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 16:19:04 +0100segfaultfizzbuzz(~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
2022-12-22 16:34:15 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126)
2022-12-22 16:34:46 +0100mvk(~mvk@2607:fea8:5ce3:8500::6126) (Client Quit)
2022-12-22 16:35:28 +0100lagash_(lagash@lagash.shelltalk.net)
2022-12-22 16:38:41 +0100mncheck(~mncheck@193.224.205.254) (Ping timeout: 246 seconds)
2022-12-22 16:42:50 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl) (Ping timeout: 246 seconds)
2022-12-22 16:47:12 +0100mncheckm(~mncheck@193.224.205.254)
2022-12-22 16:48:57 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:f8ed:343d:34ac:2e79) (Quit: WeeChat 2.8)
2022-12-22 16:51:39 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 16:53:22 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 16:54:23 +0100kraftwerk28(~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in)
2022-12-22 16:55:18 +0100kraftwerk28(~kraftwerk@178.62.210.83)
2022-12-22 16:56:30 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl)
2022-12-22 17:01:28 +0100sagax(~sagax_nb@user/sagax) (Remote host closed the connection)
2022-12-22 17:02:27 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl) (Ping timeout: 252 seconds)
2022-12-22 17:02:38 +0100Alex_test(~al_test@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 17:02:50 +0100stef204(~stef204@user/stef204)
2022-12-22 17:03:44 +0100AlexZenon(~alzenon@94.233.241.57) (Ping timeout: 260 seconds)
2022-12-22 17:04:19 +0100AlexNoo(~AlexNoo@94.233.241.57) (Ping timeout: 260 seconds)
2022-12-22 17:06:23 +0100nehsou^(~nehsou@76.145.185.103) (Remote host closed the connection)
2022-12-22 17:07:59 +0100azimut_(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2022-12-22 17:08:24 +0100kjak(~kjak@pool-72-66-75-40.washdc.fios.verizon.net)
2022-12-22 17:10:44 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 260 seconds)
2022-12-22 17:13:03 +0100bontaq(~user@71.27.75.65) (Ping timeout: 260 seconds)
2022-12-22 17:18:03 +0100fserucas(~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 256 seconds)
2022-12-22 17:20:46 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl)
2022-12-22 17:22:08 +0100jinsl(~jinsl@2408:8207:2558:2b10:211:32ff:fec8:6aea) (Quit: ZNC - https://znc.in)
2022-12-22 17:26:33 +0100jinsl(~jinsl@123.120.192.90)
2022-12-22 17:28:15 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl) (Ping timeout: 256 seconds)
2022-12-22 17:29:14 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 272 seconds)
2022-12-22 17:31:25 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
2022-12-22 17:32:26 +0100rburkholder(~blurb@96.45.2.121)
2022-12-22 17:33:21 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-12-22 17:33:51 +0100nschoe(~q@141.101.51.197) (Quit: Switching off)
2022-12-22 17:34:41 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-22 17:36:44 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-22 17:41:57 +0100Sgeo(~Sgeo@user/sgeo)
2022-12-22 17:46:35 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-12-22 17:47:31 +0100jinsl(~jinsl@123.120.192.90) (Ping timeout: 256 seconds)
2022-12-22 17:47:33 +0100jinsl-(~jinsl@2408:8207:2558:2b10:211:32ff:fec8:6aea)
2022-12-22 17:49:23 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2022-12-22 17:50:09 +0100califax(~califax@user/califx)
2022-12-22 17:50:25 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 17:51:02 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2022-12-22 17:51:40 +0100 <kjlid[m]> https://paste.tomsmeding.com/Gaojhd7w How would I do something like this? The use-case is that I have some URIs stored in a database and I would like to get them out as Text.URI.URIs
2022-12-22 17:51:46 +0100 <Jadesheit[m]> @src foldr
2022-12-22 17:51:46 +0100 <lambdabot> foldr f z [] = z
2022-12-22 17:51:46 +0100 <lambdabot> foldr f z (x:xs) = f x (foldr f z xs)
2022-12-22 18:01:59 +0100beefbambi(~beefbambi@183.82.204.74) (Ping timeout: 264 seconds)
2022-12-22 18:01:59 +0100MajorBiscuit(~MajorBisc@c-001-009-017.client.tudelft.eduvpn.nl) (Ping timeout: 246 seconds)
2022-12-22 18:02:08 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377)
2022-12-22 18:05:16 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.7.1)
2022-12-22 18:07:13 +0100 <monochrom> kjlid[m]: Looks like it should be EntryURI <$> mkURI str
2022-12-22 18:07:48 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: a reboot is going on.)
2022-12-22 18:08:01 +0100 <monochrom> replace the whole "pure $ EntryURI $ mkURI str" by that.
2022-12-22 18:08:38 +0100 <kjlid[m]> No instance for (Control.Monad.Catch.MonadThrow Ok)
2022-12-22 18:08:38 +0100 <kjlid[m]> arising from a use of ‘mkURI’
2022-12-22 18:09:00 +0100 <monochrom> What is the type of mkURI?
2022-12-22 18:09:02 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2022-12-22 18:09:26 +0100 <kjlid[m]> mkURI :: MonadThrow m => Text -> m URI
2022-12-22 18:09:40 +0100 <mauke> :t maybe
2022-12-22 18:09:41 +0100 <lambdabot> b -> (a -> b) -> Maybe a -> b
2022-12-22 18:10:06 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2022-12-22 18:10:24 +0100 <mauke> catchUriException str f = maybe (returnError ConversionFailed f "Failed to parse EntryURI") (pure . EntryURI) (mkURI str)
2022-12-22 18:10:27 +0100 <mauke> maybe
2022-12-22 18:11:02 +0100 <kjlid[m]> Where does maybe come from?
2022-12-22 18:11:17 +0100 <kjlid[m]> Oh
2022-12-22 18:11:19 +0100 <kjlid[m]> That's in Prelude
2022-12-22 18:12:34 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 260 seconds)
2022-12-22 18:12:37 +0100 <kjlid[m]> Ofcourse that worked. Thanks!
2022-12-22 18:13:13 +0100 <kjlid[m]> I'm still trying to wrap my head around the type system.
2022-12-22 18:13:42 +0100 <mauke> mkURI is (overly) generic in its return type
2022-12-22 18:15:09 +0100 <mauke> since you're not using the ParseException anyway, we can simply treat the 'MonadThrow m' part as Maybe (which is an instance of MonadThrow)
2022-12-22 18:15:27 +0100 <mauke> that is, we treat its type as Text -> Maybe URI
2022-12-22 18:15:40 +0100 <mauke> @src maybe
2022-12-22 18:15:41 +0100 <lambdabot> maybe n _ Nothing = n
2022-12-22 18:15:41 +0100 <lambdabot> maybe _ f (Just x) = f x
2022-12-22 18:16:21 +0100 <kjlid[m]> You just answered the next question I had but I didn't know how to formulate
2022-12-22 18:17:07 +0100 <kjlid[m]> Again, thanks! I think something clicked in my head now
2022-12-22 18:17:24 +0100 <mauke> we don't need to bother with 'catch' since we get to choose the MonadThrow to use, and we know Maybe represents errors as a plain Nothing value
2022-12-22 18:17:33 +0100 <mauke> so we can simply pattern match on it
2022-12-22 18:17:43 +0100 <mauke> (or use a helper function that does the pattern matching, like maybe)
2022-12-22 18:18:14 +0100 <kjlid[m]> Is it rude to ask for an example of how this would be written if I wanted to actually use the ParseException?
2022-12-22 18:18:49 +0100 <kjlid[m]> I don't think I care in this instance but it's always nice to see examples
2022-12-22 18:18:55 +0100 <monochrom> Then you switch to Either ParseException URI
2022-12-22 18:19:10 +0100 <mauke> not sure; I've never used ParseException before
2022-12-22 18:19:29 +0100 <monochrom> And the helper function is "either".
2022-12-22 18:19:35 +0100 <kjlid[m]> Ooh
2022-12-22 18:19:37 +0100 <kjlid[m]> Ofcourse
2022-12-22 18:19:51 +0100 <mauke> monochrom: I don't think that'll work
2022-12-22 18:20:13 +0100 <mauke> says here: e ~ SomeException => MonadThrow (Either e)
2022-12-22 18:20:30 +0100 <monochrom> Hrm that's bad
2022-12-22 18:20:30 +0100 <mauke> so you need some sort of injector into SomeException
2022-12-22 18:20:37 +0100AlexNoo(~AlexNoo@94.233.241.57)
2022-12-22 18:21:57 +0100 <mauke> oh, Either SomeException URI would probably work as is
2022-12-22 18:22:11 +0100 <mauke> but then you'd have to fromException the result and do a dynamic test
2022-12-22 18:22:23 +0100Alex_test(~al_test@94.233.241.57)
2022-12-22 18:22:36 +0100beefbambi(~beefbambi@2401:4900:230d:f57c:538c:d7cc:50c0:e377) (Read error: Connection reset by peer)
2022-12-22 18:22:39 +0100 <monochrom> I have a feeling though that if someone called it "ParseException" as opposed to "ParseError" they might have made it an instance of Exception.
2022-12-22 18:23:10 +0100 <kjlid[m]> Yeah it is an instance of Exception
2022-12-22 18:23:18 +0100 <kjlid[m]> At least according to https://hackage.haskell.org/package/modern-uri-0.3.6.0/docs/Text-URI.html#t:ParseException
2022-12-22 18:23:44 +0100 <monochrom> But yeah you have to go through SomeException and then downcast.
2022-12-22 18:23:50 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:26:08 +0100 <mauke> case mkURI str of { Right uri -> pure (EntryURI uri); Left e | Just pe <- fromException e -> returnError ??? ??? ??? | otherwise -> ??? }
2022-12-22 18:26:13 +0100 <mauke> or something like that
2022-12-22 18:26:21 +0100AlexZenon(~alzenon@94.233.241.57)
2022-12-22 18:26:25 +0100beefbambi(~beefbambi@183.82.204.74) (Read error: Connection reset by peer)
2022-12-22 18:27:10 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:27:38 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 18:27:40 +0100 <kjlid[m]> Wait I can just use case straight on the return value of mkURI?
2022-12-22 18:27:55 +0100 <mauke> yes
2022-12-22 18:28:01 +0100 <mauke> I mean, that's what 'maybe' is doing, too
2022-12-22 18:29:11 +0100 <kjlid[m]> `Left e | Just pe <- fromException e ->` what syntax is that? I don't think I've seen that one before
2022-12-22 18:29:11 +0100beefbambi(~beefbambi@183.82.204.74) (Read error: Connection reset by peer)
2022-12-22 18:29:19 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:30:16 +0100 <mauke> well, it's entirely untested so it might be invalid :-)
2022-12-22 18:30:28 +0100 <mauke> but I meant for it to be a pattern guard
2022-12-22 18:31:31 +0100 <kjlid[m]> No it seems to works if I replace "otherwise" with "_"
2022-12-22 18:31:38 +0100 <kjlid[m]> it seems to work even
2022-12-22 18:31:44 +0100beefbambi(~beefbambi@183.82.204.74) (Read error: Connection reset by peer)
2022-12-22 18:32:02 +0100 <mauke> _ shouldn't work after |
2022-12-22 18:32:08 +0100 <mauke> https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-460003.13
2022-12-22 18:32:16 +0100 <mauke> "pattern guards are of the form p <- e, where p is a pattern (see Section 3.17) of type t and e is an expression type t1. They succeed if the expression e matches the pattern p, and introduce the bindings of the pattern to the environment."
2022-12-22 18:32:43 +0100 <kjlid[m]> Oh it's a guard ofcourse, I added is as a catch-all in the case
2022-12-22 18:32:46 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:32:51 +0100 <mauke> oh, yeah
2022-12-22 18:33:29 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-12-22 18:33:31 +0100 <kjlid[m]> Oh yeah I had to specify what type pe was too with ScopedTypeVariables
2022-12-22 18:33:34 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 260 seconds)
2022-12-22 18:33:38 +0100econo(uid147250@user/econo)
2022-12-22 18:34:05 +0100 <kjlid[m]> Other than that the compiler seems happy
2022-12-22 18:34:17 +0100 <mauke> I don't see why you would need ScopedTypeVariables
2022-12-22 18:34:27 +0100 <mauke> you do need some code that nails down the type of pe somehow
2022-12-22 18:34:47 +0100 <mauke> either with an explicit type signature or by passing it to a function that takes a ParseException
2022-12-22 18:36:01 +0100 <kjlid[m]> Oh ofcourse. I'm not doing anything with pe so I guess that's why
2022-12-22 18:36:52 +0100 <mauke> Left e | Just pe <- fromException e -> returnError ConversionFailed f ("Failed to parse EntryURI: " ++ show (pe :: ParseException)) -- or something like that
2022-12-22 18:37:00 +0100vpan(~0@212.117.1.172) (Quit: Leaving.)
2022-12-22 18:37:07 +0100 <mauke> I suspect 'show pe' won't be particularly human readable, though
2022-12-22 18:37:14 +0100 <mauke> or user friendly
2022-12-22 18:37:34 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl)
2022-12-22 18:38:54 +0100 <kjlid[m]> Well who cares about users anyway?
2022-12-22 18:39:24 +0100beefbambi(~beefbambi@183.82.204.74) (Ping timeout: 260 seconds)
2022-12-22 18:39:39 +0100razetime(~quassel@49.207.230.181) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-12-22 18:40:14 +0100 <mauke> o ho ho, the constructor is public
2022-12-22 18:40:17 +0100MajorBiscuit(~MajorBisc@31-23-159.netrun.cytanet.com.cy)
2022-12-22 18:40:40 +0100 <mauke> Left e | Just pe@ParseException{} <- fromException e -> ...
2022-12-22 18:40:47 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:40:56 +0100 <mauke> this might be considered cheeky
2022-12-22 18:41:09 +0100 <kjlid[m]> If it works it works
2022-12-22 18:41:27 +0100beefbambi(~beefbambi@183.82.204.74) (Read error: Connection reset by peer)
2022-12-22 18:42:10 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:42:19 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl) (Ping timeout: 260 seconds)
2022-12-22 18:42:26 +0100 <mauke> > (\x -> case x of Nothing{} -> "it's nothing"; Just{} -> "it's something") (Just 42)
2022-12-22 18:42:27 +0100 <lambdabot> "it's something"
2022-12-22 18:43:05 +0100 <mauke> (for when you want to match against a constructor without caring what arguments it takes)
2022-12-22 18:46:27 +0100beefbambi(~beefbambi@183.82.204.74) (Ping timeout: 256 seconds)
2022-12-22 18:46:54 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 18:48:33 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2022-12-22 18:49:07 +0100stef204(~stef204@user/stef204)
2022-12-22 18:51:01 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 18:55:42 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.7.1)
2022-12-22 19:00:16 +0100troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-12-22 19:02:19 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 19:02:36 +0100jmdaemon(~jmdaemon@user/jmdaemon)
2022-12-22 19:04:20 +0100zero(~z@user/zero)
2022-12-22 19:05:24 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 19:07:05 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-12-22 19:07:05 +0100beefbambi(~beefbambi@183.82.204.74) (Read error: Connection reset by peer)
2022-12-22 19:07:19 +0100beefbambi(~beefbambi@183.82.204.74)
2022-12-22 19:07:35 +0100zzz(~z@user/zero) (Ping timeout: 255 seconds)
2022-12-22 19:14:53 +0100nyr(~nyr@user/nyr)
2022-12-22 19:19:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 19:22:41 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2022-12-22 19:23:37 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
2022-12-22 19:23:56 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 19:24:12 +0100raym(~ray@user/raym)
2022-12-22 19:26:27 +0100 <iqubic> Is it possible to sort a list of things first by one criteria, and the use a second criteria as a tie breaker?
2022-12-22 19:27:52 +0100 <iqubic> I have xs :: [a] and f,g :: (Ord b) => a -> b. I want to sort on the result of f, but use the result of g as tie breaker.
2022-12-22 19:28:07 +0100 <iqubic> Well, actually, not sort, but rather minimumBy
2022-12-22 19:29:19 +0100 <monochrom> This means (\x y -> compare (f x) (f y) <> compare (g x) (g y)) is your comparator.
2022-12-22 19:29:20 +0100 <geekosaur> use <> to combine them
2022-12-22 19:30:13 +0100 <geekosaur> or comparing f <> comparing g
2022-12-22 19:30:30 +0100 <monochrom> w00t that's simpler :)
2022-12-22 19:30:52 +0100 <geekosaur> :t comparing ?f <> comparing ?g
2022-12-22 19:30:53 +0100 <lambdabot> (Ord a1, Ord a2, ?f::b -> a1, ?g::b -> a2) => b -> b -> Ordering
2022-12-22 19:31:31 +0100 <iqubic> Thanks. I was trying "comparing (f <> g)" and was being told there was no semigroup instance for type b
2022-12-22 19:31:53 +0100bjourne(~bjorn@94.191.153.229.mobile.tre.se) (Read error: Connection reset by peer)
2022-12-22 19:32:17 +0100 <iqubic> thank you geekosaur.
2022-12-22 19:35:10 +0100Sciencentistguy1(~sciencent@hacksoc/ordinary-member)
2022-12-22 19:37:23 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 264 seconds)
2022-12-22 19:37:23 +0100Sciencentistguy1Sciencentistguy
2022-12-22 19:37:25 +0100malte(~malte@mal.tc) (Remote host closed the connection)
2022-12-22 19:38:31 +0100malte(~malte@mal.tc)
2022-12-22 19:39:55 +0100 <mauke> :t \f g -> sortOn (\x -> (f x, g x))
2022-12-22 19:39:57 +0100 <lambdabot> (Ord a, Ord b) => (t -> a) -> (t -> b) -> [t] -> [t]
2022-12-22 19:40:34 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-22 19:41:05 +0100 <mauke> :t \f g -> sortOn (\x -> ((,) $! f x) $! g x)
2022-12-22 19:41:06 +0100 <lambdabot> (Ord a, Ord b) => (t -> a) -> (t -> b) -> [t] -> [t]
2022-12-22 19:41:22 +0100nyr(~nyr@user/nyr) (Ping timeout: 252 seconds)
2022-12-22 19:47:18 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
2022-12-22 19:48:51 +0100stef204(~stef204@user/stef204)
2022-12-22 19:52:43 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-12-22 19:53:27 +0100coot(~coot@213.134.171.3)
2022-12-22 19:56:23 +0100johnw(~johnw@2600:1700:cf00:db0:fc14:7b6c:a314:b669) (Ping timeout: 260 seconds)
2022-12-22 19:56:46 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 19:57:59 +0100bjourne(~bjorn@94.191.153.229)
2022-12-22 20:07:28 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.7.1)
2022-12-22 20:16:33 +0100johnw(~johnw@2600:1700:cf00:db0:3017:1dda:5aaf:2264)
2022-12-22 20:17:00 +0100danza(~francesco@151.43.126.152)
2022-12-22 20:17:32 +0100danza(~francesco@151.43.126.152) (Read error: Connection reset by peer)
2022-12-22 20:22:09 +0100Sgeo_(~Sgeo@user/sgeo)
2022-12-22 20:22:39 +0100Sgeo(~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
2022-12-22 20:24:23 +0100texasmynsted(~texasmyns@99.96.221.112)
2022-12-22 20:31:21 +0100 <iqubic> I actually want minimumBy
2022-12-22 20:33:05 +0100malte(~malte@mal.tc) (Remote host closed the connection)
2022-12-22 20:34:05 +0100malte(~malte@mal.tc)
2022-12-22 20:34:42 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2022-12-22 20:35:49 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-12-22 20:37:25 +0100 <Jadesheit[m]> @pl \f -> f x y
2022-12-22 20:37:25 +0100 <lambdabot> flip ($ x) y
2022-12-22 20:40:06 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-12-22 20:42:19 +0100foul_owl(~kerry@157.97.134.158) (Quit: WeeChat 2.3)
2022-12-22 20:44:34 +0100malte(~malte@mal.tc) (Remote host closed the connection)
2022-12-22 20:45:05 +0100foul_owl(~kerry@157.97.134.158)
2022-12-22 20:45:42 +0100malte(~malte@mal.tc)
2022-12-22 20:55:29 +0100stef204(~stef204@user/stef204)
2022-12-22 20:57:21 +0100motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 256 seconds)
2022-12-22 21:03:01 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 21:05:50 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 272 seconds)
2022-12-22 21:05:56 +0100coot(~coot@213.134.171.3) (Quit: coot)
2022-12-22 21:06:36 +0100phma(~phma@2001:5b0:211c:a268:62ac:d67:a277:8a2) (Read error: Connection reset by peer)
2022-12-22 21:07:53 +0100phma(~phma@host-67-44-208-203.hnremote.net)
2022-12-22 21:11:44 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Remote host closed the connection)
2022-12-22 21:12:02 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 21:18:06 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.7.1)
2022-12-22 21:19:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 21:21:59 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Remote host closed the connection)
2022-12-22 21:23:57 +0100Sgeo_(~Sgeo@user/sgeo) (Ping timeout: 268 seconds)
2022-12-22 21:24:44 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 21:25:31 +0100CiaoSen(~Jura@p200300c9571ee1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-12-22 21:28:38 +0100AlexNoo(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 21:28:55 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 21:29:17 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 21:31:22 +0100AlexNoo__(~AlexNoo@94.233.241.57)
2022-12-22 21:34:45 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Ping timeout: 256 seconds)
2022-12-22 21:35:48 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 21:35:58 +0100mc47(~mc47@xmonad/TheMC47)
2022-12-22 21:37:25 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 21:37:47 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 21:38:01 +0100elevenkb(~elevenkb@105.224.37.128)
2022-12-22 21:38:17 +0100AlexNoo_AlexNoo
2022-12-22 21:38:59 +0100AlexNoo__(~AlexNoo@94.233.241.57) (Ping timeout: 246 seconds)
2022-12-22 21:41:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 21:59:49 +0100AlexNoo_(~AlexNoo@94.233.241.57)
2022-12-22 22:01:06 +0100AlexNoo(~AlexNoo@94.233.241.57) (Read error: Connection reset by peer)
2022-12-22 22:01:29 +0100AlexNoo__(~AlexNoo@94.233.241.57)
2022-12-22 22:04:44 +0100AlexNoo_(~AlexNoo@94.233.241.57) (Ping timeout: 272 seconds)
2022-12-22 22:05:49 +0100eikke(~NicolasT@user/NicolasT)
2022-12-22 22:07:22 +0100kenran(~user@user/kenran)
2022-12-22 22:12:49 +0100kenran(~user@user/kenran) (Remote host closed the connection)
2022-12-22 22:15:00 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 22:15:42 +0100cheater(~Username@user/cheater)
2022-12-22 22:15:45 +0100Guest323(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2022-12-22 22:18:59 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-12-22 22:19:11 +0100mc47(~mc47@xmonad/TheMC47)
2022-12-22 22:20:39 +0100mc47(~mc47@xmonad/TheMC47) (Client Quit)
2022-12-22 22:22:29 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0)
2022-12-22 22:25:32 +0100 <bjourne> i have a function that emits instructions from ast nodes. would the state monad be a good fit?
2022-12-22 22:26:01 +0100 <kjlid[m]> So I have another thing I don't quite understand. https://paste.tomsmeding.com/v2r8lKcK why do I get that error there?
2022-12-22 22:27:42 +0100 <geekosaur> "emits" sounds like some variant of Writer to me
2022-12-22 22:28:25 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:1dcc:166b:1177:c3e0) (Ping timeout: 260 seconds)
2022-12-22 22:28:35 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2022-12-22 22:31:48 +0100 <mauke> kjlid[m]: class Monad m => MonadError e m | m -> e where
2022-12-22 22:32:11 +0100 <mauke> m -> e means m uniquely determines e
2022-12-22 22:32:33 +0100 <mauke> and for m = IO, the only allowed exception type is e = IOException
2022-12-22 22:32:45 +0100 <geekosaur> earlier discussion: [18 20:47:24] <int-e> c_wraith: FWIW, I've used the W component quite a bit in a couple of assembly-like DSLs; in that design, the reader is usually unused, the state tracks labels, and the writer collects generated code. And there's an mfix somewhere to tie the labels into a know so that they can be used before the label's declaration.
2022-12-22 22:32:54 +0100 <kjlid[m]> oh, okay
2022-12-22 22:32:57 +0100 <mauke> your are in IO, but trying to throw HpassError
2022-12-22 22:33:41 +0100 <kjlid[m]> So I should just return Left?
2022-12-22 22:34:06 +0100 <mauke> not sure, I'm not that familiar with MonadError
2022-12-22 22:34:25 +0100 <kjlid[m]> Alright
2022-12-22 22:34:28 +0100 <mauke> but yeah, returning it to the outer layer (where you can throw it like you want) makes sense
2022-12-22 22:35:00 +0100 <mauke> actually ...
2022-12-22 22:35:21 +0100 <mauke> why is this thing polymorphic at all?
2022-12-22 22:35:38 +0100 <mauke> :t throwIO
2022-12-22 22:35:40 +0100 <lambdabot> Exception e => e -> IO a
2022-12-22 22:36:19 +0100 <kjlid[m]> Honestly? No reason really. I'm just learning stuff
2022-12-22 22:36:39 +0100 <mauke> wait, I might be dumb
2022-12-22 22:37:06 +0100 <mauke> yeah, it's actually two separate things :-)
2022-12-22 22:37:11 +0100 <geekosaur> I wasn't sure that was in IO, since it's got that withConnection thing
2022-12-22 22:37:35 +0100 <kjlid[m]> withConnection :: forall a. String -> (Connection -> IO a) -> IO a
2022-12-22 22:37:53 +0100 <mauke> kjlid[m]: step 1: use throwIO instead of throwError
2022-12-22 22:37:55 +0100 <geekosaur> okay, so yes IO
2022-12-22 22:38:07 +0100 <mauke> you are in IO, you can throw whatever you want (as long as it's an instance of Exception)
2022-12-22 22:38:28 +0100 <mauke> step 2: I would just drop the 'liftIO' wrapper
2022-12-22 22:38:55 +0100 <kjlid[m]> mauke: But I wanted to catch the exceptions, handle them and *return* a proper value instead. Don't need no stinking exceptions where we're going
2022-12-22 22:38:55 +0100 <mauke> anyone who needs createDb in some other monad can just 'liftIO (createDb ...)'
2022-12-22 22:39:56 +0100 <mauke> kjlid[m]: huh?
2022-12-22 22:40:04 +0100 <mauke> then why do you have throwError in there?
2022-12-22 22:41:39 +0100 <kjlid[m]> https://hackage.haskell.org/package/mtl-2.2.2/docs/src/Control.Monad.Error.Class.html#line-134 <- I looked there and assumed it would be the same as `Left`
2022-12-22 22:42:25 +0100 <kjlid[m]> Actually I'm an idiot
2022-12-22 22:42:32 +0100 <kjlid[m]> It is but I accidentally used Control.Monad.Except
2022-12-22 22:43:27 +0100 <mauke> that instance doesn't really apply here. we're in IO, not Either
2022-12-22 22:44:08 +0100 <kjlid[m]> Actually I'm an idiot again.
2022-12-22 22:44:21 +0100 <kjlid[m]> Alright
2022-12-22 22:44:23 +0100eikke(~NicolasT@user/NicolasT) (Ping timeout: 260 seconds)
2022-12-22 22:45:08 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2022-12-22 22:45:39 +0100 <kjlid[m]> But if I remove that liftIO then I get Couldn't match type ‘m’ with ‘IO’
2022-12-22 22:46:12 +0100 <mauke> old type signature?
2022-12-22 22:46:53 +0100 <kjlid[m]> What do you mean?
2022-12-22 22:46:55 +0100 <mauke> createDb :: FilePath -> [Pubkey] -> IO [Pubkey]
2022-12-22 22:47:34 +0100 <kjlid[m]> I want IO (Either HpassError [Pubkey])
2022-12-22 22:48:29 +0100 <mauke> oh, there's probably a smart way to do that
2022-12-22 22:48:40 +0100 <mauke> :t try
2022-12-22 22:48:41 +0100 <lambdabot> Exception e => IO a -> IO (Either e a)
2022-12-22 22:50:49 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-12-22 22:50:58 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2022-12-22 22:51:14 +0100slack1256(~slack1256@186.11.25.60) (Ping timeout: 255 seconds)
2022-12-22 22:52:04 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl)
2022-12-22 22:54:43 +0100 <kjlid[m]> mauke: https://paste.tomsmeding.com/5ZA990UI <- This is essentially what I want to do
2022-12-22 22:55:09 +0100 <mauke> kjlid[m]: that return type doesn't make much sense
2022-12-22 22:55:18 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 22:55:31 +0100 <kjlid[m]> It doesn't?
2022-12-22 22:55:31 +0100 <mauke> the only value this thing can return successfully is 'keys' as passed in by the caller
2022-12-22 22:56:21 +0100AlexNoo__AlexNoo
2022-12-22 22:56:40 +0100 <mauke> it doesn't give you any information over IO (Maybe HpassError)
2022-12-22 22:56:43 +0100 <kjlid[m]> Because forM?
2022-12-22 22:56:51 +0100jakalx(~jakalx@base.jakalx.net)
2022-12-22 22:57:07 +0100 <mauke> yeah
2022-12-22 22:57:38 +0100 <mauke> you're mapping over 'keys', which gives you the current element 'k'
2022-12-22 22:57:56 +0100 <mauke> on success, you return 'k', which forM then assembles into a list equal to 'keys'
2022-12-22 22:58:47 +0100unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 246 seconds)
2022-12-22 22:59:29 +0100Guest3017(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-12-22 22:59:38 +0100ArtsAndLeisure(~renate@f104006.upc-f.chello.nl) (Quit: Leaving)
2022-12-22 23:00:03 +0100 <kjlid[m]> Oh yeah I know that. The idea with the return type is that I'm going to return a list with "actually added" keys
2022-12-22 23:00:27 +0100 <kjlid[m]> E.g. remove duplicates first
2022-12-22 23:00:31 +0100 <kjlid[m]> I'm just not doing that yet
2022-12-22 23:03:05 +0100 <kjlid[m]> But yeah, maybe it makes more sense to move that elsewhere
2022-12-22 23:05:52 +0100 <mauke> is the HpassError type an instance of Exception?
2022-12-22 23:06:33 +0100 <kjlid[m]> No it isn't
2022-12-22 23:07:21 +0100 <mauke> aw
2022-12-22 23:07:25 +0100motherfsck(~motherfsc@user/motherfsck)
2022-12-22 23:07:38 +0100 <kjlid[m]> Would it simplify stuff?
2022-12-22 23:07:57 +0100 <kjlid[m]> I tend to avoid exceptions
2022-12-22 23:10:04 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 260 seconds)
2022-12-22 23:10:36 +0100 <kjlid[m]> Okay I switched to Maybe instead of Either. Is there a function that does what I want? I have looked all over the place but couldn't find anything
2022-12-22 23:11:48 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-12-22 23:13:10 +0100 <mauke> kjlid[m]: if it were, I think you could do something like: https://paste.tomsmeding.com/64RXnOt9
2022-12-22 23:16:11 +0100 <kjlid[m]> Hmm, alright
2022-12-22 23:18:32 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-12-22 23:20:57 +0100freeside(~mengwong@103.252.202.159)
2022-12-22 23:26:19 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2022-12-22 23:26:24 +0100zeenk(~zeenk@82.79.126.109)
2022-12-22 23:30:52 +0100Kaiepi(~Kaiepi@108.175.84.104) (Ping timeout: 272 seconds)
2022-12-22 23:32:36 +0100 <bjourne> when haskell says "Non-exhaustive patterns in function" can you get it to state the type name?
2022-12-22 23:32:57 +0100fizbin(~fizbin@user/fizbin)
2022-12-22 23:33:07 +0100 <mauke> s/haskell/ghc/
2022-12-22 23:33:33 +0100 <geekosaur> how do you know it's only one type/pattern?
2022-12-22 23:33:36 +0100 <kjlid[m]> Is there a try that returns a Maybe instead?
2022-12-22 23:34:30 +0100 <mauke> :t eitherToMaybe
2022-12-22 23:34:31 +0100 <lambdabot> error: Variable not in scope: eitherToMaybe
2022-12-22 23:34:35 +0100 <mauke> :-(
2022-12-22 23:35:30 +0100 <geekosaur> `either (const Nothing) Just . try`
2022-12-22 23:38:28 +0100Guest3017(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
2022-12-22 23:38:32 +0100Kaiepi(~Kaiepi@108.175.84.104)
2022-12-22 23:43:18 +0100cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2022-12-22 23:49:37 +0100Sgeo(~Sgeo@user/sgeo)
2022-12-22 23:50:11 +0100taeaad(~taeaad@user/taeaad) (Ping timeout: 260 seconds)
2022-12-22 23:53:49 +0100nek0(~nek0@2a01:4f8:222:2b41::12) (Quit: The Lounge - https://thelounge.chat)
2022-12-22 23:59:08 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)