spawn-dataspace --> dataspace-actor
This commit is contained in:
parent
783d132f25
commit
ee52520a13
|
@ -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)
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))))))
|
||||
|
|
|
@ -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
|
||||
'()
|
||||
'()
|
||||
|
|
|
@ -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)) '())
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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 '())]
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
(require syndicate/pretty)
|
||||
|
||||
(spawn-dataspace
|
||||
(dataspace-actor
|
||||
(actor (lambda (e counter)
|
||||
(and e
|
||||
(let ((new-counter (+ counter 1)))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
(require syndicate/pretty)
|
||||
|
||||
(spawn-dataspace
|
||||
(dataspace-actor
|
||||
(actor (lambda (e counter)
|
||||
(and e
|
||||
(let ((new-counter (+ counter 1)))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue