From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Signals / Messages / Events / ...? Date: Wed, 3 Jan 2018 17:16:54 -0800 Message-ID: <0A9711D5-6E93-4DC1-A3D9-F1313AE150CD@gmail.com> References: <1514956159.4049.2.camel@qlfiles.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515028549 10763 195.159.176.226 (4 Jan 2018 01:15:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 01:15:49 +0000 (UTC) Cc: Guile User Mailing List To: Christopher Howard Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jan 04 02:15:45 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 1eWu88-0001sS-1k for guile-user@m.gmane.org; Thu, 04 Jan 2018 02:15:36 +0100 Original-Received: from localhost ([::1]:44358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWuA7-0002DK-Af for guile-user@m.gmane.org; Wed, 03 Jan 2018 20:17:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWu9V-0002CU-Ju for guile-user@gnu.org; Wed, 03 Jan 2018 20:17:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWu9R-0002nh-KI for guile-user@gnu.org; Wed, 03 Jan 2018 20:17:01 -0500 Original-Received: from mail-pl0-x22f.google.com ([2607:f8b0:400e:c01::22f]:42343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWu9R-0002mn-Bi for guile-user@gnu.org; Wed, 03 Jan 2018 20:16:57 -0500 Original-Received: by mail-pl0-x22f.google.com with SMTP id bd8so133707plb.9 for ; Wed, 03 Jan 2018 17:16:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=HQKfW80nBR1UpXTjSTwwVCumWe+LJdxeCBvGl/AGFx4=; b=KRU0WfH8fJLRGZ/fh6LlCEXzkkiWePifCfuSndLw4IxMc/6C7Vi/UKcrICdX4gyee0 e3L+D1kxYffCrTwYe7WCUa16DywVGAumYq9WJj3psTFvznZS+qm5BXpS7TKtYI8GOV/I JGJOu9oCFHOBEcy7wi+GC8S3kLlfxEjkJyv6gcUNI2zlvchjZhaP6ggICpk7x8WtZOF5 MtrFMvpGP6aeP2LqFZ6k8XyKd2z1ZhRCVexrHWsZlWm9mMFyVghfLT0BmF5XSy/Oov6n Huwocfa24vEUku8lYWKFNa8UBJlhza7Yqx9g9mttG8zEt4TBT3YehP2iLPcR/0Q87W2k w/OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=HQKfW80nBR1UpXTjSTwwVCumWe+LJdxeCBvGl/AGFx4=; b=kT/4fXgoYV5COr8gkFvR7CHO+Ns9FjOlUBFXIRwgbiFH1y/wR616eHEXtFjkXDKUjD RujCph9EvVj63W5iQIMfO/3KjroSxDZelxBx7NKt4ANPSQuMeC2VlFt6vn4ASrWjqypr 9EB3aaKoVlZvEAK6E4NC79GIEqo5vTjEg9/EbJnOxbCVD2ufcc/0qpo+GlT38tloJnXv 8f8TIb+7C5AyvtyQypl4orCaTvnu3mQleT+aX22REFZv7GjdMJiHbL01Hs3fyz2ZPn1o 8/8MQx2BAPw4qZZmdqYEmMNdnrA0QpvvWiMH0r6a0D+MHrkYSJIJNC0875cqYgJp4zjl +vjQ== X-Gm-Message-State: AKGB3mLtdjyvwaKX1UADMHa84G7kek0D4/dzNqNIgXlae11bcq57c/ef PCXCLUj9Y2ufobfgq9dL/D8= X-Google-Smtp-Source: ACJfBotK3IVQsqwi4jgJRAVBjgGDoTNpmOI4LFPoWnNwZ4fvjv+WvHg/0e/4FsFxw8i4R3/7rYFpCw== X-Received: by 10.84.193.36 with SMTP id e33mr3082318pld.313.1515028616019; Wed, 03 Jan 2018 17:16:56 -0800 (PST) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id x6sm5345488pff.55.2018.01.03.17.16.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 17:16:55 -0800 (PST) In-Reply-To: <1514956159.4049.2.camel@qlfiles.net> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::22f X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:14404 Archived-At: > On Jan 2, 2018, at 9:09 PM, Christopher Howard = wrote: >=20 > 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. >=20 > 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. >=20 > 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 > --=20 > http://upgradefromwindows.com If you are on Linux you can look at fibers: https://github.com/wingo/fibers it is lightweight processes with message passing.=