« *
@chrisnicholas.dev
1
Final trick: ditch decimal for base 96. That's every printable ASCII character,…
@chrisnicholas.dev
2
Pushing to the end is the most common list operation, so in real apps indices c…
@chrisnicholas.dev
3
Real decimals have a catch too. Keep adding to the end of a list and floating p…
@chrisnicholas.dev
4
If Alice and Bob happen to choose the identical index, say `0.75`, there's no w…
@chrisnicholas.dev
5
Using this method, every change affects only one index, so other items don't ge…
@chrisnicholas.dev
6
Fractional indexing turns this around. Rather than deriving an index from posit…
@chrisnicholas.dev
7
Concurrent edits make it worse. Say Alice adds an item while Bob removes one. T…
@chrisnicholas.dev
8
Let's start with a regular array. An item's index is just its position, so inse…
@chrisnicholas.dev
9
Ever wondered how Figma keeps a shared list in the same order for everyone? Reg…
@chrisnicholas.dev
#
More
Back a page
Bluesky home
☆ Save to home
·
0 Home
·
Find
·
Games
·
Chat
·
AI
·
Setup