Skip to content

Instantly share code, notes, and snippets.

View jhenahan's full-sized avatar

Jack Henahan jhenahan

  • Cox Automotive, Inc
  • Windsor, VT
View GitHub Profile
@jhenahan
jhenahan / heighway.hs
Created April 2, 2012 11:33
Heighway Dragon - byorgey
{- Heighway dragon. See
http://en.wikipedia.org/wiki/Dragon_curve -}
module Main where
import Graphics.Rendering.Diagrams
import Control.Monad.State
import Data.Maybe
dragonStr :: Int -> String
dragonStr 0 = "FX"
data Tree : Set
data Tree′ : Set
data Tree where
leaf : Tree
node : Tree → Tree′ → Tree
data Tree′ where
leaf : Tree′
node : Tree′ → Tree → Tree′
@jhenahan
jhenahan / 0_reuse_code.js
Created January 30, 2014 20:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jhenahan
jhenahan / pointfree-1.0.4.6-tests.log
Created March 23, 2014 03:27
Test failures with relaxed bounds in pointfree
Test suite tests: RUNNING...
### Failure in: 0
foldr (++) [] failed.
expected: "join"
but got: "foldr (++) []"
### Failure in: 1
flip flip [] . ((:) .) failed.
expected: "(return .)"
but got: "flip flip [] . ((:) .)"
### Failure in: 3
if test -n $HOME
set -l NIX_LINK $HOME/.nix-profile
if test ! -L $NIX_LINK
echo "creating $NIX_LINK" >&2
set -l _NIX_DEF_LINK /nix/var/nix/profiles/default
/nix/store/cdybb3hbbxf6k84c165075y7vkv24vm2-coreutils-8.23/bin/ln -s $_NIX_DEF_LINK $NIX_LINK
end
set -x PATH $NIX_LINK/bin $NIX_LINK/sbin $PATH

Keybase proof

I hereby claim:

  • I am jhenahan on github.
  • I am jhenahan (https://keybase.io/jhenahan) on keybase.
  • I have a public key ASAbrUelCZIVPyFsLxfG4uWkXisAgS5TF4jp-YOnfAONAQo

To claim this, I am signing this object:

http://www.keyboard-layout-editor.com/##@_backcolor=%23292727&name=Workman%20Dead%20Planck%20with%20KWM%20and%20Plover&author=Jack%20Henahan&switchMount=cherry&pcb:true%3B&@_c=%23ffffff&a:7%3B&=Tab&=Q&=D&=R&=W&=B&=J&=F&=U&=P&=%2F%3B&=Back%20space&_x:0.5%3B&=&=%25&=%2F&&=%3F&=+&=%2F@&=$&=%2F_&=%5B&=%5D&=!&=%3B&@=Esc&=A&=S&=H&=T&=G&=Y&=N&=E&=O&=I&='&_x:0.5%3B&=&=%2F%2F&=(&=%2F=&=0&=%7B&=%7D&=1&=*&=)&=-&='%3B&@=Shift&=Z&=X&=M&=C&=V&=K&=L&=Dead&=.&=%2F%2F&=Enter&_x:0.5%3B&=&=6&=7&=8&=9&=%7C&=%5C&=2&=3&=4&=5&=%3B&@=Ctrl&=RAlt&=LAlt&=⌘&=Fn&=&=&=KWM&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B&_x:0.5%3B&=&=&=%3C&=~&=%60&=,&=,&=%23&=%5E&=%3E&=&=%3B&@_y:0.5%3B&=~&=!&=%2F@&=%23&=$&=%25&=%5E&=%2F&&=*&=(&=)&=Back%20space&_x:0.5%3B&=Tab&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&=Back%20space%3B&@=Del&=F1&=F2&=F3&=F4&=F5&=F6&=%2F_&=+&=%7B&=%7D&=%7C&_x:0.5%3B&=Esc&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&='%3B&@=Shift&=F7&=F8&=F9&=F10&=F11&=F12&=%7C&=±&=.&=Vol+&=Enter&_x:0.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=En
module Covariance where
import Means
import qualified Control.Foldl as L
import Control.Applicative
covariance :: (Fractional a, Real a1) => [a1] -> [a1] -> a
covariance xs ys = mean (zipWith (*) xs ys) - mean xs * mean ys
covariance' :: Fractional a => [a] -> [a] -> a
--- a/Lib/distutils/unixccompiler.py 2019-03-25 16:21:05.000000000 -0400
+++ b/Lib/distutils/unixccompiler.py 2019-04-09 07:58:19.000000000 -0400
@@ -188,15 +188,7 @@
i = 1
while '=' in linker[i]:
i += 1
-
- if os.path.basename(linker[i]) == 'ld_so_aix':
- # AIX platforms prefix the compiler with the ld_so_aix
- # script, so we need to adjust our linker index
@jhenahan
jhenahan / cabal.project
Last active January 3, 2021 05:21
Haskell + Emacs + LSP + Nix
packages: ./*.cabal
jobs: $ncpus
optimization: 2
executable-stripping: True
documentation: True
haddock-html-location: https://hackage.haskell.org/packages/archive/$pkg/$version/doc/html
haddock-hyperlink-source: true