actors: Move actors center-stage in 8sync. * 8sync/systems/actors.scm: Renamed to 8sync/actors.scm. * 8sync/systems/actors/debug.scm: Renamed to 8sync/debug.scm. * Makefile.am: Update for renamed files. * demos/actors/botherbotherbother.scm: * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: * tests/test-actors.scm: Update import of actors module to new location.
actors: Deprecate old facilities. * 8sync/systems/actors.scm (simple-dispatcher, build-actions) (make-action-dispatch): Remove. (mhandlers): Renamed to build-actions.
actors: Adding "mhandlers" and updating define-simple-actor to use it. We also mark a whole range of abstractions as deprecated, but those will be removed as they're phased out of use. * 8sync/systems/actors.scm (mhandlers): New macro. (define-simple-actor): Update to use mhandlers.
actors: Remove wrap-apply from actor-inheritable-message-handler call. * 8sync/systems/actors.scm (actor-inheritable-message-handler): Move location. (<actor>): Switch init-value of actor-inheritable-message-handler to drop wrap-apply.
actors: Add "inheritable" message handler as default message-handler. * 8sync/systems/actors.scm (actor-inheritable-message-handler): New variable. (<actor>): New actions slot, and adjust init-value of message-handler to be actor-inheritable-message-handler.
actors: Add %current-actor parameter. This allows actors which may call out long procedures, such as a web worker, to still be able to have access their actor so they can send messages to other actors. * 8sync/systems/actors.scm (%current-actor): New variable. (hive-process-message): Update to parameterize %current-actor.
actors: Add msg-val and add docstring to msg-receive. * 8sync/systems/actors.scm (msg-receive): Add docstring, and change parameter name from "the-message" to just "message". (msg-val): New procedure.
actors: Add comment about adding deferred-slot to <message>. * 8sync/systems/actors.scm: Add comment.
actors: Remove => alias. Seems it causes problems with cond and etc. No big surprise. * 8sync/systems/actors.scm (=>): Removed.
actors: Fix "unrewindable continuation" issue with error handling code. * 8sync/systems/actors.scm (hive-reply-with-error, hive-process-message): Move responding with error to outside of the catch statement. This was resulting in unrewindable continuation issues.
actors: Move message body to being an argument list for procedures. This also removes the whole define-mhandler, mlambda, etc stuff... as well as message-ref, since the argument list can be just about anything. * 8sync/systems/actors.scm (<message>, message-deferred-reply) (set-message-deferred-reply!, make-message, serialize-message) (serialize-message-pretty, read-message): Removed deferred-reply slot from <message>. (message-ref, %nothing-provided, with-message-args, mlambda) (define-mhandler): Removed. (message-needs-reply?): Renamed from message-needs-reply, removed reference to message-deferred-reply. (message-auto-reply?, <-auto-reply, call-with-message, msg-receive, =>): New procedures / macros. (<-, <-wait, <-reply, <-reply-wait, simple-dispatcher, hive-reply-with-error): Update to pass in arguments as an argument list. (%expand-action-item): Remove optional "inline" message handler form. (hive-process-message): Update for rename of message-needs-reply?; use <-auto-reply where appropriate, check for an action of either *reply* or *auto-reply*. * tests/test-actors.scm: Adjust tests to meet new structure.
actors: Make the <-* message sending procedures official, not aliases. * 8sync/systems/actors.scm (send-message, send-message-wait) (reply-message, reply-message-wait): Removed. (<-, <-wait, <-reply, <-reply-wait): Converted from being aliases to being the official procedure names.
actors: Removing deprecated comment. * 8sync/systems/actors.scm (<message>): Removing deprecated comment about replied and deferred-reply slots not being used, since we use them now.
actors: Remove deprecated call to former "8sync" definition These used the old meaning of 8sync, where something would happen asynchronously but return its value. * 8sync/systems/actors.scm (hive-create-actor, hive-create-actor*): Remove call to 8sync, just call its previous body on its own.
agenda: Rename 8sync-nowait to 8sync. * 8sync/agenda.scm (8sync-nowait, 8sync): Renamed 8sync-nowait to 8sync. * 8sync/systems/actors.scm (send-message, reply-message hive-reply-with-error): Switch calls of 8sync-nowait to 8sync.
actors: Fix hive-actor-local? to check the hive id, not whether actor exists. * 8sync/systems/actors.scm (hive-actor-local?): Update to check the hive id.
agenda: Update comment, could also attach catch routines to hive. * 8sync/systems/actors.scm (hive-process-message): Update comment.
actors: Catch all errors in the actor model. Not doing so results in a SIGABRT. * 8sync/systems/actors.scm (hive-process-message): Catch all errors and call print-error-and-continue. Leave comment for thoughts on using maybe-catch-all.
actors: Permit docstrings in mlambda. * 8sync/systems/actors.scm (mlambda): Switched to syntax-case so we can identify and allow docstrings.
actors: Export simple-dispatcher. * 8sync/systems/actors.scm: Export simple-dispatcher.