Skip to content

Instantly share code, notes, and snippets.

@nitrix
nitrix / gist:1bd49a09c4a6698dad64
Last active August 29, 2015 14:21
Interesting problem to simulate
##programming
SrPx | As a side question, if a company has an income, and it wants to compute the most it can of a problem in 10 years, is it better to buy computers as you income comes, or wait 9 years, buy faster computers and to do much more on the last year? Hmm. Not sure why I'm asking this here, that is a math question.
@gelisam
gelisam / Main.hs
Created April 18, 2014 23:19
unification-fd example
-- in reply to http://www.reddit.com/r/haskell/comments/23dxli/why_are_examples_completely_absent_from_hackage/
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
import Control.Unification
import Control.Unification.IntVar
import Control.Monad.Identity
import Control.Monad.Trans
import Control.Monad.Trans.Error
import Data.Foldable
import Data.Traversable
{-# LANGUAGE DeriveGeneric #-}
module Bar where
-- import Data.List
import qualified Data.Sequence as S
import GHC.Generics
import Data.Foldable
import Data.Monoid
import System.IO
import qualified Data.ByteString as B
# FizzBuzz in Lambda Calculus LiveScript
#
# Based on the problem from Chapter 6 of
# Understanding Computation: From Simple Machines to Impossible Programs
# by Tom Stuart
# http://computationbook.com/
#
# Only these things are allowed:
# - Creating functions
@shangaslammi
shangaslammi / hello-ski.hs
Created August 23, 2012 16:53
Hello World using SKI combinator calculus
s x y z = x z (y z)
k x y = x
i = s k k
c = s (s (k (s (k s) k)) s) (k k)
b = s (k s) k
hello =
s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s
b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(c k))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))(s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s