From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: Question collaborative editing. Date: Thu, 01 Oct 2020 18:10:35 -0500 Message-ID: <87lfgpee50.fsf@red-bean.com> References: <20200929215849.zg4wzytbrwx2b7ih@Ergus> <84B86B7C-81F0-42DF-894C-BF577E4B3D6E@mit.edu> <83a6x7js6y.fsf@gnu.org> <83eemji6e8.fsf@gnu.org> <83blhni3kr.fsf@gnu.org> <0B69D727-B2C1-44FC-8382-FDAB6C7CBDAD@mit.edu> <83a6x7i1d0.fsf@gnu.org> <20200930231159.q6h6etboucwkjcfe@Ergus> <83pn62gj2s.fsf@gnu.org> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16077"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Ergus , Fermin , Jean Louis , Noam Postavsky , Emacs developers , Stefan Monnier , Eli Zaretskii To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 02 01:11:46 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO7jm-00045j-G7 for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Oct 2020 01:11:46 +0200 Original-Received: from localhost ([::1]:45482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kO7jl-0003Gm-Fi for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Oct 2020 19:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO7j3-0002rs-E7 for emacs-devel@gnu.org; Thu, 01 Oct 2020 19:11:01 -0400 Original-Received: from newsp.red-bean.com ([45.79.25.59]:60922 helo=sanpietro.red-bean.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO7iy-0004VG-6b; Thu, 01 Oct 2020 19:11:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:Reply-To:References:Subject:Cc:To:From:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=guNyuhmZSAWWweajmE1P0BXUUzr9HbC19jAGkgG1T5E=; t=1601593854; x=1602803454; b=S7XOizd7TZfEKQNE8gfjN0rEte3wzYXpptAmRzGd0yJteebjwMsn/8D/ZIJx0590Gj9iyUMEwQ +oTHGiCLTG6kEi74JwDK26ZPftD2ca3oQxoyEXkYNWTgcqB3SvoJJPcq7HJkRMHuOcyOR9RjllxVH oXqbHQlK8CfZ/Q1qyb9eMEMwa1gydEEF1Sp+EtL4VfA/sY5BotYPTRtadNNPtu9cgD+rJK2KTL3jk yf+xhWeGfZSncYYVNP1dHzaqoxt0+bfbKdKyb9UVi2+14hQFGgkKACaKINYLKVevsyizFiuioUsI5 mbcSTfxis1a7mRFHYHkDCuS3bYTTIMqxXvgIQ==; Original-Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:37018 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO7if-0004TO-Jb; Thu, 01 Oct 2020 23:10:37 +0000 In-Reply-To: (Qiantan Hong's message of "Thu, 1 Oct 2020 15:21:37 +0000") Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=sanpietro.red-bean.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 19:10:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256903 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >IMO the problem of this approach is that if there=E2=80=99s any desync bet= ween >buffer in the library and buffer in the editor the outcome is disastrous, >and this can not only come from some bug =E2=80=94 Emacs and C library >has to talk asynchronously and bidirectionally, which means theoretically >there will be case that Emacs does some change, sent a message to >C library, but some message before C library receive the change from >Emacs arrives later=20 > Emacs C-Library > | | \ / | > | | X | > | | / \ | >V >Although the latency window on local machine is very small, the latency >of Emacs Lisp interpreter responding to events is a another complication... >There are way to work around this of course, but it=E2=80=99ll definitely = require more >work rather than just sending simple operation and buffer position, at lea= st >there need to be UID for each operation and some transaction mechanism. > >I see that Tandem send old text and new text with the text operation. This >is definitely a workaround with no correctness guarantee, and it doesn=E2= =80=99t >specify what to do when a desync happens. But those are just my mutering >about correctness, I can imagine that it might work good enough in practic= e. Well, hey, Emacs has an `md5' function :-). For example, the result of (insert (md5 (current-buffer))) is 5d260ed0f9899cbb9fc53ec96324f5d5 (Of course, the result was wrong as soon as I evaluated it!) Best regards, =2DKarl --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEsgfAWXyjn8Fyi3xbCKC3XMXtg0UFAl92YesUHGtmb2dlbEBy ZWQtYmVhbi5jb20ACgkQCKC3XMXtg0UQ2xAAqfpoChW8xJzjNauVrw+rdrI+JTy2 5i3NKYvc5O0Wn2pEGzW+z2IEEkk5+lweg8n8sBtHze7q75kjf0IrIKP2IKXgnyaa iOVz/eaNQrnmFsYhjN3rwYdKW9cVVW6pOA278RC1x1qNbnA0NnLxt53Hpti+EpEt jfZCFPQ+yoyrmgIQIdS8B9NuCqRqRPMu5higY/ZBDdBzoJl8B9W5OS0v2a5M1jwG TzpMWcPXq42EYS3KCdfOF85zLr9vXsCYHm/y29IfrKUplc5Od/tG8xCzGwGoYyHc DRH6xqVv5L16guQnWY2gZ6+SOaqhg2h+JxJIXxgakOQGrnUmNwLkuLis7nqXiuHf QrzFIlbPbTzySmPmQjs3waCT0Dkzk5C7BFlVAmmSRGXfsyt9r+UADdPP13GGLQVa pMMDs2kI5IPM5PEGpDbvsOzewzAdyLjR6SdSHDhsnftO0fI7qTf2FDFwPV4TlLGP BVEsU0f/7cteqx732mvBOLjl05Kgx7fI0oY1sAKlFxvrik+6c/XjAwvbCUCfkook L3xbkgrFjW/O1NEt9VMURZ1QwytWbR3oFhvECPcxaoKLqQGrze8b4A3W9ryazQ4s ACkne89KezcoeFfS+9uHk9VmXseeiAFglbIlsGXatdWLp3TJRcjiFAMJONbzy35u DuiX+UnK/VJuNdk= =PPq3 -----END PGP SIGNATURE----- --=-=-=--