Skip to content

Instantly share code, notes, and snippets.

Jared Tobin jtobin

Block or report user

Report or block jtobin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jtobin on github.
  • I am jtobin (https://keybase.io/jtobin) on keybase.
  • I have a public key whose fingerprint is 3422 6DCF 974D 5AF1 2114 488A 710A 5FDA E32D 77E7

To claim this, I am signing this object:

@jtobin
jtobin / gist:dd2efbb73c7c077657cf
Last active Aug 29, 2015
super-simple language and type system
View gist:dd2efbb73c7c077657cf
{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# LANGUAGE PatternGuards #-}
import Control.Applicative
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Monoid
import Data.Traversable
import System.Exit
View gist:e3e945f3c761cbc6ad43
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE RankNTypes #-}
module PHOAS where
data Expr a =
Lit Int
| Var a
View gist:3fc26d852af9e82e378e
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module HOAS where
data Expr =
Lit Int
| Add Expr Expr
| Let Expr (Expr -> Expr)
instance Num Expr where
View gist:89d741df8aaaa33eb567
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
module Minimal where
import Control.Applicative
import Data.Graph
View gist:b8ff5ef03855603bcb73
module Main where
import Control.Monad
import Control.Monad.Primitive
import System.Environment
import System.Random.MWC
data Child = Boy | Girl deriving (Eq, Show)
instance Variate Child where
View gist:6303260
{-# LANGUAGE BangPatterns #-}
import Control.DeepSeq
import qualified Data.Vector.Unboxed as U
import System.Random.MWC
import Control.Monad
import Criterion.Main
import Criterion.Config
newtype AffineTransform = AffineTransform {
@jtobin
jtobin / gist:5651280
Last active Dec 17, 2015
Portfolio grabbin'
View gist:5651280
{-# OPTIONS_GHC -Wall #-}
import Data.Function
import Data.List
main :: IO ()
main = print $ minimumBy (compare `on` sumDiffs) portfolios
-- Data ------------------------------------------------------------------------
@jtobin
jtobin / gist:4130700
Created Nov 22, 2012
praxis list union/intersection main
View gist:4130700
=== prop_i0ResultElementsAreInBoth from ui.hs:64 ===
+++ OK, passed 1000 tests.
=== prop_i1ResultElementsAreInBoth from ui.hs:68 ===
+++ OK, passed 1000 tests.
=== prop_i2ResultElementsAreInBoth from ui.hs:72 ===
+++ OK, passed 1000 tests.
=== prop_u0ResultElementsInAtLeastOne from ui.hs:77 ===
@jtobin
jtobin / gist:4130676
Created Nov 22, 2012
praxis list union/intersection
View gist:4130676
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
import Data.List
import Data.Hashable (Hashable)
import Data.HashMap.Strict hiding (filter)
import Control.Monad
import Test.QuickCheck
import Test.QuickCheck.All
import Criterion.Main
You can’t perform that action at this time.