Which calculators run RPL under the hood?
|
12-16-2019, 06:30 PM
Post: #30
|
|||
|
|||
RE: Which calculators run RPL under the hood?
Nice to see this discussion about the extensibility of RPL. Where were you guys in 2013 when I started newRPL? This discussion would've come in handy. To be fair, David and Han actually participated in the early talks, so when I say the people above this post, David you are excluded
Anyway, we figured it out and newRPL actually does *everything* that was mentioned above: * There's a library number embedded in the prolog to dispatch execution * There's an object size also embedded in the prolog, so computing the object size is standardized across the entire system. * Operators are overloaded (so + will be dispatched to new object types automatically), commands in general can be overloaded but I try to avoid that for speed reasons. * Compiling and decompiling are dispatched to the libraries managing the objects, this includes not just object types but commands as well. * In addition, there's also object validation being dispatched: The system might request a library to verify if the object is valid. This helps prevent memory corruption due to invalid objects. It also helps composite objects validate that objects that the user included within are valid, for example when the compiler finds the token "[" in the source code, the matrix library recognizes it and opens a composite, requesting validation. Any object the user included after that gets compiled by its own library, and then sent to the matrix library for validation. For example a text string inside a matrix would be compiled just fine, but rejected by the matrix library at the validation step. * There's no master command list or fixed compiler code. The compiler simply splits the tokens and sends them to all libraries in descending order. Whichever library claims the token first, gets to compile it. This means a library with higher number may override any command or any object definition of a lesser library. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)