Skip to content

Instantly share code, notes, and snippets.

Christian Takle christiantakle

  • Moixa
  • London
Block or report user

Report or block christiantakle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Icelandjack
Icelandjack / Yoneda_II.markdown
Last active Nov 5, 2019
Yoneda Intuition from Humble Beginnings
View Yoneda_II.markdown

(previous Yoneda blog) (reddit) (twitter)

Yoneda Intuition from Humble Beginnings

Let's explore the Yoneda lemma. You don't need to be an advanced Haskeller to understand this. In fact I claim you will understand the first section fine if you're comfortable with map/fmap and id.

I am not out to motivate it, but we will explore Yoneda at the level of terms and at the level of types.

View comonads.js
const Day = ({ get, left, right }) => {
const map = f => Day ({
get: f (extract()),
left, right
})
const extend = f =>
Day ({
get: (left, right) => f (Day ({ get, left, right })),
@nadavrot
nadavrot / Matrix.md
Last active Nov 6, 2019
Efficient matrix multiplication
View Matrix.md

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@3noch
3noch / .ghci
Last active Oct 29, 2018
Reflex-DOM Auto Reload Development with ghcid
View .ghci
:set prompt "> "
:set -isrc
:load Main
View stack.yaml
# https://mail.haskell.org/pipermail/ghc-devs/2017-July/014364.html
# https://downloads.haskell.org/~ghc/8.2.1-rc3/
# http://taylor.fausak.me/2017/05/17/testing-ghc-release-candidates-with-stack/
compiler: ghc-8.2.0.20170704
compiler-check: match-exact
resolver: ghc-8.2.0.20170704
setup-info:
ghc:
@daig
daig / App.hs
Last active Jun 27, 2017
Elm/Flux style Component Architecture for Reflex-Dom
View App.hs
{-# LANGUAGE OverloadedStrings #-}
module App where
import Component
import Notes
import Reflex.Dom
import Data.Semigroup ((<>))
app :: MonadWidget t m => m ()
app = do
add <- (BlankNote <$) <$> button "New Note"
@mrkgnao
mrkgnao / Eftee.hs
Last active Sep 23, 2019
An "optimized" version of ElvishJerricco's free arrow type
View Eftee.hs
{-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
@projectivemotion
projectivemotion / Advanced Bash Usage CheatSheet.md
Last active Aug 25, 2018
Cheatsheet of advanced bash commands presented in Introduction to Advanced Bash Usage - James Pannacciulli. Youtube: https://youtu.be/uqHjc7hlqd0
View Advanced Bash Usage CheatSheet.md
@Icelandjack
Icelandjack / Constraints.org
Last active Sep 27, 2019
Type Classes and Constraints
View Constraints.org

Reddit discussion.

Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.

Disclaimer 2: I should tidy this up but probably won’t.

Disclaimer 3: Yeah called it, better to be realistic.

Type classes are a language of their own, this is an attempt to document features and give a name to them.

@phadej
phadej / overlap.hs
Created Jul 1, 2016
OverlappingInstance workarounds
View overlap.hs
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeOperators, UndecidableInstances #-}
#if __GLASGOW_HASKELL__ < 708
#error "requires GHC 7.10 or newer"
#endif
module Main (main) where
You can’t perform that action at this time.