- expression-oriented programming one of the great advances of FP
- expressions plug together like legos, making more malleable programming experience in-the-small
Write in an expression-oriented style, scoping variables as locally as possible:
// ==UserScript== | |
// @name No YouTube Volume Normalization | |
// @namespace https://gist.github.com/abec2304 | |
// @match https://www.youtube.com/* | |
// @grant GM_addElement | |
// @version 2.72 | |
// @author abec2304 | |
// @description Enjoy YouTube videos at their true volume | |
// @run-at document-start | |
// @allFrames true |
/* | |
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a | |
valid CSS hexadecimal color code (like #000 or #000000), the background color will change to that | |
color and the font color will be changed to the inverse color for readability. | |
To use this script in a Google Sheets spreadsheet: | |
1. go to Tools » Script Editor; | |
2. replace everyting in the text editor with this code; | |
3. click File » Save; |
Here are all the entries in http://reproducibility.cs.arizona.edu/ where I've mentioned problems in various Facebook/G+ threads.
A number of other errors are catalogued by Peter Bailis here: https://gist.github.com/pbailis/9629050
Note: I'm a coauthor on this one.
edit: see http://cs.brown.edu/~sk/Memos/Examining-Reproducibility/
Not deserving of a full post, but nonetheless worth writing about: @ongardie, @aalevy, and a few others on Twitter were surprised by the number of papers that were flagged as "not reproducible" according to the recent study at http://reproducibility.cs.arizona.edu. Digging deeper, it appeared that 1.) "code builds" is the standard for reproducibility in this study and that 2.) many broken builds were the result of missing dependencies on the researchers' systems.
I tried reproducing a few of the authors' "unreproducible" results. It's hard to vet 600+ research code repositories, but, with a little effort (< ~10 minutes each?), I was able to get all of the following to actually build (on Ubuntu 13.10). This doesn't inspire confidence in the reproducibility of the study results.
Peter [email protected]
{-# LANGUAGE GADTs, TypeFamilies, FlexibleInstances, RankNTypes #-} | |
import Data.Reify | |
import Control.Applicative | |
import Data.Map | |
data Ast e where | |
IntLit :: Int -> Ast Int | |
Add :: Ast Int -> Ast Int -> Ast Int | |
BoolLit :: Bool -> Ast Bool | |
IfThenElse :: Ast Bool -> Ast e -> Ast e -> Ast e |
license: gpl-3.0 |
LaTeX Cheatsheet | |
---------------- | |
Common mistakes. | |
Never use "", use `` and ''. | |
endash = -- | emdash = --- | minus sign will appear in formulae | |
In URLs, use $\sim$ rather than ~. | |
"he/she" should be "he\slash she" | |
Simple Formatting. |