Skip to content

Instantly share code, notes, and snippets.

module Clock = {
include ReactRe.Component.Stateful;
let name = "Clock";
type props = ();
type state = {now: Js_date.t, timerID: option Js_global.intervalId};
let getInitialState () => {
{ now: Js_date.make (), timerID: None };
};
<html>
<canvas id="canvas" width="256" height="256" />
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, 256, 256);
ctx.fillStyle = 'white';
@andyfriesen
andyfriesen / BUCK
Created July 30, 2023 17:20
Trying to work out how to get a single mega-compilation-database out of Buck. This is a pretty naive approach, but I think it works?
# compdb/BUCK
python_bootstrap_binary(
name = "combine_compdbs",
main = "combine_compdbs.py",
visibility = ["PUBLIC"]
)

$$ \tag*{r = f(x)} \cfrac {\Gamma \vdash f: (A) \rightarrow B, x: T, r: R} {(A) \rightarrow B <: (T) \rightarrow R} $$