Skip to content

Instantly share code, notes, and snippets.

View NickSeagull's full-sized avatar
Building @neohaskell

Nick Seagull NickSeagull

Building @neohaskell
View GitHub Profile

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

compiler: ghc-8.2.0.20170404
compiler-check: match-exact
resolver: lts-8.8
setup-info:
ghc:
linux64:
8.2.0.20170404:
url: https://downloads.haskell.org/~ghc/8.2.1-rc1/ghc-8.2.0.20170404-x86_64-deb8-linux.tar.xz
content-length: 138846620
sha1: 3fd303b5753b095ce020131405dcf43199e6b447
@willkurt
willkurt / reverse in 3 langauges
Created October 5, 2016 23:43
Why referential transparency matters...
//this is valid Ruby, Python and JavaScript
myList = [1,2,3]
myList.reverse()
newList = myList.reverse()
//Q. What is the value of newList in each of those three languages??
//answers below!!!
.
.
@aaronlevin
aaronlevin / events.hs
Last active December 3, 2023 13:03
LambdaWorld 2016 & Typelevel Summit 2017 (Copenhagen): Type-Level DSLs // Typeclass induction
-- Our goal is to create a type describing a list of events. This is our
-- type-level DSL.
-- We will then use typeclass resolution to "interpret" this type-level DSL
-- into two things:
-- 1. A comma-separated list of events
-- 2. A method that, when given an event name and a payload, will try to parse
-- that event type with the payload. A form of dynamic dispatching
--
-- To model a list of types we will use tuples. You can imagine the list of
-- types "Int, String, Char" to look like:
#I __SOURCE_DIRECTORY__
#r @"bin/Debug/EvalWrapper.dll"
open Microsoft.MSR.CNTK.Extensibility.Managed
open System.Drawing
open System.Collections.Generic
open System
let createModel modelPath =
let model = new IEvaluateModelManagedF()
@Centril
Centril / test-indexed-state-monad.hs
Last active May 23, 2022 16:45
Testing indexed state monad transformers
--------------------------------------------------------------------------------
-- Copyright : (C) 2008 Edward Kmett, 2016 Mazdak Farrokhzad
-- License : BSD-style
--------------------------------------------------------------------------------
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances,
UndecidableInstances, MultiParamTypeClasses #-}
import Control.Applicative(Alternative)
import Control.Monad.Identity
import Control.Monad.State
@josteink
josteink / on_stateful_code.txt
Last active October 21, 2020 05:37
On why stateful code is bad
On why stateful code is bad
===========================
STUDENT: Sir, can I ask a question?
TEACHER: Yes!
STUDENT: How do you put an elephant inside a fridge?
TEACHER: I don't know.
STUDENT: It's easy, you just open the fridge and put it in. I have another question!
TEACHER: Ok, ask.
STUDENT: How to put a donkey inside the fridge?
@0XDE57
0XDE57 / config.md
Last active March 7, 2025 05:54
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@PurpleBooth
PurpleBooth / README-Template.md
Last active April 16, 2025 19:18
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@bnagy
bnagy / gpgmutt.md
Last active August 10, 2024 22:44
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service