Skip to content

Instantly share code, notes, and snippets.

View sleexyz's full-sized avatar

Sean Lee sleexyz

View GitHub Profile
@sleexyz
sleexyz / vis.hs
Last active November 20, 2016 01:05
visualize bytebeat
{-# LANGUAGE BangPatterns #-}
-- | Visualize bytebeat. currently doesn't print fast enough...
module Main where
import Control.Monad
import Data.Bits
import qualified Data.Char as C
import Data.List
import System.IO
import System.Environment
#!/usr/bin/env bash
# example:
#
# > ./together "foo" "bar" "baz"
#
# runs foo, bar, baz as child processes
# ctrl-c will kill all
PID="$$"
{-# 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}