This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reykjavík - Reekswich | |
Þingvellir - Thingweald | |
Akureyri - Ackerearth | |
Mývatn - Midgewater | |
Skaftafell - Shaftfell | |
Ísafjörður - Icefirth | |
Vík í Mýrdal - Wick in Miredale | |
Jökulsárlón - Icemere Loch | |
Keflavík - Caeflwick | |
Heimaey - Hamey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kvæðasafn - Snorri Hjartarson - 0.752743 | |
The Feynman Lectures on Physics Vol 1 - Richard Feynman - 0.693827 | |
How We Know - Harry Binswanger - 0.66043 | |
The Knowing Animal: A Philosophical Inquiry Into Knowledge and Truth - Raymond Tallis - 0.646221 | |
Dancing with the Muses: A Historical Approach to Basic Concepts of Music - M. Zachary Johnson - 0.646221 | |
A Mathematical Challenge: The 3x+1 Problem - Jeffrey C. Lagarias - 0.646221 | |
The Hand: A Philosophical Inquiry Into Human Being - Raymond Tallis - 0.646221 | |
Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming - Simon Marlow - 0.634218 | |
Volition As Cognitive Self Regulation - Harry Binswanger - 0.62231 | |
Harry Potter and the Sorcerer's Stone (Harry Potter #1) - J.K. Rowling - 0.596954 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object SafeIO { | |
trait Brace[M[_]] extends Monad[M] { | |
def brace[A,B,C](acquire: M[A])(release: A => M[B], go: A => M[C]): M[C] | |
def snag[A](m: M[A], f: Throwable => M[A]): M[A] | |
def lift[A](t: Task[A]): M[A] | |
} | |
object Brace { | |
def apply[M[_]:Brace]: Brace[M] = implicitly[Brace[M]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Infer where | |
import Control.Monad.State | |
import Data.IntMap (IntMap) | |
import qualified Data.IntMap as IntMap | |
data Var = V {-# UNPACK #-} !Int (Maybe String) | |
data HM = HM | |
{ nextVar :: {-# UNPACK #-} !Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait λ { | |
type α | |
} | |
trait Functor extends λ { | |
type α <: λ | |
def map[A,B](x: α { type α = A })(f: A => B): α { type α = B } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent._ | |
/** | |
* A thread pool for superstitious parent threads who | |
* know they shouldn't let their child threads back in the pool after | |
* eating, without waiting at least `crampFactor` milliseconds. | |
*/ | |
object Superstitious { | |
def pool(crampFactor: Long) = new ThreadPoolExecutor( | |
0, Int.MaxValue, 60L, TimeUnit.SECONDS, new SynchronousQueue[Runnable]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tenor | |
Tonic | |
Bouncy | |
Ermis | |
Yak | |
Samtal | |
Lithe | |
Plastic | |
Bendy | |
BendyBus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Free applicative functors | |
*/ | |
sealed trait FreeA[F[_],A] { | |
/** | |
* The canonical monoidal natural transformation that interprets | |
* this free program by giving it the semantics of the applicative functor `G`. | |
*/ | |
def foldMap[G[_]:Applicative](f: F ~> G): G[A] = this match { | |
case Pure(x) => Applicative[G].pure(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Group a where | |
gempty :: a | |
gappend :: a -> a -> a | |
ginv :: a -> a | |
data FreeGroup a = FreeGroup { outFreeGroup :: forall m. Group m => (a -> m) -> m } | |
nil :: FreeGroup a | |
nil = FreeGroup (\_ -> gempty) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.reflect.macros.Context | |
import scala.language.experimental.macros | |
import scala.annotation.StaticAnnotation | |
object helloMacro { | |
def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = { | |
import c.universe._ | |
import Flag._ | |
val args = c.prefix.tree match { | |
case q"new $name($m)" => c.eval(c.Expr[Map[String, String]](c.resetAllAttrs(m))) |