From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexandre Garreau Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Thu, 09 Dec 2021 06:52:07 +0100 Message-ID: <6141441.KMu7BXEBzU@galex-713.eu> References: <87tufmjyai.fsf@gnus.org> <837dcex6ub.fsf@gnu.org> 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="25452"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 09 06:53:42 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 1mvCNC-0006UW-1O for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 06:53:42 +0100 Original-Received: from localhost ([::1]:38678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvCNB-0005hk-07 for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 00:53:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvCLp-0004tt-Hi for emacs-devel@gnu.org; Thu, 09 Dec 2021 00:52:17 -0500 Original-Received: from [2a00:5884:8305::1] (port=36390 helo=galex-713.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvCLn-0000be-PH for emacs-devel@gnu.org; Thu, 09 Dec 2021 00:52:17 -0500 Original-Received: from gal by galex-713.eu with local (Exim 4.94.2) (envelope-from ) id 1mvCLg-000H2Q-37 for emacs-devel@gnu.org; Thu, 09 Dec 2021 06:52:08 +0100 In-Reply-To: <837dcex6ub.fsf@gnu.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:5884:8305::1 (failed) Received-SPF: pass client-ip=2a00:5884:8305::1; envelope-from=galex-713@galex-713.eu; helo=galex-713.eu X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-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:281437 Archived-At: Le merkredo, 8-a de decembro 2021, 19-a horo kaj 57:32 CET Eli Zaretskii a= =20 =C3=A9crit : > > Those are huge disadvantages. The benefits are not clear to me at all, > > but they seem to revolve around the time it takes for an interrupted > > or terminated session to restart? >=20 > No, the benefit is to be able to store and retrieve data from a > persistent DB. Python has it, Lua has it, JS has it, so why > shouldn't Emacs be able to have it? Because Emacs is Lisp, and is has =E2=80=9Cread=E2=80=9D and =E2=80=9Cprint= =E2=80=9D, that is, is=20 homoiconic, while those are not. But, on a similar perspective, we could argue JS has JSON, and yet all=20 data is not stored as JSON (well: there is a strong tendency and desire to= =20 do that, as show some =E2=80=9Cmodern=E2=80=9D database such as mongodb). = Lua is very=20 declarative and functional as well. However lisp has a longer and stronger history of supporting=20 inspectability, so the concern can be understood. However, contrarily to=20 the unix tradition, which modern emacses somewhat follow but which is=20 younger than lisp, that doesn=E2=80=99t require everything to be in plainte= xt=E2=80=A6=20 just inspectable from lisp. And if we build purely lisp interfaces, that=20 will necessarily be the case, and we=E2=80=99ll even get elisp and emacs=E2= =80=99 tools to=20 inspect and treat generically sqlite databases (and that would be very=20 neat! and hard to oppose to!), as long as the interface is general enough. > > I don't think there are any applications for which the trade off (gain > > some performance; lose some user freedom) is worth it, but even if > > there are, we should look harder at alternatives which allow us to > > gain similar amounts of performance without littering unsuspecting > > users' .emacs.ds with binary-only files. >=20 > If you are right, then this capability will remain largely unused. > Like Lisp threads, for example. Let's talk in a couple of years. No, absolutely not. Not necessarily. It could be used just because=20 sqlite is a trend. Just because it=E2=80=99s so much used that it looks co= ol. By=20 network effect. Because people coming from different background would=20 already know it (that=E2=80=99s an advantage for emacs), and get lazy to le= arn=20 more lispy stuff (that=E2=80=99s a dramatic (but not that important) risk). I mean many things which are not worth it are done netherless, that=E2=80= =99s not=20 an argument: imagine about if the vast majority of modern computation was=20 done in ridiculously sandboxed javascript, tied to servers, and without a=20 licence=E2=80=A6 > > And we need to be careful about introducing this "as an option", of > > course, because that means two versions of many packages' core code > > need to be maintained, only one of which will be tested by users who > > have not had the time to customize the defaults. >=20 > No, it means the packages that need such a capability will _require_ > Emacs with sqlite support. Like any package that needs to display > SVG requires Emacs with librsvg support, for example. We could do that in some other way by taking care of atomistically not=20 introduce sqlite without a higher-level =E2=80=9Cpreferred=E2=80=9D interfa= ce that would=20 be encouraged for the simplest uses, and allow to select a different=20 backend such as =E2=80=9Cgdbm=E2=80=9D, =E2=80=9Cbare sexps=E2=80=9D, etc. If think the reason for the very emotional reaction here is the display of= =20 a fear, which has to be justified in some way, of the fact emacs may=20 subbish a pressure to become =E2=80=9Cmore like anything else=E2=80=9D, tha= t is less=20 inspectable, less compatible, etc.