From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +PX9J6NwuGK0+wAAbAwnHQ (envelope-from ) for ; Sun, 26 Jun 2022 16:43:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aFDeJ6NwuGLIzwAA9RJhRA (envelope-from ) for ; Sun, 26 Jun 2022 16:43:47 +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 77B2410F3B for ; Sun, 26 Jun 2022 16:43:47 +0200 (CEST) Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5TUI-0007Uo-MS for larch@yhetil.org; Sun, 26 Jun 2022 10:43:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5TU7-0007UP-Nd for guix-devel@gnu.org; Sun, 26 Jun 2022 10:43:35 -0400 Received: from mx1.dismail.de ([78.46.223.134]:25499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5TU5-0005d3-Ar for guix-devel@gnu.org; Sun, 26 Jun 2022 10:43:35 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 52d0d36a; Sun, 26 Jun 2022 16:43:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=date :message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= 20190914; bh=RD2oCVwd3QHpCNbWzztkM8Rj9Dct2Yipwr9NaHONno8=; b=Ijw oXtvrk3QYA9UUKIISoCJ/m+Ek/hOT0GWJm3hW4oTN2MnkKnvxporgPZwmaeYxjy8 Xxfgmmns4nahSJacuhyZ8cI18aW7v0QR5OEPoj5nTLPtDF2HvddvgTnP4cxk8cmY jO9pnd5S8Bn4CVHZqdBMonRdpTdUt98FtgNnKaI3Ofihh4WdXEsO3qCoKjkA3xoO 46KFDlAqrQna4sfOKGLLaMcXxWm25zCXY2ZQTes9v1XT/bBXY88Guv/2uLr3hi9A HEaW+Z84/7Z0wZxI+7N10ujZLsrTL+i/k8UrYkN/bYk89Y2m5HKagthKLeUVDpQ7 cHKdZZYvyoWjRMRfbXA== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id e13a1729; Sun, 26 Jun 2022 16:43:30 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id c59a09e1; Sun, 26 Jun 2022 16:43:29 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id c16d1445 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 26 Jun 2022 16:43:29 +0200 (CEST) Date: Sun, 26 Jun 2022 09:43:33 -0500 Message-ID: <20220626094333.GB3341@gac> From: jgart To: Maxime Devos Cc: Guix Devel Subject: Re: reader macros for hidden packages In-Reply-To: <0f6daaa2146a8b4d0d9718c9e861c6277a7c7aad.camel@telenet.be> References: <20220625222700.GC3148@gac> <0f6daaa2146a8b4d0d9718c9e861c6277a7c7aad.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=78.46.223.134; envelope-from=jgart@dismail.de; helo=mx1.dismail.de 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, 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=1656254627; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=bt2lkXs6vHKICt2NzEvlFrctFiHXkb5oVdkmh6wQ9EE=; b=etQOYaCWQTk0Vdtd4UUJAGZgBGGGxEDW98eRTQGMXiaSQQ2WtkRxZp7azWiRvEgyY7CEz0 vkTbpMFMl9dRsZjVVC6B6w/o2W7gF1uULnWOqTw8uGZckAKHSLMPtdknBCy85gYReRMere duAu6mz6u5BBmjYrDNEadiJosQj5vBHujH6TLz7bdUZ4DtljBaXDynQ+zHDnYdZVqC3JYi o7xrnhpewh6NVXOgmQjR+E/IBvFZ7co0ftbXOtEh7aR/Oow0znhDul9ENgl8HuK5zp6vmh hjHNvuZbu777zgVkm3nEBfMRbl1WZaCt1VpQuX0o4rzrkWwSwd1PvySdO4sM6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656254627; a=rsa-sha256; cv=none; b=tKrEiLillGl9+xJEJ6Ml1V/io7pmQidZYoi/lnBIx2KQKj6nGMrSVyk98czlCnDpv8sQow KhPgcFU0il/kS6r1ebgVYw1tp0XJ9yit+2URwfuHZ4JSzMRLMkX/x1ddD/lMymQjRW0I+M 7eMMz1t4HOTaVXWraCmsMcQWjPCI6E4mtKgPCSwVoMsu64UdwZH96+0uX2swIKBEw4Vyq5 ucmji6zVKu/du/8YF1lskig5gjfF+fnOc+iQGHIrCJ5AyvRxm9YMaCBZtVJ6ULN2OwHfkp kJf1Cm/zxRNDR0CFtPNn/z6ZK/Hw/a6yzzwEKMGDq2GzF4CbGd8reYBlCIt5Hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b="Ijw oXtv"; dmarc=pass (policy=reject) header.from=dismail.de; 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: -4.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b="Ijw oXtv"; dmarc=pass (policy=reject) header.from=dismail.de; 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: 77B2410F3B X-Spam-Score: -4.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: KHYIZTOkidoH On Sun, 26 Jun 2022 09:27:15 +0200 Maxime Devos wrote: > jgart schreef op za 25-06-2022 om 22:27 [-0500]: > > Out of curiosity, is it possible to make reader macros like this with guile? > > > > ``` > > @hidden > > (define-public python-httplib2 > >   (package > >     (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. I've tried reading that code. Looking to get back to it again soon. gexps are still somewhat fuzzy for me. Atleast at the implementationn level. > Also, @hidden does not start with #, I was inspired by this common lisp code using cl-syntax-annot: https://github.com/fukamachi/ningle/blob/a9052827757c54a83c9648175c11530e79295513/context.lisp#L8 >so you can't extend the read > syntax that wat with read-hash-extend. (I suppose you could go #hidden > instead). Does read-hash-extend allow for more than a single character after the hash # symbol? >From reading the docs it looked like not... I'll spend some more repl time with it. Just for the sake of hacking. I'm finding excuses to write guile that I wouldn't normally write and to explore hacking on guix APIs to see what I can mold them too. Take this exploration with goops and guix for example: https://github.com/drewc/druix/blob/ad1c15bd6e20375b83ce398416d0f16de0385ab5/druix/versions.scm#L33 > > Or a new 'define-public-hidden': > > (define-public-hidden python-httplib2 > (package > (name "...") > ...)) I like this idea. You'd implement that as a macro that inserts hidden-package for the user of define-public-hidden? > or move the relevant packages upstream? Yup, that's the next step. Was just trying to find a way to suppress warnings until I have time to upstream the relevant packages and to hack me some guile for fun. 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). Thanks for all the advice. It's much appreciated! all best, jgart