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: Sat, 11 Jun 2016 18:50:27 +0200 Message-ID: <87oa77wtyk.fsf@pobox.com> References: <87y492mnjp.fsf@pobox.com> <327356C5-3603-405F-B060-3FE1CDBD81BB@verizon.net> <87oa9om9p1.fsf@netris.org> <7B3669D3-FE59-475B-B643-441D27100EBF@verizon.net> 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 1465663889 31856 80.91.229.3 (11 Jun 2016 16:51:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jun 2016 16:51:29 +0000 (UTC) Cc: guile-user@gnu.org, guile-devel@gnu.org To: Matt Wette Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jun 11 18:51:20 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 1bBm7y-0005h4-TU for guile-devel@m.gmane.org; Sat, 11 Jun 2016 18:51:19 +0200 Original-Received: from localhost ([::1]:47821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBm7x-0000nT-St for guile-devel@m.gmane.org; Sat, 11 Jun 2016 12:51:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBm7c-0000nG-AM for guile-devel@gnu.org; Sat, 11 Jun 2016 12:50:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBm7Z-0000rM-07 for guile-devel@gnu.org; Sat, 11 Jun 2016 12:50:56 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:61527 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBm7Y-0000rH-QR; Sat, 11 Jun 2016 12:50:52 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 2119F20DCC; Sat, 11 Jun 2016 12:50:52 -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:content-transfer-encoding; s=sasl; bh=zOS45fle4iHf 88AsX/R5kj6znCA=; b=uvQ6mgbdfHfZZzDGESs4h1CQw0We6P2HjkaBisIMljA5 jRhv68MyRxp3JsP86MS4xsn+Cg08+J2pfPdXQiqlRb+Y/ZOqO0qpTPzqzjOaORFo os4IgAEHDSCutyGSWsGCez3yKb2RTTIS3rYyT13kLNOOyCn6xQVZxU6Y6Uy46UE= 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:content-transfer-encoding; q=dns; s=sasl; b=TuVchd h4ylZSXivIr1CvK6xXnAmm9skwjCcu8mEe4diWWg8JFb0KkVz2invd0MyF6/uXFQ 1U0d7pTqtSVJ8UCH+OIyQvVQID/ganIxr4Hvehy44wJk/ucjqeMug2KPplZ/Ds1x hjvQ+2RlvZZlsjkFc4E3SePhJPa4Pqb2Ytn7c= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 1A8CE20DCB; Sat, 11 Jun 2016 12:50:52 -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 2A98020DCA; Sat, 11 Jun 2016 12:50:49 -0400 (EDT) In-Reply-To: <7B3669D3-FE59-475B-B643-441D27100EBF@verizon.net> (Matt Wette's message of "Tue, 5 Apr 2016 16:55:22 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: A7CC7E4C-2FF4-11E6-B561-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:18339 gmane.lisp.guile.user:12624 Archived-At: On Wed 06 Apr 2016 01:55, Matt Wette writes: >> On Apr 5, 2016, at 7:06 AM, Mark H Weaver wrote: >>=20 >> Matt Wette writes: >>=20 >>>> On Mar 28, 2016, at 12:04 PM, Andy Wingo wrote: >>>> I am working on improving our port implementation to take advantage of >>>> the opportunity to break ABI in 2.2. I am wondering how much I can >>>> break C API as well -- there are some changes that would allow better >>>> user-space threading >>>=20 >>> I made an attempt to use soft ports, but backed out after I could not >>> figure a way to extra data I wanted to associate with my port. >>>=20 >>> Addition of an access function to user-defined data would enlarge the >>> cases for which soft ports could be used. >>=20 >> Object properties can be used to associate extra information with any >> object that has identity, which includes ports. See >> 'make-object-property' in the Guile manual. > > Thanks. I had forgotten about that. =E2=80=94 Matt I think for soft ports (and custom binary i/o ports) the idea is actually that the "handler" procedures are actually closures. I.e. (let ((my-obj ...)) (make-soft-port (vector (lambda (c) (do-write my-obj c)) ...) modes)) No need for extra arguments if you have closures. Andy