Skip to content

Instantly share code, notes, and snippets.

View mitchellwrosen's full-sized avatar

Mitchell Dalvi Rosen mitchellwrosen

View GitHub Profile
@mitchellwrosen
mitchellwrosen / send-more-money.hs
Last active August 29, 2015 14:20
send + more = money
{-# LANGUAGE TupleSections #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Monad.Trans.State
import Data.List ((\\), transpose)
import Data.Map (Map)
import qualified Data.Map as M
@mitchellwrosen
mitchellwrosen / explore.hs
Last active August 29, 2015 14:20
Haskell source explorer aide
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Monad
import Control.Monad.Writer
import Data.List
module SendMoreMoney where
import Control.Monad
import Control.Monad.Trans.State
digits :: [Int]
digits = [0..9]
select :: StateT [a] [] a
select = StateT go
@mitchellwrosen
mitchellwrosen / brainfuck.hs
Last active August 29, 2015 14:21
Brainfuck interpreter
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Brainfuck where
import Control.Lens
import Control.Monad.Except

Keybase proof

I hereby claim:

  • I am mitchellwrosen on github.
  • I am mitchellsalad (https://keybase.io/mitchellsalad) on keybase.
  • I have a public key whose fingerprint is 3690 8209 3820 4AE4 DE6C 458C ADEE B819 CFC3 B7BE

To claim this, I am signing this object:

@mitchellwrosen
mitchellwrosen / invoker.hs
Last active September 22, 2017 22:11
A simple Invoker practice terminal app using reactive-banana
#!/usr/bin/env stack
{- stack --resolver lts-9.5 runghc
--package clock
--package fgl
--package random
--package reactive-banana
--package vty
-}
{-# language LambdaCase #-}

Remote terminal sharing

Some quick notes to document this somewhat tedious process.

To broadcast my terminal to the world:

1. TLS cert

If necessary, generate a self-signed TLS cert for gotty.

@mitchellwrosen
mitchellwrosen / a-tour-of-go.hs
Created December 10, 2017 00:20
a-tour-of-go.hs
{-# language DeriveAnyClass #-}
{-# language FlexibleContexts #-}
{-# language FlexibleInstances #-}
{-# language GADTs #-}
{-# language LambdaCase #-}
{-# language NamedFieldPuns #-}
{-# language RankNTypes #-}
{-# language ScopedTypeVariables #-}
{-# language TupleSections #-}
{-# language TypeApplications #-}
@mitchellwrosen
mitchellwrosen / clowns-jokers.hs
Created March 14, 2018 00:58
Clowns to the Left of me, Jokers to the Right
-- http://strictlypositive.org/CJ.pdf
{-# language DeriveFunctor #-}
{-# language FlexibleInstances #-}
{-# language FunctionalDependencies #-}
{-# language LambdaCase #-}
{-# language MultiParamTypeClasses #-}
{-# language PatternSynonyms #-}
{-# language ScopedTypeVariables #-}
{-# language TypeOperators #-}
@mitchellwrosen
mitchellwrosen / .travis.yml
Created May 8, 2018 15:40
Hasktll .travis.yml
sudo: false
language: generic
cache:
directories:
- $HOME/.stack
addons:
apt:
packages: