Home liberachat/#haskell: Logs Calendar

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

00:00:46 freeside joins (~mengwong@103.252.202.159)
00:01:20 opticblast joins (~Thunderbi@secure-165.caltech.edu)
00:03:08 × shapr quits (~user@68.54.166.125) (Ping timeout: 272 seconds)
00:04:27 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
00:04:56 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
00:06:57 moonsheep joins (~user@user/moonsheep)
00:07:27 <moonsheep> why isn't `sequence $ repeat <some IO action>` lazy?
00:07:41 <moonsheep> <some IO action> in this case reads from a stream
00:07:55 × xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 252 seconds)
00:08:12 <moonsheep> ideally I'd like to be able to `decodeUtf8 . fromChunks` it to get a lazy text that reads from the stream as needed
00:08:16 <moonsheep> is that even possible?
00:08:35 <monochrom> IO's >>= and <*> are not "lazy". sequence uses them.
00:08:46 × libertyprime quits (~libertypr@122-62-152-173-adsl.sparkbb.co.nz) (Ping timeout: 268 seconds)
00:09:00 <moonsheep> is there some other way to accomplish what I described?
00:09:00 <monochrom> If you understand unsafeInterleaveIO, it can help.
00:09:11 <moonsheep> hmm, unsafe is always scary
00:09:39 <monochrom> Then that's why people invented streaming libraries.
00:09:51 <moonsheep> oh looking at the docs it looks exactly like what I need
00:09:55 xff0x joins (~xff0x@2405:6580:b080:900:8b77:1c0d:bc0b:8fad)
00:09:56 <moonsheep> monochrom: I heard about conduit
00:10:03 <moonsheep> is it worth looking into?
00:11:40 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
00:16:47 × dextaa quits (~DV@user/dextaa) (Ping timeout: 256 seconds)
00:17:23 × zeenk quits (~zeenk@2a02:2f04:a110:ac00::7fe) (Quit: Konversation terminated!)
00:17:30 libertyprime joins (~libertypr@122-62-152-173-adsl.sparkbb.co.nz)
00:17:46 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
00:19:01 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
00:19:07 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:21:20 cheater_ joins (~Username@user/cheater)
00:21:26 × moonsheep quits (~user@user/moonsheep) (Ping timeout: 252 seconds)
00:23:15 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
00:23:15 cheater_ is now known as cheater
00:23:26 shapr joins (~user@68.54.166.125)
00:23:40 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 265 seconds)
00:24:23 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
00:25:35 × libertyprime quits (~libertypr@122-62-152-173-adsl.sparkbb.co.nz) (Ping timeout: 260 seconds)
00:27:33 dextaa joins (~DV@user/dextaa)
00:28:14 × lewisje quits (~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f) (Read error: Connection reset by peer)
00:28:39 lewisje joins (~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f)
00:32:10 <dsal> I've found conduit to be pretty handy in a couple of areas.
00:35:14 freeside joins (~mengwong@103.252.202.159)
00:38:23 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
00:42:04 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
00:42:19 <jackdk> I find conduit handy for simple stuff, and frustrating for nontrivial stuff. `streaming` is the library I like the best, at the moment.
00:44:03 scoopahdoopah joins (~quassel@050-089-109-059.res.spectrum.com)
00:47:45 freeside joins (~mengwong@103.252.202.159)
00:48:18 troydm joins (~troydm@user/troydm)
00:52:32 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
00:57:08 pragma- parts (~chaos@user/pragmatic-chaos) (Bye!)
00:58:24 <eldritchcookie[4> i am lazy so i want to template haskell my way to binding allegro5 is there already a program to generate ADTs and storable instances from a C header file or should i write my own?
01:00:22 <Hecate> hs2c I guess?
01:00:50 <geekosaur> do you mean c2hs?
01:00:56 <geekosaur> there's also hsc2hs
01:02:41 <maerwald[m]> jackdk: tried streamly?
01:03:20 × tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
01:03:56 <Hecate> erm yes I mean hsc2hs
01:05:01 freeside joins (~mengwong@103.252.202.159)
01:05:38 <geekosaur> c2hs actually sounds closer since it works from struct definitions, whereas hsc2hs requires you to manually write the #peek and #poke annotations
01:05:51 panovia joins (~user@user/siracusa)
01:06:47 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
01:07:09 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
01:07:26 <eldritchcookie[4> c2hs sounds like it would do what i want
01:15:08 libertyprime joins (~libertypr@122-62-152-173-adsl.sparkbb.co.nz)
01:16:29 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
01:16:29 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
01:16:29 wroathe joins (~wroathe@user/wroathe)
01:20:39 king_gs joins (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60)
01:20:54 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
01:20:59 × xff0x quits (~xff0x@2405:6580:b080:900:8b77:1c0d:bc0b:8fad) (Ping timeout: 246 seconds)
01:22:08 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
01:22:31 × libertyprime quits (~libertypr@122-62-152-173-adsl.sparkbb.co.nz) (Quit: leaving)
01:24:01 <Las[m]> geekosaur @geekosaur:libera.chat: FWIW I still haven't given up on making waymonad, but I'm planning to do it through a C-generating eDSL (hence the nonactivity).
01:24:58 × Inst quits (~Inst@2601:6c4:4081:54f0:497e:5356:95d7:76d0) (Ping timeout: 260 seconds)
01:26:48 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
01:27:28 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
01:29:01 jbalint joins (~jbalint@071-090-119-177.res.spectrum.com)
01:29:07 <jbalint> hi!
01:34:47 <geekosaur> Las[m], Clint and oldfashionedcow (who seems to have left) were the ones asking about waymonad
01:36:12 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:38:22 × natechan quits (~nate@98.45.169.16) (Read error: Connection reset by peer)
01:42:18 <jackdk> maerwald[m]: I used it once until their file-watcher utilities changed semantics in a minor version update and broke the program using it. Ripped it out and never looked back.
01:44:51 <maerwald[m]> jackdk: have a reference to that issue?
01:45:32 natechan joins (~nate@98.45.169.16)
01:45:58 × tstat quits (~tstat@user/tstat) (Quit: ZNC 1.8.2 - https://znc.in)
01:46:52 cheater_ joins (~Username@user/cheater)
01:49:00 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
01:49:06 cheater_ is now known as cheater
02:08:13 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
02:08:54 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:15:20 × king_gs quits (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60) (Quit: king_gs)
02:15:36 king_gs joins (~Thunderbi@187.201.110.169)
02:21:06 <jackdk> maerwald[m]: no, sorry. it was on an internal work codebase, and the PR that fixed it doesn't seem to have upstream links.
02:23:24 × king_gs quits (~Thunderbi@187.201.110.169) (Quit: king_gs)
02:23:43 king_gs joins (~Thunderbi@187.201.110.169)
02:24:52 freeside joins (~mengwong@103.252.202.159)
02:25:25 <maerwald[m]> jackdk: it sounds like one of those issues that can turn a user easily into a unabomber. There's a cabal/PVP discussion about this too (semantic vs API breaking changes)
02:26:35 <maerwald[m]> https://github.com/haskell/pvp/issues/10
02:27:04 × mizlan quits (~mizlan@2607:f010:2a7:1005:992c:24ef:1df6:234d) (Ping timeout: 252 seconds)
02:27:12 <maerwald[m]> x-compatibility: 1.2.3 semantically-incompatible-with <1.2.3
02:27:21 <maerwald[m]> You'd have such an annotation
02:27:49 <jackdk> It looks like file watching didn't have macOS support, and the version that added it changed semantics on GNU/Linux in a way that we cared about.
02:28:13 <maerwald[m]> But given most people don't understand current PVP, I'm not sure making it more complicated is gonna improve anything
02:29:35 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 264 seconds)
02:31:20 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
02:43:42 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Ping timeout: 252 seconds)
02:44:10 freeside joins (~mengwong@103.252.202.159)
02:45:55 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
02:50:30 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 255 seconds)
02:54:04 thongpv87 joins (~thongpv87@2402:9d80:32b:7272:7f5b:d81b:366:9ae0)
02:54:39 × thongpv quits (~thongpv87@2402:9d80:300:8c21:d979:8534:70e1:1f79) (Read error: Connection reset by peer)
02:55:20 jero98772 joins (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb)
02:57:14 × codaraxis quits (~codaraxis@user/codaraxis) (Ping timeout: 255 seconds)
03:00:59 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Quit: WeeChat 3.7.1)
03:01:18 × king_gs quits (~Thunderbi@187.201.110.169) (Quit: king_gs)
03:01:35 king_gs joins (~Thunderbi@187.201.110.169)
03:01:51 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
03:03:04 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb) (Remote host closed the connection)
03:06:26 × td_ quits (~td@83.135.9.52) (Ping timeout: 252 seconds)
03:08:08 td_ joins (~td@83.135.9.5)
03:13:16 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
03:13:41 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
03:18:48 thebinary joins (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106)
03:20:14 × thebinary quits (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106) (Quit: Quit)
03:22:00 × king_gs quits (~Thunderbi@187.201.110.169) (Read error: Connection reset by peer)
03:22:14 thebinary joins (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106)
03:22:33 king_gs joins (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60)
03:22:36 × thebinary quits (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106) (Client Quit)
03:22:57 thebinary joins (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106)
03:23:12 × thebinary quits (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106) (Client Quit)
03:23:33 dsrt^ joins (~dsrt@76.145.190.81)
03:24:19 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
03:24:19 thebinary joins (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106)
03:24:59 × thebinary quits (~thebinary@2400:1a00:b040:c75d:49ce:d73:4888:8106) (Client Quit)
03:28:24 × hsw quits (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Quit: Leaving)
03:34:03 <iqubic> jackdk: What cool non-trivial things can the Streaming library do?
03:34:25 × thongpv87 quits (~thongpv87@2402:9d80:32b:7272:7f5b:d81b:366:9ae0) (Read error: Connection reset by peer)
03:35:17 <iqubic> Is there a good list of cool tricks that I can view?
03:36:09 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
03:37:37 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
03:38:42 bilegeek joins (~bilegeek@2600:1008:b05b:157a:804b:6590:a15:d230)
03:42:34 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat)
03:43:57 terrorjack joins (~terrorjac@2a01:4f8:1c1e:4e8c::)
03:47:38 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
03:57:25 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:57:25 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:57:25 finn_elija is now known as FinnElija
03:59:00 freeside joins (~mengwong@103.252.202.159)
03:59:11 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
04:03:48 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
04:09:08 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
04:16:38 × king_gs quits (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60) (Ping timeout: 265 seconds)
04:19:09 × bilegeek quits (~bilegeek@2600:1008:b05b:157a:804b:6590:a15:d230) (Quit: Leaving)
04:20:53 × thegeekinside quits (~thegeekin@189.217.82.244) (Read error: Connection reset by peer)
04:21:37 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
04:22:15 azimut joins (~azimut@gateway/tor-sasl/azimut)
04:27:45 freeside joins (~mengwong@103.252.202.159)
04:30:16 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
04:30:49 alfonsox joins (~quassel@103.87.57.133)
04:34:42 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:35:52 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
04:38:43 underlap joins (~user@213.31.186.20)
04:53:01 mbuf joins (~Shakthi@49.204.130.123)
04:53:56 <jackdk> I'm only aware of the haddocks, you should see if a web search turns up anything neat
04:55:21 × son0p quits (~ff@2604:3d08:5b7f:5540:98a9:2169:15a1:4c7f) (Read error: Connection reset by peer)
04:55:44 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 272 seconds)
04:58:42 sadmax joins (~user@64.130.91.66)
05:00:38 × underlap quits (~user@213.31.186.20) (Remote host closed the connection)
05:02:04 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds)
05:02:26 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
05:03:02 × finsternis quits (~X@23.226.237.192) (Remote host closed the connection)
05:03:47 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
05:06:37 instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net)
05:07:45 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
05:09:40 × segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds)
05:10:56 × instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
05:12:42 thongpv joins (~thongpv87@103.199.22.65)
05:13:45 <iqubic> It should be possible to have an infinite stream, yeah?
05:14:54 <iqubic> cycle :: Stream (Of a) m r
05:15:01 <iqubic> cycle xs = let loop = each xs >> loop in loop
05:15:30 <iqubic> Erm... "cycle :: Foldable f => f a -> Stream (Of a) m r"
05:15:32 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
05:15:40 <iqubic> And repeat should be similar.
05:15:44 × sadmax quits (~user@64.130.91.66) (Ping timeout: 260 seconds)
05:15:57 <iqubic> I know that typechecks, but are streams lazy enough to allow that?
05:17:12 × thongpv quits (~thongpv87@103.199.22.65) (Read error: Connection reset by peer)
05:18:42 biberu joins (~biberu@user/biberu)
05:20:55 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:28:13 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
05:29:19 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
05:29:55 ec_ joins (~ec@gateway/tor-sasl/ec)
05:38:00 Inst joins (~Inst@2601:6c4:4081:54f0:acb5:9108:b4c2:bb2d)
05:44:14 × Inst quits (~Inst@2601:6c4:4081:54f0:acb5:9108:b4c2:bb2d) (Ping timeout: 246 seconds)
05:50:27 titibandit1 joins (~titibandi@xdsl-87-78-235-220.nc.de)
06:05:16 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
06:10:34 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
06:21:47 <Profpatsch> Can I derive Show for something like data Foo f = Foo { a :: f Int }
06:22:08 <glguy> You can implement it, but you can't derive it with a standard derive clause
06:22:15 <Profpatsch> i.e. “if forall a. Show (f a) then Show Foo”
06:22:19 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 252 seconds)
06:22:37 Inst joins (~Inst@2601:6c4:4081:54f0:e9bd:b9a0:edd8:a4)
06:22:43 Lycurgus joins (~juan@user/Lycurgus)
06:22:44 <Profpatsch> glguy: eh, that’s kinda annoying
06:22:47 <glguy> This is what https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Functor-Classes.html#t:Show1 is for
06:23:08 <Profpatsch> I just want this record to have some fields that are optional in some situations
06:23:09 <glguy> There's probably some GHC.Generics or Template Haskell-based deriving code somewhere you could use
06:23:20 <Profpatsch> i.e. (Const ())
06:23:44 <glguy> You might be able to do it with standalone deriving
06:24:17 <jackdk> Profpatsch: `deriving instance (forall a . Show (f a)) => Show (Foo f)` with `-XStandaloneDeriving` `-XQuantifiedConstraints` and `-XUndecidableInstances`
06:24:30 <Profpatsch> jackdk: Ah! Thanks, I was wondering where the forall would go
06:24:32 <glguy> deriving instance Show (f Int) => Show (Foo f)
06:24:34 <Profpatsch> But great to see that it works
06:24:37 <glguy> You don't need -XQuantifiedConstraints though
06:24:45 <glguy> that ends up being more general than you need
06:25:00 <Profpatsch> glguy: My actual type has like 3 fields
06:25:12 <glguy> you still don't need it
06:25:40 <glguy> It might not matter for most types you pick, but it could make it harder
06:25:43 <glguy> in general
06:26:57 <Profpatsch> glguy: How would I do it without Quantified constrains?
06:27:04 <glguy> like I said above
06:27:07 <Profpatsch> You mean just put every type that has an f in the contraints?
06:27:24 <glguy> yeah, you only need the instance to work for the types you happen to apply f to, not all types
06:27:48 <Profpatsch> ic
06:28:02 <Profpatsch> Would QuantifiedConstraints potentially lead to bad error messages?
06:29:43 <glguy> I'm not sure. It had some issues when it was introduced and I've avoided it and never actually needed it
06:29:52 <jackdk> glguy: is that because it then looks for an instance `Show (f a)` rather than individual `Show (f A1), Show (f A2), ...` that appear in the type?
06:30:03 <glguy> yes
06:31:29 <glguy> It's probably fine by now. I don't have current information about the feature's stability. I'm just inclined to use the least power I need in general
06:31:47 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 260 seconds)
06:36:47 mei joins (~mei@user/mei)
06:37:54 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
06:40:39 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
06:42:12 × inversed quits (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 268 seconds)
06:42:17 king_gs joins (~Thunderbi@187.201.110.169)
06:43:17 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:43:19 <Profpatsch> I’m fairly certain that “requirement” of mine here is not actually required now that I think about it :)
06:43:23 <Profpatsch> But good to know it’s possible.
06:48:56 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
06:49:47 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 248 seconds)
06:51:58 Xeroine joins (~Xeroine@user/xeroine)
07:01:46 × king_gs quits (~Thunderbi@187.201.110.169) (Read error: Connection reset by peer)
07:01:53 king_gs1 joins (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60)
07:04:11 king_gs1 is now known as king_gs
07:05:10 kenran joins (~user@user/kenran)
07:08:49 × kenran quits (~user@user/kenran) (Remote host closed the connection)
07:09:31 razetime joins (~Thunderbi@117.254.35.63)
07:12:10 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds)
07:13:52 Xeroine joins (~Xeroine@user/xeroine)
07:14:03 mei_ joins (~mei@user/mei)
07:14:34 kuttenbrunzer joins (~kuttenbru@2a02:8108:8b80:1d48:b9d5:86dd:1cf3:3f55)
07:15:38 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
07:17:20 × mei quits (~mei@user/mei) (Ping timeout: 255 seconds)
07:18:47 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
07:19:39 freeside joins (~mengwong@202.161.55.11)
07:22:52 jakalx parts (~jakalx@base.jakalx.net) ()
07:23:24 ec_ joins (~ec@gateway/tor-sasl/ec)
07:23:44 jakalx joins (~jakalx@base.jakalx.net)
07:29:00 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 272 seconds)
07:29:16 × mbuf quits (~Shakthi@49.204.130.123) (Quit: Leaving)
07:29:37 freeside_ joins (~mengwong@122.11.248.245)
07:30:39 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
07:30:56 × freeside quits (~mengwong@202.161.55.11) (Ping timeout: 246 seconds)
07:37:07 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
07:46:43 × troydm quits (~troydm@user/troydm) (Ping timeout: 256 seconds)
07:47:54 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
07:49:08 ec_ joins (~ec@gateway/tor-sasl/ec)
07:50:39 × razetime quits (~Thunderbi@117.254.35.63) (Ping timeout: 260 seconds)
07:54:57 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
07:58:07 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Remote host closed the connection)
07:58:25 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
07:59:03 lortabac joins (~lortabac@2a01:e0a:541:b8f0:99e2:5073:3680:2efe)
08:01:43 razetime joins (~Thunderbi@117.254.35.63)
08:01:51 × king_gs quits (~Thunderbi@2806:103e:29:45ac:af0:afaf:29e7:dd60) (Quit: king_gs)
08:05:52 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
08:08:22 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:08:38 thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1)
08:10:23 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
08:10:24 allbery_b joins (~geekosaur@xmonad/geekosaur)
08:10:26 allbery_b is now known as geekosaur
08:10:45 <thyriaen> how can i get my hands on an rpm package of xmonad 17.1 ?
08:12:19 <thyriaen> how fucked will my system be if i install an openSUSE rpm on my fedora setup ?
08:13:14 <geekosaur> unlikely to even install. there used to be some compatibility but it went away long ago
08:13:24 <thyriaen> ok :p
08:14:22 <thyriaen> do i need 170.1 or is 17.0.3 enough to fix the transparent border issue ?
08:15:52 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
08:15:58 <geekosaur> there is no 0.17.0.3 on our side; I assume that's a fedora release modifier
08:16:12 <geekosaur> and as such I have no idea what modifications they might have made
08:16:31 <thyriaen> ok
08:16:47 cheater joins (~Username@user/cheater)
08:20:13 <geekosaur> doesn't look like rawhide has any patches applied
08:23:09 <geekosaur> yeh, no patches and in particular no changes to te border; 0.17.0-3 was just a rebuild due to dependencies
08:25:02 <VOID[m]> in code like this:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/ca5811105d3e4eb28f3ec51a57d3f3adbd0d422b>)
08:25:13 <VOID[m]> * in code like this:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/c443b344a5a1b40032f78c57f9a69069efc3ba55>)
08:27:04 <geekosaur> I don't understand "unpack"
08:27:30 × scoopahdoopah quits (~quassel@050-089-109-059.res.spectrum.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:27:40 mizlan joins (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569)
08:28:46 <VOID[m]> example usage would be `longest Sum (\(Sum x) -> x `mod` 3 == 0) someArr`. I want to change `longest` so that I don't have to do `\(Sum x) -> ...`, just ` \x -> ...`
08:28:59 <VOID[m]> s/`/\`/, s/`/\`/
08:29:04 <VOID[m]> * example usage would be `longest Sum (\(Sum x) -> x \\`mod\` 3 == 0) someArr`. I want to change `longest`so that I don't have to do`(Sum x) -> ...`, just ` \\x -> ...\`
08:29:16 <VOID[m]> * example usage would be `longest Sum (\(Sum x) -> x 'mod' 3 == 0) someArr`. I want to change `longest`so that I don't have to do`(Sum x) -> ...`, just ` \\x -> ...\`
08:29:33 <VOID[m]> * example usage would be `longest Sum (\(Sum x) -> x 'mod' 3 == 0) someArr`. I want to change `longest`so that I don't have to do`(Sum x) -> ...`, just ` \x -> ...`
08:29:47 nut joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
08:29:54 <VOID[m]> * example usage would be `longest Sum (\(Sum x) -> x 'mod' 3 == 0) someArr`. I want to change `longest`so that I don't have to do`\(Sum x) -> ...`, just ` \x -> ...`
08:30:11 <geekosaur> ugh, matrix edits are really annoying IRC-side
08:30:21 <VOID[m]> I am sooooo sorry, I forgot about that ;_;
08:31:23 <VOID[m]> anyway, example usage would be `longest Sum (\(Sum x) -> x 'mod' 3 == 0) someArr`. I want to change `longest`so that I don't have to do`\(Sum x) -> ...`, just ` \x -> ...`
08:32:05 × mizlan quits (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569) (Ping timeout: 260 seconds)
08:34:44 <geekosaur> https://paste.tomsmeding.com/prqdaCIb I think I got that right
08:35:13 <geekosaur> basically forced the Sum newtype, you're out of luck if you want a different one
08:35:55 <VOID[m]> So if I want it to work for any monoid, I am out of luck? That's a shame
08:36:17 <geekosaur> that's why you need the wrapper
08:36:26 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
08:36:38 Feuermagier joins (~Feuermagi@user/feuermagier)
08:37:00 <geekosaur> numbers have two primary monoids, Sum and Product; you need the wrapper to pick one
08:38:50 × califax quits (~califax@user/califx) (Remote host closed the connection)
08:39:55 califax joins (~califax@user/califx)
08:40:05 <geekosaur> (and that's ignoring the ones like Min, Max, etc.)
08:41:03 × titibandit1 quits (~titibandi@xdsl-87-78-235-220.nc.de) (Remote host closed the connection)
08:45:09 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:46:46 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
08:47:56 <mauke> > Sum 5 `mod` 3
08:48:00 <lambdabot> error:
08:48:00 <lambdabot> • No instance for (Integral (Sum Integer))
08:48:00 <lambdabot> arising from a use of ‘e_153’
08:48:06 <mauke> I see
08:48:13 zeenk joins (~zeenk@2a02:2f04:a110:ac00::7fe)
08:48:34 acidjnk joins (~acidjnk@p200300d6e715c44040ccabc07de96856.dip0.t-ipconnect.de)
08:49:38 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
08:51:36 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
08:52:16 MajorBiscuit joins (~MajorBisc@c-001-028-012.client.tudelft.eduvpn.nl)
08:53:36 avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32)
08:54:17 <mauke> this whole function confuses me
08:54:34 <mauke> why is it the last element only that determines whether longest returns Just or Nothing?
08:56:31 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:57:47 <VOID[m]> Ok, so the thing I was doing
08:58:05 <VOID[m]> Is from array of digits making longest number dividable by 3
08:58:07 × alfonsox quits (~quassel@103.87.57.133) (Ping timeout: 252 seconds)
08:59:23 <VOID[m]> With that `longest` function,... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/c349ca6062c2082b3d93825da570ab85c1a5c738>)
08:59:39 <VOID[m]> *biggest number, not longest
09:00:29 <VOID[m]> So the Nothing gets returned if there is no sequence that matches the rule
09:00:31 mechap1 joins (~mechap@user/mechap)
09:00:57 × xsarnik quits (xsarnik@lounge.fi.muni.cz) (Quit: Ping timeout (120 seconds))
09:00:57 × xstill_ quits (xstill@fimu/xstill) (Quit: Ping timeout (120 seconds))
09:01:01 <mauke> no, the Nothing gets returned if there is no sequence that 1. matches the rule and 2. includes the last element
09:01:10 xsarnik joins (xsarnik@lounge.fi.muni.cz)
09:01:34 xstill_ joins (xstill@fimu/xstill)
09:03:32 × mechap quits (~mechap@user/mechap) (Ping timeout: 255 seconds)
09:04:25 <mauke> > maximum . sortBy (flip compare) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) $ [0 .. 9]
09:04:26 <lambdabot> [9]
09:06:18 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
09:06:47 <VOID[m]> I probably explained badly :P
09:06:47 <VOID[m]> `[1,3,4,1,2]` -> biggest number dividable by 3 composed of those digits is `4311`
09:06:59 <VOID[m]> this is what my program calculates
09:08:01 <VOID[m]> if there is such number possible, the longest will return Nothing (eg for [1,4])
09:10:32 <mauke> no, it calculates 321
09:10:34 cfricke joins (~cfricke@user/cfricke)
09:10:53 <mauke> it can't return 4311 because that doesn't include the last digit, 2
09:13:43 <VOID[m]> mauke: oh, you're right
09:14:25 <mauke> > maximum . sortBy (flip compare) . map (sortBy (flip compare)) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) $ [0 .. 7]
09:14:28 <lambdabot> [7,6,5,4,3,2,0]
09:16:52 <merijn> sortBy flip compare is just a less efficient "sortOn Down", no?
09:16:53 <mauke> > maximum . sortBy (flip compare) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) $ [4, 3 .. 0]
09:16:55 <lambdabot> [4,3,2,0]
09:17:12 <mauke> is it less efficient?
09:17:17 × zeenk quits (~zeenk@2a02:2f04:a110:ac00::7fe) (Remote host closed the connection)
09:17:37 <merijn> Certainly in terms of characters typed ;)
09:17:38 zeenk joins (~zeenk@2a02:2f04:a110:ac00::fba)
09:18:44 <VOID[m]> mauke: ok, you found a bug in mine, thanks, but yours still doesn't return correctly?
09:19:01 <VOID[m]> > maximum . sortBy (flip compare) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) $ [1,3,4,3,1,2]
09:19:02 <mauke> but Down costs another full import
09:19:04 <lambdabot> [4,3,2]
09:19:17 <mauke> you need to sort the input list first
09:19:20 <VOID[m]> for [1,3,4,3,1,2] answer would be 43311
09:19:40 <VOID[m]> > maximum . sortBy (flip compare) . filter (\xs -> sum xs mod 3 == 0) . filterM (return [True, False]) $ sort [1,3,4,3,1,2]
09:19:42 <lambdabot> error:
09:19:42 <lambdabot> • No instance for (Num
09:19:42 <lambdabot> ((Integer -> Integer -> Integer) -> Integer -> Inte...
09:19:55 <mauke> > maximum . sortBy (flip compare) . filter (\xs -> sum xs mod 3 == 0) . filterM (return [True, False]) . sortOn Down $ [1,3,4,3,1,2]
09:19:57 <lambdabot> error:
09:19:57 <mauke> heh
09:19:57 <lambdabot> • No instance for (Num
09:19:57 <lambdabot> ((Integer -> Integer -> Integer) -> Integer -> Inte...
09:20:03 <mauke> that's what I get for copy/pasting
09:20:25 <mauke> > maximum . sortBy (flip compare) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) . sortOn Down $ [1,3,4,3,1,2]
09:20:27 <lambdabot> [4,3,3,2]
09:20:37 <VOID[m]> that still isn't correct....
09:20:43 <mauke> also, yeah
09:20:47 <mauke> you're right. the algorithm is just wrong
09:21:58 <mauke> ... which you can tell just by looking at maxmimum . sortBy, which makes no goshdarn sense
09:23:24 <mauke> > maximumBy (comparing length) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) . sortOn Down $ [1,3,4,3,1,2]
09:23:26 <lambdabot> [4,3,3,1,1]
09:23:39 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
09:23:58 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
09:25:29 <VOID[m]> is that optimal thanks to laziness?
09:25:49 <VOID[m]> Like, are you not generating all combinations?
09:26:29 <mauke> no, that's brute force (and probably algorthmically bad brute force thanks to comparing length)
09:26:30 <VOID[m]> > maximumBy (comparing length) . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) . sortOn Down $ [1,3,4,3,1,2,7]
09:26:32 <lambdabot> [7,4,3,3,2,1,1]
09:27:19 <mauke> a smart algorithm would probably start by creating three buckets (modulo 3)
09:30:17 justReddy is now known as justache
09:31:33 <VOID[m]> How does filterM (return [True, False]) generate all combinations ;_;
09:35:10 <mauke> for every element, it both includes (True) and doesn't include (False) it
09:35:49 <mauke> and by "both" I mean it creates parallel universes for each case
09:35:54 <mauke> the result is the list of all universes
09:36:58 <mauke> also, that return is there just to break your brain. it's actually from a different monad and unrelated to filterM
09:37:25 <mauke> where different monad = ((->) e), so `return = const` here
09:37:28 × kuttenbrunzer quits (~kuttenbru@2a02:8108:8b80:1d48:b9d5:86dd:1cf3:3f55) (Quit: Leaving)
09:37:34 <VOID[m]> Oh wow
09:46:12 <VOID[m]> I almost get it XD
09:46:12 <VOID[m]> Monads can be hard af to get ;_;
09:46:53 <mauke> this is the multiverse monad (also known as [])
09:47:02 <[exa]> ok I have to say that `filterM (pure [True,False])` is one heck of a reader exploit :D
09:49:06 <[exa]> VOID[m]: a good introductory exercise for that kind of stuff was (for me) explaining why `(drop 3 "hello") <> (take 3 "hello")` is the same as `(drop 3 <> take 3) "hello"` and also as `(drop <> take) 3 "hello"` (as a bonus there are only monoids)
09:49:53 <VOID[m]> I did use [] to represent all possible results, it's just that here it's a list inside of list and they are kinda mixing for me... It's weird that it creates all possible results and not 2 - with all values and with none
09:51:12 <mauke> @src filterM
09:51:12 <lambdabot> Source not found. I am sorry.
09:52:03 <xerox> ilterM p = foldr (\x -> liftA2 (\flg -> if flg then (x:) else id) (p x)) (pure [])
09:52:07 chele joins (~chele@user/chele)
09:53:31 <mauke> `filterM _ [] = return []; filterM p (x : xs) = do { ok <- p x; rest <- filterM p xs; return (if ok then x : rest else rest) }`
09:53:55 <mauke> I hope I did that right
09:54:14 <mauke> anyway, each of those `<-` represents nested iteration
09:54:18 <VOID[m]> [exa]: I am in the first third of the category theory book, and I am pretty sure I saw a proof for that, but I'll definitely be re-reading that before I go forward, because it was quite demanding read :P
09:55:37 <VOID[m]> mauke: Oh that is good, I get that
09:56:36 <VOID[m]> the `foldr`/`liftA2` version is way harder. I know the functions used, I just don't really "feel" it, if that makes sense...
09:56:59 nschoe joins (~q@2a01:e0a:8e:a190:6769:fe09:b700:dd6)
09:57:23 <mauke> `filterM _ [] = return []; filterM p (x : xs) = do { ok <- p x; rest <- filterM p xs; pure ((if ok then (x :) else id) rest) }`
09:57:34 <mauke> (one step closer to the other version)
09:57:45 <[exa]> VOID[m]: you actually don't need much CT for that, just trace how it finds which Monoid instance to use
09:59:09 <VOID[m]> With monads category theory helped with getting them a lot, and I didn't even get to the specific chapter on them yet
09:59:28 teo joins (~teo@user/teo)
09:59:31 <mauke> `filterM _ [] = return []; filterM p (x : xs) = do { liftA2 (\ok rest -> (if ok then (x :) else id) rest) (p x) (filterM p xs) }`
10:00:03 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
10:00:04 <mauke> `filterM _ [] = return []; filterM p (x : xs) = liftA2 (\ok rest -> (if ok then (x :) else id) rest) (p x) (filterM p xs)`
10:00:39 <mauke> `filterM _ [] = return []; filterM p (x : xs) = liftA2 (\ok -> if ok then (x :) else id) (p x) (filterM p xs)`
10:01:26 <mauke> and that's basically straight recursion over lists with a fold
10:02:00 <mauke> oh, and that first return should also be pure
10:03:09 <mauke> anyway, that's how you can derive xerox's version (which is the one actually used in the library)
10:03:23 <VOID[m]> your second version has a bug, doesn't it? ((if ok then (x :) else id) rest)
10:03:54 <mauke> how so?
10:03:54 <VOID[m]> OH I see
10:03:54 <VOID[m]> OH
10:04:10 <VOID[m]> if returning a function 🤦
10:04:16 <VOID[m]> it makes sense, I just never saw it
10:04:32 [exa] sees `bool id (x:)`
10:04:49 <mauke> yeah, the idea is that you have rest in both branches, and you want to pull it out
10:05:53 <mauke> `if ok then x : rest else rest` ==> `if ok then (\rest -> x : rest) rest else (\rest -> rest) rest` ==> `(if ok then (\rest -> x : rest) else (\rest -> rest)) rest`
10:06:25 <mauke> "pulling out" a variable leaves an expression with a hole, which you can represent as a lambda
10:07:20 <VOID[m]> yee, I got it when I realised you're returning a function
10:09:09 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds)
10:09:12 <VOID[m]> mauke: ok, I get it, that helps very much, thanks <3
10:09:24 <mauke> you're welcome :-)
10:17:13 trev joins (~trev@user/trev)
10:19:11 gtdg joins (~gtdg@user/gtdg)
10:19:45 azimut joins (~azimut@gateway/tor-sasl/azimut)
10:21:04 × natechan quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
10:23:22 Wstfgl0 joins (~Me-me@146.102.215.218.dyn.iprimus.net.au)
10:23:24 troydm joins (~troydm@user/troydm)
10:24:30 comerijn joins (~merijn@86-86-29-250.fixed.kpn.net)
10:24:38 <mauke> VOID: https://paste.tomsmeding.com/uF8QzVbn
10:27:24 <mauke> argh, you could probably avoid splitMod and use a simple splitAt 3 instead if you sort the numbers in ascending order initially
10:27:27 × merijn quits (~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
10:27:38 <mauke> ah, no. that doesn't work :-D
10:33:11 <VOID[m]> I wrote tests, and the bruteforce approach has a bug too ;)
10:33:12 <VOID[m]> turns out length is not everything :P
10:33:31 <VOID[m]> `[1,4,2,9]` -> `921`, but `942` is bigger and dividable
10:33:56 <VOID[m]> I'd convert to numbers and then just find max
10:35:14 <mauke> alternatively, `maximumBy (comparing length <> compare)`
10:36:02 <VOID[m]> I fixed by doing `brute = maximum . map arrToNum . filter (\xs -> sum xs `mod` 3 == 0) . filterM (return [True, False]) . sortOn Down`, where `arrToNum` changes digits to num (eg `[1,2,3]` into `123`)
10:36:30 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
10:37:02 ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:8fe2:4556:60ef:ba4c)
10:37:36 × Wstfgl0 quits (~Me-me@146.102.215.218.dyn.iprimus.net.au) (Remote host closed the connection)
10:38:19 × Me-me quits (~me-me@user/me-me) (Remote host closed the connection)
10:39:30 Me-me joins (~me-me@2602:ff16:3:0:1:dc:beef:d00d)
10:43:34 × freeside_ quits (~mengwong@122.11.248.245) (Ping timeout: 260 seconds)
10:43:54 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
10:46:04 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
10:46:52 __monty__ joins (~toonn@user/toonn)
10:47:38 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
10:47:51 <eldritchcookie[4> how are the poke and peek macros of hsc2hs implemented? using theses macros is mostly boilerplate that can and should be automated and even generating the c glue code could feasibly be automated
10:48:14 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
10:52:21 <mauke> https://github.com/haskell/hsc2hs/blob/master/data/template-hsc.h#L80-L86
10:56:00 <comerijn> eldritchcookie[4: They generate C code that compiles and prints out the offsets of the relevant structs
10:56:05 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
10:56:22 xff0x joins (~xff0x@2405:6580:b080:900:86c4:71c7:793f:fbf7)
11:00:02 <Inst> hahahaha
11:00:05 <Inst> sorry, excuse me
11:01:40 × sunarch quits (sid526836@user/sunarch) (Quit: Connection closed for inactivity)
11:04:51 × megeve quits (sid523379@2a03:5180:f:4::7:fc73) (Quit: Connection closed for inactivity)
11:05:38 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
11:05:45 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:99e2:5073:3680:2efe) (Ping timeout: 252 seconds)
11:05:57 Xeroine joins (~Xeroine@user/xeroine)
11:11:47 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
11:16:37 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
11:17:12 <jonathanx> I have a dsl modeled as an AST. I'm starting to implement algebras for evaluating the AST with recursion-schemes. One complication is that there are some values that flow from the root to the children, i.e. in the opposite direction compared to cata/histo (which flows from the leaves up). These values are relevant to other algebras the flow leaves->root. One way of handling this is to rearrange stuff so that the relevant data
11:17:12 <jonathanx> get set at each level of the AST when it gets built; but I'm not sure this is better than calculating it dynamically. Any ideas?
11:17:43 <jonathanx> *relevant to other algebras _that_ flow leaves->root
11:26:19 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
11:30:32 alfonsox joins (~quassel@103.87.57.80)
11:31:03 <[Leary]> jonathanx: This problem can generally be solved by folding down to a function type `rootToLeaf -> leafToRoot`.
11:32:59 × ubert1 quits (~Thunderbi@2a02:8109:abc0:6434:8fe2:4556:60ef:ba4c) (Quit: ubert1)
11:39:17 inversed joins (~inversed@bcdcac82.skybroadband.com)
11:40:16 <jonathanx> so "cata :: Recursive t => (Base t a -> a) -> t -> a" specialized to sth like "cata :: Recursive t => (Base t (t -> a) -> (t -> a)) -> t -> (t -> a)?
11:41:19 <jonathanx> I.. think that should work, but I'll have to wrap my head around it a bit
11:41:20 jmdaemon joins (~jmdaemon@user/jmdaemon)
11:41:43 <[Leary]> Not necessarily `t -> a`; the argument can be any data type carrying the information that needs to flow the other direction.
11:43:18 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat)
11:44:34 cheater_ joins (~Username@user/cheater)
11:44:40 terrorjack joins (~terrorjac@2a01:4f8:1c1e:4e8c::)
11:44:59 <jonathanx> right, thank you. That makes sense
11:45:26 <jonathanx> Very helpful, it would've taken me quite some time to figure this out myself :)
11:47:53 × cheater quits (~Username@user/cheater) (Ping timeout: 246 seconds)
11:47:59 cheater_ is now known as cheater
11:48:57 lortabac joins (~lortabac@88.125.6.227)
11:53:44 × jargon quits (~jargon@174-22-197-118.phnx.qwest.net) (Remote host closed the connection)
11:54:51 × lortabac quits (~lortabac@88.125.6.227) (Ping timeout: 268 seconds)
11:55:08 lortabac joins (~lortabac@2a01:e0a:541:b8f0:1373:23b5:b44f:8cd6)
11:55:42 freeside joins (~mengwong@122.11.214.81)
11:58:24 × freeside quits (~mengwong@122.11.214.81) (Read error: Connection reset by peer)
11:58:41 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
11:59:59 tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
12:01:35 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
12:01:39 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
12:02:15 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 268 seconds)
12:02:23 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
12:02:26 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
12:05:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:05:20 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
12:12:11 × thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Ping timeout: 264 seconds)
12:15:42 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
12:22:34 cheater joins (~Username@user/cheater)
12:38:04 × opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 252 seconds)
12:43:07 kavvadias joins (~kavvadias@2001:9e8:632b:3b00:dade:ffd6:cbe9:49d7)
12:51:13 <dminuoso> I wish String would have been a newtype rather than a type alias..
12:51:14 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
12:51:43 <dminuoso> And Im already refraining from my usual "text would have been the better choice"
12:54:05 <int-e> . o O ( Hi, 1998 here. What is this `text` you're talking about? )
12:54:24 × v0id_ptr quits (~adrift@user/ptr-frac7al/x-0038398) (Ping timeout: 255 seconds)
12:55:47 <kavvadias> hello everyone, im trying to find a way to get the elements of a list that are equal is there a function for that?
12:57:49 <geekosaur> > (group . sort) $ [1,4,2,6,1,7,6,4]
12:57:52 <lambdabot> [[1,1],[2],[4,4],[6,6],[7]]
13:00:21 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:00:46 <kavvadias> i tried to use groupBy because i want to check for this equality https://pastebin.com/FrCEeCNT but then how do i get rid of the ones that are not equal?
13:01:08 <kavvadias> the single lists
13:02:22 <geekosaur> > (filter ((/= 1) . length) . group . sort) $ [1,4,2,6,1,7,6,4]
13:02:24 <lambdabot> [[1,1],[4,4],[6,6]]
13:02:57 <geekosaur> (less smartassedly, `filter (\x -> length x /= 1)`)
13:03:29 <kavvadias> well the smartass way looks cool af tho
13:03:36 <kavvadias> thank you
13:03:44 × zachel quits (~zachel@user/zachel) (Remote host closed the connection)
13:05:51 <comerijn> that's an inefficient functions
13:06:06 <comerijn> running length just to check for 1 or no
13:06:07 <geekosaur> true, I considered using a Set instead
13:06:16 <geekosaur> and yes, that too
13:06:17 <eldritchcookie[4> if i use capi ffi type can i import macros?
13:06:20 <comerijn> Well, or just a standalone helper with pattern match
13:06:21 <geekosaur> yes
13:06:23 <comerijn> eldritchcookie[4: Yes
13:06:34 × razetime quits (~Thunderbi@117.254.35.63) (Ping timeout: 272 seconds)
13:06:35 <comerijn> that's, like, the main use case for capi :p
13:06:37 <geekosaur> there's an example in the CApiFFI docs
13:07:37 zachel joins (~zachel@user/zachel)
13:07:39 <eldritchcookie[4> how could i use https://devdocs.io/c/types/offsetof from haskell code?
13:08:16 <eldritchcookie[4> it receives a type and a member
13:11:27 <geekosaur> can't, since it receives a C type
13:12:13 <geekosaur> did c2hs not do what you wanted?
13:15:09 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:15:13 <geekosaur> to use something like offsetof, you'd need inline-c package
13:16:25 <geekosaur> and at that point you might as well just write the demarshaling in inline-c
13:16:36 califax joins (~califax@user/califx)
13:18:06 <eldritchcookie[4> no c2hs did not do what i wanted i wanted a program that from a c header file it generates haskell and c glue code automatically only needing some fixes because it couldn't be completed automated
13:18:57 × mei_ quits (~mei@user/mei) (Remote host closed the connection)
13:19:23 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:20:19 <mauke> https://github.com/haskell/c2hs/wiki/User-Guide
13:20:27 califax joins (~califax@user/califx)
13:20:43 mei_ joins (~mei@user/mei)
13:20:47 <Inst> I'm still trying to get my head around what Haskell actually is
13:21:16 <comerijn> Inst: Sounds like you're overthinking
13:21:24 <Inst> Me? Overthinking? No way! /s
13:21:50 <Inst> I'm having fun again, I'm not producing the results I'd like, but at least I've finally gotten GHCI to start messaging my postgresql db
13:22:20 <Hecate> nice
13:22:38 Guest64 joins (~Guest64@ext-1-497.eduroam.chalmers.se)
13:22:39 <Inst> Oh, Hecate, this is Liam, so...
13:22:41 <dminuoso> Oh, postgresql. I forgot to work on my library. :(
13:23:26 <Guest64> Hi! Is there some way to leave out the main-is field in my cabal file (for the executable target) and instead pass it in as an argument when I do cabal run <name-of-the-exe>?
13:23:28 <Guest64> Thanks
13:24:26 <geekosaur> you can have multiple executable sections and pick one with cabal-run
13:24:28 <comerijn> Guest64: No, because those are two separate things?
13:24:35 comerijn is now known as merijn
13:24:45 <geekosaur> it can't on-the-fly compile a different executable based on something you pick at runtime
13:25:24 <merijn> Guest64: I mean, it can and does on-the-fly compile executables based on the argument to run :p
13:25:30 <merijn> s/Guest64/geekosaur
13:25:46 <Inst> Haskell is a functional programming language wrapping a procedural programming language wrapping a functional programming language
13:25:53 <Guest64> I am developing (primarily) a library, and I have a couple of different example files. They each define a main
13:26:13 <Guest64> So there is no other workaround to quickly running my different example than to create different executables in the cabal file?
13:26:44 ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:4d13:78d1:f594:581a)
13:26:52 <geekosaur> cabal's not designed for that. runghc is, though
13:26:59 <Inst> I guess that's functional, since it's semirecursive
13:27:02 <geekosaur> cabal run runghc myMain.hs
13:27:11 <geekosaur> maybe
13:27:33 <geekosaur> er, cabal exec, not cabal run
13:28:17 <dminuoso> geekosaur: You could just do a simple https://gist.github.com/dminuoso/680dffafddae4e272f79e5bc4b0db2cc
13:28:18 <Guest64> Hm okay, I get the feeling that defining different executable targets in the cabal file is the least amount of work
13:28:24 <dminuoso> Oh sorry. I meant Guest64 ^-
13:28:41 <dminuoso> That one is even less work
13:28:44 <dminuoso> Since you dont need separate components
13:28:46 <dminuoso> But its less clean
13:29:00 <Guest64> Less applicable for me, but still a valid solution, yet
13:29:05 <Guest64> Thanks for the input everyone
13:29:08 <merijn> I mean, you can just define a single common section for your executables and then defining a new one is a 2-3 line thing
13:29:13 thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1)
13:29:33 <merijn> "executable foo\n import: ExeStanzas\n main-is: foo.hs"
13:29:56 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:31:03 <Guest64> What is ExeStanzas in this case?
13:31:03 califax joins (~califax@user/califx)
13:31:56 <merijn> Guest64: You can define common blocks of fields and import them, so whatever fields all the executables have in common
13:32:00 <merijn> Guest64: For example: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/benchmark-analysis.cabal#L68-L71
13:32:12 <merijn> https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/benchmark-analysis.cabal#L255-L256
13:32:57 <merijn> (from your question I'm assuming most/all of your executables will have the same configuration)
13:33:14 <Guest64> Yes, that is the case :) I just want to swap in a different program, essentially
13:33:59 <merijn> Right, so you can just define a stanza with everything for the executables and then define each executable my importing that and giving a main-is
13:34:20 <dminuoso> merijn: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/benchmark-analysis.cabal#L47
13:34:22 <dminuoso> Shame on you.
13:34:42 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:34:55 <merijn> dminuoso: I only support 1 compiler and 1 freeze file atm :p
13:34:57 <Guest64> Thanks for the tip, I have not seen that you can define common sections of a cabal file before, that is great
13:34:58 <dminuoso> In 20 years, I will want to use this software at that particular commit, and not be a happy user.
13:35:04 <Guest64> I will try it out, thanks! :)
13:35:10 <merijn> dminuoso: There is a freeze file in that commit, so :p
13:35:46 <merijn> Anything other than that freeze file is not supported :p
13:36:08 <dminuoso> Ah okay, I take it back.
13:38:55 <merijn> Actually, running anything other than whatever is archived on Zenodo is not supported xD
13:39:05 <merijn> since no one is paying me :p
13:40:00 × califax quits (~califax@user/califx) (Remote host closed the connection)
13:41:10 × ft quits (~ft@p4fc2a257.dip0.t-ipconnect.de) (Quit: leaving)
13:41:11 califax joins (~califax@user/califx)
13:42:19 freeside joins (~mengwong@122.11.214.81)
13:52:03 thongpv joins (~thongpv87@2402:9d80:3f6:bf92:7fcb:6344:e6bc:6a06)
14:00:39 razetime joins (~Thunderbi@117.254.35.63)
14:01:39 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
14:04:47 × Guest64 quits (~Guest64@ext-1-497.eduroam.chalmers.se) (Quit: Connection closed)
14:06:15 thegeekinside joins (~thegeekin@189.217.82.244)
14:07:45 × erisco quits (~erisco@d24-141-66-165.home.cgocable.net) (Ping timeout: 265 seconds)
14:07:50 erisco_ joins (~erisco@d24-141-66-165.home.cgocable.net)
14:08:16 erisco_ is now known as erisco
14:09:14 Guest31 joins (~Guest31@ext-1-497.eduroam.chalmers.se)
14:10:13 <Guest31> If I use an import stanza and pull in a ghc-options: section in my cabal file, and then define another ghc-options: section with one additional flag in my executable, the last section will not override the imported one, right?
14:10:16 <Guest31> They will compound
14:11:26 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
14:14:57 <mauke> https://cabal.readthedocs.io/en/stable/cabal-package.html#meaning-of-field-values-when-using-conditionals
14:18:46 <merijn> Guest31: list fields (like options) are monoidal, yes
14:22:14 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
14:22:38 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
14:32:29 sadmax joins (~user@64.130.91.66)
14:41:34 × nut quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
14:44:16 × kavvadias quits (~kavvadias@2001:9e8:632b:3b00:dade:ffd6:cbe9:49d7) (Quit: Client closed)
14:45:36 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
14:51:03 kurbus joins (~kurbus@user/kurbus)
14:55:10 × califax quits (~califax@user/califx) (Remote host closed the connection)
14:57:09 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
14:58:00 kurbus joins (~kurbus@user/kurbus)
15:00:15 califax joins (~califax@user/califx)
15:00:34 × mei_ quits (~mei@user/mei) (Quit: mei_)
15:02:10 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
15:03:00 × Guest31 quits (~Guest31@ext-1-497.eduroam.chalmers.se) (Quit: Connection closed)
15:03:05 ec_ joins (~ec@gateway/tor-sasl/ec)
15:03:12 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:1373:23b5:b44f:8cd6) (Quit: WeeChat 2.8)
15:04:05 Guest6867 joins (~Guest68@ext-1-497.eduroam.chalmers.se)
15:04:37 Guest71 joins (~Guest71@ext-1-414.eduroam.chalmers.se)
15:05:42 <Guest71> I have a question on the CPP macro in Haskell
15:07:13 <Guest71> When I have code like #ifdef FLAG foo = 1 #else foo = 2 #endif in my Main.hs file the flag macro seems to work fine
15:07:34 <Guest71> i.e with the flag on I get foo =1 and otherwise I get foo =2
15:08:00 <Guest71> however, if instead I use the same flag on files other than Main.hs the macro never fires
15:08:06 <Guest71> I always get foo = 2
15:08:40 <merijn> Guest71: CPP is just textual processing, it uses whatever the value of FLAG dictates when compiling Main.hs
15:08:57 <merijn> When the file is compiled the flag can't be changed
15:09:07 <geekosaur> how do you have your cabal file set up?
15:10:34 jero98772 joins (~jero98772@2800:484:1d80:d8ce:9815:cfda:3661:17bb)
15:11:19 × califax quits (~califax@user/califx) (Remote host closed the connection)
15:12:45 califax joins (~califax@user/califx)
15:13:11 × Guest71 quits (~Guest71@ext-1-414.eduroam.chalmers.se) (Quit: Client closed)
15:13:32 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
15:13:45 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
15:13:59 × acidjnk quits (~acidjnk@p200300d6e715c44040ccabc07de96856.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
15:15:03 acidjnk joins (~acidjnk@p200300d6e715c440647ad5b3d6a6efb6.dip0.t-ipconnect.de)
15:15:09 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
15:15:11 × xstill_ quits (xstill@fimu/xstill) (Quit: Ping timeout (120 seconds))
15:15:45 xstill_ joins (xstill@fimu/xstill)
15:16:03 Guest71 joins (~Guest71@ext-1-414.eduroam.chalmers.se)
15:16:35 <Guest71> geekosaur this is the relevant clauses of my cabal file https://pastebin.com/eGAXvPQp
15:18:12 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
15:18:34 <geekosaur> okay, so that looks like it should be defined in Main, Test1, and Test2 but not in the library Application
15:18:46 nut joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
15:19:32 <geekosaur> also I wonder if that should be in ghc-options instead of cpp-options
15:19:44 <geekosaur> (yes, ghc understands -D)
15:19:49 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Ping timeout: 252 seconds)
15:23:48 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
15:24:17 kurbus joins (~kurbus@user/kurbus)
15:25:46 <Guest71> Hmm adding it in ghc-options instead of cpp-options did not work and infact cabal warns to put the flags in cpp-options instead
15:26:00 fizbin joins (~fizbin@user/fizbin)
15:26:13 <geekosaur> huh
15:26:34 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
15:26:57 × dsrt^ quits (~dsrt@76.145.190.81) (Remote host closed the connection)
15:27:41 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:31:47 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
15:34:01 natechan joins (~nate@98.45.169.16)
15:36:02 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
15:36:32 azimut joins (~azimut@gateway/tor-sasl/azimut)
15:36:53 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:37:51 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
15:39:44 × fizbin quits (~fizbin@user/fizbin) (Remote host closed the connection)
15:40:03 fizbin joins (~fizbin@user/fizbin)
15:44:54 × freeside quits (~mengwong@122.11.214.81) (Ping timeout: 265 seconds)
15:49:11 × Guest71 quits (~Guest71@ext-1-414.eduroam.chalmers.se) (Quit: Client closed)
15:53:11 kuribas joins (~user@ptr-17d51ep1khvun2eib7k.18120a2.ip6.access.telenet.be)
15:53:50 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
15:54:14 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
15:55:36 Sgeo joins (~Sgeo@user/sgeo)
15:57:12 × Guest6867 quits (~Guest68@ext-1-497.eduroam.chalmers.se) (Ping timeout: 268 seconds)
15:59:07 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
16:00:14 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
16:01:08 × sadmax quits (~user@64.130.91.66) (Ping timeout: 260 seconds)
16:01:34 kenran joins (~user@user/kenran)
16:04:22 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
16:08:19 × kenran quits (~user@user/kenran) (Remote host closed the connection)
16:08:38 kenran joins (~user@user/kenran)
16:12:45 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 256 seconds)
16:13:24 ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de)
16:15:55 × kenran quits (~user@user/kenran) (Remote host closed the connection)
16:16:13 kenran joins (~user@user/kenran)
16:16:20 × kenran quits (~user@user/kenran) (Remote host closed the connection)
16:16:39 kenran joins (~user@user/kenran)
16:18:02 ares joins (~ares@37-48-19-116.nat.epc.tmcz.cz)
16:18:10 × troydm quits (~troydm@user/troydm) (Ping timeout: 268 seconds)
16:18:56 kurbus joins (~kurbus@user/kurbus)
16:18:57 freeside joins (~mengwong@103.252.202.159)
16:20:18 irrgit joins (~irrgit@89.47.234.26)
16:20:52 × avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 252 seconds)
16:21:19 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
16:24:22 Guest9971 joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
16:27:26 × trev quits (~trev@user/trev) (Remote host closed the connection)
16:29:55 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
16:30:21 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
16:32:05 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
16:32:13 <tomjaguarpaw> HLS doesn't seem to pick up a new module I've created and added to my .cabal file. Is there anything obvious I should do to diagnose?
16:33:13 × gtdg quits (~gtdg@user/gtdg) (Ping timeout: 260 seconds)
16:33:26 <tomjaguarpaw> Oh, well it works now. Not sure what I did. Never mind.
16:36:19 <[exa]> tomjaguarpaw: it made up its mind
16:36:33 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds)
16:37:23 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
16:37:39 × kenran quits (~user@user/kenran) (Remote host closed the connection)
16:41:06 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Remote host closed the connection)
16:41:53 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
16:52:22 × califax quits (~califax@user/califx) (Remote host closed the connection)
16:54:16 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
16:54:56 califax joins (~califax@user/califx)
16:55:24 troydm joins (~troydm@user/troydm)
16:56:24 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
16:56:37 kurbus joins (~kurbus@user/kurbus)
16:57:32 × alfonsox quits (~quassel@103.87.57.80) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:58:39 × kurbus quits (~kurbus@user/kurbus) (Client Quit)
16:59:10 <fendor[m]> tomjaguarpaw, in theory, HLS should notice changes to your .cabal file and try to reload your project. However, reloading might take a while, depending on your project size. Additionally, there might be bugs in that reload logic that we haven't caught all yet
16:59:11 kurbus joins (~kurbus@user/kurbus)
17:02:08 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
17:02:47 ec_ joins (~ec@gateway/tor-sasl/ec)
17:04:46 × kimiamania quits (~65804703@user/kimiamania) (Quit: PegeLinux)
17:05:09 × ubert1 quits (~Thunderbi@2a02:8109:abc0:6434:4d13:78d1:f594:581a) (Remote host closed the connection)
17:05:31 segfaultfizzbuzz joins (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net)
17:05:59 kimiamania joins (~65804703@user/kimiamania)
17:07:58 simple parts (skralg@user/simple) (Leaving)
17:08:38 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
17:09:27 × ares quits (~ares@37-48-19-116.nat.epc.tmcz.cz) (Quit: Client closed)
17:13:33 × califax quits (~califax@user/califx) (Remote host closed the connection)
17:14:46 × razetime quits (~Thunderbi@117.254.35.63) (Ping timeout: 252 seconds)
17:15:36 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
17:17:44 califax joins (~califax@user/califx)
17:18:09 kurbus joins (~kurbus@user/kurbus)
17:18:17 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
17:27:08 mizlan joins (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569)
17:31:16 × mizlan quits (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569) (Ping timeout: 252 seconds)
17:33:15 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving)
17:36:13 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Ping timeout: 252 seconds)
17:40:35 × teo quits (~teo@user/teo) (Ping timeout: 255 seconds)
17:41:36 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
17:42:21 <Guillaum[m]> I'm doing some refactor in our codebase (removing template haskell lenses, mostly replaced by overloaded record dot OR generic lens) and I'm finding some beauties such as (crafted example, but that's the spirit: `getField @"fieldNameBrokenWithGHC92" (((legacyAccessor x) ^. lens . #genericLens).overloadedRecordAccessor)`
17:43:38 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Remote host closed the connection)
17:43:39 <Hecate> haha
17:43:40 <Hecate> :D
17:43:53 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
17:52:01 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
17:53:15 × MajorBiscuit quits (~MajorBisc@c-001-028-012.client.tudelft.eduvpn.nl) (Ping timeout: 260 seconds)
17:56:00 jmdaemon joins (~jmdaemon@user/jmdaemon)
17:57:50 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 246 seconds)
17:58:42 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
17:59:50 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
18:09:47 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
18:11:31 mizlan joins (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569)
18:11:36 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
18:14:35 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 248 seconds)
18:15:43 × mizlan quits (~mizlan@2607:f010:2a7:1005:9c68:f766:ea48:a569) (Ping timeout: 256 seconds)
18:15:54 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:20:11 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:8c24:7477:2459:2106)
18:22:05 jmdaemon joins (~jmdaemon@user/jmdaemon)
18:22:15 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
18:28:09 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
18:35:34 × Guest9971 quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
18:37:32 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
18:38:35 jmdaemon joins (~jmdaemon@user/jmdaemon)
18:39:28 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
18:45:58 trev joins (~trev@user/trev)
18:47:21 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
18:55:56 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
18:59:25 tstat joins (~tstat@user/tstat)
19:01:56 kenran joins (~user@user/kenran)
19:02:57 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
19:04:10 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:10:55 × kenran quits (~user@user/kenran) (Remote host closed the connection)
19:11:21 kenran joins (~user@user/kenran)
19:12:03 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
19:18:38 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
19:18:51 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:19:52 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
19:21:15 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
19:27:29 × califax quits (~califax@user/califx) (Remote host closed the connection)
19:29:04 califax joins (~califax@user/califx)
19:29:15 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
19:29:20 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 268 seconds)
19:30:11 econo joins (uid147250@user/econo)
19:33:30 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
19:35:22 × califax quits (~califax@user/califx) (Remote host closed the connection)
19:36:26 × kuribas quits (~user@ptr-17d51ep1khvun2eib7k.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
19:36:53 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 252 seconds)
19:36:56 califax joins (~califax@user/califx)
19:37:58 kurbus joins (~kurbus@user/kurbus)
19:38:58 × kurbus quits (~kurbus@user/kurbus) (Client Quit)
19:39:28 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:40:06 freeside joins (~mengwong@103.252.202.159)
19:42:10 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
19:45:21 gmg joins (~user@user/gehmehgeh)
19:45:53 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
19:47:05 kurbus joins (~kurbus@user/kurbus)
19:47:30 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
19:48:51 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:49:01 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
19:50:58 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
20:05:24 jmdaemon joins (~jmdaemon@user/jmdaemon)
20:09:26 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Remote host closed the connection)
20:09:44 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
20:11:33 <ozkutuk[m]> What is the right way to catch an exception thrown from pure code using throw?
20:12:33 <ozkutuk[m]> Would lifting it into IO via pure and using try to handle it work?
20:15:29 <gnalzo> you cannot catch exception in pure code. Only in IO. I have tried to thrown exception from pure code, but there was some weird things. That didn't work as I expected.
20:16:18 <[exa]> ozkutuk[m]: maybe elaborate on why would you do that, there might be better ways
20:16:40 <[exa]> (also, by "exceptions from pure code" you mean basically pattern matching failures and/or undefined, right?)
20:17:26 <gnalzo> ExceptT should be better for pure code, I think.
20:19:31 <ozkutuk[m]> I have no control over the throwing piece of code. Namely it is a function from GHC itself: https://hackage.haskell.org/package/ghc-9.4.4/docs/src/GHC.Types.Var.html#idInfo
20:20:04 <ozkutuk[m]> Id record is built lazily andIdInfo is filled sometime during the compilation pipeline down the line
20:20:23 <monochrom> The right way is to not use throw in pure code.
20:20:44 <ozkutuk[m]> However I don't really care about the panicking case, so I wanted to use this as something like `Id -> Maybe IdInfo`
20:20:59 <ozkutuk[m]> basically turning the throwing branch into a Nothing
20:21:40 <monochrom> The almost right way is to understand lazy evaluation and understand what seq, Control.Exception.evaluate, and Data.DeepSeq do and how much they help.
20:21:41 × troydm quits (~troydm@user/troydm) (Ping timeout: 246 seconds)
20:22:17 <monochrom> (and how much they don't help)
20:22:23 <geekosaur> monochrom, all correct but they don;t have control over it!
20:23:11 <[exa]> an uncanny case of ghc not being a library
20:23:25 <monochrom> Well yeah that's why I do have the "almost right" when we need to make a small compromise.
20:23:30 <geekosaur> well, it is, it's just not designed for ordinary users
20:23:45 <geekosaur> might be worth asking in #ghc if there's a better way to do it though
20:24:06 <monochrom> You can further the corruption by wrapping evaluate inside unsafePerformIO...
20:24:21 mei joins (~mei@user/mei)
20:24:21 <[exa]> ozkutuk[m]: internally it does Exception.throw, which looks to me like IO-based exception which you should be catch with IO, and I'm happy I didn't have to say the unsafe function first. :D
20:24:24 <geekosaur> possibly with rnf
20:24:40 <monochrom> The bottomline is understanding all the tools I mentioned so that at least you can work out something predictable.
20:25:25 <mauke> can't you check isId first before calling idInfo?
20:25:43 <mauke> oh, wrong error case?
20:25:44 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds)
20:25:44 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Ping timeout: 260 seconds)
20:27:06 <ozkutuk[m]> mauke: It is always `Id`, just that sometimes the `idInfo` field is populated and sometimes it is not
20:27:28 <ozkutuk[m]> the record the constructed partially initially
20:28:01 <ozkutuk[m]> (I am concerned with Id the type constructor, isId checks if it is Id the data constructor)
20:28:11 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
20:28:13 L29Ah joins (~L29Ah@wikipedia/L29Ah)
20:29:31 <ozkutuk[m]> [exa]: So _how_ do I catch it within IO? The function is pure. Would pulling it into IO via `pure` and catching there work?
20:29:34 codaraxis joins (~codaraxis@user/codaraxis)
20:29:48 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
20:30:03 <[Leary]> % evaluate undefined `catch` \(_ :: ErrorCall) -> putStrLn "caught"
20:30:03 <yahb2> caught
20:30:05 <geekosaur> ozkutuk[m], Control.Exception.evaluate
20:30:07 <[Leary]> Like that.
20:30:19 <ozkutuk[m]> Perhaps the simplest thing is to write my own idInfo variant which returns a Maybe
20:30:30 <[exa]> also.
20:30:42 <geekosaur> but depending on how deep it is within the IdInfo you may need rnf to force evaluation beyond WHNF
20:31:05 <geekosaur> (from Control.Deepseq)
20:31:59 <ozkutuk[m]> I'll try these out, thanks everyone!
20:33:46 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
20:35:57 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Remote host closed the connection)
20:37:25 × kurbus quits (~kurbus@user/kurbus) (Quit: Client closed)
20:40:29 × califax quits (~califax@user/califx) (Remote host closed the connection)
20:41:00 × ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
20:41:05 CiaoSen joins (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
20:41:36 ec_ joins (~ec@gateway/tor-sasl/ec)
20:43:25 kurbus joins (~kurbus@user/kurbus)
20:43:40 shriekingnoise joins (~shrieking@186.137.175.87)
20:44:58 × kurbus quits (~kurbus@user/kurbus) (Client Quit)
20:45:35 talismanick joins (~talismani@campus-011-255.ucdavis.edu)
20:46:09 kurbus joins (~kurbus@user/kurbus)
20:46:18 × kurbus quits (~kurbus@user/kurbus) (Client Quit)
20:46:39 califax joins (~califax@user/califx)
20:47:57 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
20:49:32 nineonine joins (~nineonine@2604:3d08:7780:cd00:4d52:82fa:2c2:5ed4)
20:50:45 freeside joins (~mengwong@103.252.202.159)
20:51:51 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
20:52:10 <ozkutuk[m]> evaluate + try worked great
20:53:56 <talismanick> Is there an API to search the #haskell logs?
20:54:33 <geekosaur> no
20:54:56 <geekosaur> IRC itself doesn't keep logs. we have our own logger but last I heard its search ability didn't work
20:55:07 <geekosaur> (see /topic)
20:55:29 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
20:56:16 <talismanick> geekosaur: yeah, that's what I meant... that's too bad
20:56:55 <talismanick> Isn't postgrest (conveniently written in Haskell) able to autogenerate a REST API from a Postgres DB?
20:57:14 <talismanick> https://postgrest.org/en/stable/
20:59:24 <Inst> can i ask a dumb / lazy question here?
20:59:35 <Inst> does Postgresql-simple support parsing postgresql entries to text?
20:59:49 <Inst> erm, sql output to text?
21:01:59 Guest9971 joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
21:02:39 fercoder joins (~fercoder@dynamic-186-29-203-90.dynamic.etb.net.co)
21:04:45 × fercoder quits (~fercoder@dynamic-186-29-203-90.dynamic.etb.net.co) (Remote host closed the connection)
21:05:02 × nut quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
21:05:04 troydm joins (~troydm@user/troydm)
21:05:10 <[exa]> Inst: well you can select everything from the database and then just `show` it
21:05:23 <Inst> as in, showT?
21:05:33 <Inst> i just don't want to have to deal with the String datatype
21:05:44 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:05:47 <[exa]> depends on what you get from the select, I'd just print it out and there you have the text right?
21:05:53 <[exa]> or maybe I misunderstood the question
21:05:55 <sm> do you mean pretty printing as a table, like psql would ?
21:05:58 <ozkutuk[m]> well you can convert the string you get through show with Text.pack, no?
21:06:48 <[exa]> talismanick: re REST api, we'd actually need some kind of fulltext search (tsvector index in psql or so)... not sure if just plain rest api would do there (you might pick all entries and search yourself tho.)
21:07:22 × thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection)
21:07:52 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
21:09:26 × trev quits (~trev@user/trev) (Remote host closed the connection)
21:09:49 trev joins (~trev@user/trev)
21:11:22 <Inst> the set-up right now seems to be defaulting to IO [Only String]
21:15:38 × kjak quits (~kjak@pool-72-66-75-40.washdc.fios.verizon.net) (Remote host closed the connection)
21:16:26 kjak joins (~kjak@pool-72-66-75-40.washdc.fios.verizon.net)
21:21:47 freeside joins (~mengwong@103.252.202.159)
21:28:54 × califax quits (~califax@user/califx) (Remote host closed the connection)
21:29:14 califax joins (~califax@user/califx)
21:31:25 mastarija joins (~mastarija@188.252.198.203)
21:31:56 off^ joins (~off@76.145.190.81)
21:32:34 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
21:32:45 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
21:32:50 <mastarija> Is `Maybe a` on its own a monoid? The docs say it's a monoid only if `a` is also a monoid. But it seems to me like `Maybe a` should produce a valid monoid instance.
21:33:00 <mastarija> I'm only not sure about the associativity law.
21:33:47 <mastarija> I think that if I always pick the right most `Just a` it should hold.
21:33:54 Lord_of_Life_ is now known as Lord_of_Life
21:34:06 <geekosaur> I think there's a mostly useless monoid you could get if you ignore the `a`? but it's more useful as currently defined
21:34:30 <geekosaur> (and I think you can get that monoid via Alternative)
21:34:34 × talismanick quits (~talismani@campus-011-255.ucdavis.edu) (Ping timeout: 260 seconds)
21:34:35 <tomsmeding> mastarija: check Maybe's Alternative instance
21:34:39 <tomsmeding> oh you were first
21:34:46 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
21:34:50 <tomsmeding> though that will pick the leftmost Just
21:34:59 <mastarija> I have a record that contians many Bools and occasional `Maybe` so I'd like to make it a monoid.
21:35:04 <mastarija> That would be useful to me.
21:35:16 <mastarija> I guess alternative is a monoid, right?
21:35:27 <mastarija> Although differently defined?
21:35:27 <tomsmeding> yes
21:35:34 <tomsmeding> it's just "another monoid"
21:35:40 <tomsmeding> check Alt from Data.Monoid if you really want
21:35:44 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
21:35:56 <tomsmeding> it's a newtype whose Monoid instance is the Alternative instance of the contained thing
21:35:57 <mastarija> Alternative monoid with known "semantics".
21:36:06 <tomsmeding> intuition, rather
21:36:13 <mastarija> yeah
21:36:16 <tomsmeding> semantics is too well-defined a word for this :p
21:36:21 <mastarija> :)
21:36:27 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0)
21:37:04 <[Leary]> mastarija: You might be interested in Data.Monoid.Last.
21:37:33 <mastarija> Ah...
21:37:41 <mastarija> I may be indeed interested in that :)
21:38:25 × [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
21:38:41 [Leary] joins (~Leary]@user/Leary/x-0910699)
21:40:59 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:ac96:e33a:7cce:aea0) (Ping timeout: 248 seconds)
21:55:50 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
22:03:17 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
22:03:32 × trev quits (~trev@user/trev) (Remote host closed the connection)
22:06:22 <VOID[m]> I wrote a function, that given a list of digits returns a largest number dividable by 3 that can be arranged from those digits. I used a wrapper for my lists to make sure I don't accidentally "unsort" it. If someone feels like checking it out, I'd love to hear what I could have done better. The code also include reference implementation using bruteforce https://paste.tomsmeding.com/BX0y8YM8
22:08:12 <VOID[m]> Introducing the Sorted list and refactoring code to take it into account reduced time of processing 1000 random examples from mean 2.13 ms to 1.45 ms
22:08:33 <VOID[m]> because I avoided sorting in many places
22:10:30 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
22:10:43 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Remote host closed the connection)
22:11:37 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
22:14:12 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
22:18:12 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 272 seconds)
22:19:29 × mechap1 quits (~mechap@user/mechap) (Ping timeout: 260 seconds)
22:19:44 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
22:20:23 SasoriZero joins (~SasoriZer@098-147-198-034.res.spectrum.com)
22:21:16 mechap1 joins (~mechap@user/mechap)
22:22:10 talismanick joins (~talismani@campus-004-215.ucdavis.edu)
22:24:51 × kenran quits (~user@user/kenran) (Remote host closed the connection)
22:31:23 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
22:35:59 Blightmain joins (~Blightmai@203.29.154.219)
22:43:03 freeside joins (~mengwong@103.252.202.159)
22:45:11 × nschoe quits (~q@2a01:e0a:8e:a190:6769:fe09:b700:dd6) (Ping timeout: 264 seconds)
22:47:29 × freeside quits (~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
22:48:47 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:51:13 × talismanick quits (~talismani@campus-004-215.ucdavis.edu) (Ping timeout: 252 seconds)
22:55:27 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
23:02:08 takuan joins (~takuan@178-116-218-225.access.telenet.be)
23:02:38 × Flow quits (~none@gentoo/developer/flow) (Ping timeout: 246 seconds)
23:06:19 opticblast joins (~Thunderbi@secure-165.caltech.edu)
23:07:03 × chele quits (~chele@user/chele) (Quit: Leaving)
23:08:01 × mastarija quits (~mastarija@188.252.198.203) (Quit: WeeChat 3.7.1)
23:08:52 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 272 seconds)
23:12:09 mizlan joins (~mizlan@2607:f010:2a7:1005:ac8b:dc79:8fea:7078)
23:13:59 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
23:14:19 × Guest9971 quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds)
23:16:17 Flow joins (~none@gentoo/developer/flow)
23:16:40 freeside joins (~mengwong@103.252.202.159)
23:20:18 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
23:20:54 × opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 272 seconds)
23:26:04 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
23:28:10 × mizlan quits (~mizlan@2607:f010:2a7:1005:ac8b:dc79:8fea:7078) (Ping timeout: 252 seconds)
23:28:39 × CiaoSen quits (~Jura@p200300c9574fa4002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:30:04 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:30:32 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
23:31:39 justsomeguy joins (~justsomeg@user/justsomeguy)
23:32:54 mizlan joins (~mizlan@2607:f010:2a7:1005:ac8b:dc79:8fea:7078)
23:33:56 Lycurgus joins (~juan@user/Lycurgus)
23:40:39 moonsheep joins (~user@user/moonsheep)
23:41:28 × moonsheep quits (~user@user/moonsheep) (Client Quit)
23:42:21 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
23:45:34 sammelweis joins (~quassel@c-68-48-18-140.hsd1.mi.comcast.net)
23:45:54 talismanick joins (~talismani@campus-004-215.ucdavis.edu)
23:47:24 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:48:20 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
23:54:13 × mei quits (~mei@user/mei) (Remote host closed the connection)
23:54:57 mei joins (~mei@user/mei)
23:57:39 Umeaboy joins (~Umeaboy@94-255-145-133.cust.bredband2.com)

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