From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New package: sqlite3 Date: Wed, 22 Mar 2023 08:10:47 +0000 Message-ID: <87ilet5hq0.fsf@posteo.net> References: <87cz5o6csk.fsf@bernoul.li> <87mt4swxsw.fsf@posteo.net> <875ybd7mbh.fsf@bernoul.li> <87y1nzb95o.fsf@posteo.net> <87y1nq5pkz.fsf@posteo.net> <87ttye5mcw.fsf@posteo.net> <87mt46nj00.fsf@posteo.net> 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="32979"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 22 09:11:09 2023 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 1petYr-0008N5-5v for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Mar 2023 09:11:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1petYG-0002LE-9Y; Wed, 22 Mar 2023 04:10:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1petYE-0002Kn-PC for emacs-devel@gnu.org; Wed, 22 Mar 2023 04:10:30 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1petYC-0002WB-99 for emacs-devel@gnu.org; Wed, 22 Mar 2023 04:10:30 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 70FDD2404A0 for ; Wed, 22 Mar 2023 09:10:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679472625; bh=8rJZr710usVRaFt4tjDm7giL82PmekQVPQvbSTFvRPo=; h=From:To:Cc:Subject:Date:From; b=InfMKjRyKTHB0wMIRl7y/iCZ29wxpL+mMKqRWjysj5x7TMlMbWonC08qWpj8V1m7J +G/rWQPhxxdA6PH8fhqqsZmy8ACk0372xuGGqgOJPEwwS9Ud8IkVUBQIBqfWhCKT9W HR2TIoMRJRyD6f9CSS+c/QW7OamaVL7wbsBWWg+chZxUh7vLMlLYFlpo5KONC9ktCU 2YDWo0qR6ZXRdw2NdNU2uECkpQXEZIlgX9efl8o8VEJqhkm2wwLYlhiIxPxRfvdD7g argqRxyF4uvK1kXF2spACBBvIaHu7F83exBm+HJz7hZLRb/iJMCoOMY73H/eAnxBon yRpCk82N0D/qQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PhLkR5vzjz6tng; Wed, 22 Mar 2023 09:10:23 +0100 (CET) In-Reply-To: (Lynn Winebarger's message of "Tue, 21 Mar 2023 19:58:34 -0400") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304695 Archived-At: Lynn Winebarger writes: > On Tue, Mar 21, 2023 at 12:53=E2=80=AFPM Philip Kaludercic wrote: >> I really, really have no idea what you are getting at. As in "ok, but >> what is your intent in explaining this?". >> >> Are you trying to propose that Emacs circumvents the SQLite API (that as >> far as I see uses strings) by constructing statement objects manually? > > Not at all. I don't think I can communicate via email the power of > generative programming techniques, and why basing them on simple > string concatenation is a bad idea, so I'm going to stop trying. I get that, and I am not advocating for string concatenation. Perhaps that is what is confusing me? > I don't think "? ? table values ( 1.0, 'Foo' )" can be supplied with > 'insert and 'into as parameters. Nor do I, but I doubt the necessity. SQL is a very brittle language, and replacing one keyword with another will usually require other changes to be made as well. >> Are we sure that a database is more efficient than a hash-table (which >> can already be printed and read)? Or are we talking about unusually >> extreme values, like in your other message where you were loading 2000+ >> packages? > > Who determines what is extreme?=20=20 Experience and convention? There is no algorithm to determine this, but before 2000 the highest number of Emacs packages I heard someone was using was maybe 300-400 (which I also think is an absurd number). > Tasks that aren't done today because > they are difficult to code efficiently? Tasks that seem extreme when > you write the code in direct style may become much less extreme once a > well-crafted table/query facility is available. I don't think simply > *installing* 2000+ packages is all that extreme in itself. Even > loading all those packages, particularly when using redumping, is not > particularly extreme in terms of resource consumption on modern > desktop hardware. > > Hash tables only index a single key of a data set. And they don't > address tasks like efficiently joining tables. > > My personal interests run to using relational programming for problems > like abstract interpretation and compiler implementation.=20=20 In Elisp? > I'm sure > there are many applications for problems Emacs is used to solve, e.g. > tracking cross-references, tag tables, etc. > >> > I'm sure there's more, but we won't know until the programming idiom >> > is readily available and easy to use. >> >> Are there any other languages that support this kind of interaction, >> where we could learn some lessons about the advantages and limits of >> these ideas? > > You might consider the LINQ sublanguage of C# and other .NET-based > languages as an example of a useful query DSL. As far as I understand (I have no experience with .NET-based languages), this is only syntax sugar? Or how does this relate to the point of dumping an in-memory database.