Talk:Serialise.c

From Organic Design wiki
Nodes

A node consists of three kinds of content; associations, nodally-reducable-loop and state. The nodal state is a runtime aspect and is not serialised since it is non-nodal content. So the role of serialisation is to be able to describe an arbitrary number of nodes and their nodal associations and loop.

Another important aspect of serialisation is the handling of names and global GUID's for nodes. These are part of a nodes structure, but for ease of external editing and for brevity of textual description, they have been described in a shorthand format using wiki-like links. This method has the node GUID as the first item and any option additional names separated by pipes. Here is an example...

*[[1234|group|project|org|biz]]
*[[9876|developer]]:[[5423|nad|aran|punk]]
*[[9876|developer]]:[[4748|robert|rob]]
*[[5423|nad]];[[4748|rob]];

Context

The first line which contains just a node link by itself is specifiying which node the following associations and loop (if any) apply within the context of.


Associations

The second and third lines are defining associations. All associations consist of a single line containing two node-links separated by a colon and are conceptually similar to a key:value pair.


List

- used to be "loop", but now more generic "list" is used The last line is defining the nodes list; there can only be one list in a node which contains at least one node. The list nodes are separated by semicolons, and if the list consists of only one item it must be terminated by a semicolon so it is not mistaken for a change of node context (ie a single link with no colon or semicolon). The list will be closed be default (becoming a loop), but can be made into a nonperiodic list by making the last item link to root (node number zero).


Names & Guids
  • Pipes allow nodes to have multiple aliases
  • Global GUID's are just aliases (but can be trie'd more efficiently). This means nodes can merge and have more than one GUID.
  • But the GUID must be first so that as a wiki-like-link, it refers to the actual node - the anchor would then be a pipe separated list of names.


General Syntax
  • Basically, the pipe character is for names and GUID's, colons for associations, and semicolon for loops.
  • Lines not starting with an asterisk followed by double square-bracket are ignored
  • Anything after the closing bracket on the line is ignored
  • No whitespace allowed in link syntax or at start of line
  • Trailing semicolon is optional if more than one item in loop


Discussion

Next thing. Does the loop imply execution within? --Rob 22:42, 20 Jul 2006 (NZST)

Yip, its the loops which are nodally reduced/rotated - I've changed the name above to nodally-reducable-loop --Nad 22:55, 20 Jul 2006 (NZST)

Can't quite visualise what the first line means. Does the pipe mean an association from left to right, group connects to project, project connects to org? Or are all four elements all connected to each other? --Rob 22:15, 20 Jul 2006 (NZST)

All the pipes in all of them mean the same which is simply that a node can have more than one alias. Global GUID's are also just names which are numbers. --Nad 22:24, 20 Jul 2006 (NZST)