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: [ann] fibers 0.1.0 Date: Thu, 07 Jul 2016 12:07:53 +0200 Message-ID: <87zipt69s6.fsf@pobox.com> References: <87h9c57qf6.fsf@pobox.com> <88b0f01471f8aa385f6a4442c260d28e@hypermove.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467886115 28179 80.91.229.3 (7 Jul 2016 10:08:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2016 10:08:35 +0000 (UTC) Cc: guile-user@gnu.org, guile-devel , guile-devel@gnu.org To: Amirouche Boubekki Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jul 07 12:08:27 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 1bL6EM-0002Us-7V for guile-devel@m.gmane.org; Thu, 07 Jul 2016 12:08:26 +0200 Original-Received: from localhost ([::1]:38582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL6EL-0005mb-9D for guile-devel@m.gmane.org; Thu, 07 Jul 2016 06:08:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL6E8-0005jx-H9 for guile-devel@gnu.org; Thu, 07 Jul 2016 06:08:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL6E7-0003yw-Dl for guile-devel@gnu.org; Thu, 07 Jul 2016 06:08:12 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:58310 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL6E1-0003wa-MD; Thu, 07 Jul 2016 06:08:05 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 84A2B20498; Thu, 7 Jul 2016 06:08:02 -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=+YRDKL3ooAgQZ9Y5Q4QFvZE9KhE=; b=TlN1Z2 2BCQ1Aya43yOxu5P18uOycOOIyZxt9tJzOfO9d6F/wt4QHaShllV58KTw4xzniz5 XkF5loxVTwhLGhef974JvcTaxGiSAPhpI0j7alAnSNd64dr8YPz/JRyWfa8WIESb X4FC4AMldvGOPre0aivrDTE88dzvfvP+0SKyo= 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=KnM8l4Jawq0FPqTBXB76jlx0O7+gbOPu iZUEvtD8/3U+6kEUM8tlBTwqxaAAmRwnwKqxWIx0BcF2tl56Yp3ab4EkuYuLtmDk wwvIVE0Y/3e1wHHdfEndZZ8LyNNmEDVOEggBkD6zmdPpiWKqdewFxjerXuRi47Br g+b7JMClh+c= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 7C83C20497; Thu, 7 Jul 2016 06:08:02 -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-sasl2.pobox.com (Postfix) with ESMTPSA id 960D720493; Thu, 7 Jul 2016 06:08:01 -0400 (EDT) In-Reply-To: <88b0f01471f8aa385f6a4442c260d28e@hypermove.net> (Amirouche Boubekki's message of "Wed, 06 Jul 2016 19:29:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: B053F546-442A-11E6-A249-28A6F1301B6D-02397024!pb-sasl2.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.67 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:18470 gmane.lisp.guile.user:12730 Archived-At: On Wed 06 Jul 2016 19:29, Amirouche Boubekki writes: > (Resent the mail to the mailing list) Resending my reply, I didn't notice it was a private message. (Please don't send me private messages about Guile; always send to the list.) On Tue 05 Jul 2016 21:16, Amirouche Boubekki writes: > It's ok to use several put-* procedure instead of one? For example: > > ``` > (put-string port "abc") > ``` > > is not better than > > (put-char port #\a) > (put-char port #\b) > (put-char port #\c) put-string is better performance-wise than multiple put-char invocations. But you should check :) > Otherwise said (?) is there still buffering when using non blocking > sockets? Guile sockets are unbuffered by default but that can be changed by calling `setvbuf' on them. > Does (web client) http-get work vanilla when the fiber is running? It should work, yes. The problem would come in only if it uses I/O primitives that haven't been expressed in terms of the low-level non-blocking I/O primitives. That would be a suspendable-ports bug. In that case some I/O operations would actually block instead of running properly asynchronously. That's the case for example if you do (display "foo" port) Display hasn't been rewritten in Scheme yet, so it uses C internally and the C ports code won't suspend; it will block. We need to either change uses of `display' to use put-string / put-char, or reimplement `display' in scheme. The latter is hard but it's possible to incrementally reimplement `display', where for example `display' on a string will use put-string, but on anything else dispatches to C. Andy