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.devel Subject: Re: [PATCH] add SRFI: srfi-121; generators Date: Tue, 26 Jan 2021 07:48:42 +0100 Message-ID: References: <87r1mcfozv.fsf@netris.org> <87lfckf9ac.fsf@netris.org> 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="29484"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-78-g36b56e88ef-fm-20210120.001-g36b56e88 Cc: srfi , Shiro Kawai , "Arthur A. Gleckler" , guile-devel@gnu.org To: "John Cowan" , "Mark H Weaver" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Jan 26 07:49:23 2021 Return-path: Envelope-to: guile-devel@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 1l4IAE-0007Yb-L1 for guile-devel@m.gmane-mx.org; Tue, 26 Jan 2021 07:49:23 +0100 Original-Received: from localhost ([::1]:45642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4IAD-00042H-Nl for guile-devel@m.gmane-mx.org; Tue, 26 Jan 2021 01:49:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4IA2-00042B-57 for guile-devel@gnu.org; Tue, 26 Jan 2021 01:49:10 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:52373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4IA0-00012A-BQ for guile-devel@gnu.org; Tue, 26 Jan 2021 01:49:09 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 2554EE1E; Tue, 26 Jan 2021 01:49:05 -0500 (EST) Original-Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Tue, 26 Jan 2021 01:49:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm1; bh=FvsYW O7Xhpv+5b5XAgMSiE1Q9BdmHoRVF9E2R8Hcm1M=; b=f3EoYcyENJECNsyn616JX GzilFEOgErAQODFn+BalbO0o1yVpxl4KbCydo+jO73TrZcAjadgpa+nsNQaXo8D1 Tj1CH9dcxWP5aVDW7f59eLfJmySAzsgobHdSpXCd48dC2lHSDRo5n8dxSGfWARhl MFTyaWX3NtQiJ+Syts/N66EchlUPJKM0AZgI7SKxfUoxZIjxPR6aZaFPGfdPUz7D JCJgAbQX0e9svaKM+hLrT0dxiJ5bmml2rX0nhcZ1TADHAESIfz42esGxpFS4MVON Wh/jnRiUvsT/jolj5z2Ms7zIrPuGBMYgBS38e0pLnCdTCM8IA9VxNNNDowWfKjwq w== 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=fm1; bh=FvsYWO7Xhpv+5b5XAgMSiE1Q9BdmHoRVF9E2R8Hcm 1M=; b=cI69TbPUf6YnumlYj+iH4biALSUS6Ccp/fUpSnfG0wFRkrQFizTSBUZw2 frDm8cbq3XZRZLe551tAgEOJxyTrxIEpZctBokMBfAxM1lgqVkieDAIAYOSS2E+4 0iuxN/X85T/4lO4f0bQcQZRbpdhi9dMrF+ArYIn//msumELSdn7rw+rY98oynNFI W1h44R6nXKhnyfodWn+UPkFcsYv5AIZSETI9aWwYGTrtcoafEEIQQfc3GQCFmABz aLnTak1R2YkUJxiSy/7qJtGBDNTPSADZr+NAD+lZ7RNxK1MeE1k9pzTOZhp677ko /r4vRhB68mgFIEE58R1FWvkdJ8TRA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeggdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepnfhinhhu shgpuehjnphrnhhsthgrmhcuoehlihhnuhhsrdgsjhhorhhnshhtrghmsehvvghrhihfrg hsthdrsghiiieqnecuggftrfgrthhtvghrnheptedvueetheeukeethfduvdejleetffeu vddvueduieeuvdettdeuheehvdejieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheplhhinhhushdrsghjohhrnhhsthgrmhesvhgvrhihfhgr shhtrdgsihii X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id D45CE130005E; Tue, 26 Jan 2021 01:49:03 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=64.147.123.20; envelope-from=linus.bjornstam@veryfast.biz; helo=wout4-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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20651 Archived-At: Hi Y'all! I have an efficient, almost done implementation of srfi-121. I believe i= t lacks generator-unfold, but that is all. make-coroutine-generator is i= mplemented using delimited continuations and runs a lot faster than the = one in the reference implementation, with the caveat that it is apparent= ly slightly incompatible: the coroutine generator usage in (srfi 146 has= h) yielded the wrong result - despite my version passing all tests. If the maintainers of guile are interested, I could clean this code up a= nd add accumulators and make sure it conforms to the srfi document.=20 I have already spent some time integrating srfi-171 into guile, so I'm n= ot entirely unfamiliar with the task. Best regards Linus Bj=C3=B6rnstam On Tue, 26 Jan 2021, at 04:29, John Cowan wrote: > Note that 121 is withdrawn, so people should implement 158. >=20 > On Sat, Jan 23, 2021 at 1:38 AM Mark H Weaver wrote: > > Hi Arthur, > >=20 > > "Arthur A. Gleckler" writes: > > > It's not a bad idea for the sample implementation to be as clear a= s > > > possible at the expense of performance. > >=20 > > I agree that it's desirable for one of the sample implementations to= be > > as simple and clear as possible, for the purpose of clarifying the > > specification. > >=20 > > > But it certainly wouldn't hurt to have a supplemental document mak= ing > > > recommendations about possible performance improvements, or even a= > > > second implementation. > >=20 > > Sounds good. For SRFIs such as 121 and 158, where efficiency is > > important, I think that a second sample implementation tuned for > > performance would be a useful addition. > >=20 > > Regards, > > Mark