npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@monstermakes/larry-automata

v0.0.1

Published

A Finite Automata approach to state machines.

Downloads

2

Readme

@monstermakes/larry-automata

npm version

https://nodei.co/npm/@monstermakes/larry-automata.png?downloads=true&downloadRank=true&stars=true

Description

This project gives the developer the ability to describe workflows or state machines in a simple and repeatable fashion. We are stealing concepts from the Nondeterministic finite automaton (NFA) state machine found in Automata Theory. Dont worry, the concepts are mostly around the terminology and the high level concept that we can move through the state machin in a non-determinstic type of way.


Larry Automata Concepts

A Finite Automata consists of the following:

  • Q : Finite set of states.
  • Σ : set of Input Symbols.
  • q : Initial state.
  • F : set of Final States.
  • Δ : Transition Function.

In a Larry Automata we deviate from these by combining States and Transition Functions and adding execution history to the Final States. Larry Automata encapsulates the initial input, a centralized cache, the states to be executed, the input for each state, and the history of all the previously executed states. The below sections will provide and overview of each of these concepts.

Execution

An Execution refers to the launch of one or more Automatons.

A NFA includes the "final states", which describes how things ended up after execution, in our case we are just as interested in what happened as we are in what was the final result. Thus an Execution will keep track of the changes in the execution steps (Execution History) and the final results of the execution, this will be refered to as the "Execution Results".

Step

A step combines the state, input symbols, and tranisiton function concepts in an NFA into one construct. A step declares its inputs (required and optional), defines the business logic to execute, produces outputs and has the ability to alter the flow of the execution.

Automaton

An Automaton declaritively defines all of the steps and their order of execution, prior to a run. The key take away here is the during an execution each step can alter the available steps and the subsequent order of execution. Therefore the Automaton is simply declaring the initial state machine but as things execute the Execution History is the most accurate definition of what the actual state machine end up as.

Cache

During an Execution each state will want to access the current results (think of this as the output/results of previously executed states). The cache provides a mechanism for each of the states to share data and results from one stage of the execution to the next.

Stages

When a step is executed everything that happened (changes to the steps, cache, inputs etc..) during that stage of the execution will be recorded in order in the Execution History as a "stage". These stages can be reviewed in subsequent steps or after execution concludes.


Larry Automata Software Components

TODO


Larry Automata User's Guide

TODO


TODOs

  • add Execution Results
  • add Dependency Injection for step execution
  • add an API around the Cache

Idea Scratch pad

  • What kind of hooks should we put in the Automaton???
    • prevent steps from continuing onNextStep
      • registered hooks vs event emitter and delay