Skip to content

Instantly share code, notes, and snippets.

View MatrixMike's full-sized avatar
💭
Probably working on a FOSS project

Mike Hewitt MatrixMike

💭
Probably working on a FOSS project
View GitHub Profile
@MatrixMike
MatrixMike / match.c
Created January 26, 2023 07:04 — forked from ianmackinnon/match.c
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
* 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
@MatrixMike
MatrixMike / tabsort.c
Created February 21, 2020 01:48 — forked from codebrainz/tabsort.c
Automatically Sort Geany's Document Tabs
#include <geanyplugin.h>
GeanyData *geany_data;
GeanyPlugin *geany_plugin;
GeanyFunctions *geany_functions;
PLUGIN_VERSION_CHECK(211);
PLUGIN_SET_INFO("Tab Sort",
"Automatically keeps document tabs sorted",
@MatrixMike
MatrixMike / Pascal.hs
Last active December 16, 2017 00:51 — forked from zjhmale/Pascal.hs
Pascal's triangle in Haskell
import Control.Applicative ((<$>))
center :: String -> Int -> String
center s n = spaces ++ s ++ spaces
where spaces = replicate ((n - length s) `div` 2) ' '
-- http://www.haskell.org/haskellwiki/Blow_your_mind, Ctrl-F "pascal"
pascal :: [[Int]]
pascal = iterate (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1]