News for hackers. Stuff that matters.

josemaenzo

Re:The Haskell Elephant in the Room on Thursday July 30, 2020 @05:21PM (#24002963)
nocoiner
Re:Recoil – A state management library for React on Sunday May 17, 2020 @04:57AM (#23210666)
I'm happy that we are moving away from the redux-like standard. I've tried the API in a dumb example and it looks clean and easy. https://codesandbox.io/s/three-buttons-example-with-recoil-q...

Still don't like the extra naming that you have to think of for every atom/value. Or also the key: prop that you have to define for every atom. It seems redundant for me.

And also, as a bundle-phobia guy I am. I think 22kb as extra library is ok but it could be better.

Liking a lot Recoil as solution for the three-button problem. I still think that the patch pattern I use with dop is better. In terms of simplicity and extra KB. This is the same example https://codesandbox.io/s/react-dop-nhj0j?file=/store.js

But I guess I say that because I'm the creator of dop. So I'm so open to critics :)

Re:OT and CRDT trade-offs for Real-Time collaboration on Thursday January 16, 2020 @03:35AM (#22062664)
Oh, I see. Just wondering, How GUN handle a situation like described above when working with Arrays?
Re:OT and CRDT trade-offs for Real-Time collaboration on Wednesday January 15, 2020 @05:01AM (#22053023)
Does gun have a built-in "Linked list" in the API? If so, where are the docs? Could not find them.

If not, any paper or doc that explain how to implement it with gun?

Re:OT and CRDT trade-offs for Real-Time collaboration on Tuesday January 14, 2020 @05:33PM (#22049934)
Cool! Make sense.

Let's say our state have an array like ['a','b'].

What about if Peer-A splice the first element (0) which results in ['b'] and Peer-B wants to mutate 'a' to 'A' which results in ['A','b'] and they both make the mutation at the same millisecond?

Re:OT and CRDT trade-offs for Real-Time collaboration on Tuesday January 14, 2020 @01:47PM (#22047932)
Can you refer me to a document where you explain the "lexical rank" that you are referring to?

The cartoon explanation do not tackle those terms.

Re:OT and CRDT trade-offs for Real-Time collaboration on Tuesday January 14, 2020 @06:10AM (#22043708)
Do you have any document that explain what resolution algorithm uses in what cases?

For example, one peer change a property value and the other peer deletes it.

Re:Dop: Distributed Object Protocol on Monday December 31, 2018 @04:28AM (#18793800)
"definitely isn't a library for shared document editing or more substantial cases that require OT"

You are right, is not a library that provides a way to resolve sync conflicts. Consensus algorithms is a difficult topic, and I haven't seen an approach in JavaScript that resolve this problem. Maybe gun, but I haven't tried.

If you just need client-server architecture with reactivity, why don't you give a try to dop?

Re:Dop: Distributed Object Protocol on Sunday December 30, 2018 @10:09AM (#18789483)
There is no authentication system in dop. You decide if a client can subscribe to a specific object: https://github.com/DistributedObjectProtocol/web/blob/master... The same way you would do it with plain WebSockets

Also you decide what to do when a client call a specific function: https://github.com/DistributedObjectProtocol/web/blob/master...

Re:Dop: Distributed Object Protocol on Sunday December 30, 2018 @10:03AM (#18789448)
The protocol has a versioning system: https://github.com/DistributedObjectProtocol/protocol/blob/m...

Is the responsibility of the implementation to apply the patches/mutations in the correct order of the version.

Re:Dop: Distributed Object Protocol on Sunday December 30, 2018 @09:56AM (#18789421)
Imagine a Chess game, Trello, a multiuser ToDo list app.

If you are familiar with state management libraries such a Redux, Mobx, etc. Dop is more or less the same. With the difference that the initial state of your app can be initialized in the server.

I have to work better explaining this.

Re:Dop: Distributed Object Protocol on Sunday December 30, 2018 @09:40AM (#18789365)
As mention by others, the protocol doesn't handle consensus synchronization. The implementation of the protocol (JavaScript in this case) must apply all the mutations in the correct version order: https://github.com/DistributedObjectProtocol/protocol#exampl...
Re:Build Yourself a Redux on Monday May 08, 2017 @12:57PM (#14293387)
Can we use it outside of Meteor?