Friday, December 14, 2018

Hardy class methods

In Hqardly every stack operation is identified by stack, they are methods on objectss. As in:

number MySack Push

Gets tedious, so there is:

MyStack Using

This changes the behavior of built ins and they use the top of the class stack, automatically, as user stack so no class prefix is needed..  The class stack identifies classes that have set using and have not cleared.  Default behavior like Forth, devolving into a usual set of primitives on stacks, The currently active classes are on the class stack.  Standard Forth results after the using macro. Almost never would the default current class be empty.

When a stack object is created, two or three macros are defined that get your stack set up for using and leaving the class stack.. The idea is that any given stack can be configured, for a while, as default, and all the usual Forth word behavior is default.

The idea here is that, on the bus, asynchronous hardly users may maintain Hardly persistent stacks. Set up a stack for streaming, asynchronously as the words become available.

Built in table, it left a copy below the field.  Every built in look up has two forms, a string and a packed word, text8.  Hardly uses the text8 for everywhere. The look up procedure is generally 4 to 5 steps of compare and jump. So, using definition for almost anything can be nearly costless relative to most other alternatives.  The syntax is loadable in Shunt, the syntax below the field is Default with a few unused in there. Shunt will be playing larger roles, it has the ability tobe loaded with more sophisticated rules for using the three towers,especially with speed and Tower creation.



Key  0
Key  0
Key  0
Key = 3d
Key -- 2d2d
Key ++ 2b2b
Key + 2b
Key - 2d
Key ^ 5e
Key % 25
Key * 2a
Key / 2f
Key ! 21
Key ~ 7e
Key int 746e69
Key char 72616863
Key { 7b
Key } 7d
Key ( 28
Key ) 29
Key while 656c696877
Key ; 3b
Key // 2f2f

No comments: