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: master 3d38d1d: Add sqlite3 support to Emacs Date: Sun, 12 Dec 2021 12:46:02 +0800 Message-ID: <87ilvu1ldh.fsf@yahoo.com> References: <20211211035614.15517.53830@vcs0.savannah.gnu.org> <20211211035616.984DD20A0A@vcs0.savannah.gnu.org> <87ee6j4ty4.fsf@yahoo.com> <8735mz4o70.fsf@yahoo.com> <83k0gbr0dm.fsf@gnu.org> <87y24r33bn.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: eliz@gnu.org, emacs-devel@gnu.org, larsi@gnus.org, stefankangas@gmail.com To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 12 05:47:17 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 1mwGlY-0004PY-Uo for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Dec 2021 05:47:17 +0100 Original-Received: from localhost ([::1]:39738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwGlX-0003z5-HS for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 23:47:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwGki-0003J2-9Y for emacs-devel@gnu.org; Sat, 11 Dec 2021 23:46:24 -0500 Original-Received: from sonic304-20.consmr.mail.ne1.yahoo.com ([66.163.191.146]:36480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwGkb-0007ux-Rf for emacs-devel@gnu.org; Sat, 11 Dec 2021 23:46:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639284376; bh=l2PtZlhkf4EftsIldRFKgRL6vz/298D2h/ZNdjvpVYE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=m1gxeimYYZnr3jglzj9I1QLyAsYMCOij9bFSswx7nIglB/p4/exKa2ndXEW08B8DI2e9y8KnLZ+x6CXLi1Lu+2KxUTlHTGKTolmj0dfF0I4gKW3x/W/mAgS3QWYewb9N1lZ8VbDevc036QBFVnUF7hTCUuf2g4aThuj67Ici2A6Pa4AS3fY6r/zrPQxSPR1KO8sBnppB5HTnabIoLgTIdJ0DqSsNa39QZzOBML9IXzaSh63IvLWyKP4lGzZt/KZJ8kHDxBFvqjo1jSCNrOAdbYgnzCjKzRJw79+HtWbn9OSbw58Y1Vc7QReyNQVaDbjp9CDsc4eTP1glOxl/O/lv0A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639284376; bh=BnEp4/iC62c2+3tSm6MQYXLdnHEDwnFSyroBInbDQXF=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=pONACAvEf/o1ZCKlmYph3pk6SDvc6O9AsJ8FbxpjM8qGV6goJOSo2tFD5889OklB8r3PEmGe0KJIIF8i9N6iY3WMvL7CWfj2ut9KRkHpSiVvnO8n1HXiHesvcMUcLCihc7IquucirsVUMCfENI2zRRH9k0+A4/W/bsrlPIT8smlI9l7SZCrlVG1ynJj6Gmc0JblykNae3UByvIWvoxI0f0EGxoH8PSPzjICA3cP8IW/xcCt+JQiqfJL9drt9Ol5bSuY5vcv8WPJNQdintkhE5mVP1MPGGnoigdmuaFc4Oeimvg7ml30wYz1qMQy9zBNtW4BGDbQFOM/iMgMU6aDbKQ== X-YMail-OSG: 6dMMwUIVM1kH5QSGKvG0ZlS.vMa8_4OFTi8MpW8BJYV.kO7cxjf41eqNJmaFAip 2WCVzR7zGzVconly137nuM3Q2rVa91VdtlJiFbUUYETBp34SlqiL1VOVjsON5W.nTXG6IJpPjU.K f8lxSkHpEnRvTsSWMxy93QyjMdWSdbLeL3q9_1MiFioLpjW0rDiQ4Uq6ZCBSy8yvIFPQui0svKuY TVtNW7oZoAHw1WBHCzAZgaAK3ciB_u49TlsNBu4HkcKXCA2FYag4iScob8R7MJyOXQTIkL.vce29 ORGulk_0gxC8glZGVxz_B6r3ftv3RZwUp2nhAdO_aTKyJlpCjWbH1N0ov24vVzj8tXUfyYI.nWkS q_NiwmyndKZ7Qn_qiAlxs7BVn1wIAThlPT_AdjrHdQQQUFQGSJ5.H0gBFxtq.knHCjEZZruwe5cQ gfV_TjTvYf1Vh812za.aub0y8unN0ema3IQLvvf5Z29p7oWufFlC_FrRnByuGesmHaw9sbDtq..z brjd0IoY_WB4jcFBfdjlQ5WUHyLYlCiDGXpPP4Uz3w.WGq4OFX8y93F9d8fUe7q04ITFyd7WJ8M8 _A4r34p7LZR.AwwOQ09eSmPrzCYqvjhHrSetikSg5q7SRbCVDsCm45zG5ahbwD_nRFLki85BA4_p S6yeEXaVYMEwNjrwsbJQFyvYfeaG.iHH699AQyWENzEUHkFQSX6AwVT7CkbjosUK_YjT1.uN2qsk .10H2Qas6eDeiP6c8OOiLa3nyYQTUadY_BKcajj5tKLvwSz7DXpi1ljoFiyFD9uGy102VFQulwgu s9I3gjC1tbS6_LcLzexpkngQur6DohMxa3WD3A2ZMQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Sun, 12 Dec 2021 04:46:16 +0000 Original-Received: by kubenode509.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 2ed4b225f6ec78b1a4baa0f2efe3fd20; Sun, 12 Dec 2021 04:46:08 +0000 (UTC) In-Reply-To: (Richard Stallman's message of "Sat, 11 Dec 2021 22:59:53 -0500") 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.191.146; envelope-from=luangruo@yahoo.com; helo=sonic304-20.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=unavailable 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:281742 Archived-At: Richard Stallman writes: > I don't know anything technically about sqlite3, so I can't begin > to think about how to implement this, and I'm not sure what your > suggestions really mean. Basically, SQLite has the ability to load extensions (in the form of shared libraries) at runtime. But it doesn't provide a mechanism to let programs determine whether an extension is acceptable before loading it. Even worse, SQLite is under the public domain and not the GPL, so it is legally permissible to create proprietary extensions. The developers of SQLite also maintain proprietary extensions for database compression and encryption, both of which can be loaded through the mechanism currently present in Emacs. For more technical details, you can look at the following web page: https://www.sqlite.org/loadext.html. It should work from any browser without JavaScript. > What I do know is this: the crucial question is not what name that > symbol should have, but rather, Which programs need to define it? > Are you proposing to modify the free plug-ins to define this symbol, > and make sqlite3 itself check for it? No, I'm proposing to modify the free plug-ins to define this symbol, and then to make Emacs to check for it before telling SQLite to load the plugin. It would work the same, and it'd also be much easier than modifying SQLite and having to maintain the modified version, and so on and so forth. > Can we make Emacs load the plug-in, and check for the symbol, > then arrange for sqlite3 to talk with it? That's not possible, but we can check the .so file of the plugin for such a symbol before telling SQLite3 to load it. > We would need to prevent sqlite3 from loading plug-ins itself. > But I think that all designs require some sort of change to > sqlite3, because what it's designed to do is not acceptable as it stands. > I see no way around the need to change sqlite3. We could also remove the ability to load SQLite extensions from Emacs. Thanks.