User Tools

Site Tools


notes:sycl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:sycl [2026/09/15 12:09] – Pattern samples emerynotes:sycl [2026/09/15 12:55] (current) – [Syndicate] typo emery
Line 12: Line 12:
 can parse automatically from Tcl strings. can parse automatically from Tcl strings.
 Preserves also has a binary syntax, which the Syndicate library uses for communicating over a network. Preserves also has a binary syntax, which the Syndicate library uses for communicating over a network.
 +
 +Preserves text syntax is a superset of JSON, so the library also acts as a JSON parser. The library can render to JSON as well, but some type conversions are made. 
 +
 +<code tcl>
 +package require preserves
 +
 +set pr [preserves parse {{foo: 0 bar: 1}}]
 +# {bar: 1 foo: 0}
 +
 +preserves render $pr
 +# {bar: 1 foo: 0}
 +
 +preserves render -json $pr
 +# {"bar":1,"foo":0}
 +</code>
  
 ==== Syndicate ==== ==== Syndicate ====
Line 17: Line 32:
 The Syndicate library((https://git.syndicate-lang.org/ehmry/sycl/src/branch/trunk/syndicate.md)) is almost pure Tcl and makes heavy use of namespaces. The Syndicate library((https://git.syndicate-lang.org/ehmry/sycl/src/branch/trunk/syndicate.md)) is almost pure Tcl and makes heavy use of namespaces.
  
-The library supports a SAM facet((https://synit.org/book/glossary.html#facet)) tree using nested namespaces. The ''during'' proc (equivalent to ''When'') executes its handle script in a new namespace on every match, and when the ''during'' statement expires the dataspaces are destroyed automatically.+The library supports a SAM facet((https://synit.org/book/glossary.html#facet)) tree using nested namespaces. The ''during'' proc (equivalent to ''When'') executes its handle script in a new namespace on every match, and when the ''during'' statement expires the namespaces are destroyed automatically.
  
 === Relaying === === Relaying ===
Line 25: Line 40:
  
 <code tcl> <code tcl>
 +package require syndicate
 +
 set route {<route [<tcp "localhost" 4567>]>} set route {<route [<tcp "localhost" 4567>]>}
  
notes/sycl.1789474170.txt.gz · Last modified: by emery

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki