From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: Hack the (init) system! Date: Mon, 28 Sep 2015 09:43:37 -0400 Message-ID: References: <87oahjz05m.fsf@gnu.org> <874mjb0wvm.fsf@netris.org> <87a8t2wfod.fsf@gnu.org> <87k2rertcf.fsf@dustycloud.org> <877fnaq540.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgYiV-0006MI-O5 for guix-devel@gnu.org; Mon, 28 Sep 2015 09:43:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgYiR-0007J4-BA for guix-devel@gnu.org; Mon, 28 Sep 2015 09:43:43 -0400 Received: from mail-yk0-f180.google.com ([209.85.160.180]:34755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgYiR-0007It-6M for guix-devel@gnu.org; Mon, 28 Sep 2015 09:43:39 -0400 Received: by ykdg206 with SMTP id g206so177908132ykd.1 for ; Mon, 28 Sep 2015 06:43:38 -0700 (PDT) In-Reply-To: <877fnaq540.fsf@igalia.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel On Mon, Sep 28, 2015 at 5:13 AM, Andy Wingo wrote: > On Fri 25 Sep 2015 23:04, Christopher Allan Webber writes: > >> I wonder if it's about time that Guile get something along the lines of >> a well-supported, general event loop system? > > I think Guile needs user-space threads, implemented on top of delimited > continuations. With threads, you don't need to invert control in your > program. Racket takes this approach as well. > > To get there we need to expose port buffers to Scheme, mark all file > descriptors as nonblocking, and cause EWOULDBLOCK to suspend the current > green thread. I had a prototype working a while back on the > wip-ethreads branch, but you don't want to introduce a separate port > type -- really you want to have this work on all ports, so that's the > hacking that's needed. "Green threads" and "user-space threads" are coroutines, yes? That would be a very nice feature. > I'll try to get out a 2.2 prerelease in the next week or so -- > everything is up to date now, finally, I just have a pending patch to > make the stack grow down instead of up so we can use native CALL > instructions in some future. Works in progress... Exciting! :) - Dave