From: Christopher Allan Webber Date: Thu, 3 Aug 2017 15:27:18 +0000 (-0500) Subject: Update users of bootstrap-actor -> create-actor, and update arguments. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5a22e8e14aa50d73482453f0bb74a3540b533419;p=8sync.git Update users of bootstrap-actor -> create-actor, and update arguments. * 8sync/daydream.scm (daydream): * demos/ircbot.scm (run-bot): * tests/test-actors.scm: Update users of bootstrap-actor -> create-actor, and update arguments. --- diff --git a/8sync/daydream.scm b/8sync/daydream.scm index 291d010..8113bda 100644 --- a/8sync/daydream.scm +++ b/8sync/daydream.scm @@ -35,9 +35,7 @@ ;; Now reply to the actor's continuation 'wake-up) -;; TODO: don't require the actor here (define (daydream secs) (define dreamer - (create-actor ((@@ (8sync actors) *current-actor*)) - )) + (create-actor )) (<-wait dreamer 'dream secs)) diff --git a/demos/ircbot.scm b/demos/ircbot.scm index c857156..81940fc 100755 --- a/demos/ircbot.scm +++ b/demos/ircbot.scm @@ -106,17 +106,17 @@ (run-hive (lambda (hive) (define irc-bot - (bootstrap-actor* hive "irc-bot" - #:username username - #:server server - #:channels channels)) + (create-actor* "irc-bot" + #:username username + #:server server + #:channels channels)) (define repl-manager (cond ((string? repl) - (bootstrap-actor* hive "repl" - #:path repl)) + (create-actor* "repl" + #:path repl)) (repl - (bootstrap-actor* hive "repl")))) + (create-actor* "repl")))) (wait (make-condition))))) diff --git a/tests/test-actors.scm b/tests/test-actors.scm index 30f13d0..c524af2 100644 --- a/tests/test-actors.scm +++ b/tests/test-actors.scm @@ -108,9 +108,9 @@ (~display "lazy-rep> I'm not answering that.\n"))))) (let* ((hive (make-hive)) - (customer (bootstrap-actor* hive "antsy-caller")) - (diligent-rep (bootstrap-actor* hive "diligent-rep")) - (lazy-rep (bootstrap-actor* hive "lazy-rep"))) + (customer (create-actor* "antsy-caller")) + (diligent-rep (create-actor* "diligent-rep")) + (lazy-rep (create-actor* "lazy-rep"))) ;; * Playing a tape of a diligent service rep * (parameterize ((%record-out (open-output-string))) (let* ((result (run-hive @@ -148,7 +148,7 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" (with-fresh-speaker (let ((hive (make-hive))) - (bootstrap-actor hive ) + (create-actor ) (run-hive hive '())) (test-equal '("Hey, I'm cleanin' up here!\n") (get-spoken))) @@ -157,7 +157,7 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" (with-fresh-speaker (let ((hive (make-hive))) - (bootstrap-actor hive ) + (create-actor ) (run-hive hive '() #:cleanup #f)) (test-equal '() (get-spoken))) @@ -173,7 +173,7 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" (with-fresh-speaker (let ((hive (make-hive))) - (define exploder (bootstrap-actor hive )) + (define exploder (create-actor )) (run-hive hive (list (bootstrap-message hive exploder 'explode)) #:cleanup #f)) (test-equal '("POOF\n" "Cleaning up post-explosion\n") @@ -192,13 +192,13 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" (slot-ref actor 'name))) (and=> (slot-ref actor 'create-friend) (lambda (friend-name) - (create-actor actor #:name friend-name)))) + (create-actor #:name friend-name)))) (with-fresh-speaker (let ((hive (make-hive))) - (define hi-on-init (bootstrap-actor hive - #:name "jack" - #:create-friend "jill")) + (define hi-on-init (create-actor + #:name "jack" + #:create-friend "jill")) (run-hive hive '())) (test-equal (get-spoken) '("Hi! jack inits now.\n" "Hi! jill inits now.\n")))