Skip to content

Instantly share code, notes, and snippets.

View mikesol's full-sized avatar
🎯
Focusing

Mike Solomon mikesol

🎯
Focusing
View GitHub Profile
@mikesol
mikesol / spike.ts
Last active February 17, 2026 06:40
Spike: end-to-end phantom kind propagation (validates #233)
/**
* Spike: end-to-end phantom kind propagation with branded Interpreter.
* Validates the approach described in #233 on a small scale.
*
* Run: npx tsc --noEmit (uses tsconfig.json)
*/
// ============================================================
// Typed node interfaces
// ============================================================
@mikesol
mikesol / async-spike.ts
Last active February 16, 2026 10:55
Spike: typed, stack-safe, single-concept foldAST for mvfm (issue #189)
// =============================================================
// ASYNC SPIKE: typed async generators + trampoline +
// WeakMap memoization + taint tracking
// =============================================================
// --- Foundation types ----------------------------------------
interface Expr<T> {
readonly kind: string;
readonly __T?: T;
@mikesol
mikesol / jam.txt
Created December 7, 2021 15:44
07-12-2021
<
[psr:3 bd [notes:2,hh*2] [notes:3,chin*4]]
[bd bd [notes:4,hh*2] [notes:5,chin*4]]
[psr:3 bd [notes:6,hh*2] [notes:7,chin*4]]
[bd bd [notes:8,hh*2] [notes:9,chin*4]]
[[psr:3 psr:3] bd [notes:2,hh*2] [notes:3,chin*4]]
[bd bd [notes:8,hh*2] [notes:9,chin*4]]
[psr:3 bd [notes:9,hh*2] [notes:8,chin*4]]
[bd bd [notes:10,hh*2] [notes:6,chin*4]]
[psr:3 bd [notes:9,hh*2] [notes:7,chin*4]]
@mikesol
mikesol / Main.purs
Last active October 25, 2021 13:30
m i n i m a l
module Main where
import Prelude
import Effect (Effect)
import WAGS.Lib.Learn (play)
import WAGS.Lib.Tidal (AFuture, tdl)
import Prelude
import Data.Array ((..))
@mikesol
mikesol / Main.purs
Last active October 25, 2021 13:25
Tablas and lighters
module Main where
import Prelude
import Effect (Effect)
import WAGS.Lib.Learn (play)
import WAGS.Lib.Tidal (AFuture, tdl)
import Data.Lens (_Just, set, traversed)
import Data.Profunctor (lcmap)
import WAGS.Math (calcSlope)
@mikesol
mikesol / Main.purs
Last active October 26, 2021 14:03
LoFi
module Main where
import Prelude
import Data.Lens (_Just, set, traversed)
import Data.Newtype (unwrap)
import Data.Profunctor (lcmap)
import Effect (Effect)
import Math ((%))
import WAGS.Create.Optionals (highpass, pan)
@mikesol
mikesol / Main.purs
Created October 13, 2021 06:50
Avoiding unsafe
module Main where
import Prelude
import Data.Maybe (Maybe, maybe)
import Data.Traversable (traverse)
import Debug (spy)
import Effect (Effect)
import Effect.Exception (throw)
import Web.DOM.Element (getAttribute, toNode)
@mikesol
mikesol / Main.purs
Last active September 25, 2021 14:54
Anamorphism
module Main where
import Prelude
import Data.NonEmpty ((:|))
import Effect (Effect)
import Data.Function (on)
import WAGS.Lib.Learn (play)
import WAGS.Lib.Learn.Note (accelerando, noteFromPitch_, repeat, seq)
import WAGS.Lib.Learn.Pitch (at, fuse, c4, d4, e4, fSharp4, gSharp4, bFlat4, c5, wholeTone)
@mikesol
mikesol / Main.purs
Last active September 25, 2021 14:12
F of Time
module Main where
import Prelude
import Data.NonEmpty ((:|))
import Effect (Effect)
import WAGS.Lib.Learn (play)
import WAGS.Lib.Learn.Note (accelerando, noteFromPitch_, repeat, seq)
import WAGS.Lib.Learn.Pitch (fot2, c4, d4, e4, fSharp4, gSharp4, bFlat4, c5)
import Wags.Learn.Oscillator (lfo)
@mikesol
mikesol / Main.purs
Last active October 2, 2021 07:30
Tidal wags
module Main where
import Prelude hiding (between)
import Control.Alt ((<|>))
import Control.Comonad (extract)
import Control.Comonad.Cofree ((:<))
import Control.Comonad.Cofree.Class (unwrapCofree)
import Data.Array as A
import Data.Either (Either(..), hush)