From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: Re: define anywhere Date: Sun, 06 Jun 2021 15:36:28 +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="6514"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 Cc: guile-user@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Jun 06 15:37:28 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 1lpsxz-0001RP-J9 for guile-user@m.gmane-mx.org; Sun, 06 Jun 2021 15:37:28 +0200 Original-Received: from localhost ([::1]:37824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpsxy-00013o-Jx for guile-user@m.gmane-mx.org; Sun, 06 Jun 2021 09:37:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpsxU-00013e-4Z for guile-user@gnu.org; Sun, 06 Jun 2021 09:36:56 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:48773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpsxP-0002xD-WC for guile-user@gnu.org; Sun, 06 Jun 2021 09:36:55 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3FDAF5C013C; Sun, 6 Jun 2021 09:36:50 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Sun, 06 Jun 2021 09:36:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm3; bh=jnWTp zcJpbQDCE7Qnyqt+3uNExQDkxM1fTwcYD/Ngls=; b=QH2+hDUI1zfiBl1PeD2+X SqUmo111USrylREmiMOC6vfM6peoP6LYn6Ltp0SrDDJZT/oF/Gzd292F0dFSu9hf KSTgHPpmpFIk9fIJ8+2dtr6Kuw98eAdCZgXVBOH2VpUwhh160hWDfK/YlGkBmQia 5ssZM68nOwlvApeOp8pF4wYdMVxJ9sTXwg/hcVoppMTe/EviqtS+4tKuCg2rInsL JBwlG68hDtOyBXysMZeY2HuPdINjS3KOGck7Q99TIfgs/Dvhnw2TRKf9q/pgQhNH YFuIjbxxak0fZCUkwx5AxM2+YF5Mhytu9rnq32Tie0NtxJdPQbnxhBVoTQl5F+oZ g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=jnWTpzcJpbQDCE7Qnyqt+3uNExQDkxM1fTwcYD/Ng ls=; b=eTzFPyE+ixKNroWYPYz1qjNTxM/kGy3NxC7y9S/wn3NY+RqbunOmQEMLk yzDuY/zehJW7gaMIUTNdvAmvX35p3tNNCIy5GXtG47Eo/yEl38rL/+14q0T3h/HA ICNHStVwEidu5VGyq56C5fEjRPowE/R8vUX6g8CNc4sKOdaKW4sT09Mo4XaaZwDN LwAZjCiIGO1hlPlDL+zPsgXuA+cWFJxYCVILBWz5bjOoecwAg0FVlw3H5fre5jje Sw7KAKUF7KBKePt2cmunBRAUS7Z8TGiEhHwZIIv0renw+VEeXxCu+rN8s4zABYAe 0kqy3YSpBPiUgAhXlwv9+mssC/XGA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedthedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnihhn uhhspgeujhpnrhhnshhtrghmuceolhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrg hilhdrshgvqeenucggtffrrghtthgvrhhnpeekleevieevleejffetieeltdelkeevtedu heefheduieffffdttdegjeeihedtjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehlihhnuhhsrdhinhhtvghrnhgvthesfhgrshhtmhgrihhl rdhsvg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 50236AC0064; Sun, 6 Jun 2021 09:36:49 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87wnr76w14.fsf@web.de> Received-SPF: pass client-ip=66.111.4.26; envelope-from=linus.internet@fastmail.se; helo=out2-smtp.messagingengine.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:17580 Archived-At: Oh, my version is an error. I implemented the macro before definitions i= n (some) expression contexts were a thing. Andy did a marvellous thing implementinf the new letrec: if it is possib= le, letrec will have no overhead. It also automatically handle dependant= clauses: even though it might seem counterintuitive, the guile-proper v= ersion will do the right thing always. The syntactic differentiation min= e does is just there for our feeble human minds, at least with regards t= o what guile-proper is doing. So TL/DR: guiles way is the correct way.=20 --=20 Linus Bj=C3=B6rnstam On Sun, 6 Jun 2021, at 14:02, Dr. Arne Babenhauserheide wrote: >=20 > Linus Bj=C3=B6rnstam writes: >=20 > > 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. >=20 > I=E2=80=99m not sure which approach I prefer. Your approach is more pr= ecise, but > I slightly lean towards the Guile3-version, because it does not change= > behaviour when I put a pretty-print between two defines. >=20 > Though I would want a precise approach inside other forms (like when: > separating inside when and outside when). >=20 > Best wishes, > Arne > --=20 > Unpolitisch sein > hei=C3=9Ft politisch sein > ohne es zu merken >=20 > Attachments: > * signature.asc