Wednesday, November 9, 2011

Getting a bit geeky for the moment

Geek ahead of time and save lines of code and grief later.

In G qorld we have the link to the local machine (a property of a link of a link oerator??) But it is the link to the local G engine internal, ascending of descending. Call the local URL, G_local, so:
G_local = convolve(*,G_local.config)

This creates a graph sent to G_local, the ascending link, from a descending link to graph called config (the local reserved table for the configuration graph). When the G machine finishes the convolution, it performs the normal act, retrieve the top of G for the return link, look up the connect and get G internal, and send the results to G internal. Thus, configuration with a single operator and single wildcard, the minimal machine on start up.

Now us geeks go crazy, because it the local node is defined by an operator, we can write some special code to lod the machine without having to test loalness for each pass.  The main loop becomes, look up operator and execute.  Anthing special about the local graph is embedded ion the special operator.  We would give it syntax, '_' or '$'.    As in:

convolve (_.*,config)

The special character is tagged as both a link and an operator, it is the local system character. Alternatively, if we have a hidden property, then always do the two sided look up on the operator function, selection from operator, then a sub selection on property. Two separate operations always done. Answer? Dunno, likely the two step look up.

What I am going is minimizing the definition of the machine, reducing lines of C and increasing lines of macro definitions for configure files. I would prefer to program in my M4 language and it is easy to define higher level syntax for the G machine.

So the initial state of the machine, it knows: its internals by special character, it can do a simple descend sequential. It gets the wild card operator, and the config graph is defined. From there it should be able to attach dll, load sql srings, and setup operator mappings.

In version one, the engine doesn't cache expression values, it relies on sqlite3 to optimally cache. So all variable updates are immediate changes of some node in the World of G. That includ Gout and special internal G_local. All descents, even into complex expressions, are descents by G graph and work off of inserts and select to get variables. Sqlite3, with prepared statements, caching and variable binding will limit the price.

But, every single atomic operation results in one of more get nodes and one or more insert nodes, all performed by SQL. A mimimum of a one record SQL operation with a possible null insert.

Where the market gets restructured:

Wiki has the same G machie and can confogure the SQL set operations. Consider:

Gout = convolve((fermions,bosone),wiki,physics)

Wiki simplicity engineers may have organized a very sophisticaed look up system, consisting of 20 or 40 SQL inerts into select from. Not a problem, enything entering the special look up brainch at Wiki , the convolution encounters the special Wiki operator, that modifies standard set operations. It is preloaded, to replace standard set operations. It is blazingly fast, but still appear in Typeface Explosion * as a simple grammar.

This all works because the fundamentals of traversal are a simple grammar, and the node format is simple and well defined, as it the record stores nested G format. So Wiki can build complex search using where matches in the user search graph, while maintaining extraordinary cross indexing complexity on heir own material. Wiki could even leave the simple world of open G and descend into very proprietary SQL system, even speech linkages and vision, as long as it can return Gout to standard G format with SQL inserts.

Configuring an operator requires the SQL script with the parameters laid out in sqlite3 format


  • ?
  • ?NNN
  • :VVV
  • @VVV
  • $VVV

Then the config supplies the arg count and map that translates from the standard G grammar list to this.  The call back for all SQl is null, updates to grammar variables . How is that defined? Hmm...

One last thing, we need a G graph URL schema identifier, so the G machine gets called on all G graph urls.

* Typeface Explosion is Imagisoft's imaginary, one character symbolic ontology algebra.

No comments: