Skip to content

Instantly share code, notes, and snippets.

View tmcgilchrist's full-sized avatar
👹

Tim McGilchrist tmcgilchrist

👹
View GitHub Profile
@tmcgilchrist
tmcgilchrist / Battleship.lhs
Created July 30, 2017 22:51 — forked from ChrisPenner/Battleship.lhs
Hit! You sunk my Adjunction!
Today we'll be looking into Kmett's
[adjunctions](http://hackage.haskell.org/package/adjunctions) library,
particularly the meat of the library in Data.Functor.Adjunction.
This post is a literate haskell file, which means you can load it right up in
ghci and play around with it! Like any good haskell file we need half a dozen
language pragmas and imports before we get started.
> {-# language DeriveFunctor #-}
> {-# language TypeFamilies #-}

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of the gist from this blog post.

@tmcgilchrist
tmcgilchrist / gist:1271716
Created October 8, 2011 01:24
Personal Mercurial Workflow

Mercurial Workflow

Clone -> Edit -> Commit -> Push -> Update

hg clone http://bitbucket.org/repo        => Clone a remote repo

hg clone project_dir new_changes_dir      => Clone a local repo

hg commit -m "Message"                    => Commit locally changed files.
@tmcgilchrist
tmcgilchrist / prismatic.hs
Created November 27, 2018 04:11 — forked from parsonsmatt/prismatic.hs
I figured out a nice way to pluck exceptions out of a constraint!
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
@tmcgilchrist
tmcgilchrist / gist:1271705
Created October 8, 2011 01:03
Personal Git Workflow

Git Workflow

Basic workflow I've been following, inspired by the RailsTutorial website.

Branch -> Edit -> Commit -> Merge -> Push

git init        => Create a new repository in the current directory

git add         => Add file to current changeset.
@tmcgilchrist
tmcgilchrist / git-rebase.markdown
Created February 10, 2012 02:58
Git rebase workflow

Checkout a new working branch

 git checkout -b <branchname>

Make Changes

 git add
 git commit -m "description of changes"

Sync with remote

```
OCaml compilation pipeline
┌────────────────┐
│ │
│ Source code │