Home liberachat/#haskell: Logs Calendar

Logs on 2025-08-06 (liberachat/#haskell)

00:00:55 fizbin joins (~fizbin@2601:84:8601:2604:65a2:2790:1327:34c5)
00:02:29 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
00:04:57 zlqrvx joins (~zlqrvx@101.175.150.247)
00:06:28 jackdk joins (uid373013@cssa/life/jackdk)
00:07:03 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
00:11:29 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
00:14:21 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
00:15:24 davidlbowman joins (~dlb@user/davidlbowman)
00:17:58 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
00:18:23 caubert joins (~caubert@user/caubert)
00:22:27 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
00:22:58 × caubert quits (~caubert@user/caubert) (Ping timeout: 244 seconds)
00:25:06 × Lycurgus quits (~juan@user/Lycurgus) (Quit: irc.renjuan.org (juan@acm.org))
00:33:26 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
00:36:35 × ttybitnik quits (~ttybitnik@user/wolper) (Quit: Fading out...)
00:36:41 × fizbin quits (~fizbin@2601:84:8601:2604:65a2:2790:1327:34c5) (Read error: Connection reset by peer)
00:38:18 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
00:48:49 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
00:49:12 × sp1ff`` quits (~user@c-24-21-190-184.hsd1.wa.comcast.net) (Read error: Connection reset by peer)
00:50:44 sp1ff```` joins (~user@c-24-21-190-184.hsd1.wa.comcast.net)
00:53:18 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
00:54:18 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 276 seconds)
01:04:12 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:08:44 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
01:17:03 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
01:18:31 vanishingideal joins (~vanishing@user/vanishingideal)
01:19:38 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:24:02 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
01:25:05 × pabs3 quits (~pabs3@user/pabs3) (Ping timeout: 248 seconds)
01:31:14 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
01:34:52 × davidlbowman quits (~dlb@user/davidlbowman) (Quit: WeeChat 4.1.1)
01:35:05 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:35:48 × amadaluzia quits (~amadaluzi@user/amadaluzia) (Quit: ZNC 1.10.1 - https://znc.in)
01:35:58 pabs3 joins (~pabs3@user/pabs3)
01:38:57 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 248 seconds)
01:40:34 vanishingideal joins (~vanishing@user/vanishingideal)
01:41:30 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
01:53:09 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
01:57:36 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
02:05:22 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:09:54 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
02:11:44 × jreicher quits (~user@user/jreicher) (Ping timeout: 260 seconds)
02:12:10 jreicher joins (~user@user/jreicher)
02:17:21 × jespada quits (~jespada@2800:a4:221f:e100:811f:b722:6c6c:3e08) (Ping timeout: 248 seconds)
02:19:43 jespada joins (~jespada@2800:a4:2207:500:49e1:84bb:c5a4:d6af)
02:20:49 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:23:19 × zlqrvx quits (~zlqrvx@101.175.150.247) (Quit: ZNC 1.10.0 - https://znc.in)
02:24:00 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 276 seconds)
02:25:21 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
02:26:36 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
02:27:50 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
02:32:57 trickard_ is now known as trickard
02:36:07 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:40:48 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
02:43:46 Lycurgus joins (~juan@user/Lycurgus)
02:48:53 × jmorris quits (uid604645@id-604645.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
02:51:36 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
02:55:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
02:58:39 × vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 252 seconds)
03:06:06 dcompoze joins (~dcompoze@mail.dcsoftware.xyz)
03:06:12 × dcompoze quits (~dcompoze@mail.dcsoftware.xyz) (Client Quit)
03:06:58 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
03:11:00 weary-traveler joins (~user@user/user363627)
03:13:18 × Lycurgus quits (~juan@user/Lycurgus) (Quit: irc.renjuan.org (juan@acm.org))
03:14:03 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
03:17:48 zlqrvx joins (~zlqrvx@2001:8003:8c8b:e00:374a:bdcb:457c:d1e3)
03:25:01 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
03:29:08 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
03:29:25 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
03:30:08 × hughjfchen quits (~hughjfche@vmi2417424.contaboserver.net) (Quit: WeeChat 4.6.3)
03:30:26 hughjfchen joins (~hughjfche@vmi2417424.contaboserver.net)
03:32:45 × hughjfchen quits (~hughjfche@vmi2417424.contaboserver.net) (Client Quit)
03:33:50 hughjfchen joins (~hughjfche@vmi2417424.contaboserver.net)
03:34:16 × Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection)
03:35:15 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
03:40:25 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
03:47:46 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
03:55:01 Leary joins (~Leary@user/Leary/x-0910699)
03:56:56 machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net)
03:58:28 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:02:54 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
04:06:21 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:08:58 × arahael quits (~arahael@user/arahael) (Ping timeout: 240 seconds)
04:09:21 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 248 seconds)
04:10:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
04:18:59 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
04:21:51 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:23:24 caubert joins (~caubert@user/caubert)
04:26:25 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
04:28:18 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
04:37:01 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
04:37:14 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:42:04 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
04:43:43 mange joins (~mange@user/mange)
04:48:23 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
04:49:04 gmg joins (~user@user/gehmehgeh)
04:49:27 jmcantrell joins (~weechat@user/jmcantrell)
04:50:14 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
04:52:42 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
04:57:25 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
04:57:43 × weary-traveler quits (~user@user/user363627) (Quit: Konversation terminated!)
05:03:02 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
05:04:21 × jmcantrell quits (~weechat@user/jmcantrell) (Quit: WeeChat 4.7.0)
05:05:00 jmcantrell joins (~weechat@user/jmcantrell)
05:06:08 arahael joins (~arahael@user/arahael)
05:07:21 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
05:08:03 × jle` quits (~jle`@syn-023-240-067-073.res.spectrum.com) (Quit: WeeChat 4.5.1)
05:11:45 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
05:12:58 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 240 seconds)
05:16:20 jle` joins (~jle`@syn-023-240-067-073.res.spectrum.com)
05:18:03 × califax quits (~califax@user/califx) (Remote host closed the connection)
05:18:28 califax joins (~califax@user/califx)
05:22:50 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
05:29:26 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
05:40:54 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
05:46:04 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
05:46:22 × haritz quits (~hrtz@user/haritz) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
05:53:52 wootehfoot joins (~wootehfoo@user/wootehfoot)
05:56:17 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
05:58:18 × tv quits (~tv@user/tv) (Read error: Connection reset by peer)
06:00:45 weary-traveler joins (~user@user/user363627)
06:00:49 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
06:00:57 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
06:01:18 biberu joins (~biberu@user/biberu)
06:08:20 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
06:09:25 × zlqrvx quits (~zlqrvx@2001:8003:8c8b:e00:374a:bdcb:457c:d1e3) (Quit: ZNC 1.10.0 - https://znc.in)
06:13:14 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
06:16:18 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 248 seconds)
06:23:44 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
06:26:19 euouae joins (~euouae@user/euouae)
06:28:15 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
06:38:04 <sprout> > [1..5]
06:38:05 <lambdabot> [1,2,3,4,5]
06:38:26 <sprout> > [5..1]
06:38:28 <lambdabot> []
06:39:07 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
06:43:17 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
06:44:08 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
06:54:30 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
06:58:54 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
07:00:01 × caconym747 quits (~caconym@user/caconym) (Quit: bye)
07:01:03 caconym747 joins (~caconym@user/caconym)
07:04:46 killy joins (~killy@terminal-3-187.retsat1.com.pl)
07:08:43 poscat0x04 joins (~poscat@user/poscat)
07:09:21 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
07:09:51 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
07:10:06 × poscat quits (~poscat@user/poscat) (Ping timeout: 244 seconds)
07:10:48 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:13:05 CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db)
07:16:30 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
07:16:55 acidjnk joins (~acidjnk@p200300d6e71719397d9aab65da8bb5e6.dip0.t-ipconnect.de)
07:27:13 <dutchie> > [5,4..1]
07:27:15 <lambdabot> [5,4,3,2,1]
07:27:52 tv joins (~tv@user/tv)
07:36:41 ljdarj joins (~Thunderbi@user/ljdarj)
07:41:21 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 252 seconds)
07:44:57 talismanick joins (~user@2601:644:937c:ed10::ae5)
07:46:06 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:49:42 × ft quits (~ft@p3e9bcd7f.dip0.t-ipconnect.de) (Quit: leaving)
07:59:10 × biberu quits (~biberu@user/biberu) (Remote host closed the connection)
07:59:14 ljdarj joins (~Thunderbi@user/ljdarj)
07:59:45 vanishingideal joins (~vanishing@user/vanishingideal)
08:02:57 chele joins (~chele@user/chele)
08:04:12 <ski> > L.drop 2 (L.zipWith replicate (L.cycle [1,2,3]) (L.cycle "ab"))
08:04:13 <lambdabot> cycle ["aaa","b","aa","bbb","a","bb"]
08:05:27 merijn joins (~merijn@77.242.116.146)
08:09:36 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
08:09:42 biberu joins (~biberu@user/biberu)
08:19:14 × jle` quits (~jle`@syn-023-240-067-073.res.spectrum.com) (Quit: WeeChat 4.7.0)
08:19:26 <kaol> Lovely. I built my program with GHC 9.6.6 and a part of it started crashing with "Illegal instruction".
08:19:54 <euouae> paste?
08:21:55 <kaol> https://gitlab.com/piperka/piperka the crawler and it's likely going to require production data as well which I'm not going to bother isolating. I guess it's somewhere in the web-push library.
08:24:03 <euouae> I mean, what's the paste of the error?
08:24:29 <kaol> It's only those two words.
08:24:48 <euouae> Who gives the error
08:25:10 <kaol> The binary I built with GHC.
08:25:24 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
08:25:31 <kaol> At run time.
08:27:02 <mauke> probably the shell
08:27:26 <euouae> If it's from the kernel, Illegal instruction means that the CPU instructions don't correspond to microcode
08:27:58 <euouae> That means something has been miscompiled
08:28:05 <mauke> perl -we 'kill ILL => $$'
08:28:06 <kaol> It goes away if I disable the code that would use Web.WebPush.
08:28:21 <euouae> Have you compiled *everything* with GHC 9.6.6?
08:28:31 <euouae> Or did some dependency escape
08:30:24 <euouae> kaol: you can run under gdb with `gdb my_exe -ex r` and when it hits the illegal instruction you can use `gcore my_core` to dump core
08:30:48 <euouae> You can then share that core, but be careful because it might contain secrets like tokens, passwords, etc
08:31:02 <euouae> At the very least you can do `bt` and read the backtrace, get an idea of what might have gone wrong
08:36:28 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 240 seconds)
08:45:19 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
08:49:43 merijn joins (~merijn@77.242.116.146)
08:56:59 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
08:57:15 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 276 seconds)
08:58:35 <euouae> when using cabal's Paths_* do I have to include the module in the .cabal file?
08:59:32 × vanishingideal quits (~vanishing@user/vanishingideal) (Quit: Lost terminal)
09:00:01 <haskellbridge> <sm> yes, in data-files:
09:00:17 <haskellbridge> <sm> But be aware of https://joyful.com/Haskell#Why%20should%20you%20avoid%20Cabal's%20Paths_pkgname%20feature%20?
09:03:08 <euouae> Ah yeah that's probably better
09:03:13 <euouae> I'll use file-embed
09:06:03 merijn joins (~merijn@77.242.116.146)
09:06:44 <euouae> So I'd have to embed the entire .cabal file right?
09:07:26 <haskellbridge> <sm> Why do you want to embed the .cabal file ?
09:07:49 <euouae> To grab the version:
09:08:12 <euouae> (oops, I forgot to say that's what I was doing)
09:10:15 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 276 seconds)
09:10:42 <haskellbridge> <sm> well.. that would be one way. I use ghc-options to define VERSION for CPP
09:11:12 <haskellbridge> <sm> cpp-options: -DVERSION="1.0"
09:11:50 <euouae> but then you need to edit 2 places of the version strnig
09:12:20 <haskellbridge> <sm> for me there’s many many such places, I have a release script that sets them
09:12:31 <Leary> euouae: https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html#conditional-compilation
09:12:34 <Leary> "Since version 2.0, the macro CURRENT_PACKAGE_VERSION expands to the string version number of the current package."
09:12:47 <euouae> ah awesome. thankfully that's easy
09:12:53 <euouae> I was looking into the autogen instructions for cabal
09:13:01 <haskellbridge> <sm> nice
09:13:07 <haskellbridge> <sm> and related: to grab info about the local git repo, githash package is good (but tends to force more rebuilding)
09:14:36 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
09:14:37 <euouae> I don't think I can use CURRENT_PACKAGE_VERSION
09:14:54 <euouae> It's only for macro expansion? I tried `print CURRENT_PACKAGE_VERSION` in my code and it says the data constructor is not defined
09:15:08 <euouae> oh, it's an autoconf macro?
09:15:31 <sm> you need to enable the CPP language extension at the top of the file, probably
09:15:48 <sm> {-# LANGUAGE CPP #-}
09:16:28 <euouae> hm, now it breaks my multiline strings
09:16:45 × CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 276 seconds)
09:17:06 <euouae> I'm doing message = "foo\n\ ...and then follows... \bar"
09:17:25 <euouae> Does that not work with CPP? Maybe I'll have to write a Version.hs module
09:20:15 <euouae> thanks for all the help! appreciate it
09:20:48 <sm> np. Don't know about that multiline issue
09:23:00 × trickard quits (~trickard@cpe-56-98-47-163.wireline.com.au) (Ping timeout: 252 seconds)
09:23:21 trickard_ joins (~trickard@cpe-56-98-47-163.wireline.com.au)
09:26:34 <merijn> euouae: You don't have to write a Versions module
09:26:42 <merijn> euouae: Cabal can auto gen one that you can just import
09:26:51 <merijn> Although I forgot the exact magic for doing so
09:27:03 <merijn> I think it's Paths_package?
09:28:30 <merijn> euouae: https://cabal.readthedocs.io/en/3.4/cabal-package.html#accessing-the-package-version
09:39:40 × jackdk quits (uid373013@cssa/life/jackdk) (Quit: Connection closed for inactivity)
09:51:45 <euouae> merijn: sure, thats how our discussion started above :P the conclusion was that I should avoid it because it's more finnicky
09:52:07 <c_wraith> for data files, maybe.
09:52:15 <c_wraith> For the version string? not at all
09:52:46 <euouae> Wait, so if I use Paths_mypkg, what should I also put in the .cabal file? or nothing?
09:52:46 <c_wraith> Err, version Version. But that's much sillier to say.
09:53:02 <c_wraith> Yes, it needs to be in there.
09:53:04 <euouae> I noticed it does work without any requirements in .cabal but ghc complains that Path_mypkg module is used without specified
09:53:13 <euouae> if I try to specify it, it complains that Path_mypkg is not a valid name
09:53:40 <c_wraith> compare with https://github.com/chowells79/roll/blob/main/roll.cabal
09:53:55 <c_wraith> it needs to be in other_modules *and* autogen_modules
09:54:08 <c_wraith> err. dashes instead of underscores
09:54:35 <euouae> you used underscores
09:54:43 <euouae> I see then, it's not in build-depends
09:56:29 <c_wraith> right. build-depends is for packages. It's just a module that cabal will auto-generate, not a full module
09:56:42 <c_wraith> err, not a full package
09:57:28 <euouae> makes a lot of sense, thanks
09:58:17 <c_wraith> The whole reason I keep that silly project around is as a reference because I forget how to use those things every time.
09:58:31 <euouae> heheh
10:06:22 <sm> how do you use CURRENT_PACKAGE_VERSION actually ? The doc is not quite clear. "Cabal places the definitions of these macros into an automatically-generated header file, which is included when preprocessing Haskell source code by passing options to the C preprocessor." Do you have to import this file ?
10:06:39 × YoungFrog quits (~youngfrog@2a02:a03f:ca07:f900:abf4:cf52:58ac:4a84) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in)
10:06:59 YoungFrog joins (~youngfrog@2a02:a03f:ca07:f900:4407:d5e8:2b8d:2dc6)
10:07:07 <euouae> I could use it with the CPP pragma
10:07:10 <sm> (...and would it kill you to mention its name or path...)
10:07:15 <c_wraith> it should be available automatically whenever you have CPP enabled
10:07:17 <sm> great
10:07:22 <euouae> I think you can also use it if you write custom build instructions with autoconf
10:08:20 <sm> I'd like to know for sure if CURRENT_PACKAGE_VERSION still works after rm -rf ~/.cabal. I assume so.
10:08:45 <c_wraith> It only exists at compile time
10:08:54 <sm> 👍🏻
10:09:30 <euouae> Yeah so it solves the issues you were talking about sm
10:09:45 <euouae> I actually don't think I care about those issues for myself
10:10:24 <c_wraith> those issues only apply specifically with data files, because they are required to exist after compilation
10:12:35 <c_wraith> resources that are only used during code generation won't have the same issues
10:14:11 <euouae> Got it, right. Then both solutions are fine.
10:15:32 trickard___ joins (~trickard@cpe-53-98-47-163.wireline.com.au)
10:17:51 × trickard_ quits (~trickard@cpe-56-98-47-163.wireline.com.au) (Ping timeout: 276 seconds)
10:20:33 lxsameer joins (~lxsameer@Serene/lxsameer)
10:22:13 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 248 seconds)
10:30:19 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 260 seconds)
10:30:21 <sm> added CURRENT_PACKAGE_VERSION to my faq, thanks
10:34:19 trickard___ is now known as trickard
10:38:32 × caubert quits (~caubert@user/caubert) (Quit: WeeChat 4.6.3)
10:41:56 merijn joins (~merijn@77.242.116.146)
10:44:20 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
10:49:14 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 272 seconds)
10:51:31 × forell quits (~forell@user/forell) (Quit: ZNC - https://znc.in)
10:51:55 forell joins (~forell@user/forell)
10:53:13 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
10:54:08 × killy quits (~killy@terminal-3-187.retsat1.com.pl) (Ping timeout: 245 seconds)
10:54:22 killy joins (~killy@176.223.173.250)
10:54:53 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:01:55 merijn joins (~merijn@77.242.116.146)
11:06:44 × machinedgod quits (~machinedg@d75-159-126-101.abhsia.telus.net) (Ping timeout: 244 seconds)
11:07:10 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 276 seconds)
11:07:15 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 276 seconds)
11:08:29 merijn joins (~merijn@77.242.116.146)
11:12:16 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
11:17:42 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer)
11:21:30 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
11:31:41 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:46:24 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
11:55:26 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
12:00:26 sajenim joins (~sajenim@user/sajenim)
12:08:13 vanishingideal joins (~vanishing@user/vanishingideal)
12:12:42 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
12:17:57 davidlbowman joins (~dlb@user/davidlbowman)
12:18:06 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 276 seconds)
12:24:14 × infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 272 seconds)
12:27:07 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
12:37:20 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 252 seconds)
12:43:58 × davidlbowman quits (~dlb@user/davidlbowman) (Ping timeout: 240 seconds)
12:44:38 infinity0 joins (~infinity0@pwned.gg)
12:48:54 × tabaqui quits (~tabaqui@167.71.80.236) (Remote host closed the connection)
12:49:19 tabaqui joins (~tabaqui@167.71.80.236)
12:50:23 <merijn> euouae: incredibly late reply: But I also (moderately) disagree with Paths_ being finnicky, it's just a very particular solution to a very particular problem. Then people don't read docs properly on what problem it solves, try to (mis)use it and complain it breaks for their usecase (which it wasn't trying to solve)
12:51:27 × mange quits (~mange@user/mange) (Quit: Zzz...)
12:52:03 × tabaqui quits (~tabaqui@167.71.80.236) (Remote host closed the connection)
12:52:47 tabaqui joins (~tabaqui@167.71.80.236)
12:54:24 haritz joins (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
12:54:25 × haritz quits (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
12:54:25 haritz joins (~hrtz@user/haritz)
12:58:13 <haskellbridge> <sm> The current docs let new haskellers assume that data-files is a good way to ship extra files with their app, but don’t mention how that will sooner or later cause that app to no longer run
12:58:41 <haskellbridge> <sm> I wouldn’t blame people for not reading docs in this case
13:01:56 <merijn> sm: It *is* a good way to ship extra files. BUT not if you intend to tell people to use cabal like a package-manager
13:02:49 <merijn> sm: The problem is that cabal has 3 intended audience and 1 accidental one, the last group ends up in trouble when package authors leads them to install things via cabal
13:03:24 <merijn> sm: Cabal's audiences are: 1) library authors, 2) application developers, 3) package builders. The accidental 4th group being "end-users"
13:04:03 <merijn> The data-files APIs exists so that 1 & 2 can define static files in a portable way so that 3 can ship them in some way acceptable for their package system
13:04:18 weary-traveler joins (~user@user/user363627)
13:04:42 <merijn> i.e. so that people building apt-get packages can put static files in an appropriate location in a way that a Haskell application can find them reliably on the user system
13:06:07 davidlbowman joins (~dlb@user/davidlbowman)
13:06:13 × davidlbowman quits (~dlb@user/davidlbowman) (Client Quit)
13:06:18 <merijn> Now, I realise that unfortunate pragmatic reality is that lots of people use cabal as a package manager since it's "just convenient enough" to do so. But the original design (especially of the Paths_ stuff) was never for that use-case
13:06:38 davidlbowman joins (~dlb@user/davidlbowman)
13:07:13 <haskellbridge> <sm> I think it’s reasonable for any cabal user to expect that a binary they built with cabal will keep running, except for the usual reasons (major system upgrade). That’s not true in general if they use this feature. So that should be documented, otherwise many people are misled, they waste time, haskell’s bad reputation continues.
13:07:50 <haskellbridge> <sm> nothing more complicated than that
13:08:19 <merijn> I'm not sure any amount of documentation will prevent people from making that mistake, since people don't read docs :)
13:08:52 <haskellbridge> <sm> at least they read enough to find out about this feature; it can be mentioned briefly there. Easy
13:09:24 <merijn> tbh, my alternative radical solution would be to just not have "cabal install" put data files anywhere without explicit instruction
13:10:04 <merijn> that is, ensuring that use of data-files with naive "cabal install" is ALWAYS broken, so that people don't accidentally rely on behaviour they shouldn't
13:12:29 × euouae quits (~euouae@user/euouae) (Ping timeout: 260 seconds)
13:21:06 × trickard quits (~trickard@cpe-53-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
13:21:20 trickard_ joins (~trickard@cpe-53-98-47-163.wireline.com.au)
13:22:55 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
13:27:51 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 252 seconds)
13:30:28 × tomku quits (~tomku@user/tomku) (Ping timeout: 240 seconds)
13:36:44 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
13:37:36 tomku joins (~tomku@user/tomku)
13:43:06 × davidlbowman quits (~dlb@user/davidlbowman) (Quit: WeeChat 4.1.1)
13:44:09 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 260 seconds)
13:51:19 merijn joins (~merijn@77.242.116.146)
13:58:17 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
13:58:47 ttybitnik joins (~ttybitnik@user/wolper)
14:04:11 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
14:20:05 jle` joins (~jle`@2603:8001:3b00:11:1742:53d1:68d8:b2f4)
14:27:22 × jespada quits (~jespada@2800:a4:2207:500:49e1:84bb:c5a4:d6af) (Ping timeout: 276 seconds)
14:30:53 jespada joins (~jespada@2800:a4:222e:bc00:5c89:ae86:ae88:469a)
14:52:26 wootehfoot joins (~wootehfoo@user/wootehfoot)
14:56:19 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.5.2)
14:59:52 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:00:09 × ttybitnik quits (~ttybitnik@user/wolper) (Quit: Fading out...)
15:05:34 trickard___ joins (~trickard@cpe-49-98-47-163.wireline.com.au)
15:05:45 × trickard_ quits (~trickard@cpe-53-98-47-163.wireline.com.au) (Ping timeout: 252 seconds)
15:07:45 trickard___ is now known as trickard
15:12:17 × killy quits (~killy@176.223.173.250) (Ping timeout: 248 seconds)
15:14:04 killy joins (~killy@terminal-3-187.retsat1.com.pl)
15:14:33 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
15:18:22 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
15:24:11 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:27:16 × killy quits (~killy@terminal-3-187.retsat1.com.pl) (Ping timeout: 272 seconds)
15:47:10 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
15:48:41 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
15:53:30 × trickard quits (~trickard@cpe-49-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
15:53:44 trickard_ joins (~trickard@cpe-49-98-47-163.wireline.com.au)
15:57:53 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Remote host closed the connection)
15:58:15 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
16:03:07 × inline quits (~inline@ip-005-146-197-054.um05.pools.vodafone-ip.de) (Quit: Leaving)
16:04:25 euouae joins (~euouae@user/euouae)
16:04:33 <euouae> merijn: incredibly late reply to your incredibly late reply: roger that!
16:04:48 Lycurgus joins (~juan@user/Lycurgus)
16:05:27 davidlbowman joins (~dlb@user/davidlbowman)
16:06:23 kritzefitz_ joins (~kritzefit@debian/kritzefitz)
16:06:48 × kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 252 seconds)
16:07:07 × davidlbowman quits (~dlb@user/davidlbowman) (Client Quit)
16:07:26 davidlbowman joins (~dlb@user/davidlbowman)
16:08:17 × davidlbowman quits (~dlb@user/davidlbowman) (Client Quit)
16:08:35 davidlbowman joins (~dlb@user/davidlbowman)
16:11:00 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
16:11:14 kritzefitz_ is now known as kritzefitz
16:13:15 cstml joins (~Thunderbi@user/cstml)
16:13:16 jespada_ joins (~jespada@2800:a4:222e:bc00:5017:2ec6:219d:238d)
16:15:29 × jespada quits (~jespada@2800:a4:222e:bc00:5c89:ae86:ae88:469a) (Ping timeout: 252 seconds)
16:17:01 × cstml quits (~Thunderbi@user/cstml) (Client Quit)
16:25:48 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 245 seconds)
16:26:45 trickard_ is now known as trickard
16:28:12 machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net)
16:29:55 killy joins (~killy@terminal-3-187.retsat1.com.pl)
16:32:35 inline joins (~inline@ip-005-146-197-054.um05.pools.vodafone-ip.de)
16:33:54 L29Ah joins (~L29Ah@wikipedia/L29Ah)
16:36:28 ttybitnik joins (~ttybitnik@user/wolper)
16:41:37 × chele quits (~chele@user/chele) (Remote host closed the connection)
16:47:04 × killy quits (~killy@terminal-3-187.retsat1.com.pl) (Ping timeout: 272 seconds)
16:47:20 killy joins (~killy@2.56.252.228)
16:51:40 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
16:53:21 weary-traveler joins (~user@user/user363627)
16:57:36 × ubert1 quits (~Thunderbi@91.141.76.34.wireless.dyn.drei.com) (Ping timeout: 276 seconds)
17:07:08 <euouae> If I have a function with signature m4_define :: (State ParserState :> es) => M4MacroArgs -> Eff es T.Text
17:07:16 <euouae> How can I define a record type whose field matches it?
17:08:00 <euouae> If I try data M4Builtin = M4Builtin { m4Builtin :: (State ParserState :> es) => M4MacroArgs -> Eff es T.Text }
17:08:08 <EvanR> you could pet the es as a parameter to the record type
17:08:10 <euouae> I get that the type variable `es` is not in scope
17:08:21 <EvanR> M4Builtin es
17:08:46 <euouae> But how do I say that es is (Statae ParserState :> es) => ... ?
17:08:46 <Leary> Or use RankNTypes and quantify it in the type: `muBuiltin :: forall es. ...`
17:09:00 <EvanR> es is not (State ParserState :> es) => ...
17:09:08 <EvanR> that would be infinitely nested
17:09:14 <euouae> that's not what I meant
17:09:29 <euouae> I'll look into RankNTypes
17:09:45 <Leary> If you're parameterising `M4Builtin`, the constraint on `es` goes in the functions that use it.
17:10:39 <euouae> can I do the same with class?
17:11:05 <Leary> I don't understand the question.
17:11:12 <euouae> there's two types of macros: builtin and user-defined. I made them both instances of the macro class. they both (may) alter the parser state.
17:11:59 <euouae> ("macro" and "parser" for the language I implement)
17:12:50 <euouae> if I have them both instances of the macro class, I can do `invoke macro arguments` e.g. without caring whether `macro` is builtin or user-defined
17:13:13 <euouae> ah, I don't need to do anything in class. it's fine as it is
17:14:28 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:15:39 wickedjargon joins (~user@S0106f89e28d5699a.vc.shawcable.net)
17:16:32 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
17:17:19 jmcantrell joins (~weechat@user/jmcantrell)
17:17:22 jespada joins (~jespada@2800:a4:222e:bc00:a123:c77e:d5dc:3c33)
17:18:35 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
17:19:15 × jespada_ quits (~jespada@2800:a4:222e:bc00:5017:2ec6:219d:238d) (Ping timeout: 244 seconds)
17:20:55 euphores joins (~SASL_euph@user/euphores)
17:20:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
17:24:21 × Lycurgus quits (~juan@user/Lycurgus) (Quit: irc.renjuan.org (juan@acm.org))
17:25:32 × euphores quits (~SASL_euph@user/euphores) (Client Quit)
17:29:06 <euouae> In this code: <https://paste.tomsmeding.com/ggK5R7rb>, why does the commented-out definition of m4Builtins not work? I get these errors: <https://paste.tomsmeding.com/d9MgQUMh>
17:29:30 Square joins (~Square@user/square)
17:29:54 <euouae> I fear that this might be too tricky for me to understand, I might just go with the definition above the commented-out code
17:31:07 × Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection)
17:31:23 Leary joins (~Leary@user/Leary/x-0910699)
17:31:37 euphores joins (~SASL_euph@user/euphores)
17:32:39 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
17:32:41 × phma quits (phma@2001:5b0:211f:bd18:75ac:c42:f158:ecd7) (Read error: Connection reset by peer)
17:33:05 phma joins (phma@2001:5b0:211f:bd18:75ac:c42:f158:ecd7)
17:34:14 ft joins (~ft@p3e9bcd7f.dip0.t-ipconnect.de)
17:36:44 × ystael quits (~ystael@user/ystael) (Ping timeout: 260 seconds)
17:42:21 × ouilemur quits (~jgmerritt@user/ouilemur) (Quit: WeeChat 4.7.0)
17:47:00 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
17:48:06 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
17:52:58 ss4 joins (~wootehfoo@user/wootehfoot)
17:53:28 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
17:54:23 sprotte24 joins (~sprotte24@p200300d16f329e0068136d88ed0ee852.dip0.t-ipconnect.de)
17:55:24 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds)
17:57:24 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 276 seconds)
18:00:12 × Square quits (~Square@user/square) (Remote host closed the connection)
18:01:47 Square joins (~Square@user/square)
18:02:55 <euouae> I see that I've made my life hard by using two types and a class instead of a single type with two constructors!
18:03:17 <monochrom> That's a common mistake.
18:04:23 <monochrom> Alternatively it is not necessarily a mistake. It depends on which way you want to resolve the Expression Problem.
18:05:03 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
18:05:54 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 260 seconds)
18:06:53 <Leary> euouae: GHC doesn't infer higher rank types; I expect you would have to give `f` an explicit type signature.
18:08:37 <EvanR> or if es can only be two things, make es into ES which has two constructors
18:09:02 <euouae> I solved the es issue with RankNTypes with signatures like m4Builtin :: forall es. State ParserState :> es => M4MacroArgs -> Eff es T.Text
18:09:19 <euouae> but eventually I had to do things like `Either M4Builtin M4Dynamic` for the two members of the M4Macro class
18:09:54 <EvanR> .oO( that's just a rank 1 type )
18:10:01 <euouae> It's not good because Either is not an exclusive sum type exactly (You can have Either Int Int e.g.)
18:10:02 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
18:10:17 <euouae> I think in my case, it was just a imstake, like monochrom said
18:11:11 <euouae> EvanR: ah whoops! It compiles without that extension too
18:11:18 <euouae> I guess I just had to use 'forall'
18:14:22 ouilemur joins (~jgmerritt@user/ouilemur)
18:15:51 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Remote host closed the connection)
18:16:14 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
18:16:48 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
18:19:17 <EvanR> yeah, that's how you put a polymorphic function in a record field
18:20:03 <EvanR> sometimes you see it in GADT constructors which also doesn't require RankN
18:20:27 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
18:20:29 × killy quits (~killy@2.56.252.228) (Ping timeout: 260 seconds)
18:20:56 <EvanR> wait
18:21:21 <EvanR> now the constructor is a higher ranked type, so Maybe RankN is automatically enabled
18:21:44 ystael joins (~ystael@user/ystael)
18:22:17 <Leary> It is included in GHC202*.
18:22:19 killy joins (~killy@terminal-3-187.retsat1.com.pl)
18:25:57 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 248 seconds)
18:27:07 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
18:31:58 <euouae> EvanR: right, good point, the constructor is higher ranked.
18:35:48 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Read error: Connection reset by peer)
18:36:26 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
18:38:27 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
18:39:55 <gentauro> Hey, anybody know why `stack` freezes when installing: `stack --verbose install digest-0.0.2.1` -> (last line) `2025-08-06 20:38:11.697019: [debug] Executing the build plan` and nothing happens …
18:40:30 <gentauro> I tried to Google for an answer, but it seems "pretty local" to my machine …
18:40:42 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
18:41:13 <gentauro> `~/.stack/global-project/stack.yaml` -> `resolver: lts-24.0` on a NixOS box
18:41:20 × wickedjargon quits (~user@S0106f89e28d5699a.vc.shawcable.net) (Remote host closed the connection)
18:42:54 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
18:48:02 × weary-traveler quits (~user@user/user363627) (Remote host closed the connection)
18:48:48 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Read error: Connection reset by peer)
18:49:21 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
18:53:49 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
18:56:08 target_i joins (~target_i@user/target-i/x-6023099)
18:58:34 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
19:00:07 × caconym747 quits (~caconym@user/caconym) (Quit: bye)
19:00:46 caconym747 joins (~caconym@user/caconym)
19:02:39 <euouae> gentauro: is there anything odd about the build plan?
19:09:11 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
19:09:12 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
19:14:00 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
19:16:20 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:16:42 euphores joins (~SASL_euph@user/euphores)
19:20:38 × trickard quits (~trickard@cpe-49-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
19:20:51 trickard_ joins (~trickard@cpe-49-98-47-163.wireline.com.au)
19:24:42 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
19:31:33 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
19:32:59 <gentauro> euouae: there is no build plan …
19:33:24 <gentauro> It's the last statement that printed to the console (debug with --verbose)
19:34:42 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
19:35:58 × machinedgod quits (~machinedg@d75-159-126-101.abhsia.telus.net) (Ping timeout: 240 seconds)
19:41:15 karenw joins (~karenw@user/karenw)
19:42:45 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
19:45:09 × killy quits (~killy@terminal-3-187.retsat1.com.pl) (Ping timeout: 252 seconds)
19:46:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
19:48:53 × ystael quits (~ystael@user/ystael) (Ping timeout: 252 seconds)
19:55:42 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
19:58:08 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
19:58:23 tromp joins (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3)
19:58:49 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
19:58:56 pavonia joins (~user@user/siracusa)
20:00:35 ystael joins (~ystael@user/ystael)
20:02:49 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
20:07:12 × ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 272 seconds)
20:12:16 <karenw> Hello hello. I'm trying to interop with a C function, but my code is hanging inside pokeByteOff when implementing Storeable::poke. I assume it's some kind of deadlock? Any idea how to not do this? (I'm in the IO Monad, no unsafePerformIO or other shenanigans)
20:13:38 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
20:17:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
20:18:02 <int-e> Could it be a circular implementation of Storable? (the default implementation of `pokeByteOff` is `pokeByteOff ptr off = poke (ptr `plusPtr` off)`)
20:20:24 <karenw> Ah, the type had fields which, despite never being used via 'Ptr' needed valid implementations of Storable::poke or they recursed forever.
20:21:54 aruns joins (~aruns@user/aruns)
20:22:16 × jespada quits (~jespada@2800:a4:222e:bc00:a123:c77e:d5dc:3c33) (Ping timeout: 276 seconds)
20:24:45 jespada joins (~jespada@r179-25-247-44.dialup.adsl.anteldata.net.uy)
20:26:28 × tomku quits (~tomku@user/tomku) (Ping timeout: 240 seconds)
20:27:28 tomku joins (~tomku@user/tomku)
20:29:06 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
20:29:59 × Square quits (~Square@user/square) (Ping timeout: 260 seconds)
20:31:35 polykernel joins (~polykerne@user/polykernel)
20:33:33 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
20:33:34 jmcantrell joins (~weechat@user/jmcantrell)
20:34:09 <karenw> Hmph, can't seem to work out how to represent an opaque C pointer on the haskell side. I was doing `newtype VkInstance = VkInstance #type uintptr_t` but it goes kaboom when trying to marshal a VkInstance. (Ptr VkInstance works though)
20:34:56 <geekosaur> `Ptr ()` is the convention, I think, and you just save the pointer rather than trying to marshal it?
20:35:46 <geekosaur> and if you need to deal with its lifetime on the Haskell side, hopefully there's some "free" function C-side and you can instead use `ForeignPtr` with its "free" function as the destructor
20:36:16 <karenw> Yeah, there's vkDestroyInstance
20:36:41 <geekosaur> okay, then you want ForeignPtr
20:37:34 <karenw> `newtype VkInstance = VkInstance (Ptr ())` That works!
20:38:54 × ystael quits (~ystael@user/ystael) (Ping timeout: 260 seconds)
20:42:55 <karenw> So should I do `newtype VkInstance = VkInstance (ForeignPtr ())` or is that the wrong layer of abstraction?
20:44:29 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
20:48:43 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
20:51:47 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
20:52:01 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 248 seconds)
20:59:30 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 248 seconds)
20:59:53 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:04:09 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
21:06:38 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
21:06:39 <geekosaur> `ForeignPtr` is for when you need a C-side destructor to be called when the Haskell side goes out of scope and is garbage collected.
21:07:08 <karenw> Hmm, I still have to explicitly call finalizeForeignPtr before main finishes
21:12:33 jmcantrell joins (~weechat@user/jmcantrell)
21:13:42 × euphores quits (~SASL_euph@user/euphores) (Ping timeout: 272 seconds)
21:17:56 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:17:58 <EvanR> so just explicitly free the resource using the Ptr
21:18:23 <EvanR> or do it inside of a bracket pattern
21:18:27 <geekosaur> that's not unusual if there's no gc before the program finishes
21:18:44 <geekosaur> there's no guarantee whatsoever that a final GC will be run
21:19:48 × euouae quits (~euouae@user/euouae) ()
21:19:59 <karenw> Is 'a bracket pattern' like the various `usingFoo` functions I've seen around?
21:20:11 <monochrom> withFoo, but yes.
21:20:27 <karenw> Makes sense. `withInstance`
21:20:35 <mauke> withFoo = bracket acquireFoo releaseFoo
21:21:35 <monochrom> The bracket pattern is best because it is what C++ RAII dreams of. When execution leaves the scope, whether by "normal return" or "exception killed me", the release is done, you will not leak.
21:22:04 <mauke> RAII is more flexible
21:22:48 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
21:24:29 <monochrom> But I recognize that life is not always ideal. If your use sites can't use the bracket pattern, then explicit release is the next resort. The last resort is that, if you use the threaded runtime, GC is periodically run when idle, including finalizers.
21:26:06 <monochrom> The later actually spoiled some entitled millenials. Their code had a lot of openFile but never hClose. They were like "why unthreaded RTS doesn't work" as if it was not their fault.
21:26:09 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 248 seconds)
21:26:25 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
21:27:36 <karenw> Hmm, `withInstance = bracket createInstance destroyInstance`, but `createInstance` needs an `instanceCreateInfo` argument too...
21:27:59 <mauke> withInstance x = bracket (createInstance x) destroyInstance
21:28:20 <monochrom> Oh it's always like `bracket (openFile filename ReadWriteMode) hClose (\h -> ...)`
21:28:39 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 276 seconds)
21:29:07 <mauke> readFile "lol"
21:29:28 <karenw> So it overall looks like this? https://pastebin.com/FGwTHa8x
21:30:21 <monochrom> I recently did a bracket inception. I had bracket (foo x) hClose, where foo x is itself a bracketOnError (bar y) close
21:31:41 <mauke> karenw: looks plausible, at least
21:32:07 trickard_ is now known as trickard
21:33:24 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:33:48 × phma quits (phma@2001:5b0:211f:bd18:75ac:c42:f158:ecd7) (Read error: Connection reset by peer)
21:37:06 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 276 seconds)
21:37:07 phma joins (phma@2001:5b0:2144:2fc8:608e:cd2e:a6ba:e92f)
21:37:16 weary-traveler joins (~user@user/user363627)
21:38:14 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
21:38:57 × tromp quits (~textual@2001:1c00:3487:1b00:788c:1b3f:625a:cce3) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:45:47 × phma quits (phma@2001:5b0:2144:2fc8:608e:cd2e:a6ba:e92f) (Read error: Connection reset by peer)
21:48:48 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
21:49:50 phma joins (~phma@2001:5b0:211f:e928:45c9:c5e:3037:5ac6)
21:53:21 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
21:55:18 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
22:02:28 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
22:04:17 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:05:30 × sp1ff```` quits (~user@c-24-21-190-184.hsd1.wa.comcast.net) (Remote host closed the connection)
22:09:09 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
22:09:40 <karenw> Does peekArray copy the values to haskell-owned memory, or do I need to keep the c-owned memory around?
22:11:20 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
22:11:47 <EvanR> it yields a haskell list of haskell values
22:12:05 <EvanR> that were marshalled from the FFI world
22:12:43 <karenw> So I can let the c memory get freed?
22:13:45 <EvanR> the critical thing to wonder about is if the list and the values are all constructed before peekArray finishes, or if it's doing some weird lazy I/O
22:14:08 <karenw> Yes, that's what I'm asking, I think. Is peekArray lazy or strict
22:14:10 <EvanR> it seems to be the first thing, which means the array can go to hell
22:14:25 <EvanR> this is what I gather from looking at the code for peekArray
22:16:18 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 252 seconds)
22:16:57 <EvanR> note if you were the one who created the array for temporary purposes, there's a "bracket" for that too
22:17:29 <EvanR> allocaArray
22:18:39 <karenw> Ah, I was using allocaBytes
22:19:45 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:21:26 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
22:23:43 × infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 245 seconds)
22:24:38 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
22:30:22 Sgeo joins (~Sgeo@user/sgeo)
22:32:53 Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net)
22:35:10 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:39:45 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
22:44:39 infinity0 joins (~infinity0@pwned.gg)
22:47:48 L29Ah joins (~L29Ah@wikipedia/L29Ah)
22:50:21 jmcantrell joins (~weechat@user/jmcantrell)
22:50:38 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
22:52:09 × Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 252 seconds)
22:57:25 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
23:02:18 jackdk joins (uid373013@cssa/life/jackdk)
23:04:12 Lycurgus joins (~juan@user/Lycurgus)
23:08:41 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
23:13:52 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
23:21:22 Square joins (~Square@user/square)
23:38:58 × FANTOM quits (~fantom@87.74.59.94) (Ping timeout: 240 seconds)
23:40:06 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
23:40:19 × connrs quits (~connrs@user/connrs) (Ping timeout: 260 seconds)
23:42:14 × poscat0x04 quits (~poscat@user/poscat) (Remote host closed the connection)
23:44:40 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
23:45:22 poscat joins (~poscat@user/poscat)
23:45:48 × acidjnk quits (~acidjnk@p200300d6e71719397d9aab65da8bb5e6.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
23:49:20 × karenw quits (~karenw@user/karenw) (Read error: Connection reset by peer)
23:50:05 karenw joins (~karenw@user/karenw)
23:54:04 × sprotte24 quits (~sprotte24@p200300d16f329e0068136d88ed0ee852.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
23:55:29 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
23:59:11 connrs joins (~connrs@user/connrs)
23:59:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)

All times are in UTC on 2025-08-06.