Skip to content

Instantly share code, notes, and snippets.

View joshuafcole's full-sized avatar

Joshua Cole joshuafcole

View GitHub Profile

Aggregation Statification Station Vacation III: Tokyo Drift

Misc. Notes

  • Only aggregates require stratification

  • We want to aim for the fewest strata possible

  • Aggregates that look the same should always have the same output

  • Aggregates which depend on their own outputs (directly or otherwise) are unorderable

  • Aggregates which filter (rather than provide) the rows contributing to their inputs are orderable

  • Aggregates have four kinds of variables

Breaking Down Tic-tac-toe

Last week, @RubenSandwich posted an interactive demo on the mailing list capable of playing and scoring tic-tac-toe matches. He provided some great feedback about the issues he ran into along the way. Now that the language is becoming more stable, our first priority is seeing it used and addressing the problems which surface. To that end, his troubles became our guide to making Eve a little friendlier for writing interactive applications in general and tic-tac-toe in specific.

This analysis (and future breakdowns) will be written inline in Eve to make the discussion flow more naturally. Since our blog is capable of rendering Markdown, we can provide a pleasant reading experience directly from the source code. At the moment, Eve's syntax only lends itself to a subset of Markdown, but we plan to make some small changes in the near future to become fully compatible with [GFM][2

function() {
// LCG courtesy of <https://gist.github.com/Protonk/5389384>
let m = Math.pow(2, 24), a = 16598013, c = 12820163, z = 3;
function rand() {
return z = (a * z + c) % m / m;
}
function ancestors(elem:HTMLElement) {
let ancestors = [];
while(elem) {
throttle = function(func, wait, options) {
var context, args, result;
var timeout = null;
var previous = 0;
options || (options = {});
var later = function() {
previous = options.leading === false ? 0 : getTime();
timeout = null;
result = func.apply(context, args);
context = args = null;