- TOC {: toc }
Friday night, Twitter sent me a notification to look at this tweet:
https://t.co/nqIwhoOc39Recording of our presentation on Artist-Centric Programming Tools at #chi2018— Jennifer Jacobs (@jsquare) May 18, 2018
| import {run} from '@cycle/run'; | |
| import {makeCanvasDriver, rect, text} from 'cycle-canvas'; | |
| import { makeKeyboardDriver } from 'cycle-keyboard' | |
| import xs from 'xstream' | |
| import fromEvent from 'xstream/extra/fromEvent' | |
| import split from 'xstream/extra/split' | |
| import throttle from 'xstream/extra/throttle' | |
| import concat from 'xstream/extra/concat' |
Friday night, Twitter sent me a notification to look at this tweet:
https://t.co/nqIwhoOc39Recording of our presentation on Artist-Centric Programming Tools at #chi2018— Jennifer Jacobs (@jsquare) May 18, 2018
| group = xs => xs.reduce((rv, x) => { | |
| (rv[x] = (rv[x] || [])).push(x); | |
| return rv; | |
| }, | |
| {}); | |
| objMap = (oldObj, func) => Object.keys(oldObj).reduce(function(newObj, current) { | |
| newObj[current] = func(oldObj[current]) | |
| return newObj; | |
| }, | |
| {}); |
| _nonWordRe = /[^a-zA-Z0-9\u00C0-\u00FF, ]+/g; | |
| _iterateGrams = function(value, gramSize) { | |
| gramSize = gramSize || 2; | |
| var simplified = '-' + value.toLowerCase().replace(_nonWordRe, '') + '-', | |
| lenDiff = gramSize - simplified.length, | |
| results = []; | |
| if (lenDiff > 0) { | |
| for (var i = 0; i < lenDiff; ++i) { | |
| value += '-'; | |
| } |
count = 0
update msg count =
case msg of
Increment ->
count + 1