From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Mon, 06 Dec 2021 10:23:36 -0800 Message-ID: <87sfv5d23b.fsf@ericabrahamsen.net> References: <87tufmjyai.fsf@gnus.org> <488359F2-6FEB-4E07-BAF1-EBC257B0EE28@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29457"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:4dQPe8Bwfd72+JyX47k4sSePIO8= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 19:24:44 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 1muIfM-0007VP-Ez for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 19:24:44 +0100 Original-Received: from localhost ([::1]:37438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muIfL-0004Gy-Bl for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 13:24:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muIeP-0003Zw-0y for emacs-devel@gnu.org; Mon, 06 Dec 2021 13:23:45 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:47796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muIeN-0000r2-2F for emacs-devel@gnu.org; Mon, 06 Dec 2021 13:23:44 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1muIeK-0005yZ-VZ for emacs-devel@gnu.org; Mon, 06 Dec 2021 19:23:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:281144 Archived-At: Qiantan Hong writes: >> YUCK!! >> >> That would break 45 years of Emacs tradition and practice. In Emacs, >> data are stored as PLAIN TEXT. Even .elc files are pretty much plain >> text. > Or the way I’d like to put it, data are stored as S-EXP. >> That is, text that you can examine with standard tools, such as grep, >> awk, perl, less, ...., and C-s and friends within Emacs. > So you can read, eval, print them, edit them structurally, and > look at the beautiful and highly readable parentheses. > I found myself read C 20 times slower than Lisp, not mentioning > hexademicals! > >> Emacs has that already. It's called an alist. It becomes persistent >> when you print it to a file, not a challenging project. > Same thoughts. But jokes aside, they do have a valid point, > which is reading/printing a big alist can get slow. > I totally don’t see the need to introduce database to > solve this problem though. I hereby call for a plain Elisp > implementation of a log-structured object(or, CONSes) store. Scanning the (very long) thread, I don't think anyone is proposing using sqlite *by default* for any Emacs data storage, least of all the customization interface. Customize is the perfect poster child for the advantages of plain-text, Emacs-readable data formats. As others have said, sqlite is great for very large stores of data, particularly if data retrieval is performance-sensitive. I'm excited about this only because, somewhat ironically, only external packages can require a sqlite library and make use of it -- it's not available for built-in libraries.