sudo apt-get install python3-pip
sudo pip3 install virtualenv
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,
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.
Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
passwd
apt-get update
apt-get upgrade
apt-get install fail2ban
useradd deploy
mkdir /home/deploy
| license: mit |
This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.
Highly recommended things!
This is my five-star list. These are my favorite things in all the world.
A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★
| # Output to a jpeg file | |
| set terminal jpeg size 1280,720 | |
| # Set the aspect ratio of the graph | |
| set size 1, 1 | |
| # The file to write to | |
| set output "timeseries.jpg" | |
| # The graph title |
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/stacked-area-chart-via-d3-group |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <table id="split"> | |
| <thead></thead> | |
| <tbody></tbody> |