From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YIphMUyo22UsXAEA62LTzQ:P1 (envelope-from ) for ; Sun, 25 Feb 2024 21:51:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id YIphMUyo22UsXAEA62LTzQ (envelope-from ) for ; Sun, 25 Feb 2024 21:51:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XjUFyPpM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708894284; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=pFgki93OlYQAiQrqtiDsT45Bh1j+/54rWnBu5JFc0co=; b=jDp1xDWI2oM/uJjDIkrJ8ojlv0w666R8RcAXybAZ1jNgiz7GBHU82M9wyWl3py10RMBxLD f+mZsG2rA+4WC1eezaQEcRuZSer+8mw/0tBeNf2efHlS7/nBE4pI5QQzsIpHDo9JJvGyP2 0peQFk9Rcj4dl9f3083UNu7brCm/dPPTq52s+dJtgX4D2fK9yhBQDLGhKpLeOUgJVn7hZJ Y2Eq5MXzD+NKLylpV0ZIdACGMhCrCJDN/KHnTFqe085Tj6ZXOF/xmW7EBsQNAJ0J0CMcmQ rD0GWju+RSY7EIa8S9FD3HNxNlUX4H7PxfyPMrPxc4ktNo5fP1nmwXUHpStVsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XjUFyPpM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708894284; a=rsa-sha256; cv=none; b=DYriIFpg9JZ2JIDVkrQkqe0dvniRV9jUIWC49MzAgKFClXevNj9jN2gRBmMG+RvG80mptu JEoFShJf4D/rqgLHm5nrweWLEqT2c44vaVF8CxfjkHn6/LYwfGcQGK/QOntDaXQaNM4fVF ZJCZcxmnkYxbhfF/YVexaL87ce4dHKoppGGvxxD8p3emauLGGglVzN9ZkT6HYtQdebYcPe MtpxMJCmh3CYcUi7V4MmSApL4CnuNybfVSxdOZctGQpWJezO5TTF2qz5V0Et1c7MN65/dt XTDLHKSQ7A12htF6PY0pbAp2un1Ez2pUWaEuIPNX5A0t1cJm7RgJHBWP8/a8Fw== 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 AC1CF3EA7B for ; Sun, 25 Feb 2024 21:51:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reLSg-0006RC-Ri; Sun, 25 Feb 2024 15:51:02 -0500 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 1reLSf-0006Ql-Ow for guix-devel@gnu.org; Sun, 25 Feb 2024 15:51:01 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reLSa-0007Wg-TH for guix-devel@gnu.org; Sun, 25 Feb 2024 15:51:01 -0500 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-512bde3d197so1860211e87.0 for ; Sun, 25 Feb 2024 12:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708894254; x=1709499054; darn=gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=pFgki93OlYQAiQrqtiDsT45Bh1j+/54rWnBu5JFc0co=; b=XjUFyPpMgtrovqSv8cYGmRg8isLUTVELf5TyeucU63vDP0KvS/mh0Ddp6bvqcXu/R/ z1qILbZRXkg6SSxBDZb7yjbjT/4B/W+OUZdgN+Xfl5NVzlCiQsFCUACJ/2aWNXQ6gXLK sJMt6dCNLCD4NrJFPrBOR+2P5/cPFWQ1cmGUgoayhp0iML7T4Qj8yVJKChWVemIg9iS9 n5TK8MpmNaTI03HiWV3pRTr/bg7V9+sPfuR6TBpSTsJKZWVnLhVXLhURhVQaq88aYUr5 obSAOAswahYj2GvkVF8E3ZYoTJbvM4N/SA+PM9/oOiiVaVNq5fWsvMDGQy83CQFOYXTt CrOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708894254; x=1709499054; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pFgki93OlYQAiQrqtiDsT45Bh1j+/54rWnBu5JFc0co=; b=Sb7+Okj4NqKrkeyVOeFg4zJs7uQ21NrWQDPH+jkekwgiZsei5ijKavIukOnqnnqclJ S/GVWKX8vs3QmSt4QDJeL10sG0lsbWSLg1qPIUFYKSJrSEJ0lj9mosbBfY7FF34jUkG4 WosKOvY9BQkT7PcOjCZvxu+lbLqQHAQ2RawNO/q4NABPqha425EQcwhkDAAIoEVL+oeU HsxDQ/gTkziNtkZOWFbXcv4CvPCmMc43rvA5d6OoaJCusjBuXBY3mPWkBKGcQDwuMUPu 0Bvn+3L60UUKI2/rXD5moFKLt59ruV5XTYAz6GF/hFZYpxAHLHDgvCvugjvGDHU381QI eYPg== X-Forwarded-Encrypted: i=1; AJvYcCWxs9qtDGiwV1C04ndBJm+V0LfBaj0IfyT3BMTmQmkN+qciXYwDWEKnzbOeKIprqzdsvvzyiZDwavpfBeMgVZgNqgQ= X-Gm-Message-State: AOJu0YzY3fR7u0lKeY2oXjKUTyyCgBzbsBP/XCrOLYt3g5VA96SN1SmS dWNFegPNWTF2L60WbByksB67jZpkJgDQ9GLqbfOpcyDucya0lAgT X-Google-Smtp-Source: AGHT+IHUtepCM7iy+/IQUABqjXx7SaKaSUzMNzEAY3zmsa11A4ZznOrk4xQI9994jkefYUxZtRQx+Q== X-Received: by 2002:a05:6512:3ba6:b0:511:a477:64aa with SMTP id g38-20020a0565123ba600b00511a47764aamr3884229lfv.51.1708894254038; Sun, 25 Feb 2024 12:50:54 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id ju21-20020a170906e91500b00a3d5d8ff745sm1790741ejb.144.2024.02.25.12.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 12:50:53 -0800 (PST) Message-ID: Subject: Re: A friendlier API for operating-system declarations From: Liliana Marie Prikler To: antlers , guix-devel@gnu.org Date: Sun, 25 Feb 2024 21:50:51 +0100 In-Reply-To: <1ab54235-ecfe-43df-afce-e45ca6aba1c1@app.fastmail.com> References: <1a7168a5-5207-4dfa-ac12-b3fed841580b@app.fastmail.com> <748f644460181e086c694333a1faa2c730452a99.camel@gmail.com> <1ab54235-ecfe-43df-afce-e45ca6aba1c1@app.fastmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=liliana.prikler@gmail.com; helo=mail-lf1-x134.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.56 X-Spam-Score: -9.56 X-Migadu-Queue-Id: AC1CF3EA7B X-Migadu-Scanner: mx13.migadu.com X-TUID: gAPy4Pdk88MG Am Sonntag, dem 25.02.2024 um 10:49 -0800 schrieb antlers: >=20 > 1.) It leaks `(guix records)`'s thunked/delayed field abstraction to > the end-user, which will confuse and regularly bite absolutely anyone > who tries to use it. >=20 > 2.) Ideally we'd check that modified fields exist at compile-time. > This could require users to provide the record-type, which is not > always public, but could also be optional. You can get the record type of a record at run-time, so at least you can synthesize a check that gives you a helpful message if that's what you're gunning for. > 3) The `cut`-like transformation is recursive and, while it has > well-defined and tested behavior, the semantics are non-standard. I > don't believe that the syntax achieves its goals without this > mechanism, but there are remaining sub-concerns to address before I'd > consider it ready to formalize and document. Perhaps we can make it like modify-services where we take a value updater instead of evaluating the forms directly? This would fix both #3 and #1 (since we'd unwrap the thunked/delayed field silently). That would also make it so that we can use a single set of arrows (=3D>) for both. > 4) The syntax expands modifications of multiple fields into recursive > expansions (ie: calls to the record constructor) when it would be > more efficient (especially for thunked/delayed fields) to accumulate > transformations by target field and `compose' them over a single call > to the record constructor. This hasn't been an issue in practice, but > would be the "right thing to do". That's a minor detail, but it might be a syntax-rules =E2=86=92 syntax-case change. > If I do raise the possibility of up-streaming it would be with these > issues addressed, and would still have substantial cause to warrant > discretionary discussion then. Really a scratching-my-own-itch > solution atm. Of course it'd go through the proper review channels first, but from personal experience talk over at guix-devel is less likely to cause the change you want over submitting an actual patch :) Cheers