From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 9bRWMv18rl9zbgAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 12:33:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8MmpLf18rl9yYgAA1q6Kng (envelope-from ) for ; Fri, 13 Nov 2020 12:33:01 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5879194011A for ; Fri, 13 Nov 2020 12:33:01 +0000 (UTC) Received: from localhost ([::1]:55750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdYGA-0000UG-IB for larch@yhetil.org; Fri, 13 Nov 2020 07:32:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdYFb-0000Qb-F2 for guix-devel@gnu.org; Fri, 13 Nov 2020 07:32:23 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:33361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdYFW-00032R-Ca; Fri, 13 Nov 2020 07:32:22 -0500 Received: by mail-wr1-x42b.google.com with SMTP id u12so2489177wrt.0; Fri, 13 Nov 2020 04:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=FEB8PhKBBCjr8pclAdhb+sWp05Z0wrF0neOr0IK1ZfU=; b=uNZUY0vANOA3v9Z54BGsYnf6OTl2o6dSJaoEmGBe+iSCZE7bDJK5+FfaQNgjTq+YvO RlDNg/+qO5ZFhfMXghSEUHNNE4lWhdlqPUS5HYLvIpPVeb3CDUYNYNShqKK512woO4BM 3BxbwOtYcWsPZfdjqtdJuaENaleWNze9OdFGQvALrO396vozthMZj5uDYeFlSI/qNG+W 0XHP4Ysq14+1N2I60ZrkAmIt6qZVU3y8zpf8P3cFGqufSKH4BMajr9tQjRfc3YFmsA3l Nhgj9RgU3sm47p+gXYEX/nFOw7OO0nkHxPdMn+P1v1OtudxDWEFV+WGBVEPmAnuH0zw6 4LzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=FEB8PhKBBCjr8pclAdhb+sWp05Z0wrF0neOr0IK1ZfU=; b=Rz+/TU+SA7oNceL9UvVqgFd1hi5ThaYMV5d1FgDmpLrTvMs5/GpDFEl6W1B4BdlMI2 Kn9i2bQcQTAMOQJ3vbjjr+Ms+9UubQjsAXNU0LDPo/DReldZaTLYuoBVQnzi+DDjYt46 CgXFdX7kl/n7IRfl+ETBHAK0D44jegQZp5Hmd643r+mMxOZdGoOtePH2f2MuEyvkwIDM IK8iAwzgwJjRTV68jRJVzXAfVgfyGJYa6lFpZPx6kMuQZy2kR25mEHk9AsR3RVeew9OG eSy37xzvXylw3Az1WoGHdHWL/fRKrqNZ1Iaz32AXcrdoIKx6/8geFVw9ISCBvonlOTDy UOCA== X-Gm-Message-State: AOAM530qRFILOhzCzZ9C+2XhIroOSq9T/p8O1UG09t69cZB2xjEr3yfg o3/lENJkAgE0VhS/RthvFk4Tw0w1YM+aDA== X-Google-Smtp-Source: ABdhPJwO//IWC1BwdP20Jq8KUTEqdB9+EvRy6OLmTBDjXBvKKcZ8+3GcyRxA7voj1uDZlBk6Vhgmyg== X-Received: by 2002:adf:9066:: with SMTP id h93mr3388387wrh.166.1605270736016; Fri, 13 Nov 2020 04:32:16 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id d3sm10953589wre.91.2020.11.13.04.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 04:32:15 -0800 (PST) From: zimoun To: Ryan Prior , Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Announcing emacs-guix-packaging In-Reply-To: References: Date: Fri, 13 Nov 2020 13:31:52 +0100 Message-ID: <86y2j5e8uf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Development of GNU Guix and the GNU System distribution Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=uNZUY0vA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: npuigilE/vNP Dear, On Fri, 13 Nov 2020 at 01:28, Ryan Prior wrote: >> Did you consider making it part of Emacs-Guix? That=E2=80=99d give us a = single >> go-to place for all things Guix in Emacs. > > I don't use emacs-guix myself. I've tried it a couple times but it's > junky. Specifically, it incorporates a lot of custom Guile logic and > depends on internal Guix APIs. This design does not benefit anybody. My English is not good enough to parse =C2=AB it=E2=80=99s junky =C2=BB. W= hatever. > It's harmful for the Guix project because having third-party > applications depend on your internal APIs locks you down, where you > can't refactor internal logic without breaking other people's stuff. And > it's sad for users because it exposes them to that routine brokenness, > which in my case has prevented me from ever getting any use out of it > when I've tried it. I am not sure to understand what you mean=E2=80=A6 > And I know I'm not just unlucky: at least once a month we get people in > the IRC or Matrix rooms for Guix who are unable to make emacs-guix work > on their machines. For an interface to Guix, which aims to solve > software deployment problems, this is especially cringe-inducing. It > shows the fundamental weakness of the package's technical design. =E2=80=A6because there is not so much choice: a) interface via the Guix CLI= so invoke =E2=80=99guix =E2=80=99 via the Emacs =E2=80=99process-f= ile=E2=80=99 function somehow and then parse the output *or* b) interface via the Guix scheme API. You mean that a) would be better, right? I am not convinced. Because the Guix plumbing is Scheme and the Guix CLI is porcelain, there is no Guix CLI plumbing; contrary to Git, for instance, Magit uses the Git CLI plumbing (with experiment using libgit2). IIUC. > So as a result I'm not really interested in contributing to emacs-guix. > I would of course not object if its maintainer wanted to incorporate > parts of my package into theirs. They are both GPLv3. The point is that emacs-guix is not really maintained these days: https://github.com/alezost/guix.el/issues/38#issuecomment-617718043 > On the other hand, I am interested in building out a formal API for > tools to interface with Guix without having to depend on its internals > or parse the output of its CLI commands. This could be a Guile API, > although I picture json would be a better choice to support diverse > tooling. [...] > So what I'd want is a uniform scripting interface where I can query Guix > and get responses in a uniform way, whether that's json, recfile, edn, > msgpack, or Guile s-expressions or whatever. Just so it's an explicitly > documented external API that won't change arbitrarily, doesn't freeze > Guix internals, and only requires me to parse one type of output. At > some point in the future I can write more about that, and I'm down to > contribute the labor to make it happen too. We can use this thread as a > kick-off point for that discussion too if you're interested. If you go that road (CLI+parse output), the first step is to add to Guix an output formatter. For example, today =E2=80=9Cguix package=E2=80=9D (i.= e., =E2=80=9Cguix search=E2=80=9D and =E2=80=9Cguix show=E2=80=9D) uses recutils as formatter= and sometimes other formatting (=E2=80=9Cguix package -A=E2=80=9D or =E2=80=9Cguix package -I= =E2=80=9D or =E2=80=9Cguix package -l=E2=80=9D). Basically, other than =E2=80=9Cpackage->recutils=E2=80=9D (guix/ui.scm) fun= ctions should be added. Then another option =E2=80=99--format=E2=80=99 with predefined f= ormats as =E2=80=99recutils=E2=80=99 (default), oneline, json, free-your-imagination,= etc. and then: $ guix search --format=3Doneline guix guix none gnu/packages/package-management.scm:136:4 emacs-guix 0.5.2-2.58a840d gnu/packages/emacs-xyz.scm:2754:4 hpcguix-web 0.0.1-5.9de6356 gnu/packages/web.scm:7433:4 [..] $ guix package --format=3Djson -A [..] { "name": "hello", "version": "2.10", "source": "mirror://gnu/hello/hello-2.10.tar.gz", "build-system": "gnu", "home-page": "https://www.gnu.org/software/hello/", "synopsis": "Hello, GNU world: An example GNU package", "description": "GNU Hello prints a greeting.", "license": "GPL-3.0+", "native-inputs": ["gettext"] } [..] Somehow as =E2=80=9Cguix describe --format=3D=E2=80=9D already does. Even we could imagine --format=3D=E2=80=9C%n %v\n%d=E2=80=9D with %n, %v, %= d representing say package name, version and inputs; which could mitigate the lack of CLI plumbing but it seems beyond the initial concern. All the best, simon