From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New package: sqlite3 Date: Tue, 21 Mar 2023 06:55:19 -0400 Message-ID: References: <87cz5o6csk.fsf@bernoul.li> <87mt4swxsw.fsf@posteo.net> <875ybd7mbh.fsf@bernoul.li> <87y1nzb95o.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="28920"; mail-complaints-to="usenet@ciao.gmane.io" To: Philip Kaludercic , Jonas Bernoulli , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 21 11:55:55 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 1peZej-0007Ed-Ks for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Mar 2023 11:55:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peZeS-0007AV-Lr; Tue, 21 Mar 2023 06:55:36 -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 1peZeP-0007AN-Jk for emacs-devel@gnu.org; Tue, 21 Mar 2023 06:55:34 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peZeN-0005NJ-TI for emacs-devel@gnu.org; Tue, 21 Mar 2023 06:55:33 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id a16so10835374pjs.4 for ; Tue, 21 Mar 2023 03:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679396130; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9UvEJGSUJq1vel94g3qn3fvxtnUoL+wMs0t9jcQp0vo=; b=OSPirfXhUE2winbojNOO72hW2HFnoGAND/eD0vdNK+4HHttsW8Qw2Ll3wuu9gkErSz dvIT/2zt0tH1lNZKEZGizyIU4Vu9oGaWngNxVoW3kGbGMvi7mmFhyGtCjIOSrLA25qoS 0IdHZYCkal0merfcSdfkLaHQg594E0hemokcaDcMTqwJZom27UpH3idoh88zTkJdAX43 3e7N+2Wy6YpX0KsAnRzExYeL1t3WaHndrtnRngx/o5SguPCBLU37vFAu+db7b12FQzMC B6w6NCcDMBR+fosohp2F8rhu5ShLGS8nxZALn+dotpqYsF4kectBARCPd+M+wcE+otTp CBqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679396130; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9UvEJGSUJq1vel94g3qn3fvxtnUoL+wMs0t9jcQp0vo=; b=iANxaDHNWdfEdC5Aqk7QHUAb9tCTusY4YyKWmBexk/DtBMjm92Yf00nKG0eAP189Zf RjJw7JmnqwEch4CKQXKfsGCwxi+EC3TFKqpzukaJ/A5tShDCE1oXdPWrRVJSoL5ufqld HjRum2b2hB6ljzeXivGaXeyQHVN6FfPx7RLm4C1nny5RwLYZdUjyFTL/Dn8BkoCjqiRj 7NRIofIxyA2X9KzVMO9FzZDKJFPQPhaoW6SoyouuHfdKvJWSQZHi18t2hXR7seJxGidQ ZYV7QQwwN4UFRIGjciNBE5q1/a+QPkobPUKOaAf97l4bOHQbq9HMW3j91XkVJkSLnAhx QUIg== X-Gm-Message-State: AO0yUKWMCY/I2EHZyj7cZasOdmrTVlpaKQTBo374YwFEeXzcC+HhGVbO ZfXwNFsUoSJ0s+9iwtTP4w4a17h/wOUWhHFROV4= X-Google-Smtp-Source: AK7set8mevXwNC8dM0tjVJyBwy96yMbfIBiO1SIXZ1FIUpdQE6a5LzbKiuNWqE+PJdPzNOSQn8PdaU3JysjtY+HI4U0= X-Received: by 2002:a17:90a:5314:b0:23d:3ff1:87b8 with SMTP id x20-20020a17090a531400b0023d3ff187b8mr526503pjh.8.1679396130143; Tue, 21 Mar 2023 03:55:30 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=owinebar@gmail.com; helo=mail-pj1-x102b.google.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, 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:304637 Archived-At: On Tue, Mar 21, 2023 at 3:22=E2=80=AFAM Jean Louis wrote= : > * Philip Kaludercic [2023-03-14 19:17]: > > Jonas Bernoulli writes: > > > > >> Do you have a link to the package you are talking about? > > > > > > Ups, here you go: https://github.com/pekingduck/emacs-sqlite3-api > > > > Would you happen to know if there is some rx-like, s-expression based > > language for constructing SQL queries. I am not looking for anything > > generic, just a way to avoid writing long strings. > > While such packages exists, for me I do not find them usable as then I > have to forget about the SQL and learn about the new Emacs Lisp > structure that is to correspond to SQL. I see personally no benefit in > that. There are a couple of good reasons to use an sexpr-based query language: * Avoiding sql injection issues by putting all the boilerplate for interpolating data into queries into a macro expander * Treating code as data and vice-versa is a powerful programming technique The real power of embedding sqlite in elisp will come when sqlite data structures can be used as efficient representations of sets and relations in lisp code. Eventually, I would also expect to see mutually recursive code enabled, with "virtual table" modules for emacs data structures so they can be transparently used in sql code, along with sql functions written in lisp. For example, you might create a table from lisp data using a select statement rather than executing a large number of insert statements. In-memory databases would not be unusual, and should be dumpable objects. At that point, you could expect to see such objects frequently used, e.g. for tag tables, user configuration, abstract interpretation of lisp code, etc. Lynn