Tuesday, February 21, 2012

Pondering the Colon

I often sit for hours plotting plans for Json Uglies. The Colon is the most interesting, how do we define it? Name:Value mans that in the current index space, the index Name return Value. The index space is likely a spanning tree over the web, clients can always index, and if their index space is detailed, and its bot update system fast; then client gets the value fairly quick. But for fast runs the client wants to use names he knows are local. How is a name invoked? I dunno for sure, but I define the formal $Name, I'll change it when someone complains.

Within an @ sequence, I will dispense with the $ altogether. I think the changes within the @, like quotes mean a bag of key words! Anyway, under the @, everything is looked up. My intent is to ultimately define the language with one statement: Gout@Gin1,Gin2, commutative with the arguments. All the Gs are graphs on the web in standard indexed form. Why? Well, really, its just an expanded definition of a bytecode. It just means, "Run the associated byte code".

The programming model greatly simplifies searches. The two arguments,Gin1,Gin2 and Gout are seen as two nested graphs, but execute as two linear sequences of bytecodes, on each other. Generally the client graph is smaller, the searched graph huge, but both obey the same rules of nesting, or shall we say, nesting up to be in a position to take a hop, or step along the graph. But the query is a simple query by example, the small graph has a little pattern it is checking that patter against the bigger graph down a certain alley of patterns. I have all the nesting I want: Name@@G1,Gin,G3 Really just nesting the bytcode interpreter.

So, the programming model is lock the machine, run the tables, and unlock the machine. Inside lock the machine there is step, step an fetch, step if match, drop if unmatched, set node equal to etc. But the machine the graphs use to interpret the byte codes is a simpler interpreter than say for JavaScript. It is a script designed to optimize short pattern matching and stepping and counting snippets.

Stepping across machines is transparent, the issuing Gin causes a pause, the entire ready state for that run is pushed, and the intermediate Qson launched. Simple graph searching/marking protocols, 30-60-200 years old work. We just want to make Json a little bit self directed.

The Qson machine is designed to do one thing, move Qsons, in complete units, through the interpreted, and send the results back. It has memory,flat, Json, and table formats, and can move these chunks very fast.

No comments: