From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KHjbKSHtsGXQvwAA62LTzQ:P1 (envelope-from ) for ; Wed, 24 Jan 2024 11:57:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KHjbKSHtsGXQvwAA62LTzQ (envelope-from ) for ; Wed, 24 Jan 2024 11:57:37 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail header.b=wA7kMh7f; dmarc=pass (policy=none) header.from=lendvai.name; 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=1706093857; a=rsa-sha256; cv=none; b=WNuo5Zfkh++u2yPtOTn8kXpUUkiiUSA4Q1Ca3fjNEDUGKkJ7Cx1f9MErHzdrYO64Q5GMqp I8NBObUAV5tbgLw6QuyTTTxFDdR50+3TsAuq1SgEePTJgYcjqyh8A+E5xecKhJdotar13d 6b1l8b0iu37HeKcwXoW8dWcu76wbu1dyyEf1Bk7tOUGLw3/GefV8m4pZTquAMGl6HILmCU TPIPl4WAh0otG7Lj0+ClVprd7KHrHEGPrfLarkIgSVtAdabFNwC9gW0d8UuEy3AjiN7id7 8hdSTXnNpioekRrOECMVni6y7jk74C61MqTeLxBU7WVwEE77H0ZT029IvqQIMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail header.b=wA7kMh7f; dmarc=pass (policy=none) header.from=lendvai.name; 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=1706093857; 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=NwCQXbRIQg7+16BqCy9EBCnDas0mfqbBQKQwAVvwV1Q=; b=i1njsWquL03xFZPthBJp6X/0VV7RNEDOX8q03xQExuEfZ1btE6ksrYRFqln7SFM5y+Yiyx A9E7FQ9+7PMTUgMEPjeArt3hhpkO/1MgMWIGGuLn9jR5DeutNO+NRExeringU7dAZ1MEq3 uYr4mYf18ZvKW9CJ9PvvRxoT3wK1ssLd/j2Fh00OFf2oBjTrvAi+k2FjfXy2PdyvoiLy9V /AF019VZYUibA9UAc6g6BqREKq7UZOnoGM68mRjvSl/FgwlXuSLDzDvcCjwKEEceRZz5+k 8DFBNEfpudlWkPqRtjjLufWrTrXyFxPIAjkQ5wdhLmL5fUIKiPwO1d9kc8FnqA== 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 4C526728FE for ; Wed, 24 Jan 2024 11:57:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSawL-0006SL-SK; Wed, 24 Jan 2024 05:57:05 -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 1rSawJ-0006Rw-FF for guix-devel@gnu.org; Wed, 24 Jan 2024 05:57:04 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSawG-0002n0-Sq; Wed, 24 Jan 2024 05:57:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail; t=1706093815; x=1706353015; bh=NwCQXbRIQg7+16BqCy9EBCnDas0mfqbBQKQwAVvwV1Q=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=wA7kMh7f7qpX7J0PVii0tq2acz4r7n5cxpkKjfOti0co5z8sHQRMJnvy47Xx20JIm GlBhooIrJfz9q1AtkIPtCzhrPfrAy0CpoQLn1kcFhxtEg5YClsPEzzzrPKdCwcg5io o4EjrQYHFv4WKoqVBwz80CKiXMmDzB1Xz2dMVDm20Ur7FXuORntq6AmZkSh36BJjmp bop0v2xw0pr+u4TSv4DtxLkjm4/r6VbVxDshUthuCm+Lg/nb8P5gf63bsI7Scs8gpD 8qPV/Y94/OxZG3kdIPXBxmWA6ROeI0JmvxcRc5bAjU14gYMgP7FgcAdb3vg3wcJuLo YTPpczCabN5/Q== Date: Wed, 24 Jan 2024 10:56:46 +0000 To: Maxim Cournoyer From: Attila Lendvai Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= , guix-devel Subject: Re: [shepherd] several patches that i deem ready Message-ID: In-Reply-To: <87a5ow2nje.fsf@gmail.com> References: <878r4ia86d.fsf@gmail.com> <87a5ow2nje.fsf@gmail.com> Feedback-ID: 28384833:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.17; envelope-from=attila@lendvai.name; helo=mail-4317.proton.ch 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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-Scanner: mx10.migadu.com X-Spam-Score: -10.06 X-Migadu-Queue-Id: 4C526728FE X-Migadu-Spam-Score: -10.06 X-TUID: vpMzYVPpoiZo > 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 serio= usly 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 mach= inery can be replaced easily later, and then i moved on. > 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 stateme= nts when i'm debugging something, regardless of the level, and including ot= her people's code. and then i just toggle line wrap with the press of a but= ton. 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 comm= ents and documentation. and rethinking my "executable comment" metaphore: t= hese 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 ho= w 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 enab= led. if requested, then i'm willing to re-format the log statements if i can fin= d a way to still color it all gray. it's important that logging stays out o= f sight while reading the code. > 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, er= ror handling hygene, and warning-free compilation, then inefficient debuggi= ng 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 my= self working on these, too. such investment rarely pays off for the first b= ug, but it pays off very well in the long run. --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CA political situation is the manifestation of a parallel psycholog= ical problem in millions of individuals. This problem is largely unconsciou= s (which makes it a particularly dangerous one!)=E2=80=9D =09=E2=80=94 Carl Jung (1875=E2=80=931961), Letters, vol.1 pg. 535