Sunday, December 16, 2018

I was clever

Using the standard args list format, used around the world from Tasmania to Moscow, make me want that to be the assembler format. Default is embedded in that argument list, t never leaves as long as the user does not.  Any other coordinating application does not leave that args list, they compute on it, make stacks out of it, arrays, send Morse code. Anybody wants to watch the chaos, make your code loadable with the standard Entry. I may have to pipe some of them, bu if any pythn code needs to kow what a linux utility did, thust look, you get the shared args list, dangerous, foolish, ut great when under control.

Default has simple variables

o casting function necessary. There are two types.
One, a constant pointer to a source code
Two an  integer value.
Integer valued variables compute at run time, strings are cast as assignments and held. The source code lives until cleared,  somehow. So, w see, I stick with the moinimal needed, the Defulat if you are doing nothing fancy.

Except fr three, it can point to an arglist and be an assembly macro. I will call static a key word, it means a pointer to a particular argc,args pair. And it has length, and I call this  the Default assembly interrpetable, with no inten to establish a Bus standard..

To make a bunch of static variables, just read in the default source. The form is:
name = "a string of some sort"; 
Where the quote means , right here, wherever you got the source from, that spot. If anyone moves the source, well too bad, it is not changing, syntax has no methods.

name = 1234;

This puts the number in the table, and it computes at run time. No other variables allowed in Default, I might put it in the license. I have all the full console loop, loadingfunction, files and Default language at 770 lines, with comments and error checking. It just seems there is the minimum syntax, and it has a niche. Default is meant only to build in a command line 'editor' with where and simple counts. Normally not noticed.

It leaves one simple problem,we want variables to expand into command Bus format from the definition table, at run time. OK. static  means this variable points to pre-assembled. It has a life time the same as the original source, short. Default is not persistent, if you use it, be persistent by executing from a file. Default is barely more than a back space editoron your command line, it is just minimal.

Saturday, December 15, 2018

Simple interface grammar

the main(argc,argv) has as its first argument the command name  itself.  So does the console loop in the new system.

So the argc, argv standard is always standard, I do not need to pipe anything though stdio to subsystems, I can always load their executables and find the entry point.

onsole has two entry interfaces:
argc,argv and *argc,argv // one use a ointer to argc

Tha is much simpler, we have a third form, put the string command line on arg one for systems that do their own tokenizing.  So, make everything simple, do a one time interface to main(argc,argv), make it sharable, write a converter or loader. Then screw the difference between entry for shared and entry for main, use main always.

If I were the authors of gcc

I say to myself, fake self, those zillions of flags work great, lets proliferate them except for one thing. I would issue a precedence table for the flags, including left right associations for filenames and operators with the '-' set. then point to the standard wiki shunting yard algorithm. Tell users that gcc runs the command line through shunt algorithm with that table, and that's it. I think you can get sudden agreement and the utility of gcc will go up, way up a bit I think. Configure processors can get a really big clue about specific languages, options and generate much better command lines, automatically. Cost? A hundred lines of code.

Why I like Default

It is from the lab, always throwing in the 50 lines of code that reads a line then sends data to the thing under test. I never minded, but it was never the central issues.   I just hit that point where do it once, get a simple 'brackets with while loop' going.

 If Shunt was widely available I simply send it the script and it returns it in executable order. Above and beyond having Shunt and  expressions and variables, the net cost of a while loop is about 60 lines of code. Just get it down to those lines of code, farm out everything else. One always has a simple boot language. With that while loop I am free to throw all sorts of scripts at hunt, I have modularized, I can loop around things.

Two basic recursions in the assembler, expression parenthesis and while brackets. Very simple to manage, most of what I do is simplify and code removal,  the stranded code I throw in just to get around some pesky problem at the moment, as I learn.  O we have to methods, the recursive 'bracket assembler' and the Shunt  three stack. They are transforms of one another, Shunt using a separate stack for operators, he other method  using the compiler stack.

The linux command standard

Not difficult. Tokens separated by space, Dash character allowed in tokens and I guess the Dot fits into names, and maybe it knows about filenames as standard. Tha is is, a string format

The binary format is the well know argc, argv, bu we adapt the argc so it can be counted by sequential commands. So, the console loop needs the official token parser, the one and only, so it can have a string and binary mode. The issue comes up because the tokenizer ould be swappable, but to us, swapping out the command formats is like redefining the DMA bus all the time. Tokenize, is part of the DMA controller. Choosing a different Tokenizer standard is like switching computer architectures. My 30 lines of tokenizer remains permanent, it defines the bus architecture. This is not syntax, upper level. This is like object code  format in a microprocessor. So console loop says linux format is al we get, either space separated string or args array and argc index and the ConsoleLoop  goes from the one to the other as needed,  internally.

So, you type something in the console, the assumption its you type a standard string command, with args, as normal.  Any syntax is loadable, Default preloaded but not active.  If I type default, the Default parser gets control, but is still limited to linux command format on the bus. Ditto for Python and Forth, if availability.  What happens in Default is the same, interactive syntax until exit, by the same path. The different is that Default is always thee, limited to opaque place holders for variables and wile loops.  I have to work this flow though because the default  integration of console loop. The code os coming up, it has about 15 syntax error checks, and will other wise loop without crashing. So the command line is being used by me, rather than testing strings.

Friday, December 14, 2018

Default does something

It now does this:
while(2) {quit;}

And goes though all the hoops then executed the linux command 'quit'. By tomorrow some time I will Have something a bit buggy but workable in the lab. My pace lows down then, just adding or fixing as needed. It is coming in at 700 lines of code and compiles in a second.  I can make it cleaner, over time.

I find Hardly time now and then but I am still learning a bit of Forth.

Another bad day at the markets

The kicked can got blown a bit off course. But at least the yield curve stopped getting more inverted. Like he eye of a hurricane, he second round of debt repudiation is coming.

Just from minimum steps, examine the Shunt tree

Lay it out an an Xchars, the way I do Huffman trees, except the weighting graph is a two dimensional spread of cells.   The layout of the weightings, their position on the graph is scaled, and alost all grammars will be sphere packinsg, they will work best over their domain when the weightings re spread to resemble the balance Hffan tree, overlayed. Up the Y axis ae te heavy weights, and they are rarer, the bottom elements have varying amounts of left/right orderings as they are equally probable horizontially.

This is a classic case for a Deep mind, looking at myriads of text, finding its own meaning.  Shunting algorithm, needs study, for AI, really.

We can diagram sentences with Shunt

Expnd the weightings to include  quite a few types of speech, some even invented, some even invented by bots.

Shunt is a super high speed grammar to add to join, and it can fill a key word tree as a LaxyJ graph A great AI tool, join stack discover plain text structure, they can categorize their structure as a basis graph, recurse it and generate key word weights.  Give these tag name and load them into the Shunt weighting table,.

The weighting table is 2D, it has a left right and an up down, ideally suited to map Huffman tees onto that. Then we create three and five color Tower of Hanoi games, funneling tons of text through the new grammar, it comes out as diagrammed sentences. Giggles call them supervisory network, I call them  baiss trees that span a data set according to rule of minimizing congestion.  Shunt is in my bag of tricks.

So, you give me a bunch of stock names,then Shunt can diagram sequences of those names according to thier congestion levels. Blue chips become discoverd, and become a part of speech for the bot, like:

Yea, the large Blue chip trades seem to lag the rise in small chips during winter.

Like, the bots could find this information out, and say it to us. Bots be able to read and write, how about that!

Class methods in Hardly

Methods are amacro attached to the class object, the class objectis a stack, all stacks get a symbol.

S we get variable scoping:

arg3 arg2 arg1 mymethod myclass

Any definition from myclass comes  prefixed y class name.

myclass is a macro that always get one of the methods from its definition. All stacks have a macro definition for immediate look up of local methods. Definition lookup is extremely fast as all names are eight byte limited. So separating by slack class allows reuse without conflict. The execution unit does almost everything by macro defines as they are the shortest path.