From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: Re: suspendable soft ports Date: Thu, 12 May 2022 15:56:37 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-fOXQOuIA4blasexGm/+Z" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7725"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 To: Stefan Israelsson Tampe , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu May 12 15:57:04 2022 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 1np9JQ-0001nO-Hm for guile-devel@m.gmane-mx.org; Thu, 12 May 2022 15:57:04 +0200 Original-Received: from localhost ([::1]:55702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1np9JP-0006ry-7Y for guile-devel@m.gmane-mx.org; Thu, 12 May 2022 09:57:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np9JA-0006pD-J3 for guile-devel@gnu.org; Thu, 12 May 2022 09:56:48 -0400 Original-Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]:35058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np9J8-0004Kq-BE for guile-devel@gnu.org; Thu, 12 May 2022 09:56:48 -0400 Original-Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id Vpwh270014UW6Th01pwhLx; Thu, 12 May 2022 15:56:41 +0200 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1652363801; bh=sQrWsFD8RJpJVLCBKIR0gbOFAxbd+hzfaNCIJBj2GS0=; h=Subject:From:To:Date:In-Reply-To:References; b=KlpqxjDePN0nPM37CTHxYf508LB3zq3qv5cc68zPYjUFFaaw/H6OswZcULOeauMYv EjhuLL4dFxIigZKxZiounv+cB/qHAaie8UKW9edgm+L+y7Vf36MWshc0j1R6Betwr0 MqbtqDLemg6tlgzJFxwMUOnzjDcpa5gYeQUBL/f/CuVZbFeFTZ1BMuITi5c8/90M6c j8HR2RNewfAavf+2Lbbf85jXv8eWCH4rqhB5SC68wb4ReJug45HZPQwrlUWLjTnnbh GlmOabW+E4omMCtVHNV34gkibcNo6P4Y2BsQzYmxXyvkd8vPjxqR+aTClWIQ7OtRNz 2JoZ89ReH9awA== Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 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:21209 Archived-At: --=-fOXQOuIA4blasexGm/+Z Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Stefan Israelsson Tampe schreef op do 12-05-2022 om 15:25 [+0200]: > I did a take to make the soft-ports suspendable and here is an idea, >=20 > http://itampe.com/suspendable-soft-ports.html >=20 > Let me know if you are interested, I could refactor out these files > to a project of their own, but really something like this should=C2=A0be > in guile. +1 (for moving into Guile, though as a separate project would be sufficient for my use cases). I need something like this for BSD socket integration in Scheme-GNUnet (which uses Guile-Fibers and hence needs suspendable ports). There are other uses as well (see recent IRC). It would also solve (from (fibers)Barriers): Accidental continuation barriers are bugs, and the Guile developers have been working on removing them over the years. By now, most of the high-priority accidental barriers are gone. Those that are left include: [...] * R6RS custom binary port callbacks * Legacy "soft port" callbacks [...] Something that appears to be missing: integration with C. Does calling scm_get_u8 from C work (assuming that no actual suspension happens)?=20 Likewise for scm_get_bytevector_n, scm_seek, ... Greetings, Maxime. --=-fOXQOuIA4blasexGm/+Z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYn0SFRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7prvAQDfKUmoNKmdSBkmrSJm+2Wii+nW M56tlOr48hd85K/ecgEA41o6goXXM+QLNpfPG8hA/eIHsp1k3MmbGoXJdjktlgU= =sWDY -----END PGP SIGNATURE----- --=-fOXQOuIA4blasexGm/+Z--