Git Product home page Git Product logo

irom-dynamix's Introduction

IROM-Dynamix

Dynamix is a system of dynamic variables that "remember" their definition and update whenever their inputs change. Each variable is a readonly object with two properties, Value and Exp.

  1. Value can be used to get the current value of the Dynamix variable, or it can be used to set the variable to a constant.
  2. Exp, or expression, is a zero args function that returns the current value of the variable. It can be used to set a variable to a dynamic value. Subscription to Dynamix parents is automatically handled within the execution of this function.

For example, if i and j are both Dynamix ints: i.Value = 5; j.Exp = () => i.Value + 6; i.Value = 7; //j.Value == 13

Furthermore, Dynamix variables have an event called OnFilter. This event allows the output of a Dynamix var to be filtered before the final result is set. This is useful for cases with constrained acceptible outputs, such as a font size that must be greater than zero.

Dynamix variables can be used in complicated, nested situations as well. A Dynamix expression can include an if statement based on a Dynamix bool that returns one of two Dynamix ints, and subscription and resubscription is handled automatically, with minimum parent subscription. (This means the variable won't be subscribed to the variable on the other side of the if branch until the branch actually flips.)

Finally, Dynamix is fast, small, and lightweight. SPEED: Updates are performed at rates exceeding 750000 updates per second. SIZE: The entire package is only 7 classes and the binaries are only 28kb. MEMORY: Each Dynamix variable only requires about 38 words of memory (*depending on usage)

Overall, Dynamix variables allow previously difficult dynamic tasks to be handled easily, like automatic gui localization updating, or major gui restructuring based on a config variable-- All with no manual event handling code.

irom-dynamix's People

Contributors

jonhartnett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.