Skip to content

Instantly share code, notes, and snippets.

@shaunlebron
shaunlebron / clj.dif
Created December 15, 2018 03:22
parindent on clojure core
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index 8e98e072..b3174e14 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -7,26 +7,26 @@
; You must not remove this notice, or any other, from this software.
(ns ^{:doc "The core Clojure language."
- :author "Rich Hickey"}
+ :author "Rich Hickey"}
@shaunlebron
shaunlebron / cljs.diff
Created December 15, 2018 03:20
parindent on clojurescript core
diff --git a/benchmark/cljs/benchmark_runner.cljs b/benchmark/cljs/benchmark_runner.cljs
index a4ea583c..4407b571 100644
--- a/benchmark/cljs/benchmark_runner.cljs
+++ b/benchmark/cljs/benchmark_runner.cljs
@@ -1,8 +1,8 @@
(ns cljs.benchmark-runner
(:refer-clojure :exclude [println])
(:require [cljs.reader :as reader]
- [clojure.core.reducers :as r]
- [clojure.string :as string]))
@shaunlebron
shaunlebron / nudge-formatter.md
Created December 11, 2018 10:35
how elm-format and prettier deal with ambiguity

Case Study: how to branch without options

[elm-format inspired prettier] to let the user branch between two different formatters without the use of explicit options, by taking cues from the source's original formatting. (see [multi-line objects])

  • Context: an object literal is sometimes better displayed on multiple lines even it can fit on one
  • Problem: it was deemed impossible for the formatter to know when multiline is preferable
  • Solution: allow the user to insert a newline after the first curly to force multiline
// before
@shaunlebron
shaunlebron / realtalk.md
Last active December 18, 2024 02:12
why Dynamicland Realtalk isn't open source

Transcribed from an interview with Toby Schachman and Paula Te on The Afrofuturist Podcast:

There's this notion of the open-source movement. There are a lot of things
that we totally resonate with that because it's about understanding how your
technology works. We're totally 100% on board with that.

But then there are other issues with the open-source community, where it's
very internet-based and so open-source ends up benefitting this group of
people who have really strong access to internet and understand how to use
Idling
shiftdown -> Highlighting point
mousedown -> MouseDrag?
touchstart -> TouchDrag?
Highlighting point
mousedown -> Creating selection
mousemove -> Highlighting point
shiftup -> Idling
Idling
Idling without Selection*
shiftdown -> Highlighting point
mousedown -> Panning view
Idling with Selection
shiftdown -> Highlighting point
mousedown -> Drag?
Idle?
hasSelection -> Idling with Selection
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/[email protected]/dist/walt.js"></script>
<script id="jsbin-javascript">
@shaunlebron
shaunlebron / notes.md
Last active September 6, 2018 10:31
Movie shot detection

Movie shots detection

I like this "show all the data" view of 2001, from VashiVisuals:

2001

Using a program

@shaunlebron
shaunlebron / faketalk.js
Created August 30, 2018 07:48 — forked from antimatter15/faketalk.js
A toy system inspired by realtalk
function mouse(_, me, when, claim){
when('fox is out', () => {
claim(me, 'wish', 'labelled', 'squeak')
claim(me, 'wish', 'outlined', 'red')
})
}
function fox(_, me, when, claim){
claim('fox is out')
}
@shaunlebron
shaunlebron / dynamicland-vneck-tshirt.lua
Created August 30, 2018 05:05 — forked from forresto/dynamicland-vneck-tshirt.lua
first shot at dynamicland #softfab
-- Shirt (#softfab)
Claim (you) has state "waist" with initial value (30).
Claim (you) has state "arm" with initial value (5).
Claim (you) has state "armaround" with initial value (10).
Claim (you) has state "side" with initial value (20).
Claim (you) has state "neck" with initial value (15).
When (you) contains dots /dots/,
(you) has width /width/: