State machines are wonderful tools

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • awesome-workflow-engines

    A curated list of awesome open source workflow engines

  • [2] https://github.com/meirwah/awesome-workflow-engines

  • xstate

    Actor-based state management & orchestration for complex app logic.

  • This is only true when considering a specific software design that implements the state machine. I'd say the most popular way to define a state machine in code is how Xstate does it: https://github.com/davidkpiano/xstate. You define your states, and then you define your inputs, and then you map out every single transition between states.

    This is probably the most inefficient way to design a state machine. There's a simple mathematical explanation for that. If we agree that a state diagram is a directed graph consisting of N nodes, then there are N^2 possible transitions (that's the definition of a completely connected graph). This means there's a large space of possible transitions relative to the number of states, which means there's a high probability that you will have to modify lots of transitions when modifying the state machine itself.

    In this article, this author is sharing several alternative designs for state machines, which don't look like they suffer from exactly the same problem. I'm most familiar with TLA+, where you describe a state machine simply with one logical predicate: the "Next" state relation. This is the most powerful way I've found to define state machines, and modifying one function to entirely change the behavior of the state machine is very easy in practice.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • RE2

    RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.

  • Most popular regex engines use backtracking and support non-regular features. They aren't based on automata, so implementing AND is perhaps not as theoretically straight-forward in that context.

    There are some popular finite automata based engines though. RE2 comes to mind. In theory, things like AND and complement could be implemented, but in practice, they blow up the size of the state machine.[1, 2] The current maintainer of RE2 did build a tool that permits intersection and complement though.[3]

    [1] - https://dl.acm.org/doi/10.1145/2071368.2071372

    [2] - https://github.com/google/re2/issues/156#issuecomment-354068...

    [3] - https://github.com/google/redgrep

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Mastering XState Fundamentals: A React-powered Guide

    1 project | dev.to | 16 Apr 2024
  • Unleashing the Power of Actors in Frontend Application Development

    1 project | dev.to | 22 Mar 2024
  • Rethinking State Management - Why XState is a Game-Changer for Developers

    1 project | dev.to | 15 Jan 2024
  • JavaScript State Machines and Statecharts

    1 project | /r/patient_hackernews | 14 May 2023
  • JavaScript State Machines and Statecharts

    1 project | /r/hackernews | 14 May 2023