Skip to content

Instantly share code, notes, and snippets.

View alpacaaa's full-sized avatar
🎱
Testing in production

Marco Sampellegrini alpacaaa

🎱
Testing in production
View GitHub Profile
@i-am-tom
i-am-tom / Oops.hs
Last active March 26, 2019 12:30
Tracked (and dispatchable) exception-handling with classy variants.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
@i-am-tom
i-am-tom / Sigma.hs
Last active December 18, 2018 14:18
Sigmaltons
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilyDependencies #-}
module Sigma where
import Data.Kind (Type)
type family Sing (i :: k) = (o :: Type) | o -> i

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x

The Easy-Peasy-Lemon-Squeezy, Statically-Typed, Purely Functional Programming Workshop for All!

John A. De Goes — @jdegoes


Agenda

  • Functions
  • Types, Kinds, & More Functions
  • FP Toolbox
@jonhoo
jonhoo / raft.go
Created March 16, 2016 22:33
Raft pseudocode
// This file gives pseudocode for the complete operation of a Raft peer,
// including the fast backtracking optimization. The implementation here is
// currently 0-indexed, as this simplifies the implementation in many cases.
// This implementation also does not discuss locks at all, which will be vital
// in any real implementation.
//
// ============================================================================
// The following data needs to be persisted
// ============================================================================
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@dominictarr
dominictarr / papers.md
Last active November 29, 2024 02:52
Distributed Systems Papers

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf

@staltz
staltz / introrx.md
Last active December 20, 2024 15:49
The introduction to Reactive Programming you've been missing
@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active December 16, 2024 20:30
A badass list of frontend development resources I collected over time.