Skip to content

Instantly share code, notes, and snippets.

View sordina's full-sized avatar

Lyndon Maydwell sordina

View GitHub Profile
import SwiftUI
import PlaygroundSupport
struct Foo : View {
var body: some View {
Circle()
.fill(.green)
.frame(width: 200, height: 200, alignment: .center)
}
@sordina
sordina / RandomNotes.html
Created June 17, 2015 13:15
Render random bars of notes for cello practice
<html>
<head>
<title> random notes </title>
<script type="text/javascript" charset="utf-8" src="http://www.vexflow.com/vextab/support/vexflow-min.js"> </script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
<input style="width: 800px;" id="slider" type="range" min="1" max="60" step="1" value="3" />
* Les: Getting more comfortable with HoTT - Talk: "Bluffers Guide to HoTT"
History - Barber's Paradoxes, etc.
Russell stratifying set theory
Martin Löf in the 1970s
In TT - Say term x is of type t -> `x : t`
This is a judgement
Curry howard - Types and terms = Conjecture/proposition and Proof
Things become interesting in the presence of equality
equality is always with respect to some type
exists t -> x:t = y:t
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
-- | Small demonstration of GraphQL subscriptions over websockets as per https://github.com/apollographql
--
-- * Intended to be a convention over configuration approach.
-- * Retries subscription on failures.
-- * Provides callbacks for success and errors.
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE TypeApplications #-}
import Control.Applicative
import Control.Exception
import Control.Monad
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
-- Wrong!
@sordina
sordina / dockerrun-jsen-schema.json
Created March 12, 2016 12:37
jsen schema to validate Dockerrun.aws.json files
{
"type": "object",
"properties": {
"AWSEBDockerrunVersion": {
"type": "integer",
"minimum": 1,
"maximum": 2
},
"authentication": {
"type": "object",
{-# LANGUAGE DeriveFunctor #-}
module Main where
-- see https://jtobin.io/sorting-with-style
import Control.Arrow ((***))
import Data.Function ((&))
{-# LANGUAGE DeriveFunctor #-}
module Main where
-- see https://jtobin.io/sorting-with-style
import Control.Arrow ((***))
import Data.Function ((&))
{-# LANGUAGE BlockArguments #-}
module Main where
import System.Environment
import Control.Monad
import Control.Concurrent
import Control.Exception.Base
{- Inspiration: