2017-08-10 19:04:45 +00:00
|
|
|
#lang syndicate/core
|
2016-02-03 04:01:08 +00:00
|
|
|
;; Demonstrate wildcard assertions.
|
2016-07-30 17:02:07 +00:00
|
|
|
;; One actor asserts everything except inbound/outbound assertions (which break
|
2016-02-03 04:01:08 +00:00
|
|
|
;; the ground VM). It therefore *subscribes* to everything too.
|
|
|
|
|
2016-04-01 23:53:46 +00:00
|
|
|
(require syndicate/pretty)
|
2016-02-03 04:01:08 +00:00
|
|
|
|
2017-02-15 23:18:19 +00:00
|
|
|
(actor (lambda (e s)
|
2016-02-03 04:01:08 +00:00
|
|
|
(printf "Subscriber - Aggregate\n")
|
2016-04-01 23:53:46 +00:00
|
|
|
(syndicate-pretty-print s)
|
2016-02-03 04:01:08 +00:00
|
|
|
(printf "Subscriber - Patch\n")
|
2016-04-01 23:53:46 +00:00
|
|
|
(syndicate-pretty-print e)
|
2016-02-03 04:01:08 +00:00
|
|
|
(newline)
|
|
|
|
(if (patch? e)
|
|
|
|
(transition (update-interests s e) '())
|
|
|
|
#f))
|
2016-03-12 16:54:31 +00:00
|
|
|
trie-empty
|
2016-02-03 04:01:08 +00:00
|
|
|
(patch-seq (assert ?)
|
2016-07-30 17:02:07 +00:00
|
|
|
(retract (outbound ?))
|
|
|
|
(retract (observe (inbound ?)))
|
|
|
|
(retract (inbound ?)) ;; not actually required for the purposes of this demo
|
|
|
|
))
|