Hacker News new | ask | show | jobs
by jay-aye-see-key 949 days ago
Operational transforms are one of those interesting technologies I’ve wanted to learn by implementing but haven’t made the time yet. I also didn’t realise it could be implemented in that little code.

Can you recommend any learning resources for implementing an OT? (Ideally typescript, python, or rust)

2 comments

This single file shows the entire set of OT transformations (retain, insert, delete):

https://github.com/Operational-Transformation/ot.js/blob/mas...

and this is a good post outlining the basics of OT, from the creator of CodeMirror:

https://marijnhaverbeke.nl/blog/collaborative-editing-cm.htm...

I haven’t explored this space in a while, but I have a couple of examples that could be helpful. A Clojure library of mine [0] has a decent README with some background reading on how to use operational transform.

I also reimplemented it in a surprisingly tiny amount of OCaml [1] which was a fun way to learn that language :)

[0]: https://github.com/jahfer/othello [1]: https://github.com/jahfer/othello-ocaml