From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.devel Subject: Re: Unboxed package manager Date: Mon, 20 Mar 2023 19:11:10 +0100 Message-ID: <87sfdzqon5.fsf@bernoul.li> References: <57668895-8EEA-44F7-BD46-9CDFAA11FD2C@gmail.com> <87zg87saw8.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16373"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , emacs-devel To: Lynn Winebarger , Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 20 19:43:04 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 1peKTI-00042l-IF for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Mar 2023 19:43:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peKSa-0001sa-4o; Mon, 20 Mar 2023 14:42:20 -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 1peJyh-0003yT-V9 for emacs-devel@gnu.org; Mon, 20 Mar 2023 14:11:27 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peJyf-0000Tg-Nc for emacs-devel@gnu.org; Mon, 20 Mar 2023 14:11:27 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id B4DC41653D; Mon, 20 Mar 2023 19:11:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from:received :received; s=sel2011a; t=1679335879; bh=p8n3sLx3O3hxy1UQaUu9Q1hl SJYdlrRMzq9LOxqTbkg=; b=NDAl1EX2Al18z9WfBEqh5mAk7cSxdT3UsU2LF8Ia jMm3hGYVFpdLHQDLupZDe8ujfgTitT6RS8b/MQjwEFTT/wOuhZqaEH4gD535Nuyo Vra+dMUwoqF/WdY78/ZFb+AVYYfpRuwxAQGxSrNWUNxryVAzokLysgSA449RaWcX OM8= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id Oea-TTXhntPV; Mon, 20 Mar 2023 19:11:19 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 130A516539; Mon, 20 Mar 2023 19:11:11 +0100 (CET) In-Reply-To: Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 20 Mar 2023 14:42:18 -0400 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:304616 Archived-At: Lynn Winebarger writes: > I think I'm going to hack something together starting with advice on the > existing package management and taking some inspiration from the design of > Jonas Bernoulli's epkg and emir packages for tracking installed packages > and component files in a SQLite database. If I were to start over now, I wouldn't write Closql. At the time it made a lot of sense because I knew nothing about databases and because it allowed me to switch out the old data store ("everything is *its own* file") without changing internal interfaces much. Moving from files to a database did wonders for performance, so at first I didn't mind the performance impact of the OO interface on top of the database. Meanwhile I have moved away from the OO interface for anything that deals with more than one package at a time, turning many rows into EIEIO objects is a bit costly. When I switched to SQLite, Emacs had no built-in support (coming in Emacs 29) and there also was no module, so EmacSQL was the natural choice. I am the maintainer of that now, so I definitely think it serves a purpose, but I do have some reservations. The next release will feature new backends that use the built-in support and a module, but if I were to start now, I probably would go with the built-in support directly. EmacSQL allows writing SQL using vectors instead of concatenating strings, which is nice, but for people just getting started with SQL, it has the disadvantage that you now have to learn two things, SQL and the almost SQL vector syntax, which isn't 100% complete and doesn't map 1:1. The main limitation of EmacSQL is that it stores everything (except NULL) as a string. This is why I would probably avoid it now, because it limits interoperability with anything that doesn't use EmacSQL.