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: delay and force Date: Thu, 10 Jun 2021 07:30:15 +0200 Message-ID: References: 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="3943"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 To: "Tim Meehan" , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Jun 10 07:31:07 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 1lrDHV-0000qY-SN for guile-user@m.gmane-mx.org; Thu, 10 Jun 2021 07:31:06 +0200 Original-Received: from localhost ([::1]:36652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrDHU-00038v-9i for guile-user@m.gmane-mx.org; Thu, 10 Jun 2021 01:31:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrDHA-00037z-AK for guile-user@gnu.org; Thu, 10 Jun 2021 01:30:44 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrDH5-0003rU-QX for guile-user@gnu.org; Thu, 10 Jun 2021 01:30:44 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DF8825C0126; Thu, 10 Jun 2021 01:30:37 -0400 (EDT) Original-Received: from imap42 ([10.202.2.92]) by compute6.internal (MEProxy); Thu, 10 Jun 2021 01:30:37 -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 :subject:content-type:content-transfer-encoding; s=fm3; bh=ikc7o xfKohbZ26wHa5ZdfkZsxSyLoYVFsxDOrEthtmo=; b=Ik3BkcAm0PBuOP82WwPKL 6wv7ZbDaI347tD3YCNhpJRb6oAfoRKpjBArrx/1np88FXHUIJYweKUl1i6SidIa1 SwTsS1p1e6jU2Kjdfr2MqjgkO6nz2i37YsNhxSmjIyciLuNbsjj6l9znOc/+FXRp +1LPOKXI4ccz1WHefC9/MsJZsiD66uHvNK57XwOM4VgYWp6nKSXTauZFBz/PPdKc 20RsaUFGXee6h0w+sgybrHwMR62KMR4mObuOA6upzZu6jecK4gCdeLc7/+D8CggJ F3eZsRTqWZdbTn2vZSC4pGJNs8RXfG7zvOR4dnpFW/IRyPkmUCl60ZpZSz/TViVH A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=ikc7oxfKohbZ26wHa5ZdfkZsxSyLoYVFsxDOrEtht mo=; b=LSRmL3DKd7TWdYwT2JDlMOqiC5H0LSD1kwhNEF2JnnblHscGIGXrYSsma mWzyineD7GqiAg5OvLCjuVCcrRz0KnkSO6OE/3hPjUJNBR2L6/zrp5O1e1cwvvnv ri5AYJNipLW4fxOQp0IXmpbU/nIh9WzANt9C8cqqIfeNsEAgCMquibzb5ip6CK9f IltB0oYGrBMoc29VbPg2W971yX43+kDKhuWfiznU1pOlC5WPLVDGgShmU7Bq9eYK N4FRl98aZFbdq1nIvlbpCWLGmJ3CNbaM86qbSrkdxFKYntgIADCCxsQkoU8hr9dB 1AEIsb3A3x+iPHLU1ZmjcZlC/6HpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeduvddgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnihhn uhhspgeujhpnrhhnshhtrghmuceolhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrg hilhdrshgvqeenucggtffrrghtthgvrhhnpeekleevieevleejffetieeltdelkeevtedu heefheduieffffdttdegjeeihedtjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehlihhnuhhsrdhinhhtvghrnhgvthesfhgrshhtmhgrihhl rdhsvg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6A8143100061; Thu, 10 Jun 2021 01:30:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=66.111.4.28; envelope-from=linus.internet@fastmail.se; helo=out4-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.001, RCVD_IN_MSPIKE_WL=0.001, 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:17589 Archived-At: You can see a version of them used in srfi-41. I do believe I use them i= n my old implementation of rackets for loops for guile. For/foldr I used= them as a way to ensure that the next iteration was evaluated only once= (despite being possible to call it several times) to avoid quadratic be= haviour.=20 I don't really think they are used that often, since when you need lazin= ess you would probably reach for srfi-41 (which is horribly slow) or gen= erators (srfi-158).=20 I see them as a primitive mostly for macro writers, to be honest. It is = useful if you want to handle a computation back to the user but want to = make sure it is run at most one time. That is mostly how I have seen the= m used (and used them myself), at least.=20 --=20 Linus Bj=C3=B6rnstam On Thu, 10 Jun 2021, at 07:08, Tim Meehan wrote: > Are there any good examples of "medium-sized" programs that use delay = and > force? I have seen the documentation examples, but I am curious about = how > it is used by other people in larger projects. >=20