From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Control the order of expansion of syntax-case macros Date: Fri, 20 Dec 2024 19:38:59 +0900 Message-ID: References: <1bfa042ed3719a10006789205e954bb53c83cf45.camel@planete-kraus.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29530"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Vivien Kraus Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Dec 20 11:39:56 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tOaQG-0007bd-2l for guile-user@m.gmane-mx.org; Fri, 20 Dec 2024 11:39:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOaPd-0007dK-E1; Fri, 20 Dec 2024 05:39:17 -0500 Original-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 1tOaPb-0007cV-VJ for guile-user@gnu.org; Fri, 20 Dec 2024 05:39:15 -0500 Original-Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOaPa-0003sv-97 for guile-user@gnu.org; Fri, 20 Dec 2024 05:39:15 -0500 Original-Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so1544543a91.3 for ; Fri, 20 Dec 2024 02:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734691152; x=1735295952; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gxmOjyJaBXQXU1+zp/PxvSpfCoFvVcflT5KxrEwuAiY=; b=jBSnbo1IJXDNeIe670orC1f2pCzoFFFCKFOg3GKaj7EivQohGBdoLeXMEUtNSGwo/E ErTLJVrd1TUdeiTh2zKOR51D7ejH+Lj+BGywwltbWH9Hn6/2KBT5EtlS/ePznlVQ5Apg e/fnALRXs+POEALwrOAx69APeH5kiYm0HBKiaEJelfCBGHnDAlJpbCx123KbRKDJwk65 gFqnrayDJsCDey1OcnT/hbl6fDwX8/M5kYqWOIUN3IQZuOD/GYV5gt3czGQ4oKfVX5bD UOpy2SQXXxva6sBfg3I3Qu4/6ejqDRFXt5szhsIfL4KMKNB97saMa6N8kb5ouRbyeuuS UD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734691152; x=1735295952; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gxmOjyJaBXQXU1+zp/PxvSpfCoFvVcflT5KxrEwuAiY=; b=crrW1ZwWJ4cXgE+cYtQ7Me5UoGwz5bgrSHToJVURbpOo0tiF+vggINneWK3wJizfCN rIE3tBOYmEJKNPm3MITqI2B1X1aAIZ2CJ7Lw0sXILcdN9DF1ODPnBE29SA5z1+alP3JA T7eqRxT25V/rUxsMoNPw3T7hp4cNkU3V7X4HUQPJAsOKT6HlIVdC9y9GWcqkL5hZJknU VLlt3e5rx/4BlPDsHVyTqQuYAG+IAJRd2yyGV9u522Viyr/zUdq2M25bDoeniJVoKmv9 70T85kXP66Xi2LguMtOYqXrEh/CSR32FJX16+++b3rkcaqxYzVuBYS1dEZZ5iZW8I35r 4P0Q== X-Gm-Message-State: AOJu0YyRoS002eqjT71LvohSY4vgFhdwGspRTOaYY2dEJZABGAc4DQ0V 8oMflo354ESdyrmAp6qXGG/PlvOebroEV4GKzAIBICGsQldZR/7x/eV5vxSwURIrPBGw5CIDA+4 347oSQcil4UVyPtUwOcvOKr6vTvBHY9kM X-Gm-Gg: ASbGncuvmgE5zeBQ5YHfH9xtQoE8xtSzJFf7Uh9gNWDT6klwrVix2oBdvrPY7T4WQin NrMr/sMBCWQNJgfG40Uc5wn09wkqpjT4nCMjSJA== X-Google-Smtp-Source: AGHT+IHPRj5WSo0HlNH5uqlzO/omdf8noJIuNBrjAxc7Tj5Mg3JrTix5+H/YNQJQh9XQWUVVpnoevW1kTheMnLM+U2s= X-Received: by 2002:a17:90b:2cc7:b0:2ee:53b3:3f1c with SMTP id 98e67ed59e1d1-2f452debcdamr3985651a91.5.1734691152599; Fri, 20 Dec 2024 02:39:12 -0800 (PST) In-Reply-To: <1bfa042ed3719a10006789205e954bb53c83cf45.camel@planete-kraus.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=nalaginrut@gmail.com; helo=mail-pj1-x102c.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:20014 Archived-At: > > > So my guess is that syntax objects are expanded lazily. Is there > something I can do to get #'world expanded before #'hello? > More accurately, it's Normal Order for macro and special form (actually it's another fancy name of internal implemented macro), you may want to take a look through the "application order vs normal order" part inside SICP. Here's a simple formula to understand practical Lazy: Lazy = Normal + Updating "Updating" is another fancy academic term for caching the evaluated value to prevent redundant computation. Say, memorization. I could be blamed for the over simplified explanation to say Normal Order rather than more general term non-strict-evaluation, Normal Order is just one of them, theoretically, but most useful. In your case, there's no updating, so you shouldn't claim it "Lazy" in computation. :-) Best regards.