Skip to content

Instantly share code, notes, and snippets.

@laser
laser / decisions.md
Last active March 31, 2016 18:29
Decisions

What Should I Do Next?

  1. Build something that allows Mateen's JIRA plugin to access protected resources w/out thinking about OAuth 2.0
  2. Build something that allows Mateen's JIRA plugin to access protected resources through an OAuth 2.0 adapter
  3. Stop thinking about Mateen's JIRA plugin
@laser
laser / dispatch.hs
Created March 31, 2016 15:26
Dynamic / Dispatch
module Dispatch where
import Data.Dynamic
import Control.Monad.Reader.Class
-- THINGS WE WANT
-- 1. we want to avoid having to duplicate the type of the members of a
-- type class in our test (like Fixture)
-- 2. we want to be able to record the arguments applied to a test function
-- 3. we want to be able to control the return value from a test function
@laser
laser / transformers.hs
Created March 23, 2016 23:05
Transformers Code Sample
module Main where
import Control.Applicative (liftA2)
import Data.Char (isAlpha)
import Data.Either
import Data.List (find)
data GameError = InvalidInput String
| IncorrectGuess deriving (Show, Eq)
@laser
laser / transformers.md
Last active July 20, 2017 15:04
Transformers: Monad Combineratorz

Monad Transformers

Note: This is a paraphrased rip-off of the excellent article A Gentle Introduction to Monad Transformers. Almost none of these ideas are my own. I simply paired down the original post to something I thought was manageable for our study group.

What Are We Gonna Cover?

  • What they are
  • Why you'd want them
  • How they work
@laser
laser / new-world-order.md
Last active February 10, 2016 18:30
Yay, Haskell.

The New World Order

Things That I Really Liked

This section is never as exciting as the gripe-section; I'll keep it brief:

  • System collaborators instantiated centrally
  • Wrapping persisted values in Stored type
  • Great take on decoupling notion of request processing and response-creation from Scotty
@laser
laser / style.hs
Created February 6, 2016 00:12
Haskell Style
module Style (
foo,
Bar(..)
) where
data Bar = Bar { x :: String
, y :: Int } deriving (Show, Eq)
foo :: Bool -> Int
foo b = if b then 1
@laser
laser / Notes.md
Last active September 20, 2020 07:43
Cousera - Python Notes

Week 4

Constants

  • Cannot change
  • Examples: 1, 9.12, True, or "Foo"

Variables

@laser
laser / notes.md
Last active January 28, 2016 20:10
CIS 194 - January 28, 2016

Jan. 28 (Week 3 Assignment due)

Agenda

  • Questions about Week 3 homework + materials
  • Review Week 3 assignment
  • Miscellaneous

Miscellaneous

@laser
laser / second.md
Last active January 14, 2016 18:29
CIS 194: Second Meeting (Week 01 Homework + Discussion of Week 02)

CIS 194: Second Meeting (12:00PM - 1:30PM PDT)

Agenda

  • 12:00PM: Sandwiches
  • Some useful tools
  • Solicit presentation for Feb 5 (type classes)
  • 12:30PM: Pain points from Week 1
  • 12:50PM: Week 1 Homework Demo (Jeegar)
@laser
laser / outline.md
Last active March 17, 2017 18:27
CIS 194 / Winter, 2016 / Outline

CIS 194: Introduction to Haskell

Agenda

  • Why do I like Haskell?
  • Why do I dislike Haskell?
  • What's CIS 194?
  • What's the Plan?
  • Walkthrough of course materials