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 09:06:52 -0500 Message-ID: References: <87tufmjyai.fsf@gnus.org> <87lf0nr2b4.fsf@gnus.org> <87fsqvp5ae.fsf@gnus.org> <87bl1jp51y.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34400"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Qiantan Hong , "emacs-devel@gnu.org" To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 15 15:56:25 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 1mxVhg-0008k0-Bx for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 15:56:24 +0100 Original-Received: from localhost ([::1]:43788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxVhe-0007N2-B6 for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Dec 2021 09:56:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxUvz-000625-27 for emacs-devel@gnu.org; Wed, 15 Dec 2021 09:07:07 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxUvr-0002LC-S9 for emacs-devel@gnu.org; Wed, 15 Dec 2021 09:07:06 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DCD6780620; Wed, 15 Dec 2021 09:06:55 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D4AD38043C; Wed, 15 Dec 2021 09:06:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1639577213; bh=tYOiN3ksr8AzeSAue39DtG2AnE76cBuEB2dHi5mbM0s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GA2ODpnmTDlbARSAVA476VjH+t5qLPJZF4LQPa14AtqAILazZmjqFgI/LNWnMYwh0 hYi/jPtMWJGuiRGt/Nx/z98AVk7OH3BkyrMwc/x+8CQC6U1qB1JZdLB1V9QYIV/Qky crXBLyf0wfa7YPOSbA5OMADX5xeVDLNzPcdZl6wBedv/ZYzrUaEDWRC6qDupdqD2nF KRGOL6N9svGVP0XL+rXCEYHVGLtL8Wy5KxqfYX1Nsjbg6wUqhdkBXzmJ99Y0Rxm+La hGRdeqgrdDQocLLsomxlliA4sIE6m4b2pk5L5Q0RQzB1j+fikxTH2sGGhUWsGtws6x Br7FAqVCoWlrA== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9AFDF120202; Wed, 15 Dec 2021 09:06:53 -0500 (EST) In-Reply-To: <87bl1jp51y.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 14 Dec 2021 16:41:29 +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:282051 Archived-At: > but I didn't quite see how that would work with circular and > self-referential lists.) 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. Stefan