Newest at the top
2024-10-24 21:31:43 +0200 | <geekosaur> | but the popinters to other limbs can be reused |
2024-10-24 21:31:34 +0200 | <geekosaur> | the point here is that everything is immutable, so an entire tree limb in either case will be replaced which requires the path to that limb to be replaced |
2024-10-24 21:31:29 +0200 | <int-e> | Unused old parts will eventually be garbage collected. |
2024-10-24 21:31:11 +0200 | <int-e> | You construct new trees, reusing parts of old trees. The new parts are freshly allocated on the heap. |
2024-10-24 21:30:56 +0200 | <mauke> | by inserting and removing elements? |
2024-10-24 21:30:45 +0200 | <zzz> | and shrink? |
2024-10-24 21:30:36 +0200 | <zzz> | mauke: how do Sets grow? |
2024-10-24 21:30:20 +0200 | <mauke> | trees aren't modified in place |
2024-10-24 21:30:13 +0200 | <int-e> | zzz: that's not correct |
2024-10-24 21:30:13 +0200 | <mauke> | no, there absolutely will be |
2024-10-24 21:30:00 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-24 21:29:50 +0200 | <zzz> | geekosaur: yes, what i mean is that in the case of Map the tree is always the same size, so there won't be any garbage collection on updates |
2024-10-24 21:29:49 +0200 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
2024-10-24 21:29:15 +0200 | <int-e> | That's also true for Set x, but the tree will be smaller. |
2024-10-24 21:28:36 +0200 | <int-e> | Map x Bool is persistent; rather than modifying values, "updates" will recreate a path in a tree to the updated key and reuse the other parts of the tree. |
2024-10-24 21:27:57 +0200 | <geekosaur> | eh? they're both trees, one carries a little extra data |
2024-10-24 21:27:19 +0200 | <zzz> | not only that, i'm guessing Map x Bool will allocate a fixed chunk of memory from the start, while Set x will grow and/or shrink? But this is beyond what i understand about the low levels of GHC |
2024-10-24 21:26:41 +0200 | <geekosaur> | pointer to value, constructor tag |
2024-10-24 21:26:34 +0200 | <geekosaur> | sorry, two |
2024-10-24 21:26:18 +0200 | <geekosaur> | 3 machine words, I think? |
2024-10-24 21:26:09 +0200 | <geekosaur> | Bool won't cost you mugh though |
2024-10-24 21:25:58 +0200 | <geekosaur> | it will cost a little more memory, yes |
2024-10-24 21:25:44 +0200 | <zzz> | but i'm thinking about memory management |
2024-10-24 21:25:42 +0200 | <geekosaur> | well, presumably they will check the value if it's Map x Bool, which will slightly slow things down |
2024-10-24 21:25:36 +0200 | <zzz> | i guess from a moral stance, Set is better because the "not specified" case is unrepresentable |
2024-10-24 21:25:09 +0200 | <mauke> | Set x ~ Map x () |
2024-10-24 21:24:56 +0200 | <zzz> | no, in the case of going with Map, all keys will be initialized from the start |
2024-10-24 21:23:53 +0200 | <geekosaur> | that is, do you care about "not specified"? |
2024-10-24 21:23:40 +0200 | <geekosaur> | I think there's less a performance question than a presence issue |
2024-10-24 21:23:24 +0200 | Square | (~Square@user/square) (Ping timeout: 246 seconds) |
2024-10-24 21:23:22 +0200 | <zzz> | performance-wise |
2024-10-24 21:22:51 +0200 | <zzz> | what should i keep in mind when chosing between `Set x` and `Map x Bool` for setting/checking flags? |
2024-10-24 21:19:27 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-10-24 21:18:57 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2024-10-24 21:14:12 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-24 21:12:55 +0200 | <sinbad> | I ma using the latest version (0.0.18) and the passwordLookupSync take 3 arguments |
2024-10-24 21:12:43 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 264 seconds) |
2024-10-24 21:12:21 +0200 | hgolden__ | (~hgolden@146.70.173.37) (Ping timeout: 248 seconds) |
2024-10-24 21:09:52 +0200 | hgolden_ | (~hgolden@static-198-44-129-115.cust.tzulo.com) hgolden |
2024-10-24 21:08:00 +0200 | <sinbad> | geekosaur: yes I might. however with the full program I get the same error |
2024-10-24 21:07:51 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-10-24 21:06:35 +0200 | <geekosaur> | one little issue I noticed is that the error mentions `it` which means you were doing this in ghci, not a Haskell program, which might affect things |
2024-10-24 21:05:54 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-10-24 21:05:15 +0200 | <mauke> | sinbad: https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-Cancellable.html#t:Cancellable |
2024-10-24 21:03:43 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds) |
2024-10-24 21:00:37 +0200 | caconym | (~caconym@user/caconym) caconym |
2024-10-24 21:00:02 +0200 | caconym | (~caconym@user/caconym) (Quit: bye) |
2024-10-24 20:58:57 +0200 | <lxsameer> | zzz: awesome, thank you |
2024-10-24 20:58:26 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-24 20:58:01 +0200 | <zzz> | (Warp is to Haskell what hyper (tokio based) is to Rust) |