From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: persistent data feature Date: Fri, 10 Dec 2021 13:50:30 +0800 Message-ID: <87fsr157q1.fsf@yahoo.com> References: <87tufmjyai.fsf@gnus.org> <877dcil2sj.fsf@ericabrahamsen.net> <87czm98qi1.fsf@gnu.org> <87o85tcwm0.fsf@ericabrahamsen.net> <874k7ljwkr.fsf@gnus.org> <87fsr5cuzq.fsf@ericabrahamsen.net> <878rwx8mdn.fsf@gnu.org> <87r1aphuei.fsf@gnus.org> <837dcex6ub.fsf@gnu.org> <87bl1p10js.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="9875"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Richard Stallman , eric@ericabrahamsen.net, cesar.mena@gmail.com, eliz@gnu.org, Pip Cet , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 10 06:55:03 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 1mvYs2-0002Ke-D1 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Dec 2021 06:55:02 +0100 Original-Received: from localhost ([::1]:48694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvYs0-0003BO-NL for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Dec 2021 00:55:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvYnv-0001l5-Bg for emacs-devel@gnu.org; Fri, 10 Dec 2021 00:50:48 -0500 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:40325) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvYnt-0007Fm-0D for emacs-devel@gnu.org; Fri, 10 Dec 2021 00:50:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639115437; bh=kN0U4YMzfKEkw3dReviMUs93nPt150vygiLq1lsAU/E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=t1+qjJXkB4QmcFiY1CQ0cEJWutonGNXndZBCrAzga4uAgk1UG3G48SEFPxykF/UuXD57Vr1yMKHx9maUXBOw/SxDMkYJvs8wSVAnXo9U1E71ULjAaobaxZsomcOmhF1cDyn0D8eh1lJjQxcFY3KhJLAOPwA+C6GQsQ3gBMZ3VXA0XrfInpBSMpBQCPVXoN/vl/rrDnbCgd5wctCS7+O/EsLK586W0o3kZxGDHrPYExsjWfmcGoxqTOcp8gXcKxjNftjUuDVW/2j0/ZdanvAPg2gKWT3TyYwBb3IVVJ12yPypqMKsTyMKiLLEmuSZmGEgTj9PHmD9cMaO0jfGlg4gMg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639115437; bh=fyVsNN0qB6AWgPRYy128KvJIR9OL6q5cAbHwsBuMzdz=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=cRGIdEnERbbVgKNjJyBjQHqxZsZXJivHeoblgtk2y/tqAD+GWigLUs2lxsOtvL3wFF2XEftTb+liE3zkPIEsbvpaLDVi9D7y8keLtwsZ7aYdggJM8H+cYgaG/GMtZDrhJktw0RL2O8ntzeVWcTBoCaeZ6UZ7zUkZrt8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w3 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Fri, 10 Dec 2021 05:50:37 +0000 Original-Received: by kubenode509.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0e133f1f09e094d91e3f0521647e3fc7; Fri, 10 Dec 2021 05:50:36 +0000 (UTC) In-Reply-To: <87bl1p10js.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 10 Dec 2021 06:39:03 +0100") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.33; envelope-from=luangruo@yahoo.com; helo=sonic308-10.consmr.mail.ne1.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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:281570 Archived-At: Lars Ingebrigtsen writes: > You'll get a slower and messier interface. If you're (optionally) > storing the data in different data files, which ones has precedence? I disagree with the messier part: that is purely an implementation detail, and no such implementation exists yet. But for uses such as storing a list of recently used Emoji, is a "slower interface" really such an important downside? Especially since the list of recently used Emoji will be stored in a ring of some arbitrary (but small) size. I suspect that the use-cases which require storing a large amount of data (such as the Gnus registry) will generally opt to use sqlite3 directly, instead of going through the "sticky value" system (which involves printing Lisp data to a string, storing it as a string in the database, and reading it back again). > Will all these backends have the same semantics wrt. concurrent updates > from different Emacs instances? We could either make that undefined behaviour (the easy way out), or design a locking mechanism for the text-based backend. Perhaps the existing file locking mechanism could be used for this. > Will they offer the same introspection opportunities (like "delete all > stored data that refer to 'foo'"?) Sure, why not? Since SQLite does not know about Lisp objects, I don't see what advantage it can have WRT introspecting the contents of Lisp objects. > I won't be adding any other backends for this. What if someone else does? Are patches welcome?