Skip to content

Instantly share code, notes, and snippets.

@timhall
timhall / task-plugin-unification.md
Created July 27, 2017 13:04
Task / Plugin Unification
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 1 column 11
---
title: RFC: Task / Plugin Unification
---

Summary

This RFC presents an alternative plugin API that matches the current task API.

Unifying tasks and plugins should encourage task reuse (as plugins), simplify the overall API, and allow a single core mental model for how taskr tasks and plugins function.

@timhall
timhall / .block
Last active October 18, 2016 14:14 — forked from john-clarke/.block
BAA Marathon and Half-Marathon results as a histogram
license: mit
height: 550
border: yes
@timhall
timhall / .block
Last active September 29, 2016 15:50
d3.compose Heatmap
license: mit
@timhall
timhall / .block
Last active September 29, 2016 14:45
d3.compose Error Bars
license: mit
@timhall
timhall / .block
Last active September 29, 2016 14:42
d3.compose Tooltip
license: mit
Private pClient As WebClient
Public Property Get Client() As WebClient
If pClient Is Nothing Then
Set pClient = New WebClient
pClient.BaseUrl = "https://ops.epo.org/3.1/"
' Setup authenticator (note: provide consumer key and secret here
Dim Auth As New OPSAuthenticator
Auth.Setup "CONSUMER_KEY", "CONSUMER_SECRET"
Sub PostFiles()
' Note: Add reference to Microsoft Scripting Runtime
' (Tools > References)
' References:
' http://www.xl-central.com/list-files-fso.html
' http://stackoverflow.com/a/20391100/1240745
Dim FSO As New FileSystemObject
Dim XmlFolder As Folder
Private Client As WebClient
Private Wrapper As WebAsyncWrapper
Private AllRequests As Collection
Private BatchIndex As Long
Private BatchSize As Long
Private Waiting As Long
Public Sub ExecuteRequests()
Dim i As Long
Dim Request As WebRequest
@timhall
timhall / d3.compose functional.md
Last active November 18, 2015 15:23
d3.compose functional

Goals

Apply functional techniques to make d3.compose easier to reason about, more testable, and better match d3's standard approach

Implementation

Use a "smart"/"dumb" components approach (reference) with "smart" component handling logic, state, and context and "dumb" component handling rendering.

  • The "dumb" component is stateless and is a simple, idempotent function that takes in a d3.selection and properties and renders the chart.
  • The "smart" component provides the API for interacting with Compose, prepares properties for the "dumb" component, and handles any logic/state
/*
Goal:
Draw charts and components purely from selection and props
Question:
Is it more performant (speed and memory):
a) transform data fully before passing to draw
b) transform data minimally and prepare (d, i) functions and pass with props
Hypothesis: