-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript port? #28
Comments
The project does build a Scala.js module but I'm not sure if it's usable from JS. |
Right, if I understand correctly, Scala.js just helps if you want to write the host app in Scala too, as opposed to just transpiling a Scala lib for use in native JS. I gave it a shot a couple days ago without much success :) |
Scala.js code can be used from a JS host environment as long as what you want to use is exported https://www.scala-js.org/doc/interoperability/export-to-javascript.html |
Because the crjdt is implemented in Scala, I learned the language and love it now. Check out Martin's Coursera course and Haoyi's Hands-on. Regarding language design and elegance I think Scala is superior to JavaScript. In this gist I have some ugly code of a collaborative textfield using crjdt. |
I'd love to see ports to other languages and would encourage you to do this. Unfortunately I lack the free time and experience with JavaScript for collaborating on a JS port. I agree that the notation of the paper is a little bit off-putting and understanding the whole data type without much type information can be hard (at least it was for me). Btw, the code has no @Tamriel Your gist is great! This is AFAIK the first demo using crjdt! |
@fthomas I will try the annotations method for a stop gap, but I would definitely love to create a first-class native JS implementation. If you do happen to come across some free time, let me know — even just walking through your understanding of the algorithm would help me immensely! No JS experience necessary :) |
Have a look at automerge. |
I agree the notation used in paper is the biggest obstacle preventing more implementations (in different languages) of the great ideas published in this paper to exist. I personally also struggle to understand it properly. I've created a question on Computer Science Stack Exchange site (here: https://cs.stackexchange.com/questions/83770/help-understand-the-notation/85376) to clarify the notation, and some of the points were already answered there. Unfortunately, the still unanswered questions are crucial for proper understanding, and, apparently, it requires a deep familiarity with the paper to answer them, according to the people who posted some answers already. It would be great if someone who made his way through the notation to chime in and post an answer for the reward of imaginary internet points and my (and probably other people's) gratitude. :) @fthomas any chance you could give it a shot some time in future? |
I'm currently using the amazing LSEQ CRDT in a collaborative editor, and the new-ish JSON CRDT has me really excited. I'm trying to start on a port to JavaScript, but I'm afraid despite my CS background, the paper's notation is beyond me 😆
I would love to include this in an upcoming talk I'm giving on Collaborative Editing.
Since I'm basically a n00b to Scala and Haskell, what resources would you recommend for wrapping my head around this? Or better yet, would you (or someone else really familiar with the datatype) be interested in collaborating on a JS port?
The text was updated successfully, but these errors were encountered: