Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
objecting to features

Graydon Hoare graydon

💭
objecting to features
View GitHub Profile
View gist:3782995
#!/usr/bin/python
import fileinput, re, sys
current_file = None
current_exports = []
def fixup(m):
global current_exports
if m.group(2) in current_exports:
View gist:8695245
Uncovered note on my desk from conversation about rust's state in rustboot era:
"""
Obstacles:
- bad closures
- bad object model
- generics / monomorphization
- x64 port / x86-isms
- stack growth (doubling vs. chaining)
View keybase.md

Keybase proof

I hereby claim:

  • I am graydon on github.
  • I am graydon (https://keybase.io/graydon) on keybase.
  • I have a public key whose fingerprint is 99E4 A8F4 DECC 782F CB19 5530 0A04 E2A9 F7B1 3CE1

To claim this, I am signing this object:

@graydon
graydon / map.geojson
Created Apr 21, 2014 — forked from anonymous/map.geojson
cell LACs in USA
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@graydon
graydon / map.geojson
Created Apr 21, 2014 — forked from anonymous/map.geojson
cell LACs in germany
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View country-bounding-boxes.py
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@graydon
graydon / docker-osx-shared-folders.rst
Last active Feb 3, 2021 — forked from codeinthehole/docker-osx-shared-folders.rst
How to share folders with docker containers on OSX
View docker-osx-shared-folders.rst

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.

View target-environment-platform-condition.md

Target environment platform condition

Introduction

This proposal introduces a platform condition to differentiate device and simulator builds.

View reducing
Delta:
$ cat check-2.sh
#!/bin/bash
ulimit -t 3; ~/work/llvm/build-release/bin/opt -S $1 | ~/work/llvm/build-release/bin/lli
if ! test "$?" = "0"; then
exit 1
fi
View ToneInference.hs
{-# LANGUAGE FlexibleInstances #-}
module MiniToneInference where
import Prelude hiding ((&&))
import Control.Applicative
import Control.Monad
import Data.Map.Strict (Map, (!))
import Data.Maybe (fromJust)
import Data.Monoid ((<>))
import Data.Set (isSubsetOf)