From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: Asynchronous event loop brainstorm at FSF 30 Date: Sat, 03 Oct 2015 17:29:16 -0500 Message-ID: <87k2r3tvzh.fsf@dustycloud.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443918609 28648 80.91.229.3 (4 Oct 2015 00:30:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Oct 2015 00:30:09 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 04 02:30:09 2015 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 1ZiXBl-0004TK-1Z for guile-devel@m.gmane.org; Sun, 04 Oct 2015 02:30:05 +0200 Original-Received: from localhost ([::1]:40566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiXBk-0005zA-7u for guile-devel@m.gmane.org; Sat, 03 Oct 2015 20:30:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiXBg-0005yu-TN for guile-devel@gnu.org; Sat, 03 Oct 2015 20:30:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiXBd-0004fI-M0 for guile-devel@gnu.org; Sat, 03 Oct 2015 20:30:00 -0400 Original-Received: from dustycloud.org ([50.116.34.160]:32780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiXBd-0004ej-Hr for guile-devel@gnu.org; Sat, 03 Oct 2015 20:29:57 -0400 Original-Received: from earlgrey (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 4E52126748 for ; Sat, 3 Oct 2015 20:29:56 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 50.116.34.160 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17892 Archived-At: So David Thompson, Mark Weaver, Andrew Engelbrecht and I sat down to talk over how we might go about an asynchronous event loop in Guile that might be fairly extensible. Here are some of what we discussed, in bullet points: - General idea is to do something coroutine based. - This would be like asyncio or node.js, asynchronous but *not* OS thread based (it's too much work to make much of Guile fit around that for now) - If you really need to maximize your multiple cores, you can do multiple processes with message passing anyway - Initially, this would probably providing a general API for coroutines. Mark thinks delimited continuations would not be as efficient as he'd like, but we think it's okay because we could provide a nice abstraction where maybe something nicer could be swapped out later, so delimited continuations could at least be a starting point. - So what we really need is a nice API for how to do coroutines, write asynchronous code, and work with some event loop with a scheduler - On top of this, "fancier" high level systems like an actor model or something like Sly's functional reactive programming system could be done. - Probably a good way to start on this would be to use libuv (or is it libev?) and prototype this. It's not clear if that's a good long term approach (eg, I think it doesn't work on the HURD for those who care about that, and Guix certainly does) - Binary/custom ports could be a nice means of abstraction for this So, that's our thoughts, maybe someone or one of us or maybe even *you* will be inspired to start from here? To invoke Ludo, WDYT? - Not Ludo