Skip to content

Instantly share code, notes, and snippets.

@shaunlebron
shaunlebron / clj.dif
Created Dec 15, 2018
parindent on clojure core
View clj.dif
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 Dec 15, 2018
parindent on clojurescript core
View cljs.diff
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 Dec 11, 2018
how elm-format and prettier deal with ambiguity
View nudge-formatter.md

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 Sep 1, 2021
why Dynamicland Realtalk isn't open source
View realtalk.md

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
View SketchSystems.spec
Idling
shiftdown -> Highlighting point
mousedown -> MouseDrag?
touchstart -> TouchDrag?
Highlighting point
mousedown -> Creating selection
mousemove -> Highlighting point
shiftup -> Idling
View SketchSystems.spec
Idling
Idling without Selection*
shiftdown -> Highlighting point
mousedown -> Panning view
Idling with Selection
shiftdown -> Highlighting point
mousedown -> Drag?
Idle?
hasSelection -> Idling with Selection
View index.html
<!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/walt-compiler@0.16.2/dist/walt.js"></script>
<script id="jsbin-javascript">
@shaunlebron
shaunlebron / notes.md
Last active Sep 6, 2018
Movie shot detection
View notes.md

Movie shots detection

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

2001

Using a program

@shaunlebron
shaunlebron / faketalk.js
Created Aug 30, 2018 — forked from antimatter15/faketalk.js
A toy system inspired by realtalk
View faketalk.js
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')
}
View dynamicland-vneck-tshirt.lua
-- 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/: