From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: Re: define anywhere Date: Fri, 11 Jun 2021 10:08:18 +0200 Message-ID: References: <87wnr76w14.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40110"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Jun 11 10:08:45 2021 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 1lrcDc-000AIi-3k for guile-user@m.gmane-mx.org; Fri, 11 Jun 2021 10:08:44 +0200 Original-Received: from localhost ([::1]:37538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrcDb-0005rC-6d for guile-user@m.gmane-mx.org; Fri, 11 Jun 2021 04:08:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrcDQ-0005qu-JE for guile-user@gnu.org; Fri, 11 Jun 2021 04:08:32 -0400 Original-Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]:41834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrcDO-0001Cp-Qe for guile-user@gnu.org; Fri, 11 Jun 2021 04:08:32 -0400 Original-Received: by mail-io1-xd29.google.com with SMTP id p66so28143322iod.8 for ; Fri, 11 Jun 2021 01:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qU9dRw5WdphZjlQpa4xH1CqDL105jnsc/clOTgUmQmg=; b=QL0v4bw1KBJMBjTcCFOS/hOCXFKLnJmM9DCVKaD8SrA3DkL+U3k4scfTYuZDV8Glco McCu9oYcTzQ+wTTZIwPX67KYRQVuFFxV9zYOx/40xnC/7Y8ENyGNbO9listQAKVQ2rrU 0a3Lq5rqulMrCwdCrIgn0G0ci1MIPy91gR7m+jn5UztTXOLnIJrPg8s+onldW7lGIZ8z +3XeWb/XAS8PQcam+qSlezifgFfhSEI2QnIor1TEEWV+Wj2v1z3gtdm1mWwOTtbgYNRx Utl00L6WveZ9l5DgKNdg/ifr6P5lvAvzbp8XzV6knI15kQ/95tqcKyd2hBypq8b4coYX e6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qU9dRw5WdphZjlQpa4xH1CqDL105jnsc/clOTgUmQmg=; b=Q7GNZZ0BYU+QCcGu3r1+gy0YNsyZIePOt+CLi2dZrtJa798nsWO+v9ylhe2WzQIYoo eKsUGB1h6eIpMU6A3UzvQo6e4CV1FMxCxci8cUJPT5zQX0utF36BfVU7oJumU+iUopRZ ryeVOVshL1orJmK4WjYZ59ZCt0sbMoEyN0qwhKhx74RODPVDbP4/8qX6CqgbXWDIh5xo I4CxWzPXSijUaolSRvzWbVXs/7zyoKTtW7B+P1hTO4CNXd+b1wxcoF3JEPWjWKvzZ9Ko KxdaAomaMyNcWp/7apRT4h6sug0FQlBtTnaJAexpJQ0yDoHRJsQGBw9YGHyA83W5Mqvh nppw== X-Gm-Message-State: AOAM532Wq085V6L8DX1BlAOqyny2beI9pnxOzJzrB5PhpXYqKj01S4Rh MjToCPQwEpCI+TIRLwX0GJx6mEVEfKZZE6V3seQ= X-Google-Smtp-Source: ABdhPJxYLBVBakKOaQNnarZIa8n6+ZAdFVVKgUwHvOF4lJzEeFphuXR8L7C5uBMG+KdMTbjav2e9jgHSS/Lq+lSBftQ= X-Received: by 2002:a5e:8510:: with SMTP id i16mr2247896ioj.40.1623398909846; Fri, 11 Jun 2021 01:08:29 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d29; envelope-from=damien.mattei@gmail.com; helo=mail-io1-xd29.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.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.lisp.guile.user:17593 Archived-At: On Sun, Jun 6, 2021 at 3:36 PM Linus Bj=C3=B6rnstam wrote: > Oh, my version is an error. I implemented the macro before definitions in > (some) expression contexts were a thing. > do you talk about what? the linked code? > > Andy did a marvellous thing implementinf the new letrec: if it is > possible, letrec will have no overhead. It also automatically handle > dependant clauses: even though it might seem counterintuitive, the > guile-proper version will do the right thing always. The syntactic > differentiation mine does is just there for our feeble human minds, at > least with regards to what guile-proper is doing. > > So TL/DR: guiles way is the correct way. > > -- > Linus Bj=C3=B6rnstam > > On Sun, 6 Jun 2021, at 14:02, Dr. Arne Babenhauserheide wrote: > > > > Linus Bj=C3=B6rnstam writes: > > > > > becomes ONE letrec under gulie3, whereas my library turns it into > > > (letrec ((a 2) (b 3)) > > > (display "hej") > > > (letrec ((c 3)) > > > (+ a b c))) > > > > > > That should be an easy fix, again if there is any interest. > > > > I=E2=80=99m not sure which approach I prefer. Your approach is more pre= cise, but > > I slightly lean towards the Guile3-version, because it does not change > > behaviour when I put a pretty-print between two defines. > > > > Though I would want a precise approach inside other forms (like when: > > separating inside when and outside when). > > > > Best wishes, > > Arne > > -- > > Unpolitisch sein > > hei=C3=9Ft politisch sein > > ohne es zu merken > > > > Attachments: > > * signature.asc >