I hereby claim:
- I am diogot on github.
- I am diogot (https://keybase.io/diogot) on keybase.
- I have a public key ASCsCEdA5hL6oc5kH1vqoWl9bEk42-cuRL2IzADSgVUbwwo
To claim this, I am signing this object:
#include <iostream> | |
#include <cstdlib> | |
#include <fstream> | |
using namespace std; | |
int nextAvailable(unsigned int C, int *chashier) | |
{ | |
int avail = 0; |
// | |
// XCTestCase+MethodSwizzling.h | |
// | |
// Created by Diogo Tridapalli on 5/28/14. | |
// Copyright (c) 2014 Diogo Tridapalli. All rights reserved. | |
// | |
#import <XCTest/XCTest.h> | |
@interface XCTestCase (MethodSwizzling) |
// | |
// DTNetworkOperation.h | |
// DTOperation | |
// | |
// Created by Diogo on 10/14/15. | |
// Copyright © 2015 Diogo Tridapalli. All rights reserved. | |
// | |
#import "DTOperation.h" |
I hereby claim:
To claim this, I am signing this object:
State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?
There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.
Here I present a composable pattern for pure state machiness with effects,