josephg/diamond-types
View on GitHub ↗ ★ 1,852 Rust
The world's fastest CRDT. WIP.
20 mentions on Hacker News by 9 people: 1 story, 19 comments · first 2021-07-28 · latest 2026-08-04
20082026
-
…and down to reason about. Here’s a 150 line long function I wrote which I think is quite beautiful: https://github.com/josephg/diamond-types/blob/e143890a596aaf... This function traverses a DAG given 2 points in the dag, A and B. It breaks…
comment by josephg · 2026-08-04 · in "Clean" Code, Horrible Performance (2023) -
…diamond-types has done really good work here, with an explanation of their internals here: https://github.com/josephg/diamond-types/blob/master/INTERNA... In conclusion, the article seems to be really down on CRDTs in general, whereas I…
comment by miloignis · 2026-03-16 · in Lies I was told about collaborative editing, Part 2: Why we don't use Yjs -
…all that trait foo is what makes it headache inducing. I swear its worth it. [1] Eg MergableSpan: https://github.com/josephg/diamond-types/blob/00f722d6ebdc9f...
comment by josephg · 2025-08-20 · in CRDT: Text Buffer -
…Readme [0]: >And since that blog post came out, performance has increased another 10-80x (!). [0] https://github.com/josephg/diamond-types
comment by riedel · 2024-08-28 · in Faster CRDTs (2021) -
…- it’s an internal only type and the code is new enough that the paint hasn’t dried yet. https://github.com/josephg/diamond-types/blob/master/src/ost...
comment by josephg · 2024-07-23 · in Ask HN: Fast data structures for disjoint intervals? -
…thought has gone into the raw performance you need for text CRDTs that can handle large documents: https://github.com/josephg/diamond-types
comment by holmesworcester · 2023-09-12 · in Quiet – Encrypted P2P team chat with no servers, just Tor -
…In any case, I agree with the metaphor and batching granular operations can always be done. [1]: https://github.com/josephg/diamond-types
comment by vivegi · 2023-05-10 · in Ask HN: What is new in algorithms and data structures these days? -
…- Peritext: https://www.inkandswitch.com/peritext/ - Dimond types: https://github.com/josephg/diamond-types People building eventually consistent database syncing with them: - https://electric-sql.com (Postgres <-> SQLite) -
comment by samwillis · 2023-05-10 · in Ask HN: What is new in algorithms and data structures these days? -
…that queue definition if I wanted to, but it makes the compiler's errors better leaving it in. [1] https://github.com/josephg/diamond-types/blob/66025b99dbe390...
comment by josephg · 2023-04-14 · in Elixir and Rust is a good mix -
…even if it might be slower than yjs (or yrs, its Rust implementation) or diamond-types. [0] https://github.com/josephg/diamond-types [1] https://github.com/automerge/autosurgeon
comment by satvikpendem · 2023-01-31 · in Automerge 2.0 -
…Yjs, Kevin Jahns) * https://github.com/y-crdt/ypy (python bindings for the rust implementation) * https://github.com/josephg/diamond-types (Seph Gentle's rust implementation of YATA, the algorith behind Yjs)
comment by sirodoht · 2023-01-31 · in Automerge 2.0 -
…(151 comments)], by the creator of another CRDT in Rust library, Diamond Types [ https://github.com/josephg/diamond-types ]
comment by satvikpendem · 2023-01-31 · in Automerge 2.0 -
…remarkable. Devastating for the ego, but remarkable. Edit: Simple dbg_check implementation example: https://github.com/josephg/diamond-types/blob/3eb48478fd879e... And here's a simple fuzz tester: https://github.com/josephg/jumprope-rs/blob…
comment by josephg · 2023-01-01 · in Adding design-by-contract conditions to C++ via a GCC plugin -
…think of a way to implement text on your proposed system which would be performant and simple. [1] https://github.com/josephg/diamond-types
comment by josephg · 2022-12-06 · in You might not need a CRDT -
…https://github.com/josephg/reference-crdts [2] https://home.seph.codes/public/node_graph.svg [3] https://github.com/josephg/diamond-types/tree/master/src/lis...
comment by josephg · 2022-04-21 · in WebAssembly 2.0 First Working Draft -
…CRDT which fits in 100 lines of javascript. The next piece of work is marrying them together. [1] https://github.com/josephg/diamond-types/ [2] https://josephg.com/blog/crdts-go-brrr/ [3] https://github.com/y-crdt/y-crdt/tree/main/yrs [4]…
comment by josephg · 2022-04-16 · in I was wrong – CRDTs are the future (2020) -
…Code is here, if anyone is interested. The whole thing is a few hundred lines all up: https://github.com/josephg/diamond-types/tree/0cb5d7ecf49364...
comment by josephg · 2022-04-11 · in Conflict-Free Replicated Data Types (CRDT) -
…"truncate" method splits an item in two. Spans are only extended if can_append() returns true: https://github.com/josephg/diamond-types/blob/c4d24499b70a23... With real data from Martin's editing trace, 182 000 inserted characters get…
comment by josephg · 2021-07-31 · in Faster CRDTs: An Adventure in Optimization -
…not beautiful or overly fancy. Just steady, confident and readable (assuming you know the context): https://github.com/josephg/diamond-types/blob/2e807298a70382...
comment by josephg · 2021-07-28 · in Coding with Character