Skip to content

Instantly share code, notes, and snippets.

View sleexyz's full-sized avatar

Sean Lee sleexyz

View GitHub Profile
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ vec4 (v, v, v, 1)
& (+(bbF (texture2D backBuffer) uvN * copy osc7))
bbF x = x
& lmap (view norm)
& lmap (*0.99)
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ (bbF (texture2D channel2) uvN)
bbF x = x
& lmap (view norm)
{-# LANGUAGE GADTs #-}
module Jam_2016_10_29 where
import Util
output = toProgram $ vec4 (v, v, v, 1)
& over (webcamF (texture2D channel2) uvN)
& mix 0.1 (bbF (texture2D backBuffer) uvN)
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
module Jam_2016_10_10 where
import Util
output = toProgram (remix rgba uvN)
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module Jam_2016_10_05 where
-- tempo sync
import Hylogen.WithHylide
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module Jam_2016_10_05 where
-- tempo sync
import Hylogen.WithHylide
@sleexyz
sleexyz / default.nix
Created September 8, 2016 20:42
ngrok fhsuserenv
with import <nixpkgs> {}:
let fhs = pkgs.buildFHSUserEnv {
name = "ngrok-env";
targetPkgs = pkgs: with pkgs;
[ glibc
];
};
in pkgs.stdenv.mkDerivation {
name = "ngrok";
buildInputs = [
{-# LANGUAGE RecordWildCards #-}
data Foo = Bar { a :: Int, b :: Int, c :: Int, d :: Int }
| Baz { x :: Int, y :: Int, z :: Int, w :: Int }
deriving (Show)
bar = Bar {a=1, b=2, c=3, d=4}
baz = Baz {x=10, y=20, z=30, w=40}
@sleexyz
sleexyz / findwithdefault.hs
Last active August 30, 2016 17:01
hylogen 1.4
import Hylogen.Expr
import Hylogen.WithHylide
findWithDefault :: ToGLSLType a =>
(Expr a -> Booly) -> Expr a -> [Expr a] -> Expr a
findWithDefault predicate = foldr (\x acc -> sel (predicate x) x acc)
findWithDefault' :: (ToGLSLType a, ToGLSLType b) =>
(Expr a -> Booly) -> Expr b -> [(Expr a, Expr b)] -> Expr b
http://comonad.com/reader/2008/representing-adjunctions/
Let Hask be Set?
SET:
Objects are sets
Morphisms are total functions between sets
(wait, Hom-Sets are exponentials?????)
HASK: