Catherine West

Results 24 comments of Catherine West

I license past and future contributions under the triple MIT OR Apache-2.0 OR Zlib license, allowing licensees to choose any one at their option.

Just to be clear (I haven't tried this), is it the automatic `Collect` implementation that triggers an error? During compilation?

Hm, maaaaybe, but using luster for anything serious is probably a ways off. I dunno, I'd have to think about exactly how to do it. I think after luster is...

> Before I start poking around in Table, do you have thoughts on an approach? Not yet, I need to do some research into how precisely next works in puc...

Okay, so as suspected PUC-Lua just walks the hash buckets in order to find a next value. The guarantee about supporting deletions as you iterate through is because a rehash...

> Lua says that deletions and modifications are okay, but insertions are not okay whilst iterating, but it doesn't enforce that at the language level like a Rust implementation would....

> Deletions wouldn't work with an IndexMap either. The last item is moved to fill the gap, messing up the indices. I can't see any easy solution yet. That's a...

Ahhhh, you beat me to it, nice work! I'm not an expert at hash map implementations at all, but I was thinking of just porting [one](https://github.com/kyren/flat-hash-table/blob/master/include/flat_hash_table.hpp) that I had written...

> 1 and 3: Oops, that's a late-night bug. It's meant to bail out of the find() when it finds Empty, but not Tombstone (which could indicate something in between...

Maybe IndexMap + delay removes until the next insert *is* the right solution. IndexMap is respectably fast, at least.. I think PUC-Lua plays some garbage collector games with dead indexes...