Sign in

zx

@zxch3n.com
734 followers 204 following 71 posts

Founder of @Loro.dev github.com/zxch3n

PostsRepliesMedia
zx @zxch3n.com · 28/11/2025
I’ve built several things with it. It’s evolving fast and the DX is quite good. For example, its inspect snapshot test is unique and super useful, combining with its unique way to represent string with `#|`.
110
zx @zxch3n.com · 30/04/2025
Loro Inspector is here! Now you can directly browse the current state and complete edit history of your Loro documents in the browser. You can also use this tool to time travel to any version in the history of your Loro document.
1214
zx @zxch3n.com · 16/01/2025
It's so hard to feel this warmth from interactions on social platforms these days 🥹
040
zx @zxch3n.com · 12/12/2024
just watched DJs coding Haskell live?!
2191
zx @zxch3n.com · 02/12/2024
83 GB
020
zx @zxch3n.com · 27/11/2024
Was listening to *City of Stars* and saw this 😭
010
zx @zxch3n.com · 12/11/2024
What happened to npm downloads?
curl -s https://api.npmjs.org/downloads/range/2024-11-05:2024-11-12/ | jq .
{
  "start": "2024-11-05",
  "end": "2024-11-12",
  "downloads": [
    {
      "downloads": 12058492966,
      "day": "2024-11-05"
    },
    {
      "downloads": 0,
      "day": "2024-11-06"
    },
    {
      "downloads": 0,
      "day": "2024-11-07"
    },
    {
      "downloads": 0,
      "day": "2024-11-08"
    },
    {
      "downloads": 0,
      "day": "2024-11-09"
    },
    {
      "downloads": 0,
      "day": "2024-11-10"
    },
    {
      "downloads": 0,
      "day": "2024-11-11"
    },
    {
      "downloads": 0,
      "day": "2024-11-12"
    }
  ]
}
000
zx @zxch3n.com · 07/11/2024
Myers diff may generate weird deltas like the following example. It will make concurrent text updates generate weird merge results. Any suggestions? My current thought is to implement an A* search on top of the edit graph that punishes noncontinuous edits
220
zx @zxch3n.com · 06/11/2024
You may experience data loss due to the following issues caused by incorrect usage of CRDTs libraries, regardless of whether you're using Loro, Automerge, or Yjs. Here is how to avoid them:
Container Overwrites
When initializing child containers in parallel, overwrites can occur instead of automatic merging. For example:

const doc = new LoroDoc();
const map = doc.getMap("map");
 
// Parallel initialization of child containers
const docB = doc.fork();
const textA = doc.getMap("map").setContainer("text", new LoroText());
textA.insert(0, "A");
const textB = docB.getMap("map").setContainer("text", new LoroText());
textB.insert(0, "B");
 
doc.import(docB.export({ mode: "update" }));
// Result: Either { "meta": { "text": "A" } } or { "meta": { "text": "B" } }
This behavior can lead to serious data loss issues. If a container holds significant data or even the entire document's content, overwriting it could result in unexpected loss of important information. While the complete editing history is preserved and allows for potential recovery of user data, the recovery process can be complex.
2101
zx @zxch3n.com · 25/10/2024
Loro is on Reddit 🔥
030