Skip to content

Instantly share code, notes, and snippets.

View matfournier's full-sized avatar

matfournier matfournier

View GitHub Profile
@matfournier
matfournier / canada.json
Last active August 2, 2016 07:33
various maps of NA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matfournier
matfournier / fetch.js
Created April 14, 2017 05:34
fetch.js using flutures
const fetch = require('node-fetch')
const Future = require('fluture')
const fs = require('fs')
const BASEURL = 'https://api.github.com/licenses'
const headers = {
headers: {
'Accept': 'application/vnd.github.drax-preview+json'
}
''' print out binary place value patterns '''
''' glitchy infinite scroll version '''
''' hit any key to exit '''
''' see https://github.com/mouse-reeve/placevalue_ascii '''
import math
import argparse
import time
import sys
import os
@matfournier
matfournier / spacemacs.txt
Created September 6, 2017 04:08
spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;;; softerav1-theme.el --- Emacs theme with a light background.
;; Copyright (C) 2014 , mf
;; Author: mf
;;
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;; Created with emacs-theme-generator, https://github.com/mswift42/theme-creator.
///// this is from https://gist.github.com/jdegoes/1b43f43e2d1e845201de853815ab3cb9
///// App2 ported to cats
//////
// build.sbt
// name := "finaltagless"
// version := "0.1"
// scalaVersion := "2.12.6"
@matfournier
matfournier / desugar.hs
Created August 28, 2018 05:03
desugaring help
main = do
m <- newEmptyMVar
forkIO $ do
putMVar m 'x' -- child thread puts x into the mvar
putMVar m 'y'
r <- takeMVar m -- main thread takes the value out of the mvar
print r
r <- takeMVar m
print r
@matfournier
matfournier / desugar.hs
Created August 28, 2018 05:03
desugaring help
main = do
m <- newEmptyMVar
forkIO $ do
putMVar m 'x' -- child thread puts x into the mvar
putMVar m 'y'
r <- takeMVar m -- main thread takes the value out of the mvar
print r
r <- takeMVar m
print r
@matfournier
matfournier / problem.hs
Last active October 30, 2018 05:17
Playing with haskell to solve a scala problem
-- so I have a problem where I had some ADT. I need to produce some FinalResult at a
-- much later time where the ADT is some input on the way to getting this final result
-- Each member of the ADT needs some different piece of missing information required to produce the final result
-- at some point we end up with this missing information
-- to get the final result, pattern match on the ADT and provide the correct bit of missing info
-- leads to a lot of pattern matching in Scala.
-- Typeclass looks nicer but feels just like moving the pattern match around
-- and looks 100x uglier in scala due to cruft/implicits
name: parmf
version: 0.1.0.0
github: "githubuser/parallel"
license: BSD3
author: "Author name here"
maintainer: "example@example.com"
copyright: "2018 Author name here"
extra-source-files:
- README.md