From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Howard Newsgroups: gmane.lisp.guile.user Subject: Signals / Messages / Events / ...? Date: Tue, 02 Jan 2018 20:09:19 -0900 Message-ID: <1514956159.4049.2.camel@qlfiles.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-YZ0pH4lpvkRy3yx5wCP0" X-Trace: blaine.gmane.org 1514956081 3894 195.159.176.226 (3 Jan 2018 05:08:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2018 05:08:01 +0000 (UTC) To: Guile User Mailing List Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jan 03 06:07:57 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWbHM-0000VV-4c for guile-user@m.gmane.org; Wed, 03 Jan 2018 06:07:52 +0100 Original-Received: from localhost ([::1]:39797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWbJL-0000IO-9K for guile-user@m.gmane.org; Wed, 03 Jan 2018 00:09:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWbIy-0000H1-OR for guile-user@gnu.org; Wed, 03 Jan 2018 00:09:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWbIu-0003fN-5e for guile-user@gnu.org; Wed, 03 Jan 2018 00:09:32 -0500 Original-Received: from mx.kolabnow.com ([95.128.36.42]:23702) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eWbIt-0003dn-Qt for guile-user@gnu.org; Wed, 03 Jan 2018 00:09:28 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 77495403C4 for ; Wed, 3 Jan 2018 06:09:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= mime-version:content-type:content-type:date:date:from:from :subject:subject:message-id:received:received:received; s= dkim20160331; t=1514956163; x=1514956185; bh=R+zOH5l6sXjYhAuZUI8 hQgoyhG2H7ZFnk+YQNMCnpfY=; b=mCF8bD/SiuKb1qOdF1JPRC1xzLvN/M8Hth1 r3ICjLe47/L153PI4Jf9etK3uROx2n+Q/tH+hk2wv3PW33hNMMEyHhfGs8vYiJ2A DT5Gy0JnuogGGqaxEn0v94HOpJMAhrikW7QciY64tc0rdJWzy28ae0fLiON8gkKk 1JfDf2baUdK7BAQgYJKFif5KD3AKsIJb0jsCTqOO76rkiJ7VlT0h73ICgGE1QwbE O60AvnVzihKjOEEgihCZnG/31XCBLjDcTD83+2DRsE8F552M76hKjY6OJwhXI5H9 9nofrynMhERvJAKmlvZL5D5Q/Iblkt4zv4k8us82NxW9568Siz1fnptCTyPUcTLl IRLeqk2JzAQ3lx9QKU1sFJd3zS/sNCB3C6JGnrask85kCC3kARKYFIz1B71+6ZKN 3O1j1rp1bY8J8yKDGCNDwyUNdmSP1vGtu+I3bWpzKnqTY7/1OQ7JWHscNH5hlfux ysWuZILz46DhQooe3rAdXL9c24Ay6J4GOD9ItahSDwadBp3abd7/pN9S4z/0b4aq JpDckWiAY7wOrdf8+YNeMz7XT3FoLCRlIbg7gWBIEk6EvM X-Virus-Scanned: amavisd-new at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JMrEGEBMnVS9 for ; Wed, 3 Jan 2018 06:09:23 +0100 (CET) Original-Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id BE88840251 for ; Wed, 3 Jan 2018 06:09:23 +0100 (CET) Original-Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 990562343 for ; Wed, 3 Jan 2018 06:09:23 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 95.128.36.42 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14399 Archived-At: --=-YZ0pH4lpvkRy3yx5wCP0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi list, forgive me if this is a somewhat vague question... but is there some kind of framework/system/approach for Guile where you could have different parts of your code register callback functions to react to a certain signal or message raised by any other part of the code? I'm thinking like dbus where I guess you can sort of send off a message but not really care who receives it. In chickadee you can register callbacks for the various input events, and i think that basic idea could be extended so long as (1) you could have any kind of event/signal you wanted; (2) call backs added could be specified as either persistent or one-time call-backs. It seems like it wouldn't be too hard to code something like that with just lists of callback functions tied to names/data in a tree. But maybe somebody has already thought of that or would suggest a better approach. Just running into this challenge in development where a function like "new-game" has to do 8 different things to 6 different data structures, but why not instead just have the code dealing with the 6 different objects register callbacks to receive the 'new-game signal? I think message passing is the wrong term because in message passing you specify the message connections between the different objects, right? Signal bus maybe? --=20 http://upgradefromwindows.com --=-YZ0pH4lpvkRy3yx5wCP0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE3cRyrLOhI3rPcNVUee7NbCP9XMUFAlpMZX8ACgkQee7NbCP9 XMW9eAgAh9Nga+PG5f+Jx3Hdd8EHQEuyxidMXZ4eh4NgBAOZvqK5pI449Iy3ZqgX tEr2w+Dh9QZf0eg0GQpay0o7Irk1s3xPSFJHTW8jAp3pudCbqrnGjZNAcsH9gzQO 1q5bvpkhXS27Z3Ne7JS0tsEn5FxOeDVVyg10d0WB+7K3gz2l63zMVus7PLIXbPUv IFS0+LUAceoTwoqECcn5q1QvToabG6EwPxLyPzRMXRc9wicGIohH598TcZ8RNFxG Qgln7OqWkzs8pyy7AKPOQ4bOGkopbLCOgmFDS+8hKpa33/tmsjV88azM+hmC1qgx fY4JENP3w4SSy+m/rEPX/EXJRZkCzA== =GhUL -----END PGP SIGNATURE----- --=-YZ0pH4lpvkRy3yx5wCP0--