Logs: liberachat/#haskell
| 2025-11-22 09:45:00 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 2025-11-22 09:48:57 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-22 09:49:44 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 09:52:33 | → | acidjnk joins (~acidjnk@p200300d6e71719523cbe3f8115602cb8.dip0.t-ipconnect.de) |
| 2025-11-22 09:52:34 | <tomsmeding> | I have two ForeignPtrs pointing to resources on some external device; the finaliser for ForeignPtr 1 needs ForeignPtr 2 in order to properly free its resource. (FP 2 is some kind of "device context", and FP 1 wraps an "object" on that device.) This means that the finaliser for FP 2 may only start running after the finaliser for FP 1 has fully completed. GHC does not honour ordering dependencies |
| 2025-11-22 09:52:34 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 2025-11-22 09:52:36 | <tomsmeding> | between finalisers of ForeignPtrs, and this results in crashes in practice for us. Is there some standard pattern I can apply here to still make my code work? |
| 2025-11-22 09:54:05 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2025-11-22 09:55:40 | <tomsmeding> | s/may only start/must only be allowed to start/ |
| 2025-11-22 09:55:48 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 2025-11-22 09:56:10 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 245 seconds) |
| 2025-11-22 10:02:08 | × | tromp quits (~textual@2001:1c00:3487:1b00:697a:bc7a:f580:408c) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-22 10:05:07 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 10:07:43 | → | tromp joins (~textual@2001:1c00:3487:1b00:697a:bc7a:f580:408c) |
| 2025-11-22 10:08:22 | <Leary> | tomsmeding: <https://hackage.haskell.org/package/base-4.21.0.0/docs/Foreign-ForeignPtr.html#v:touchForeignPtr>, but based on the docs you might be SOL. |
| 2025-11-22 10:08:32 | × | trickard quits (~trickard@cpe-87-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-22 10:08:45 | → | trickard_ joins (~trickard@cpe-87-98-47-163.wireline.com.au) |
| 2025-11-22 10:09:01 | <tomsmeding> | Leary: That documentation is why I came here. :P |
| 2025-11-22 10:09:31 | <tomsmeding> | I do love the unexpected deadlock situation that the docs describe |
| 2025-11-22 10:09:49 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-11-22 10:10:38 | <Leary> | Well, add more `forkIO`, I guess. |
| 2025-11-22 10:11:16 | <tomsmeding> | Yes, I'm not scared of a couple more forkIO, but it's a brilliant footgun |
| 2025-11-22 10:12:34 | → | X-Scale joins (~ARM@6.67.114.89.rev.vodafone.pt) |
| 2025-11-22 10:15:02 | <jreicher> | ForkIO Asks a Question... |
| 2025-11-22 10:19:59 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 10:24:02 | × | tromp quits (~textual@2001:1c00:3487:1b00:697a:bc7a:f580:408c) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-22 10:24:34 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-11-22 10:27:46 | → | tromp joins (~textual@2001:1c00:3487:1b00:697a:bc7a:f580:408c) |
| 2025-11-22 10:30:41 | × | synchromesh quits (~john@2406:5a00:2412:2c00:1c88:6424:1e2a:539d) (Quit: WeeChat 4.1.1) |
| 2025-11-22 10:34:15 | × | trickard_ quits (~trickard@cpe-87-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-22 10:34:29 | → | trickard_ joins (~trickard@cpe-87-98-47-163.wireline.com.au) |
| 2025-11-22 10:35:22 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 10:35:59 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2025-11-22 10:39:54 | → | __monty__ joins (~toonn@user/toonn) |
| 2025-11-22 10:42:06 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-22 10:53:24 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 10:58:09 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-11-22 11:08:47 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 11:13:19 | → | sp1ff` joins (~user@2601:1c2:4c00:6820::e122) |
| 2025-11-22 11:13:19 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-22 11:14:26 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 2025-11-22 11:14:29 | × | sp1ff quits (~user@2601:1c2:4c00:6820::8bad) (Ping timeout: 260 seconds) |
| 2025-11-22 11:14:36 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-22 11:20:59 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 11:21:35 | × | annamalai quits (~annamalai@157.32.221.227) (Ping timeout: 245 seconds) |
| 2025-11-22 11:25:44 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-22 11:32:25 | × | jreicher quits (~user@user/jreicher) (Quit: In transit) |
| 2025-11-22 11:35:50 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2025-11-22 11:36:22 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 11:36:29 | <probie> | I think a ref count is a good idea. |
| 2025-11-22 11:37:17 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Quit: ljdarj) |
| 2025-11-22 11:38:59 | <probie> | f = atomicModifyIORef ref (\x -> (x-1, x <= 1)) >>= (`when` runFP2Cleanup) |
| 2025-11-22 11:39:34 | <probie> | initialise the ref to 2, add `f` as the last instruction to the finaliser for FP1, and have the finaliser for FP2 just be `f` |
| 2025-11-22 11:40:43 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds) |
| 2025-11-22 11:51:46 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 11:54:43 | <tomsmeding> | probie: that's also a cute solution |
| 2025-11-22 11:55:52 | <tomsmeding> | in this case, because of the semantics of the device (it's a GPU), cleaning up FP2 _before_ FP1 implicitly also cleans up FP1, so I implemented some synchronisation so that if the finalizer of FP2 happens to be run first, FP1's finalizer just does nothing |
| 2025-11-22 11:56:38 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-11-22 11:56:45 | <tomsmeding> | (what is actually concretely disallowed is explicitly cleaning up FP1 after FP2, or running the two in parallel) |
| 2025-11-22 11:58:54 | trickard_ | is now known as trickard |
| 2025-11-22 12:00:55 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 264 seconds) |
| 2025-11-22 12:06:32 | × | X-Scale quits (~ARM@6.67.114.89.rev.vodafone.pt) (Ping timeout: 240 seconds) |
| 2025-11-22 12:07:10 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 12:11:19 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-22 12:17:35 | → | ubert1 joins (~Thunderbi@91.141.74.115.wireless.dyn.drei.com) |
| 2025-11-22 12:19:15 | × | tromp quits (~textual@2001:1c00:3487:1b00:697a:bc7a:f580:408c) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-22 12:19:38 | → | Everything joins (~Everythin@88.155.11.254) |
| 2025-11-22 12:19:40 | × | ubert quits (~Thunderbi@77.119.163.162.wireless.dyn.drei.com) (Ping timeout: 246 seconds) |
| 2025-11-22 12:19:41 | ubert1 | is now known as ubert |
| 2025-11-22 12:19:59 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-22 12:21:59 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 12:24:12 | → | X-Scale joins (~ARM@6.67.114.89.rev.vodafone.pt) |
| 2025-11-22 12:26:24 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-11-22 12:30:04 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 255 seconds) |
| 2025-11-22 12:37:01 | → | jreicher joins (~user@user/jreicher) |
| 2025-11-22 12:37:10 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-22 12:37:31 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 12:39:15 | × | trickard quits (~trickard@cpe-87-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-22 12:39:28 | → | trickard_ joins (~trickard@cpe-87-98-47-163.wireline.com.au) |
| 2025-11-22 12:42:04 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2025-11-22 12:42:13 | × | Googulator57 quits (~Googulato@85-238-67-234.pool.digikabel.hu) (Quit: Client closed) |
| 2025-11-22 12:42:36 | → | Googulator57 joins (~Googulato@2a01-036d-0106-0231-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) |
| 2025-11-22 12:45:13 | × | AlexZenon quits (~alzenon@94.233.240.123) (Quit: ;-) |
| 2025-11-22 12:46:06 | × | AlexNoo quits (~AlexNoo@94.233.240.123) (Quit: Leaving) |
| 2025-11-22 12:46:32 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 2025-11-22 12:48:02 | mniip_ | is now known as mniip |
| 2025-11-22 12:52:34 | × | trickard_ quits (~trickard@cpe-87-98-47-163.wireline.com.au) (Ping timeout: 246 seconds) |
| 2025-11-22 12:52:54 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 12:52:57 | → | trickard_ joins (~trickard@cpe-87-98-47-163.wireline.com.au) |
| 2025-11-22 12:57:32 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-22 13:08:17 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 13:12:48 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-22 13:12:50 | × | falafel quits (~falafel@2603:8000:ca00:83fb:1db5:6d25:28c0:7c1c) (Ping timeout: 256 seconds) |
| 2025-11-22 13:13:38 | × | Nachtgespenst quits (~user@user/siracusa) (Quit: Bye!) |
| 2025-11-22 13:20:13 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 246 seconds) |
| 2025-11-22 13:20:33 | → | AlexNoo joins (~AlexNoo@94.233.240.123) |
| 2025-11-22 13:21:46 | → | AlexZenon joins (~alzenon@94.233.240.123) |
| 2025-11-22 13:23:00 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-22 13:24:21 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-22 13:29:43 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
All times are in UTC.