From ee52520a1373332d16f4477a0952af2e7a157a12 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 25 Feb 2017 11:16:25 -0500 Subject: [PATCH] spawn-dataspace --> dataspace-actor --- examples/netstack/monolithic-lowlevel/main.rkt | 4 ++-- examples/platformer/lll-main.rkt | 4 ++-- racket/syndicate-gl/2d.rkt | 2 +- racket/syndicate/actor.rkt | 2 +- racket/syndicate/big-bang.rkt | 2 +- racket/syndicate/dataspace.rkt | 16 ++++++++-------- racket/syndicate/examples/chat-no-quit-world.rkt | 2 +- racket/syndicate/examples/chat.rkt | 2 +- racket/syndicate/examples/example-lang.rkt | 2 +- racket/syndicate/examples/example-layer.rkt | 2 +- racket/syndicate/examples/example-meta-drop.rkt | 2 +- racket/syndicate/examples/example-meta-echo.rkt | 2 +- racket/syndicate/examples/example-meta-echo2.rkt | 2 +- racket/syndicate/examples/example-plain.rkt | 2 +- racket/syndicate/examples/example-quit-world.rkt | 2 +- racket/syndicate/ground.rkt | 2 +- 16 files changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/netstack/monolithic-lowlevel/main.rkt b/examples/netstack/monolithic-lowlevel/main.rkt index b2b500a..ab12437 100644 --- a/examples/netstack/monolithic-lowlevel/main.rkt +++ b/examples/netstack/monolithic-lowlevel/main.rkt @@ -61,7 +61,7 @@ (advertisement (inbound (tcp-channel us them ?))) ;; we will write to remote client )))) - (spawn-dataspace + (dataspace-actor (spawn-demand-matcher (inbound (advertise (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) (inbound (observe (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) spawn-session)) @@ -105,7 +105,7 @@ (subscription (inbound (advertise (tcp-channel them us ?)))) (advertisement (inbound (tcp-channel us them ?))))))) - (spawn-dataspace + (dataspace-actor (actor (lambda (e counter) (match e [(message 'bump) diff --git a/examples/platformer/lll-main.rkt b/examples/platformer/lll-main.rkt index 92eddfc..3cca1d8 100644 --- a/examples/platformer/lll-main.rkt +++ b/examples/platformer/lll-main.rkt @@ -942,7 +942,7 @@ #:level-size [level-size-vec (vector 4000 2000)] #:scene [scene grassland-backdrop] . actions) - (spawn-dataspace + (dataspace-actor (and scene (spawn-background-image level-size-vec scene)) (spawn-display-controller level-size-vec) (spawn-physics-engine) @@ -1045,5 +1045,5 @@ ((2d-dataspace #:width 600 #:height 400) (spawn-keyboard-integrator) (spawn-scene-manager) - (spawn-dataspace (spawn-score-keeper) + (dataspace-actor (spawn-score-keeper) (spawn-level-spawner 0))) diff --git a/racket/syndicate-gl/2d.rkt b/racket/syndicate-gl/2d.rkt index 6351a42..f26ce7e 100644 --- a/racket/syndicate-gl/2d.rkt +++ b/racket/syndicate-gl/2d.rkt @@ -434,7 +434,7 @@ (define current-coordinate-maps (hash)) (define-values (proc pending-transition) - (actor->process+transition (spawn-dataspace boot-actions))) + (actor->process+transition (dataspace-actor boot-actions))) (define event-queue (make-queue)) (define target-frame-rate 60) diff --git a/racket/syndicate/actor.rkt b/racket/syndicate/actor.rkt index 8925048..bdc407e 100644 --- a/racket/syndicate/actor.rkt +++ b/racket/syndicate/actor.rkt @@ -314,7 +314,7 @@ (syntax-parse stx [(_ name:name script ...) (quasisyntax/loc stx - (let ((spawn-action (core:spawn-dataspace + (let ((spawn-action (core:dataspace-actor #:name name.N (actor-action script ... (schedule-action! (core:quit-dataspace)))))) diff --git a/racket/syndicate/big-bang.rkt b/racket/syndicate/big-bang.rkt index 574ced2..9c068c1 100644 --- a/racket/syndicate/big-bang.rkt +++ b/racket/syndicate/big-bang.rkt @@ -134,7 +134,7 @@ (define-syntax-rule (big-bang-dataspace* boot-actions extra-clause ...) (let-values (((proc initial-transition) - (actor->process+transition (spawn-dataspace boot-actions)))) + (actor->process+transition (dataspace-actor boot-actions)))) (big-bang (interpret-actions (bb proc '() '() diff --git a/racket/syndicate/dataspace.rkt b/racket/syndicate/dataspace.rkt index eeca4dc..331d2db 100644 --- a/racket/syndicate/dataspace.rkt +++ b/racket/syndicate/dataspace.rkt @@ -3,8 +3,8 @@ (provide (struct-out dataspace) make-dataspace - spawn-dataspace - make-spawn-dataspace + dataspace-actor + make-dataspace-actor dataspace-handle-event pretty-print-dataspace) @@ -109,14 +109,14 @@ (queue-append-list (dataspace-pending-action-queue w) (for/list [(a actions)] (cons label a)))])) -(define-syntax spawn-dataspace +(define-syntax dataspace-actor (syntax-rules () - [(spawn-dataspace #:name name-exp boot-action ...) + [(dataspace-actor #:name name-exp boot-action ...) (spawn-standard-relay - (make-spawn-dataspace #:name name-exp (lambda () (list boot-action ...))))] - [(spawn-dataspace boot-action ...) + (make-dataspace-actor #:name name-exp (lambda () (list boot-action ...))))] + [(dataspace-actor boot-action ...) (spawn-standard-relay - (make-spawn-dataspace (lambda () (list boot-action ...))))])) + (make-dataspace-actor (lambda () (list boot-action ...))))])) (define (make-dataspace boot-actions) (dataspace (mux) @@ -124,7 +124,7 @@ (set) (hash))) -(define (make-spawn-dataspace #:name [name #f] boot-actions-thunk) +(define (make-dataspace-actor #:name [name #f] boot-actions-thunk) ( (lambda () (list dataspace-handle-event (transition (make-dataspace (boot-actions-thunk)) '()) diff --git a/racket/syndicate/examples/chat-no-quit-world.rkt b/racket/syndicate/examples/chat-no-quit-world.rkt index 34873da..9317a82 100644 --- a/racket/syndicate/examples/chat-no-quit-world.rkt +++ b/racket/syndicate/examples/chat-no-quit-world.rkt @@ -37,7 +37,7 @@ (pub (inbound (tcp-channel us them ?))) ;; we will write to remote client )))) -(spawn-dataspace +(dataspace-actor (spawn-demand-matcher (inbound (advertise (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) (inbound (observe (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) spawn-session)) diff --git a/racket/syndicate/examples/chat.rkt b/racket/syndicate/examples/chat.rkt index 8943af4..5aee655 100644 --- a/racket/syndicate/examples/chat.rkt +++ b/racket/syndicate/examples/chat.rkt @@ -40,7 +40,7 @@ (pub (inbound (tcp-channel us them ?))) ;; we will write to remote client )))) -(spawn-dataspace +(dataspace-actor (spawn-demand-matcher (inbound (advertise (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) (inbound (observe (tcp-channel (?!) (?! (tcp-listener 5999)) ?))) spawn-session)) diff --git a/racket/syndicate/examples/example-lang.rkt b/racket/syndicate/examples/example-lang.rkt index 186ef05..996d318 100644 --- a/racket/syndicate/examples/example-lang.rkt +++ b/racket/syndicate/examples/example-lang.rkt @@ -32,7 +32,7 @@ #f)] [_ #f])) -(spawn-dataspace (actor r (void) sub-all-except-meta) +(dataspace-actor (actor r (void) sub-all-except-meta) (actor b 0 '())) (define (echoer e s) diff --git a/racket/syndicate/examples/example-layer.rkt b/racket/syndicate/examples/example-layer.rkt index 979a84d..eafc615 100644 --- a/racket/syndicate/examples/example-layer.rkt +++ b/racket/syndicate/examples/example-layer.rkt @@ -10,7 +10,7 @@ (patch-seq (sub 'die) (sub (observe 'die)))) -(spawn-dataspace +(dataspace-actor (actor (lambda (e s) (match e [(message (inbound 'die)) (quit)] diff --git a/racket/syndicate/examples/example-meta-drop.rkt b/racket/syndicate/examples/example-meta-drop.rkt index c1bfde2..0af1c0d 100644 --- a/racket/syndicate/examples/example-meta-drop.rkt +++ b/racket/syndicate/examples/example-meta-drop.rkt @@ -2,7 +2,7 @@ ;; Analogous to nc-incremental-meta-drop.rkt in the Redex model. ;; Demonstrates (hopefully) correct processing of meta-interests when dropping a patch. -(spawn-dataspace +(dataspace-actor (actor (lambda (e u) (match u [0 (transition 1 '())] diff --git a/racket/syndicate/examples/example-meta-echo.rkt b/racket/syndicate/examples/example-meta-echo.rkt index 6eb47fd..acd095a 100644 --- a/racket/syndicate/examples/example-meta-echo.rkt +++ b/racket/syndicate/examples/example-meta-echo.rkt @@ -24,7 +24,7 @@ (require syndicate/pretty) -(spawn-dataspace +(dataspace-actor (actor (lambda (e counter) (and e (let ((new-counter (+ counter 1))) diff --git a/racket/syndicate/examples/example-meta-echo2.rkt b/racket/syndicate/examples/example-meta-echo2.rkt index 1eadc3d..38c8ffa 100644 --- a/racket/syndicate/examples/example-meta-echo2.rkt +++ b/racket/syndicate/examples/example-meta-echo2.rkt @@ -3,7 +3,7 @@ (require syndicate/pretty) -(spawn-dataspace +(dataspace-actor (actor (lambda (e counter) (and e (let ((new-counter (+ counter 1))) diff --git a/racket/syndicate/examples/example-plain.rkt b/racket/syndicate/examples/example-plain.rkt index a155544..2f45bfa 100644 --- a/racket/syndicate/examples/example-plain.rkt +++ b/racket/syndicate/examples/example-plain.rkt @@ -68,7 +68,7 @@ 1 (patch-seq (sub (observe (set-timer ? ? ?))) (sub (timer-expired 'tick ?)))) - (spawn-dataspace (actor r (void) sub-all-except-meta) + (dataspace-actor (actor r (void) sub-all-except-meta) (actor b 0 '())) (actor echoer (void) diff --git a/racket/syndicate/examples/example-quit-world.rkt b/racket/syndicate/examples/example-quit-world.rkt index 1ab4a65..f189489 100644 --- a/racket/syndicate/examples/example-quit-world.rkt +++ b/racket/syndicate/examples/example-quit-world.rkt @@ -33,5 +33,5 @@ (sub-to-alarm))) (printf "Type 'quit' or 'quit-dataspace'.\n") -(spawn-dataspace (spawn-command-listener) +(dataspace-actor (spawn-command-listener) (spawn-ticker)) diff --git a/racket/syndicate/ground.rkt b/racket/syndicate/ground.rkt index 0b2a4e2..2efada3 100644 --- a/racket/syndicate/ground.rkt +++ b/racket/syndicate/ground.rkt @@ -156,7 +156,7 @@ ;; Action* -> Void ;; Runs a ground VM, booting the outermost Dataspace with the given Actions. (define (run-ground . boot-actions) - (run-ground* (spawn-dataspace #:name 'ground boot-actions))) + (run-ground* (dataspace-actor #:name 'ground boot-actions))) ;; actor -> Void (define (run-ground* s)