From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Wed, 15 Dec 2021 11:36:19 -0500 Message-ID: References: <87tufmjyai.fsf@gnus.org> <87bl1jp51y.fsf@gnus.org> <2724339.91WLGuX5TE@galex-713.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8416"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , emacs-devel@gnu.org, Qiantan Hong To: Alexandre Garreau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 15 17:38:01 2021 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 1mxXI0-000203-Gj for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 17:38:00 +0100 Original-Received: from localhost ([::1]:43604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxXHy-0005Zj-Ga for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 11:37:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxXGd-0003Rt-Bk for emacs-devel@gnu.org; Wed, 15 Dec 2021 11:36:36 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxXGa-00036a-At for emacs-devel@gnu.org; Wed, 15 Dec 2021 11:36:34 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6025D442462; Wed, 15 Dec 2021 11:36:29 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C4408442449; Wed, 15 Dec 2021 11:36:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1639586187; bh=qEdIYu7KpVfQfM15ZqCJQOGP2I0dbtCokE2j17XEhmI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cfjWfF6Qz7OhqrUhYm9OeGi5MbFgrLtqHiYd7zNE6YIxrmnuWCeVO2HKUoR8YAkRE Kq2/LT/j4H2Sq41d34UR1jDo3c8+0q/9sASket04Z7DdwzRTXxjt0manqkmDERdT3E xy5+hRrWdnwVKQb1SqlZh+tGirSm+1ImOTnnw4QkOSnnRag8YJT/UWA9M6DAY1sNH0 nGxFVlqUlusrmOBo/YDlPgl9gZaKp+mkCemUhXMGnVYGuvRMuCCPQkQpXKZALPNlRM 7St8rwfHTrl6u+bs3W++US3K2oLxYW+SoFU/TwVlfCcluLKyVk1hmMf9FWkBbAffe7 QM28wKebQ3O6Q== Original-Received: from alfajor (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A91FE1203D6; Wed, 15 Dec 2021 11:36:27 -0500 (EST) In-Reply-To: <2724339.91WLGuX5TE@galex-713.eu> (Alexandre Garreau's message of "Wed, 15 Dec 2021 16:04:42 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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.29 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:282068 Archived-At: >> > but I didn't quite see how that would work with circular and >> > self-referential lists.) >>=20 >> AFAIK the general way to avoid these issues is to store/log not the >> "data-diff" but the higher-level operation that caused this diff. >> E.g. log something like "add X to tree" instead of recording which nodes >> in the tree were modified in which way. This way, the presence or >> absence of cycles in the representation of the tree doesn't come into >> the picture at all. > > Looks like Qiantan=E2=80=99s implementation of incremental log-like store. Indeed. BTW, there's another approach which, instead of looking at the higher-level API looks at the lower level steps (like "change this slot to that value" where a value can be a reference), so adding an element to a doubly linked list would record a set of 4 slot changes. Stefan