P
state_machines
P | state_machines | |
---|---|---|
8 | 5 | |
2,919 | 795 | |
0.9% | 1.0% | |
8.3 | 3.3 | |
4 days ago | 17 days ago | |
C# | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
P
- Property-based testing in practice [pdf]
-
Gem adds support for creating state machines for attributes on any Ruby class
I worked on a state machine framework in another language, and have definitely have found less terse to be pretty good. Typing a few extra characters isn't that bad, especially if it makes some awful bit of evented code easier for someone to understand.
Of the things available open source, I think P-lang is pretty cool: https://github.com/p-org/P/blob/master/Tutorial/1_ClientServ...
-
The Actor Model and the Chess Clock
Your proposed syntax reminded me of https://p-org.github.io/P/
-
The TLA+ Video Course
I’ve gotten a lot of good about TLA+ and the more recent the P language has been really promising lately. It’s got a good pedigree and is being increasingly used as AWS as well.
- P Language
-
Learn TLA+
I tried to use TLA+ but what annoys me the most is the disconnection between the actual implementation and its code. I think the P language has a much better future just because it can generate code that works: https://github.com/p-org/P
-
Let's build a distributed Postgres proof of concept
It is tough.
My approach when learning new protocols like Raft or Paxos is to implement them in Pluscal (TLA+'s higher-level language) or P (https://github.com/p-org/P). I've found that helps separate the protocol-level concerns from the implementation-level concerns (sockets? wire format?) in a way that reduces the difficulty of learning the protocol.
state_machines
- Gem adds support for creating state machines for attributes on any Ruby class
-
Practical State Machinery
State Machines (Ruby) - A popular library providing a Ruby DSL for easily building finite state machines
-
Why Developers Never Use State Machines (2011)
As a regular user of the state_machine Ruby gem, I wouldn't recommend it. If you don't believe me, just check out the "Class definition" section of the usage examples: https://github.com/state-machines/state_machines#usage
The problems are obvious. It's built on magic and indirection. This leads to difficult to debug state machine problems. For anything beyond simple state machines you quickly lose any idea of what your object is doing.
-
ActiveRecord: Adding Boolean methods for DateTime columns
Might this be better handled with a state machine with active record integration?
-
Ruby 3 Released
Here's an example of how it can happen - look at the code examples in https://github.com/state-machines/state_machines - almost everything you are coding is in the DSL of that library if you are using it:
What are some alternatives?
Hybridizer - Examples of C# code compiled to GPU by hybridizer
AASM - AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, NoBrainer, Dynamoid)
Testura.Code - Testura.Code is a wrapper around the Roslyn API and used for generation, saving and compiling C# code. It provides methods and helpers to generate classes, methods, statements and expressions.
State Machine - Adds support for creating state machines for attributes on any Ruby class
Mond - A scripting language for .NET Core
Statesman - A statesmanlike state machine library.
PeachPie - PeachPie - the PHP compiler and runtime for .NET and .NET Core
simple_states - A super-slim statemachine-like support library
Iron python - Implementation of the Python programming language for .NET Framework; built on top of the Dynamic Language Runtime (DLR).
state_shifter
Amplifier.NET - Amplifier allows .NET developers to easily run complex applications with intensive mathematical computation on Intel CPU/GPU, NVIDIA, AMD without writing any additional C kernel code. Write your function in .NET and Amplifier will take care of running it on your favorite hardware.
transitions - State machine extracted from ActiveModel