Browse Source

Interoperable (!!) with syndicate-py

main
Tony Garnock-Jones 5 months ago
parent
commit
dcb657f732
  1. 8
      syndicate.sh

8
syndicate.sh

@ -115,21 +115,21 @@ demo() {
esac
}
ds_object presence demo_presence
ds_assert "$ds_ref" "<Observe <compound <rec presence 1> {0: <bind a <_>>}> $presence>"
ds_assert "$ds_ref" "<presence \"$username\">"
ds_assert "$ds_ref" "<Observe <compound <rec Present 1> {0: <bind <_>>}> $presence>"
ds_assert "$ds_ref" "<Present \"$username\">"
demo_utterance() {
ds_project "$ds_event" '^ message . 0'
}
ds_object utterance demo_utterance
ds_assert "$ds_ref" "<Observe <compound <rec says 2> {0: <bind who <_>> 1: <bind what <_>>}> $utterance>"
ds_assert "$ds_ref" "<Observe <compound <rec Says 2> {0: <bind <_>> 1: <bind <_>>}> $utterance>"
ds_flush
ds_mainloop </dev/null &
mainloop_pid=$!
while read line
do
ds_message "$ds_ref" "<says \"$username\" \"$line\">"
ds_message "$ds_ref" "<Says \"$username\" \"$line\">"
ds_flush
done </dev/tty
kill $mainloop_pid

Loading…
Cancel
Save