Logs: liberachat/#haskell
| 2021-05-27 11:14:23 | × | ksqsf quits (~textual@67.209.186.120.16clouds.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-05-27 11:14:43 | × | ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Quit: Quit) |
| 2021-05-27 11:14:56 | → | ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) |
| 2021-05-27 11:15:21 | → | smr joins (~smn@91-114-147-117.adsl.highway.telekom.at) |
| 2021-05-27 11:16:58 | × | urdh quits (~urdh@h88-129-148-132.cust.a3fiber.se) (Ping timeout: 264 seconds) |
| 2021-05-27 11:18:06 | × | tricklynch quits (~tricklync@216-180-94-57.starry-inc.net) (Quit: Quit) |
| 2021-05-27 11:19:12 | → | urdh joins (~urdh@h88-129-148-132.cust.a3fiber.se) |
| 2021-05-27 11:19:57 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 272 seconds) |
| 2021-05-27 11:20:12 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Remote host closed the connection) |
| 2021-05-27 11:20:33 | → | holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) |
| 2021-05-27 11:21:18 | cf | is now known as nf |
| 2021-05-27 11:21:25 | <dminuoso> | Philonous_: refer to http://blog.johantibell.com/2011/06/computing-size-of-hashmap.html |
| 2021-05-27 11:21:43 | <dminuoso> | At first glance, it seems the 9 bytes is old. |
| 2021-05-27 11:21:47 | <dminuoso> | *9 words |
| 2021-05-27 11:22:30 | × | Gurkenglas quits (~Gurkengla@dslb-088-075-022-175.088.075.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 2021-05-27 11:22:47 | → | oxide joins (~lambda@user/oxide) |
| 2021-05-27 11:23:57 | <dminuoso> | Presumably bytestring got reworked, but the memory requirements table was not updated |
| 2021-05-27 11:24:10 | × | urdh quits (~urdh@h88-129-148-132.cust.a3fiber.se) (Ping timeout: 264 seconds) |
| 2021-05-27 11:24:24 | → | Megant joins (~kaitsu@user/megant) |
| 2021-05-27 11:24:24 | ts1 | is now known as st |
| 2021-05-27 11:24:56 | → | urdh joins (~urdh@h88-129-148-132.cust.a3fiber.se) |
| 2021-05-27 11:26:15 | <dminuoso> | So judging from this, you're also off on your assumption about ForeignPtr, there's more than just an address in there |
| 2021-05-27 11:27:45 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Remote host closed the connection) |
| 2021-05-27 11:28:00 | → | holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) |
| 2021-05-27 11:28:19 | → | agumonke` joins (~user@88.160.31.174) |
| 2021-05-27 11:30:49 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Remote host closed the connection) |
| 2021-05-27 11:30:59 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-05-27 11:31:55 | → | holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) |
| 2021-05-27 11:32:07 | <dminuoso> | If my math isnt off, it seems a current ByteString has 8 bytes of overhead it created on the heap |
| 2021-05-27 11:32:13 | <dminuoso> | plus the content |
| 2021-05-27 11:32:23 | <dminuoso> | *8 words. |
| 2021-05-27 11:32:25 | <dminuoso> | gosh |
| 2021-05-27 11:33:07 | <Philonous_> | Right, they removed the offset |
| 2021-05-27 11:33:15 | <kritzefitz> | Is it just me or is it kinda confusing that ForeignPtrs are freed by Haskell's (i.e. the “native”) garbage collector? |
| 2021-05-27 11:34:18 | → | smitop joins (uid328768@user/smitop) |
| 2021-05-27 11:34:30 | × | guest0123 quits (~aaron@2601:602:a080:fa0:745b:c700:b4c:aac3) (Ping timeout: 264 seconds) |
| 2021-05-27 11:34:58 | × | ku quits (~ku@2601:280:c780:7ea0:8d75:13f2:a7bb:13b1) (Ping timeout: 264 seconds) |
| 2021-05-27 11:35:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-05-27 11:37:03 | <adamse> | kritzefitz: what the gc does with the underlying storage depends a bit on what ForeignPtr you have right? |
| 2021-05-27 11:38:12 | → | ddellacosta joins (~ddellacos@86.106.121.23) |
| 2021-05-27 11:39:00 | <kritzefitz> | adamse, yeah, forget that said “freed”. I'm mostly bugged by the fact that ForeignPtrs are tracked by the garbage collector while non-foreign Ptrs aren't (apart from the pointer itself). |
| 2021-05-27 11:40:27 | <dminuoso> | Well, isnt that the whole point of them? |
| 2021-05-27 11:40:44 | × | lcp quits (~hellcp@83.24.148.243.ipv4.supernova.orange.pl) (Quit: lcp) |
| 2021-05-27 11:40:52 | <dminuoso> | Or do you expect the finalizers to fire magically, without assistance? |
| 2021-05-27 11:41:09 | → | hellcp joins (~hellcp@83.24.148.243.ipv4.supernova.orange.pl) |
| 2021-05-27 11:41:45 | ← | hellcp parts (~hellcp@83.24.148.243.ipv4.supernova.orange.pl) () |
| 2021-05-27 11:41:53 | <kritzefitz> | No, I just find the naming confusing. Like, both Ptrs but ForeignPtrs point to foreign data. I don't see how adding “Foreign” to the name signifies the tracking by the gc. |
| 2021-05-27 11:42:25 | ← | YiChen` parts (~user@222.94.45.34) (ERC (IRC client for Emacs 28.0.50)) |
| 2021-05-27 11:42:41 | <dminuoso> | The word foreign denotes that the memory region is, usually, managed by a foreign library. |
| 2021-05-27 11:42:53 | → | danidiaz joins (~ESDPC@static-184-112-86-188.ipcom.comunitel.net) |
| 2021-05-27 11:43:10 | <dminuoso> | Do you have a better prefix? |
| 2021-05-27 11:43:22 | → | o1lo01ol1o joins (~o1lo01ol1@cpe-74-72-45-166.nyc.res.rr.com) |
| 2021-05-27 11:43:27 | × | ddellacosta quits (~ddellacos@86.106.121.23) (Ping timeout: 244 seconds) |
| 2021-05-27 11:43:49 | Philonous_ | is now known as Philonous |
| 2021-05-27 11:44:24 | <kritzefitz> | Not sure, “GCTracked“ comes to mind, but it seems a bit verbose. |
| 2021-05-27 11:44:53 | <opqdonut> | just call them Ptr and Qtr |
| 2021-05-27 11:45:03 | <opqdonut> | supports later expansion to Otr and Rtr |
| 2021-05-27 11:45:08 | <opqdonut> | or perhaps Ptr and Ptr' |
| 2021-05-27 11:45:35 | <dminuoso> | Naming is hard. :) |
| 2021-05-27 11:45:50 | <dminuoso> | Eventually you will always find a reason why a chosen name is bad. |
| 2021-05-27 11:46:15 | <__monty__> | kritzefitz: But that suggests the memory region is managed by the GC, which isn't what happens right? |
| 2021-05-27 11:47:01 | × | asthasr quits (~asthasr@162.210.29.120) (Quit: asthasr) |
| 2021-05-27 11:47:57 | <dminuoso> | kritzefitz: Usually the intend is that ForeignPtr points towards memory owned/managed by a foreign (ffi) library. The GC interaction is just so finalizers back into FFI can be called whenever Haskell loses track of it. |
| 2021-05-27 11:48:04 | <dminuoso> | Personally I find the name okay. |
| 2021-05-27 11:48:16 | × | o1lo01ol1o quits (~o1lo01ol1@cpe-74-72-45-166.nyc.res.rr.com) (Ping timeout: 264 seconds) |
| 2021-05-27 11:48:37 | <Philonous> | I think it's one of those things that could go both ways, like "safe" and "unsafe" ffi calls. We own the pointer but we have to call a foreign finalizer. |
| 2021-05-27 11:51:31 | <kritzefitz> | I don't find the notion that a foreign library “owns” the memory region really useful. Ultimately the GC own no memory, the closest it gets is just borrowing it directly from the kernel. A ForeignPtr feels more native to me in that (usually) the GC decides how long it lives (assuming the finalizer actually causes the foreign libraty to free the memory). |
| 2021-05-27 11:52:25 | → | avzorov joins (~textual@114.129.18.130) |
| 2021-05-27 11:52:55 | <kritzefitz> | Whereas plain Ptrs feel much more foreign in some cases. For example, if we receive a pointer in a call from C to Haskell, we might have no control whatsoever over the lifetime of the memory, because the memory is entirely managed (allocated and freed) by the caller. |
| 2021-05-27 11:53:29 | <dminuoso> | Ah, I think I see what you are getting at. |
| 2021-05-27 11:53:59 | <dminuoso> | Then yeah, perhaps TrackedPtr would have been a better name. |
| 2021-05-27 11:54:05 | <dminuoso> | Or FinalizingPtr |
| 2021-05-27 11:54:17 | → | Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr) |
| 2021-05-27 11:54:41 | → | guest0123 joins (~aaron@2601:602:a080:fa0:3d68:2a1a:74b4:e9fa) |
| 2021-05-27 11:55:05 | <opqdonut> | Ptr is just a pointer with no additional semantics, ForeingPtr is something like AllocatedRegion, right? |
| 2021-05-27 11:55:13 | → | hughjfchen joins (~hughjfche@120.229.94.210) |
| 2021-05-27 11:55:25 | → | ddellacosta joins (~ddellacos@89.46.62.112) |
| 2021-05-27 11:55:30 | <dminuoso> | ForeignPtr is just a Ptr with finalizers attached to it |
| 2021-05-27 11:56:24 | × | hughjfchen quits (~hughjfche@120.229.94.210) (Client Quit) |
| 2021-05-27 11:56:55 | → | involans joins (~alex@cpc92718-cmbg20-2-0-cust157.5-4.cable.virginm.net) |
| 2021-05-27 11:59:29 | <kritzefitz> | I don't even want to say that Ptrs are necessarily “more foreign” than ForeignPtrs. Ptrs just seems more general in both directions. The distinction between the two types seems orthogonal to their “foreignness” to me. |
| 2021-05-27 11:59:50 | <kritzefitz> | I like FinalizingPtr. It seems really on point about their difference. |
| 2021-05-27 12:00:29 | × | ddellacosta quits (~ddellacos@89.46.62.112) (Ping timeout: 272 seconds) |
| 2021-05-27 12:01:00 | × | avzorov quits (~textual@114.129.18.130) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-05-27 12:01:52 | ← | involans parts (~alex@cpc92718-cmbg20-2-0-cust157.5-4.cable.virginm.net) (WeeChat 2.3) |
| 2021-05-27 12:02:29 | × | ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Quit: Quit) |
| 2021-05-27 12:04:06 | → | involans joins (~alex@cpc92718-cmbg20-2-0-cust157.5-4.cable.virginm.net) |
| 2021-05-27 12:06:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-27 12:06:18 | → | o1lo01ol1o joins (~o1lo01ol1@cpe-74-72-45-166.nyc.res.rr.com) |
| 2021-05-27 12:07:43 | × | zyzzyxdonta quits (~zyzzyxdon@p54bdfd77.dip0.t-ipconnect.de) (Quit: Leaving) |
| 2021-05-27 12:08:59 | → | spirgel_ joins (spirgel@gateway/vpn/protonvpn/spirgel) |
| 2021-05-27 12:10:54 | × | hmmmas quits (~chenqisu1@183.217.202.217) (Quit: Leaving.) |
| 2021-05-27 12:11:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-05-27 12:12:19 | × | spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds) |
| 2021-05-27 12:14:25 | → | ddellacosta joins (~ddellacos@86.106.121.40) |
| 2021-05-27 12:15:18 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Ping timeout: 264 seconds) |
| 2021-05-27 12:15:22 | → | fm joins (~fmeyer@p2e5339c6.dip0.t-ipconnect.de) |
| 2021-05-27 12:15:56 | → | Toast52 joins (~Toast52@151.192.167.120) |
| 2021-05-27 12:16:32 | ← | albertodvp parts (~user@185.137.204.140) (ERC (IRC client for Emacs 26.3)) |
| 2021-05-27 12:17:17 | → | haskman joins (~haskman@106.212.143.206) |
All times are in UTC.