Skip to content

Instantly share code, notes, and snippets.

View sleexyz's full-sized avatar

Sean Lee sleexyz

View GitHub Profile
@sleexyz
sleexyz / origami.md
Created August 12, 2018 21:10
origami.md

-- Origami: categorical syntax for live coding

-- Origami is an idea of structuring programming using composition operators

-- Homogenous folding induces endomorphisms (elements of a monoid as a single object category) -- Heterogenous folds induces morphisms (elements of category) -- categorical programming:

-- star a declaration with and equals sign -- entirely point free

// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Unlit/CurvedRotation"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
loadAPI(6);
host.setShouldFailOnDeprecatedUse(true);
host.defineController("Strange Industries", "MIDI Channel Wrapper", "0.1", "2ffb9781-f13f-4f6f-b988-76fca0b308e9", "sleexyz");
host.defineMidiPorts(1, 1);
if (host.platformIsWindows()) {
}
else if (host.platformIsMac()) {
}
else if (host.platformIsLinux()) {
alt (do (note 127 126 124 127) (shift 1 2 3)) (do (note 125) (fast 2))
fast 2
shift 0.5 0 0 0
alt i
stack
i
do
note 120 60 15 127
slow 4
alt i m
note 60 127 72 127
shift 0
fast 1
slow 4
stack
i
do
note 127
slow 1
alt m
#!/bin/sh
pfctl -d
pfctl -F all
pfctl -f /etc/pf.conf -e
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
module Jam_sunnyvale_11_28 where
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE RebindableSyntax #-}
module Live where
import Control.Concurrent
import Data.Word (Word8)
import Data.Function ((&))
import Prelude
import Data.String
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE RebindableSyntax #-}
module Live where
import Control.Concurrent
import Data.Word (Word8)
import Data.Function ((&))
import Prelude
import Data.String