Giter Club home page Giter Club logo

facts-about-state-machines's Introduction

Hi there, I'm Chris Pressey. Most of the things I make, I make under the auspices of Cat's Eye Technologies, so if you're looking for things I've made, you probably want to look at https://codeberg.org/catseye instead.


Cirriculum vitae


When Microsoft acquired GitHub, I didn't leave immediately. I wanted to give them a chance. Well, they had their chance.

It's not that I've suddenly become a Free Software zealot. But I do think open source should be more than just something that enables a "Community Tier (FREE!)" business model.

There is also a significant amount of irony in a code host based on an open-source distributed version control system becoming "too big to fail", and actually, when I say "significant", what I mean is "insupportable". So, I can no longer in good conscience support it.

¹ As far as is humanly possible. Actually, insofar as what I've done has been open sourced I can't actually prevent anyone from uploading it here, "stopping using GitHub" for me consists in (a) not visiting the site if I don't have a very good reason to, (b) not hyperlinking to content on GitHub if there is any other option, and (c) promoting viable alternatives, such as Codeberg.

facts-about-state-machines's People

Contributors

cpressey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facts-about-state-machines's Issues

Code samples of state machine implementation

Please could you add code snippets of the different types of state machine implementation. It is easier to visualize and perhaps even use the appropriate code snippet.

Thank you - this is a good, comprehensive description of state machines.

Commands and events

Thanks for writing these notes.

On the statement that state machine transitions are neither functional or imperative, they can also be both. We distinguish commands and events. Commands drive state machines and events are emitted by them and reflect what has happened. Commands can be side effecting and emit an event. An event is then applied to a state to yield another state and has no side effects ie it is a pure function. This is useful when event sourcing to reconstitute state as events can be replayed without side effects.

Here’s a blog I wrote on this topic a while back: http://christopherhunt-software.blogspot.com/2021/02/event-driven-finite-state-machines.html

Here’s an implementation of what the blog describes using Rust: http://christopherhunt-software.blogspot.com/2021/02/event-driven-finite-state-machines.html

I’d be interested in your thoughts regarding what we’ve done. Thanks again for your work.

Statements about state complexity and behaviour are misleading

Great article, first. Found it on Hacker News. But I did notice a section that could be revised. It is the section titled A complex state machine means your system has complex behaviour:

Firstly, the statement is false because it makes a statement about all machines of a type but doesn't include any exceptions. For example, a heavily complex state machine could always result in the output "false" (or "true"). This behaviour is actually quite simple but the state machine to produce it could be incredibly complex for some reason. I suppose you could make an argument that the "internal" behaviour is complex, but even this is a stretch of the possible truths.

Secondly, the converse is false as well; a very simple three-state machine could produce incredibly complex behaviour that could appear completely random to outside observers. I would recommend reading on this topic, especially with a nod to Wolfram's computational reduction arguments. He has produced very simple state machines that produce incredibly detailed and complex behaviours.

I would encourage you to redesign this section to qualify or give specific examples of complex machines with complex behaviours versus simple machines with simple behaviours --- and then describe how the opposite is also possible.

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.