Monday, April 9, 2012

I wrote software!

While being off line one might think I would be writing lots of software.  No, I fight the urge with thousands of video games.  But I did work the theory.  I looked over the NoSql scene, factored in Moore's Law and I figured the industry was relayering the software.  Layers that were previously compiled can now be interpreted, layers interpreted can be executed from database.

So, I split the software, burying the Sqlite3 layer deep, and it has a simple interface:

typedef struct {
int (*exec)(int method ,Element *data);
void * db_pointer;
Void * graph_list;
} DB_INTERFACE;
// the graph_list is a nested set of DB cursors, really, set up for nested store.  Anything in the Json grammar will happen using these graph cursors.  Element is the new typedef name for a graph node. 

Then I define two or three required methods, like fetch next child or fetch next sibling.   But the installed operators are up to the user, and the system is still set up to manage custom operators, including supporting a bind system.

 So now to switch the databases underneath, I just have the new database execute the required methods. So, with about 1/3 a page of software, the Json parser/convolver is layer free.

I immediately wrote a data base, with another third of a page of c code.  My database will extract nested stores from a linear array of 100 elements! (In other words, testing the parser/convolver separately is now a breeze.

Then, I implemented two more characters in the ugly set, the Parenthesis and the Dollar.  The dollar is a special naming syntax that says, use relative indexing.  The parenthesis says, the relative indexing base Element is this one.

Thus, I now have an execution unit that executes compiled JavaScript (minus the arithmetic and conditionals)  At this point I have a  nearly overflowing one page of  c code.  So the six weeks of pondering yields one page of c code.  But, the catch, executing Javascript execution is now a generalized join, a sub method of general graph convolution.  Javascript is nothing but a little cursor that traces the JaavaScript though is named/value nests until it reaches native code.  In this case, the native code are the custom and required operators.

What happened to indexing?
The defa8ult is a local symbol table, then find things by scan and match.  I will ponder another six weeks and find a half page of code that uses someone elses indexing method.

One more thing, I  cut an pasted the Windows dll code, so the system now allows.  The Dll methods are tied tyo method names, so in JavaScrip it is:

 method_name:[native_code]

Why is this simple?  Because the software industry has layered and relayered for 30 years, and the relayering software is getting automated and modular.

No comments: