actors: Switch over to using wrap-rmeta-slot for build-actions. * 8sync/rmeta-slot.scm (wrap-rmeta-slot): New variable. * 8sync/actors.scm (build-actions): Switch from using make-rmeta-slot to using wrap-rmeta-slot. * doc/8sync.texi (Writing our own actors): Update documentation to use #:init-thunk. * 8sync/actors.scm (<actor>, define-actor, <hive>): * 8sync/systems/irc.scm (<irc-bot>): * demos/actors/robotscanner.scm (<warehouse-room>, <droid>): * tests/test-actors.scm (<hi-on-init>): * tests/test-rmeta-slot.scm (<kah-lassy>, <sub-lassy>): Update to use #:init-thunk instead of #:init-value on actions slot.
Update copyrights. * 8sync/actors.scm: * 8sync/agenda.scm: * 8sync/debug.scm: * 8sync/repl.scm: * 8sync/systems/irc.scm: * 8sync/systems/web.scm: * Makefile.am: * demos/actors/botherbotherbother.scm: * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: * demos/ircbot.scm: Update copyright lines.
irc: Convert handle-line to a message handler. * 8sync/systems/irc.scm (<irc-bot>): Add 'handle-line action handler, which points to handle-line generic. (dispatch-raw-line): Send message to our own actor to call handle-line. (handle-line): Convert to be an action handler. * demos/ircbot.scm: * doc/8sync-new-manual.org: Update implementers of handle-line generic method.
Use *init* and *cleanup* in existing actors. * 8sync/repl.scm (<repl-manager>): * 8sync/systems/irc.scm (<irc-bot>): Switch from an 'init action to the implicit '*init* action. * 8sync/systems/irc.scm (<irc-bot>, irc-bot-cleanup): Add *cleanup* handler. * demos/ircbot.scm: * doc/8sync-new-manual.org: Drop some calls to 'init when bootstrapping-messages since we now use '*init*.
actors: Remove define-simple-actor, add define-actor. define-simple-actor wasn't very useful, whereas define-actor is moderately helpful. * 8sync/actors.scm (define-simple-actor): Remove. (define-actor): New macro. * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: * tests/test-actors.scm: Convert to use define-simple-actor instead of define-actor.
actors: Add auto-init feature to actors. * 8sync/actors.scm (<actor>): Add '*init* action to actions slot. (<hive>, hive-handle-init-all): Add '*init-all* action. (hive-handle-cleanup-all): Adjust comment. (%hive-create-actor): Add send-init? argument, and when supplied call <-wait on the actor's '*init* method. (bootstrap-actor, bootstrap-actor*): Rename from hive-create-actor, hive-create-actor*. Switch init argument to init-args and pass in #f to %hive-create-actor's send-init? argument. (create-actor, create-actor*): Switch init argument to init-args and pass in #t to %hive-create-actor's send-init? argument. (run-hive): Add '*init-all* action call to the hive on the initial queue. * 8sync/debug.scm (bootstrap-actor-gimmie, bootstrap-actor-gimmie*): Rename from hive-create-actor-gimmie, hive-create-actor-gimmie*. * demos/actors/botherbotherbother.scm: * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: * demos/ircbot.scm: * doc/8sync-new-manual.org: * tests/test-actors.scm: Change calls from hive-create-actor to bootstrap-actor. * tests/test-actors.scm: Add actor *init*'ing tests.
actors: Implicit from-actor argument <-foo methods, and add rest of <-foo*. * 8sync/actors.scm (<-, <-wait, <-reply, <-reply-wait): from-actor is now implicitly supplied via %current-actor parameter. (<-*, <-reply*): New procedures. (<-wait*, <-reply-wait*): Now pull from-actor from #:actor. * 8sync/actors.scm: * 8sync/systems/irc.scm: * demos/actors/botherbotherbother.scm: * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: * demos/ircbot.scm: * tests/test-actors.scm: Update all callers of <-foo procedures to drop from-actor argument. * doc/8sync-new-manual.org: Update documentation of <-foo procedures to drop from-actor argument.
actors: Add new method of running REPL via REPL actor. Also adds new procedure to see if an actor is alive, and make use of it in the new REPL actor. * 8sync/actors.scm (actor-am-i-alive?): New procedure. (ez-run-hive): Remove #:repl-server keyword. * 8sync/repl.scm (<make-coop-server-handler, spawn-and-queue-repl-server!): Remove. (<repl-manager>, repl-manager-cleanup, repl-manager-init): New variables. * demos/ircbot.scm (parse-args): Add --repl command line option. (run-bot): Add and queue <repl-manager> actor if appropriate.
irc: Move irc-bot code to make use of generic methods ircbot.scm demo also now makes use of subclassing. * 8sync/systems/irc.scm (<irc-bot>): Removed line-handler field. (irc-bot-dispatch-line): Renamed from irc-bot-dispatch-raw-line. All callers changed. (irc-bot-send-line): Moved position in file. (irc-bot-handle-line): New method. (irc-bot-handle-misc-input, irc-bot-handle-user-join) (irc-bot-handle-user-quit): New stub methods. * demos/ircbot.scm (<my-irc-bot>): New variable. (irc-bot-handle-line): Now a generic method extending same named method in 8sync/systems/irc.scm. Previously was `handle-line'. (run-bot): Use <my-irc-bot>. (main): Remove debugging pk.
irc: Update irc code to use actors. Also some significant cleanup. But more can still be done! * 8sync/systems/irc.scm: Adjust exports. (irc-line, irc-format, irc-display, irc-send-message) (irc-send-formatted, handle-login, <irc-line>) (default-handle-privmsg, make-handle-line, irc-loop) (default-line-handler, queue-and-start-irc-agenda!): Removed. (parse-line): Return multiple values rather than the <irc-line> record. (irc-line-username): Update to use prefix rather than pulling out of <irc-line>. (condense-privmsg-line): Update docstring to call `is-action' `emote?'. (echo-message): Renamed from echo-back-message. Change argument list and body to match new version and add docstring. (<irc-bot>, irc-bot-username, irc-bot-server, irc-bot-channels) (default-irc-port, irc-bot-line-handler, irc-bot-socket) (irc-bot-realname, irc-bot-init, irc-bot-main-loop, irc-bot-dispatch-line) (irc-bot-send-line): New variables. * demos/ircbot.scm (handle-line): Renamed from `handle-message'. Adjust body for actors edition. (display-help, parse-args, run-bot): New variables. (main): Adjusted for new structure.
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.
web: Deprecate current web system. The web system needs a rewrite, so officially deprecating, but keeping code around in a file for reference. * 8sync/systems/web-deprecated.scm: Renamed from 8sync/systems/web.scm. * demos/hello-web.scm: Removed. * Makefile.am: Remove references to above.
demos: Update demos to new conventions. * demos/actors/botherbotherbother.scm: * demos/actors/robotscanner.scm: * demos/actors/simplest-possible.scm: Update demos to use new conventions around actions slot, lack of message-ref, etc.