From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 YJgpM1cXsWX89AAAqHPOHw:P1 (envelope-from ) for ; Wed, 24 Jan 2024 14:57:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YJgpM1cXsWX89AAAqHPOHw (envelope-from ) for ; Wed, 24 Jan 2024 14:57:43 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=aJZryvMG; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706104663; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DrwbxGD+HOdK04QmHkL65zuHCTHSI1VQbfLvboLiQIQ=; b=doNH3y5h5Hr9M8R+E2KFiklE4PcnMK9+v6XYcbMkV9Ccw+u6x/4K+GBVLjxvkyqT177US9 0j9Bqrk3RKYRcJ22HTssZvaIiYChNI5i7/MRToUUiKAn7Kq4YtdYm7wZn4YiBkgQO1ccXT NvWh7aOqCPjoFtEVViUsjF6kQocZexdu84/7q17/FK5skvecG255dRfEHVbaFwHs0QMvTO 9KBlkFCiIDvldthrnpUJ3gtZ9AxhlGPCq0MEjlCNVoNNKwXUnqLom6kwEayl2dVihspa4M y/Ym4QB/sxZfGIntEc1tZ5tIW5Ag1gTQkJoru74kZetOJWunCbjbpdV0XYqsdw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=aJZryvMG; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706104663; a=rsa-sha256; cv=none; b=KevPef/e61iWcCZR71oMi/Sow3SA9DRPNlHuLkmeXK1uwPYRU3BbZMulQ9zqSd3RT3bpsr l1TdXo5p1XtmjU4eb88apEnWboTzjUSktDIuOk/N8MdaMZ0Z5vp0VNB7Mzlm5wQEiWuHkg vtCUKdZsbEcquhq3tpuihePlL1TwnBOQHbyhh+/4E3dd4Gygx/IWwqjwdj/e07rMA+ahtU zj9qspzeXVYCEZVldqwPgroxt19Wnc7L8CHKFGPUEwvowHcNxbMhFe0Xdq6cUxpS9nrCuI j1fyjthUk1dD52bgEFgDO8yMDckBrUNDKaJAOEH09xlhHHzd6FN/8lWSbrpenw== 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 70BD05505D for ; Wed, 24 Jan 2024 14:57:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSdkW-0001Gd-VH; Wed, 24 Jan 2024 08:57:04 -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 1rSdkU-0001FH-IY for guix-devel@gnu.org; Wed, 24 Jan 2024 08:57:02 -0500 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSdkR-0005on-RX; Wed, 24 Jan 2024 08:57:01 -0500 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-21080bacc6fso3149694fac.0; Wed, 24 Jan 2024 05:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706104616; x=1706709416; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=DrwbxGD+HOdK04QmHkL65zuHCTHSI1VQbfLvboLiQIQ=; b=aJZryvMGe4UDCwjGai564dWHi8fUK94LGdXFQYr17CUYLvc4K9ngaKSKxh6gHlGCf9 k2J9IXchc4wFlBNzxe2Ow8W7lxsFVL12lQ4AtjhGBfV+/Tk/c3bLciu6JCNWWXywcumm wMH8s/pNcXXFtWGP8ldwYaHtQ49rjKgjTDsG8x1ITaVLwfvWzIpBPeMdhsd968WxepBJ Qi6c7vavqyu2JBeBcrPIuW8FPMxp29d98rQE+zUpW663dTLaJVWdtMGnklrxHObVnFOh mSgqb5DnsCS+Gs2ZxGePp2NHlo0qiSCW/zHmNO3AX7qFZ5GCC/E+rPSxlkDtu8Xr1b4w 8tWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706104616; x=1706709416; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DrwbxGD+HOdK04QmHkL65zuHCTHSI1VQbfLvboLiQIQ=; b=eJkhe0RByONFe/qDzkV1efTZeqC/F43TgvXCp5gvjIka2mW2f2nfXZMMGb7QHjF1n/ pkFcb8BJUCI0ud4VqFKBh3Qo3KW/wNnFyU4vOsvsqTc71wfZt1PADmimm34wZ5FOnxhh AleedzT64k0ABVpemzFIKYcIHtO03Go12bvnOBkPKwKKAyEd5Ci3cljheqaV/uqmsmzs bMEu60mScwH9PlU3vIVmy56OtHj0mqSoyph7tc3/leTLF9ox4xHq2ZfXSZqExyw8N89o pKlh+SOQAQD3mTjC3cr6BX9UMPM1jypG1IhnzEcK5NB+08JLBo3h9vEfeNdZZTHwPb9W 50OA== X-Gm-Message-State: AOJu0Yz4GTFbSdmHrwFzhBCx5LxP4GVGTM0nRXs6rkhY61XTjvAv5Xu5 COhoOQLdZy7IV7mq5V2h7dEXjwYhHVM5BvlTEefxrjo3A0lDHf08KuuQF8yd4IM= X-Google-Smtp-Source: AGHT+IH4DcjZU7swGle0LVd+kYRYrc2ibvVrMrMfk5P4/FlvnrqcdKJ2wgLN8cjazR1k6ZWvw3t16Q== X-Received: by 2002:a05:6871:150:b0:206:3ae:f0ad with SMTP id z16-20020a056871015000b0020603aef0admr3226464oab.114.1706104616200; Wed, 24 Jan 2024 05:56:56 -0800 (PST) Received: from hurd (dsl-155-16.b2b2c.ca. [66.158.155.16]) by smtp.gmail.com with ESMTPSA id jv22-20020a05622aa09600b00419732075b4sm4383265qtb.84.2024.01.24.05.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 05:56:55 -0800 (PST) From: Maxim Cournoyer To: Attila Lendvai Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel Subject: Re: [shepherd] several patches that i deem ready In-Reply-To: (Attila Lendvai's message of "Wed, 24 Jan 2024 10:56:46 +0000") References: <878r4ia86d.fsf@gmail.com> <87a5ow2nje.fsf@gmail.com> Date: Wed, 24 Jan 2024 08:56:54 -0500 Message-ID: <87cytqzvfd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4860:4864:20::2a; envelope-from=maxim.cournoyer@gmail.com; helo=mail-oa1-x2a.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.99 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -9.99 X-Migadu-Queue-Id: 70BD05505D X-TUID: 6EFrT0LOJdb+ Hi Attila, Attila Lendvai writes: >> About "cheaper code path when a log level is disabled at runtime", >> perhaps it can be improved in guile-lib, but otherwise that's a nice >> list. I just wish we had a good logging library in Guile and could stop >> reinventing the wheel left and right. > > > i've made my judgement that the logger in guile-lib was never applied > seriously when i relized that it stores the enabled state in a > hashtable (which must be looked up for every log statement). > > i made sure the log statements have a unique syntax, so the underlying > machinery can be replaced easily later, and then i moved on. I guess if we were serious at giving Scheme/Guile a great logging library we would try to design it with the help of everyone as a SRFI; it could then be integrated to Guile and any other Scheme, benefiting the ecosystem at large. Is this something you could be interested in trying? I've found the Scheme community around SRFIs very knowledgeable and helpful. >> OK. For levels greater than debug, they I see them as glorified >> comments (executable comments as yo wrote), so I don't see a strong >> reason to attempt to hide them or treat them specially. In Python >> (which strives to be readable), we typically break logging lines (which >> are concatenated for free inside the parens -- default Python behavior), >> and that doesn't hurt readability in my opinion, and means we can just >> follow the usual style rules, keeping things simple. > > > my experience is different. i found myself only ever looking at log > statements when i'm debugging something, regardless of the level, and > including other people's code. and then i just toggle line wrap with > the press of a button. > > must be related to my habit that i usually put more effort into making > the code more self-documenting (readable) than i put into writing > informal comments and documentation. and rethinking my "executable > comment" metaphore: these log statements serve much less as comments > than reporting the temporal state and program flow. > > but my primary aim is to color it all gray, and i don't immediately > know how to do that in emacs for multiline sexp's (i.e. balanced > parens). this is the primary reason our team just kept them on one > line, but the flexibility of toggling word wrap as needed is also > nice: the essetial part is always within a reasonable margin, and the > rest can be read when word-wrap is enabled. I'm sure there's a way; have you consulted in #emacs on Libera? > if requested, then i'm willing to re-format the log statements if i > can find a way to still color it all gray. it's important that logging > stays out of sight while reading the code. OK; I'll let other voices their preference (because it's down to that, and current conventions). > >> Thanks for working on this, I'm sure it'll help many, myself included, >> following the execution of Shepherd more easily. > > > my pleasure! > > in my experience when a project doesn't have proper logging, > backtraces, error handling hygene, and warning-free compilation, then > inefficient debugging quickly eats up more time than it would take to > implement these features properly. > > unfortunately, guix and guile is not very good on this front, so i > found myself working on these, too. such investment rarely pays off > for the first bug, but it pays off very well in the long run. I wholly agree. Sadly, I find the debugging facilities of Guile are also lacking compared to what other programming languages have, which further exacerbate that situation. -- Thanks, Maxim