Skip to content

Instantly share code, notes, and snippets.

View bmershon's full-sized avatar

Brooks Mershon bmershon

View GitHub Profile
@bmershon
bmershon / .block
Last active August 1, 2017 00:28
1D Flat Foldability
license: MIT
height: 960
border: no
scroll: no
@bmershon
bmershon / .block
Last active July 28, 2017 03:20
1D Alternating Fold
license: MIT
height: 960
border: no
scroll: no
@bmershon
bmershon / .block
Last active July 23, 2017 23:48
Grid Cycles
scrolling: yes
border: no
height: 960
license: MIT
@bmershon
bmershon / .block
Last active July 6, 2017 04:53 — forked from mbostock/.block
Apollonian Gasket
license: gpl-3.0
height: 960
border: no
@bmershon
bmershon / .block
Last active June 30, 2017 04:51
An Interesting Lattice
height: 960
border: no
license: MIT
@bmershon
bmershon / .block
Last active June 14, 2018 12:24
Minimum Spanning Tree
height: 960
border: no
license: MIT
@bmershon
bmershon / README.md
Last active June 16, 2017 05:58
How to be Annoying During a Coding Interview

Problem 1

You are given a string of the form 101?01?110?0001 where the "?" characters are unknown digits in a string representing a binary number. For example, the string 101 represents the number 5 and the string 11101 represents the number 29. You are instructed to print out all the possible numbers that this special string with "?" characters might represent. Each "?" is either a 0 or 1 digit. The string 1?1 would require you to print both 5 and 7, as either of those numbers could be represented by 1?1.

Choose a programming language you are comfortable using.

...

@bmershon
bmershon / README.md
Last active June 15, 2017 02:24
Branching Process

In Matthew Butterick's fantastic book Beautiful Racket the reader is encouraged to develop a novel extension to the JSON language (really, a data format) which permits arbitrary S-expressions (symbolic expressions) to be placed in the code so long as the S-expressions evaluate to a value supported by JSON. Long story short, a language is created that reads in this funny looking JSON and produces valid JSON which results from evaluating the special S-expressions peppered throughout the input source. The language is called jsonic to suggest the extra power with which it has been embued.

Well, I thought it would be neat to stretch the notion of what an S-expression might evaluate to when it is placed inside what looks like otherwise valid JSON. What if we wanted to make a tree-like structure with JSON. This is a fairly common use case, as many data structures might either be fed by or serialize their data to a JSON data structu

@bmershon
bmershon / .block
Last active January 13, 2023 13:06
Y Combinator
border: no
@bmershon
bmershon / .block
Last active July 14, 2017 20:01
SVG Spritesheet
scrolling: yes
license: MIT
border: no