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