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: Unboxed package manager Date: Wed, 22 Mar 2023 10:31:04 -0400 Message-ID: References: <57668895-8EEA-44F7-BD46-9CDFAA11FD2C@gmail.com> <87zg87saw8.fsf@posteo.net> <87sfdzqon5.fsf@bernoul.li> <87lejprq6e.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002e103c05f77e03eb" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38530"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , Yuan Fu , emacs-devel To: Jonas Bernoulli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 22 15:32:35 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 1pezVz-0009hu-8X for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Mar 2023 15:32:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pezUp-00065l-R2; Wed, 22 Mar 2023 10:31:23 -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 1pezUn-00065C-LP for emacs-devel@gnu.org; Wed, 22 Mar 2023 10:31:21 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pezUk-0002wp-Ly for emacs-devel@gnu.org; Wed, 22 Mar 2023 10:31:21 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id fb38so6312459pfb.7 for ; Wed, 22 Mar 2023 07:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679495475; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lpoSZuEkExn7hwA9Ta66K0enAcb8PIJ3CXkcEu0wVp0=; b=Y5b0PBKsNVd+OTNNxzcWrAWiKzxl2IJS2pQhSchHAt4RBAhU/usog//1bZ829TK7+u 2TiJqwmRUVnYC0FSipMEs+4N5WjF2T8enmPLi2EomGJyYbKTm7JTIYszQGFgtLh8r6tp u9P+ANol3aZjsGNONoNKtLKJtRcuB5i5QOZZ7xQBQzNLMosQTGFAdBtMHwCzu2PtdOwH 3TSladUBKTCUVowTTLXNxGiNaNF2ybH47iviW7Jw8It6gitpzr3bV92AQmV42yso4QkN eFPYPH7fkbQcN/lnDMShg/ZixcMs6q+9x+cGJawvGqoWIXUqZHtRkFxHnWD6hLPGaySj ofQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679495475; h=cc: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=lpoSZuEkExn7hwA9Ta66K0enAcb8PIJ3CXkcEu0wVp0=; b=eylN/hvogouEG+UvrF1mWXcBTKfUjOCfUQwmPUoJsJ8BjQzawJcTtwrWH3vJf5pi3+ cPIwCqTLiuwRTDb38FqZv3x2YTed2W2Ia1bMjFj0IW8w7wXw3w+szNRZKwrC1QFNoUMR 7KFy/K7eC8QYFhwcjGjVlFdMoRMRDo84sR2kYl0SXL+bIl1JA/PnsqV1qhxGnnz+sQtO T/y0soRrBrqSLekmN2p02MDvMTUeO1zo4hk6o4ipajXb7eYgD5HrW2DL14+/LFg+/CPL 4VGxlGQE5FHyUJjqOPJ7jCU8vu06DzB8r4NxQPBvmPJjQiDE2Ma63P0vRWYpbwlsXiPb HEjg== X-Gm-Message-State: AO0yUKULcQXlSpJ+mfU1w4jknV9hp1SaQEZRCYa4L3RGb2HwHsbIoTbx Wsuyk743mH5GVh274inItpuPFE9ggASI7kVxodE= X-Google-Smtp-Source: AK7set/ANhquK04iaWKM1eoL2vih6cSo6glb/WkeTcVHVzNwynBtcuijD/+mwlcdhHkNeIwsJ52vGRNUagnr4rb9bhc= X-Received: by 2002:a05:6a00:9a0:b0:627:2973:b118 with SMTP id u32-20020a056a0009a000b006272973b118mr1892519pfg.1.1679495474842; Wed, 22 Mar 2023 07:31:14 -0700 (PDT) In-Reply-To: <87lejprq6e.fsf@bernoul.li> Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=owinebar@gmail.com; helo=mail-pf1-x432.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, HTML_MESSAGE=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:304711 Archived-At: --0000000000002e103c05f77e03eb Content-Type: text/plain; charset="UTF-8" On Wed, Mar 22, 2023, 7:17 AM Jonas Bernoulli wrote: > Lynn Winebarger writes: > > > It seems like a method for > > compiling sexpr-type representations of sql queries into statements > > usable with the builtin support would still be useful, and not limited > > in the same way - since the returned values do not require serializing > > as text by the sqlite shell then parsing them in Elisp. > > Of course "SQL as vectors" and "store everything as a string" are not > tied to each other per se, but with EmacSQL you get both. > The whole SQL as vectors conceit isn't something I've given a lot of thought to. As long as it's a syntax tree and not a pile of strings. Vectors or conses - both can be analyzed by pcase, so I start at a point of indifference. > > [ Digression...] > > Just looking at the src/sqlite.c in master, as there is no other > > documentation of the sqlite support I can see, only a simplified form > > of the core API is supported - not unreasonable for an initial > > release. The only noticeable absence I see, based on a cursory review > > of the sqlite3 API spec, is that a select query cannot be reset. > > Maybe because each db connection is associated with at most one > > prepared statement at a time by the design of the Lisp_Sqlite > > pseudovector? > > > > Other than that, I note that rows are returned as lists rather than > > arrays, which makes the semantics more incompatible with emacsql than > > it really has to be. Can that be changed before 29 is released? > > Why is that a problem? What would we gain if the DSL and the output > both used vectors or both lists? > It's not the SQL expressions I'm concerned about. I'm just thinking of the existing sql-using code base expects rows to be represented with arrays, why add the cost of remarshalling them from lists? It just seems like a gratuitous incompatibility to me, unless there's a strong reason to prefer lists. I have no other reason to prefer either representation. The die is cast now, anyway. Lynn --0000000000002e103c05f77e03eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Mar 22, 2023, 7:17 AM Jonas Bernoulli <jonas@bernoul.li> wrote:
Lynn Winebarger <owinebar@gmail.com>= writes:

> It seems like a method for
> compiling sexpr-type representations of sql queries into statements > usable with the builtin support would still be useful, and not limited=
> in the same way - since the returned values do not require serializing=
> as text by the sqlite shell then parsing them in Elisp.

Of course "SQL as vectors" and "store everything as a string= " are not
tied to each other per se, but with EmacSQL you get both.
<= /div>

The whole SQL as v= ectors conceit isn't something I've given a lot of thought to. As l= ong as it's a syntax tree and not a pile of strings.=C2=A0 Vectors or c= onses - both can be analyzed by pcase, so I start at a point of indifferenc= e.


> [ Digression...]
> Just looking at the src/sqlite.c in master, as there is no other
> documentation of the sqlite support I can see, only a simplified form<= br> > of the core API is supported - not unreasonable for an initial
> release.=C2=A0 The only noticeable absence I see, based on a cursory r= eview
> of the sqlite3 API spec, is that a select query cannot be reset.
> Maybe because each db connection is associated with at most one
> prepared statement at a time by the design of the Lisp_Sqlite
> pseudovector?
>
> Other than that, I note that rows are returned as lists rather than > arrays, which makes the semantics more incompatible with emacsql than<= br> > it really has to be.=C2=A0 Can that be changed before 29 is released?<= br>
Why is that a problem?=C2=A0 What would we gain if the DSL and the output both used vectors or both lists?

It's not the SQL expressions I'm co= ncerned about.=C2=A0 I'm just thinking of the existing sql-using code b= ase expects rows to be represented with arrays, why add the cost of remarsh= alling them from lists?

= It just seems like a gratuitous incompatibility to me, unless there's a= strong reason to prefer lists. I have no other reason to prefer either rep= resentation.=C2=A0 The die is cast now, anyway.=C2=A0

Lynn

--0000000000002e103c05f77e03eb--