From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: wip-ports-refactor Date: Thu, 14 Apr 2016 16:03:17 +0200 Message-ID: <87zisw9tju.fsf@gnu.org> References: <87twjempnf.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1460642627 19031 80.91.229.3 (14 Apr 2016 14:03:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2016 14:03:47 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Apr 14 16:03:37 2016 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqhrr-0005qf-Io for guile-devel@m.gmane.org; Thu, 14 Apr 2016 16:03:35 +0200 Original-Received: from localhost ([::1]:39902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqhrq-0004tG-OP for guile-devel@m.gmane.org; Thu, 14 Apr 2016 10:03:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqhrg-0004po-Qk for guile-devel@gnu.org; Thu, 14 Apr 2016 10:03:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqhrc-0007zV-Qj for guile-devel@gnu.org; Thu, 14 Apr 2016 10:03:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqhrc-0007zR-Ns; Thu, 14 Apr 2016 10:03:20 -0400 Original-Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:59948 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aqhrc-0000ny-5S; Thu, 14 Apr 2016 10:03:20 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Germinal an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87twjempnf.fsf@pobox.com> (Andy Wingo's message of "Wed, 06 Apr 2016 22:46:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:18284 Archived-At: Hi! Andy Wingo skribis: > I have been working on a refactor to ports. The goal is to have a > better concurrency story. Let me tell that story then get down to the > details. In addition to concurrency and thread-safety, I=E2=80=99m very much interes= ted in the impact of this change on the API (I=E2=80=99ve always found the port= API in C to be really bad), on the flexibility it would provide, and on performance=E2=80=94=E2=80=98read-char=E2=80=99 and =E2=80=98get-u8=E2=80= =99 are currently prohibitively slow! > Going forward we need to define a Scheme data type for ports, and to > allow the read/write procedures to be called from Scheme, and to allow > Scheme implementaitons of those procedures. We also need to figure out > how to do non-blocking I/O, both on files and non-files; should we set > all our FD's to O_NONBLOCK? How does it affect our internal > interfaces? I do not know yet. I think this part can come later, after the refactoring is done. > There's still space for different schedulers. I wouldn't want to > include a scheduler and a thread concept in Guile 2.2.0 I don't think -- > but if we can build it in such a way that it seems natural, on top of > ports, then it sounds like a good idea. I agree. If the new implementation gives users more flexibility, then people will be able to easily experiment with things like 8sync or your ethreads branch. From there on, we=E2=80=99ll have a better idea of whethe= r a scheduler framework or something should be added to Guile proper. I=E2=80=99ll take a look at the code. Thanks a lot for fearlessly diving into this! :-) Ludo=E2=80=99.