Update users of bootstrap-actor -> create-actor, and update arguments.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 3 Aug 2017 15:27:18 +0000 (10:27 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 3 Aug 2017 20:50:19 +0000 (15:50 -0500)
* 8sync/daydream.scm (daydream):
* demos/ircbot.scm (run-bot):
* tests/test-actors.scm: Update users of bootstrap-actor ->
create-actor, and update arguments.

8sync/daydream.scm
demos/ircbot.scm
tests/test-actors.scm

index 291d010dfd4d96f2efcf9559df6310f7f0ec46b1..8113bdadd00c555c29e7bf9ba07d895c19a97931 100644 (file)
@@ -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*))
-                  <daydreamer>))
+    (create-actor <daydreamer>))
   (<-wait dreamer 'dream secs))
index c8571561d9582285c24e5601fae9c181e76a9342..81940fc66744e86206e9449922d1fb6dba44f3ec 100755 (executable)
   (run-hive
    (lambda (hive)
      (define irc-bot
-       (bootstrap-actor* hive <my-irc-bot> "irc-bot"
-                         #:username username
-                         #:server server
-                         #:channels channels))
+       (create-actor* <my-irc-bot> "irc-bot"
+                      #:username username
+                      #:server server
+                      #:channels channels))
      (define repl-manager
        (cond
         ((string? repl)
-         (bootstrap-actor* hive <repl-manager> "repl"
-                           #:path repl))
+         (create-actor* <repl-manager> "repl"
+                        #:path repl))
         (repl
-         (bootstrap-actor* hive <repl-manager> "repl"))))
+         (create-actor* <repl-manager> "repl"))))
 
      (wait (make-condition)))))
 
index 30f13d053f847d18de56abfa00ad2eb92cf2c8d4..c524af2257ebb43e524e8af5118012d08c4c6525 100644 (file)
       (~display "lazy-rep> I'm not answering that.\n")))))
 
 (let* ((hive (make-hive))
-       (customer (bootstrap-actor* hive <antsy-caller> "antsy-caller"))
-       (diligent-rep (bootstrap-actor* hive <diligent-rep> "diligent-rep"))
-       (lazy-rep (bootstrap-actor* hive <lazy-rep> "lazy-rep")))
+       (customer (create-actor* <antsy-caller> "antsy-caller"))
+       (diligent-rep (create-actor* <diligent-rep> "diligent-rep"))
+       (lazy-rep (create-actor* <lazy-rep> "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 <cleanly>)
+   (create-actor <cleanly>)
    (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 <cleanly>)
+   (create-actor <cleanly>)
    (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 <exploder>))
+   (define exploder (create-actor <exploder>))
    (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 <hi-on-init> #:name friend-name))))
+           (create-actor <hi-on-init> #:name friend-name))))
 
 (with-fresh-speaker
  (let ((hive (make-hive)))
-   (define hi-on-init (bootstrap-actor hive <hi-on-init>
-                                       #:name "jack"
-                                       #:create-friend "jill"))
+   (define hi-on-init (create-actor <hi-on-init>
+                                    #:name "jack"
+                                    #:create-friend "jill"))
    (run-hive hive '()))
  (test-equal (get-spoken)
    '("Hi! jack inits now.\n" "Hi! jill inits now.\n")))