standard objects - LeFreq/Singularity GitHub Wiki

Users should be spared programmer idiosyncrasies as much as possible. Every standard object in the ecosystem conforms to a uniform syntax for data passing. This is superior to learning custom APIs for every object. Just as there are only 26 letters to handle the entire corpus of English text, there are only ~5 functions needed to handle every object need.

  • run (name on command line), running an object must create output for the >> method to have a purpose
  • clone-object %, base-case: group(group ) until it bottoms out at the nameless group and outputs a BEEP or ".".
  • receive >>, base case: echo input (hidden and not exposed to the programmer outside the object); mandatory require statement ensures type checking and exception handling for the OS.
  • send <<, base case: output attribute, otherwise NULL (hidden as above), mandatory require statement ensures output conforms to type category.
  • query-object ?, base-case: TRUE if running, otherwise FALSE
  • outputs the NAME of the object is used in an expression or queried. This may incur a small cost.
  • a exception/ receiver method that is never called or referred to directly, but decides what to do if a msg is received.
A way to address parents or super classes above. If another User has a connection to a subobject in a super object, they can send a whoami request (MSG "whoami" ??? will output the of the object. Would this be within the command environment? That is, is the command-line environment inside subobjects that are inside the super-object, data ecosystem? YES. The command line could be a writeaccible DNA/code access to the cell. Then if someone says "1/" or "RUN" it runs the code in your cell inside the Soup...)

Data I/O to the right with the << operator sends it XXXNO, sentences are read in ONE directionXXX in abstraction, towards parent objects and users themselves.

All objects are subservient to super classes and are not allowed to pester their parents. Further, there is no data manipulation of internal variables or states, except by the object itself; i.e. all data is PRIVATE.

Each object should have a piece of canonical data (object NAME) returned from the object when it is used in an expression, like a variable. This should be affiliated with the object`s SWEAR contract. It could be the cursor position of a database object or properties of a window object, etc. (Python users: This is their REPR data, which differentiates itself from the STR data which might be output with the run method.)

TODO: Let's say i'm in a standard, minimal object whose methods are all simple functions. What are my commands? send, receive, edit/transform (change->clone), msg upwards, msg laterally, discard (send to the Soup)(needed?)

  1. All objects should contain metadata to store: point_of_origin (an Internet address to get new versions), version, PayPal_ID, allocation_card (percentage list of how revenue is distributed to all contributers).
  2. ???Object initialization can take any serial data stream (like reading a file), and whip it into the construct the data was designed for (a video, for example): VideoMP4("\marshalled\media\myvideo.mp4") will load and initialize the object. That construct can then be interacted with through the special five methods. >> might allow you to add frames to the video, for example (frameData >> myvideoobject), or maybe the object is a player and will queue up the item. Metaclasses take any other type and spit out another class.??? This was to make use of optimizations available at object creation, but may be irrelevant.
As trust rises abvoe some user-supplied value, type-checking need not occur for sake of efficiency. Any contributor listed that is not a known node, sends any revenue to a "starving programmer" fund, or something.
⚠️ **GitHub.com Fallback** ⚠️