Hot take after a decade of building text editors: trees are a mistake.
Slate, ProseMirror, Lexical - all trees. Meanwhile the most-used editor on earth never bothered: Word models text as flat runs over a buffer. The surprise hero of this story ๐
slate-yjs/core 1.1.0 is out:
- new: translateYjsEvent and applySlateOp are now exported for custom bindings
- fixes for remote formatting, withYHistory before connect, and shared Yjs deltas
https://t.co/C9Xt5OUJnY
@DanneLundqvist@hhg2288@_mql I have found that slate and slate-yjs handle large documents fairly well, the performance bottlenecks are usually about how folks implement slate editors. I would look there first or point a capable model at it
Since picking up slate-yjs: 8 releases.
Fixes, several found by the new fuzzer:
- moving a node forward no longer lands it in the wrong place
- remote cursors next to links show up again, and hidden cursors stay hidden
- soft line breaks survive merges
- pressing Enter at the start of a paragraph no longer moves other people's cursors or text they're typing
- fixes from normalizing a remote change are synced straight away instead of going out later
- an editor no longer silently stops syncing after a remote update fails
Under the hood: TypeScript 6, Vitest 5, React 19 types, and the example app on Hocuspocus 4.
https://t.co/q6DrIvRroi
slate-yjs is actively maintained again, by me, thanks to @bitphinix for the awesome work on this and for handing over the baton.
New home: https://t.co/cFbbA2EP8b
First minor changes include updated dependencies, supply chain protection, a new fuzzer that is finding sync bugs which are about to be fixed.
Issues and PRs welcome.
it begs the question: what's the next programming primitive to be replaced with matrices? for loops? functions? while statements? what does the "language for intelligence" look like?
This is the type of post I might regret later, but I really had an urge to rant about the current discourse around pacing the frontier. https://t.co/A0Vuk4DXEF
This is the type of post I might regret later, but I really had an urge to rant about the current discourse around pacing the frontier. https://t.co/A0Vuk4DXEF
Hey, hey! I've been working on something last couple weeks.
Libras - a music player that connects to your own music server. It's still early in development though already replaced apps on my desktop and android.
Give it a try, let me know what you think
https://t.co/009I8l0Um4
I resigned from Anthropic today. I spent the last three years doing pretraining research at both OpenAI and Anthropic. Neither company is acting responsibly. They are racing straight to self-improving superintelligence and gambling with our lives. More thoughts below.
"All four mutations red their own gates"
This is a response I got more than once recently from a coding agent.
I am mostly frustrated but also a little delighted :D
I guess unpopular opinion, but for texts that I am committed to understanding thoroughly, I absolutely do ask AI to quiz me or summarize parts I did not understand. Laugh if you want, but I will bet cold hard $$ that my comprehension is much higher than median for those texts.
Thank you that is really helpful actually! You seem to be using prosemirror-collab. receiveSteps is a dozen clean lines because it never merges anything. Any concurrent edits just get refused and the client retries. So the ordering problem didn't go away, it moved into those race conditions that you mentioned. Trees feel free in that world because the server answers the hard question for you, that's a different kind of tradeoff. I'm exploring a model where you don't need the server.
Hot take after a decade of building text editors: trees are a mistake.
Slate, ProseMirror, Lexical - all trees. Meanwhile the most-used editor on earth never bothered: Word models text as flat runs over a buffer. The surprise hero of this story ๐
@hausdorff_space Genuine question before I write an essay in this thread: can you elaborate on that claim? Why is neither approach harder with trees, in your experience?
youโre not missing anything - the gesture code really is similar, and thatโs sort of the point: you lose nothing at this layer by not storing a tree. The real difference is in your own screenshot: https://t.co/c0kmPr69Fo(end). A PM position only makes sense against one version of the doc, so when edits happen at the same time they have to be remapped, and collab editing needs a server to put everyoneโs transactions in the order.
My positions keep their names forever, so merging is just combining edits - no remapping exists. and to be fair to my own hot take: trees are great for reading - I build one for every render. What I meant was that storing one as the source of truth is what makes concurrent editing hard, among other things