spawn-dataspace --> dataspace-actor

This commit is contained in:
Tony Garnock-Jones 2017-02-25 11:16:25 -05:00
parent 783d132f25
commit ee52520a13
16 changed files with 25 additions and 25 deletions

View File

@ -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)

View File

@ -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)))

View File

@ -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)

View File

@ -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))))))

View File

@ -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
'()
'()

View File

@ -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)
(<actor> (lambda ()
(list dataspace-handle-event
(transition (make-dataspace (boot-actions-thunk)) '())

View File

@ -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))

View File

@ -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))

View File

@ -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)

View File

@ -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)]

View File

@ -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 '())]

View File

@ -24,7 +24,7 @@
(require syndicate/pretty)
(spawn-dataspace
(dataspace-actor
(actor (lambda (e counter)
(and e
(let ((new-counter (+ counter 1)))

View File

@ -3,7 +3,7 @@
(require syndicate/pretty)
(spawn-dataspace
(dataspace-actor
(actor (lambda (e counter)
(and e
(let ((new-counter (+ counter 1)))

View File

@ -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)

View File

@ -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))

View File

@ -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)