Martin Kleppmann

Results 172 comments of Martin Kleppmann

On document granularity, my suggestion would be to think of a document as the unit of sharing. For example, in Google Docs, you can choose who may access a particular...

Let's discuss a move operation on #319 and keep this issue focussed on undo.

Hi @nornagon, thank you for this. It's good to speed up applyChanges in the case where the changes are in reverse order. However, I expect that the common case for...

This looks great, thanks for putting it together! One more suggestion for a scenario would be "deleting N consecutive characters all at once". This is an interesting case because it...

Fair point — happy to have a list of maps on the benchmark. Even if we advise against it, people will probably do it anyway, so we should try to...

Another idea: * When observing a nested object somewhere inside the document tree, provide the observer callback with the JsonPath from the root to that object for which the callback...

Hi @skokenes, can you look at the previous document state (before you applied the patch — it should still be available since it's immutable) and work out the deleted value...

An O(n^2) algorithm would be: for every RemoveEdit, scan over all the following edits in the list, and if their index is after the removal position, increase it by one....

You can reduce it to O(n) if the edits appear in ascending order: in this case you know that for each edit in the list, all the subsequent edits must...

I think it's quite promising to have a callback in `applyChanges` that allows application code to validate whether a change is allowed to be applied (e.g. based on which properties...