From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SOLeBWwKuGI21QAAbAwnHQ (envelope-from ) for ; Sun, 26 Jun 2022 09:27:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sHLSBWwKuGJTSwEA9RJhRA (envelope-from ) for ; Sun, 26 Jun 2022 09:27:40 +0200 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 C6AD22FE3E for ; Sun, 26 Jun 2022 09:27:39 +0200 (CEST) Received: from localhost ([::1]:40450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5MgE-0007lI-V2 for larch@yhetil.org; Sun, 26 Jun 2022 03:27:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5Mg1-0007kH-QT for guix-devel@gnu.org; Sun, 26 Jun 2022 03:27:25 -0400 Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]:42628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5Mfz-0003w3-Bi for guix-devel@gnu.org; Sun, 26 Jun 2022 03:27:25 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id njTK2700N4UW6Th01jTLLH; Sun, 26 Jun 2022 09:27:20 +0200 Message-ID: <0f6daaa2146a8b4d0d9718c9e861c6277a7c7aad.camel@telenet.be> Subject: Re: reader macros for hidden packages From: Maxime Devos To: jgart , Guix Devel Date: Sun, 26 Jun 2022 09:27:15 +0200 In-Reply-To: <20220625222700.GC3148@gac> References: <20220625222700.GC3148@gac> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KyrdWyXmkzYS983TJMAI" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1656228440; bh=CNVC5MXhxtQy67sidm+sJiVUYXK/z1fVCRXOtwIiYMw=; h=Subject:From:To:Date:In-Reply-To:References; b=HE7LrIEcsy3O/rvc1KAQsDLzhwublegoG3Aj95uEowyHnQgxzI5tnd3MlKHDTeDmb H828JlhOXUe961ATro5ra/hruRedXmd8ym+a4SUCOluaZ1Ier/epq8jYKmGs9gB3TP mW0Cx0jECGlORCvS/7rpSsNgjtfFCe6YpF8FMr3kAtDtl6egWZlNrZ9J3QaFGK27+c bLBw6eofebKBi4WbzUSMECTw8/3jif2gfktLhVqkrs8ePWbd40ETDr5jWVmIYRKxm+ dwJmD1Vp/9azT8liAAj4WEtUjqC32zuLyFGWqBSUqcU6OQFH3njwAznXI1746TW6w7 tiKMBIvJ5CVZQ== Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656228459; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CNVC5MXhxtQy67sidm+sJiVUYXK/z1fVCRXOtwIiYMw=; b=sT9TY4gyTwOfrrVOH5GNLQ9DYChxp9Y8oS9k9O4BBFHux7wF3Izzz3YiBnRuXLUqlXfxDg 3YvbAa2KAPI4Sz+kJL12KcJc4NLv6sPNN1Favo6aK095XVoi89hH78WBuZsEOUiKxMgsBZ /5g8nvznSSuKLV9OYjzxgl26A8EGoapbwxRYZpXT9AJIuuhhaU5cq6ecCOvcEDvi18ZyeO Meb1L3QcT2ClrJHG1rYvZVWTtEQh2/5cv0dK65UnjP5F1yEY6tY9Z7OxlnWIFAVa+qCgQM 59dvw0Pos6oG1RNHbQ0ndFQSnQBJvy2l9oxpHWtrX/HJQxvg/T/QNcaYe3ncMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656228459; a=rsa-sha256; cv=none; b=ONZWDzQnNl2E4t5rypOAPXRgq1ZGbbn0jafY7S/gc4LW3nYtI1RCH46FM6bJ/oXJJbG3TR W1LiqBB1YffgbQlv1tn9vFaDwdZft2Ub/vzdB6z4wnxlaJix0Gbj9S2s2WCQJo34hg9yUA mUty52iw8wh1OF/PcvQoXGXHV6eIDFwZGKFb5TF3T2AHF5wVqtiMuk96bjwZFLSbDGmX9K PdZzwpu3gye08h/vADFHaWJ/HgmWOteHIfR23wuM+dIauOgV1kf00dcDQjdhkeFMi/f8lT 99ZJHDNyGOt5ttpNgSEzjo+YiEPXIIojl3XvEnuhR2K99tFw8kUZ7Tzq6+pRjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=HE7LrIEc; dmarc=pass (policy=none) header.from=telenet.be; 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" X-Migadu-Spam-Score: -8.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=HE7LrIEc; dmarc=pass (policy=none) header.from=telenet.be; 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" X-Migadu-Queue-Id: C6AD22FE3E X-Spam-Score: -8.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: stkaRmMBkHqh --=-KyrdWyXmkzYS983TJMAI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable jgart schreef op za 25-06-2022 om 22:27 [-0500]: > Out of curiosity, is it possible to make reader macros like this with gui= le? >=20 > ``` > @hidden > (define-public python-httplib2 > =C2=A0 (package > =C2=A0=C2=A0=C2=A0 (name "python-httplib2") > [...] > The above would make the package hidden by using `hidden-package`. FWIW, read-hash-extend things aren't macros, though that can be worked around with some cleverness, see (guix gexp) where #~(...) -> (gexp ...) by the read syntax, and 'gexp' is a macro. Also, @hidden does not start with #, so you can't extend the read syntax that wat with read-hash-extend. (I suppose you could go #hidden instead). However, I cannot recommend this, for read syntax is global (not per module, like the module system) and there can only be a single read syntax per first character (so high chance for collisions). It's also rather magical, and we already have the less magical but no less concise 'hidden-package', why not: (define-public python-httplib2 (hidden-package (name "...") ...)) Or a new 'define-public-hidden': (define-public-hidden python-httplib2 (package (name "...") ...)) or move the relevant packages upstream? Also, the module system has a #:replace, which may be useful to put in the (guixrus packages ...) modules such that in case a module imports both the guixrus and guix module, the guixrus wins (not 100% sure if that would works). Greetings, Maxime. --=-KyrdWyXmkzYS983TJMAI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrgKUxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tRNAQDWNlrJSsHwEmsbQAFjdVl3pfLX JoOlQ23qqbsaFOwfrgEA+Gcy/OAizD6X4GQZQ2W2sVcHUgdO4ISjFs9LjjmVpAU= =siDV -----END PGP SIGNATURE----- --=-KyrdWyXmkzYS983TJMAI--