02:57 | <Jack Works> | oh I wonder what's the motivation for BigInt TAs |
02:58 | <Jack Works> | I thought TA is for low level calculations, is there a cross-platform representation (like IEEE floating points) for BigInt? |
02:58 | <shu> | oh the TAs aren't actually storing BigInts, they're storing (u)int64 |
02:59 | <shu> | but to get the values out / or assign into them we need to put them into BigInts |
02:59 | <shu> | since Numbers don't have enough bits to hold int64s |
03:01 | <Jack Works> | 🤔 so it cannot store infinitely big number? |
03:02 | <Jack Works> | oh I see |
08:46 | <Domenic> | So here is a fun case. On the web platform we have OK. So what happens if you mutate during iteration? In particular, consider starting with keys If we naively copy We could output |
08:58 | <Robert Pamely> | I haven't run this, but from what I can tell in c++ it would just move on to "d" because "b" is behind the iterator. That's logically what I would expect myself. |
09:01 | <Robert Pamely> | So I guess that's the middle option you gave reading again. If you insert during iteration you could miss elements. |
09:28 | <Ashley Claymore> | TIL, Map delete doesn't actually remove the entry from the list (but implementations can avoid the memory leak) |
09:29 | <Ashley Claymore> |
|
09:33 | <Ashley Claymore> | so to see a map key twice looks like need to delete and then re-set |
09:35 | <Ashley Claymore> | I'm +1 on Robert Pamely . Inserting behind the sorted position of the iterator would result in that entry not being seen, and the current entry not being seen twice |
15:45 | <bakkot> | +1 to ["a", "c", "d"] ; that's also consistent with e.g. Java's ConcurrentSkipListMap and separately I think is the least unexpected from first principles |
15:45 | <bakkot> | I think for sorted collections you should not expect that things added during iteration are necessarily visited |