From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: anyone define port types? Date: Thu, 23 Jun 2016 12:43:12 +0200 Message-ID: <877fdgp4n3.fsf@pobox.com> References: <87y492mnjp.fsf@pobox.com> <87pots9tag.fsf@gnu.org> <87bn37wtf2.fsf@pobox.com> <20160612092513.3eb1c8a3@laptop.homenet> <8760t5mthu.fsf@pobox.com> <20160619163327.36246706@dell.homenet> <8737o9kr3g.fsf@pobox.com> <20160619210912.48528ffa@dell.homenet> <20160620074503.6d06426b@dell.homenet> <87y460jou5.fsf@pobox.com> <20160620100157.530fc347@dell.homenet> <20160622234450.773f313f@bother.homenet> <8760t0qru7.fsf@pobox.com> <20160623102421.3ff83743@bother.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466678622 13333 80.91.229.3 (23 Jun 2016 10:43:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2016 10:43:42 +0000 (UTC) Cc: guile-user , guile-devel To: Chris Vine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 23 12:43:32 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 1bG26d-0005Lw-3K for guile-devel@m.gmane.org; Thu, 23 Jun 2016 12:43:31 +0200 Original-Received: from localhost ([::1]:35773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG26c-000804-8o for guile-devel@m.gmane.org; Thu, 23 Jun 2016 06:43:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG26X-0007y9-VV for guile-devel@gnu.org; Thu, 23 Jun 2016 06:43:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG26T-0007Zb-RT for guile-devel@gnu.org; Thu, 23 Jun 2016 06:43:24 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:56173 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG26T-0007ZR-Mh; Thu, 23 Jun 2016 06:43:21 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 8973320FFE; Thu, 23 Jun 2016 06:43:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=RWBspL/Luzz4HCxPj0na+W2IdlY=; b=vEChie p2+ImAdkcQr6vwJ0V/XEDJO+px+7YVSKGmNn/DKf8wMfNKteGSqFEKWcHPhb8uFo 9zvXpdWa0dvZVyamX3hc9V7SJ1K67DzsQmb04eWuvFnPqy4X8H4IeLfuyzafeoUb lLxxzpOczMcblfsqgWOVdheHq24q6wpKJcR8Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=aIREGpsqZsjYq3ZJRGjgHBMSVb8Vh5FX G8y3vb542sN3sELPl57b1pT5w++73gGvK6BshLmo5zpCsjyEfbPXBxU49BKITYsg PP87L+ceI6jKNblirmQCp/2KmwPrK/peVjEDRMRZre+8y4iiv8CtFf63K2M0Xou1 qgeQXyLXhsk= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 808F320FFD; Thu, 23 Jun 2016 06:43:20 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id C6A7620FFC; Thu, 23 Jun 2016 06:43:19 -0400 (EDT) In-Reply-To: <20160623102421.3ff83743@bother.homenet> (Chris Vine's message of "Thu, 23 Jun 2016 10:24:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 4CFEF26C-392F-11E6-A504-C1836462E9F6-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 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:18398 gmane.lisp.guile.user:12692 Archived-At: On Thu 23 Jun 2016 11:24, Chris Vine writes: > A few things on that. First, there will always be a use for an event > loop to do event-loopy things, irrespective of whether and how a > coroutine interface is put around it. Sometimes you want to abstract > things away, sometimes you don't. Yep! > Secondly, as I understand it in the end you want pre-emptive "green" > threads for guile, whereas my code equates to co-operative > multi-tasking, whilst also working with native threads. I must come > clean and say that I don't like "green" threads. I actually don't want *pre-emptive* threads -- I'd rather have threads suspend at I/O points instead. But yeah, my preferred abstraction is threads; and those user-space threads could be bound to a core, or we could schedule them on multiple cores. But there's room for many things :) > Which leads on to the third point, which is that I would like to see > guile match its words (in its documentation) with respect to native > threads. I have found they work fine, with caution about shared global > state. You think they don't, except possibly on intel, because some of > its lock-free structures/variables -- and I think you are possibly > referring to the VM here -- lack appropriate fences or other atomics. > (The higher level C and scheme code has plainly had serious attempts at > thread-safety made for it using mutexes.) I see what you mean. On the other hand I don't like documenting bugs :/ (I prefer to fix them, and find that often the effort is similar.) Good native thread support is within Guile's remit and everyone should have the good experience that you have had. But that's not something we can guarantee right now unfortunately :/ Andy