Skip to content

Instantly share code, notes, and snippets.

View lambda-fairy's full-sized avatar
💜
Hello!

Chris Wong lambda-fairy

💜
Hello!
View GitHub Profile
@lambda-fairy
lambda-fairy / maintain-package.md
Last active August 29, 2015 14:01
Custom docs copy

/package/:package/maintain

Maintain bonbon version 1.2.1

Status: build successful (green) / build pending (yellow) / docs uploaded by maintainer (blue) / build failed

@lambda-fairy
lambda-fairy / names.txt
Last active August 29, 2015 14:02
Interesting pony names
Acid Test
Aqua Regia
Branch Cut
Break Even
Cash Flow
Ellie and Ella
Emmentaler
First Mover
Fore Sight
Graham Cracker
package: hello-1.0.1.2
os: linux
arch: x86_64
compiler: ghc-7.6.3
client: cabal-install-1.20.0.2
dependencies: base-4.6.0.1
install-outcome: InstallOk
docs-outcome: Ok
tests-outcome: NotTried
@lambda-fairy
lambda-fairy / goaway.js
Last active August 29, 2015 14:02
Playing around with wavepot
// lfairy - go away
Array.prototype.sum = function() {
return this.reduce(function(a, b) { return a + b; }, 0);
};
function dsp(t) {
var base = Math.floor(t) % 2 ? 261.63 : 220;
var wave = [base, 3/2 * base, 4/3 * base, 5/2 * base].map(function(freq) { return 0.1 * sub(sin(freq, t), 1, t); }).sum();
20:53 <lfairy> since Nala's getting retired soon, how about we throw her a farewell party
20:54 <lfairy> guys?
20:55 <lfairy> .c party, don't party
20:55 <Nala> lfairy: don't party
20:55 <lfairy> um, ok
@lambda-fairy
lambda-fairy / 2014-07-12.md
Last active August 29, 2015 14:03
2014-07-12

On <link rel="canonical">

20:14 <lfairy> ditching the redirect -- what do you think about that?
20:15 <dcoutts> mm
20:15 <dcoutts> adding things to the haddock pages isn't easy
20:15 <dcoutts> like the permalink thing
20:16 <dcoutts> because it's generated by haddock
20:16 <dcoutts> lfairy: honestly, I'd focus on the slightly larger projects that are harder for random volunteers to get into
@lambda-fairy
lambda-fairy / blahtris.html
Created July 22, 2014 06:36
Minimal Tetris implementation
<!DOCTYPE html>
<html>
<head>
<title>Blahtris</title>
<style type="text/css">
div#sandbox {
float: left;
position: relative;
}
div#msgbox {
@lambda-fairy
lambda-fairy / plan-74.markdown
Last active August 29, 2015 14:04
Plan for Hackage #74
@lambda-fairy
lambda-fairy / CaseInsensitive.hs
Created July 31, 2014 01:49
Data.CaseInsensitive and (Co)Traversable
traverse :: (FoldCase s1, FoldCase s2, Functor f) => (s1 -> f s2) -> CI s1 -> f (CI s2)
traverse f = fmap CI.mk . f . CI.original
cotraverse :: (FoldCase s1, FoldCase s2, Functor f) => (f s1 -> s2) -> f (CI s1) -> CI s2
cotraverse f = CI.mk . f . fmap CI.original
-- Examples
concat :: [CI ByteString] -> CI ByteString
concat = cotraverse B.concat
@lambda-fairy
lambda-fairy / PropCheck.hs
Created August 14, 2014 05:17
Fancy (classical) propositional logic checker
{-# LANGUAGE TypeFamilies #-}
import Control.Applicative
import Data.Functor.Compose
------------------------------------------------------------------------
-- Preliminaries
(-->) :: Bool -> Bool -> Bool