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