Skip to content

Instantly share code, notes, and snippets.

Christian Takle christiantakle

  • Moixa
  • London
View GitHub Profile

Download the image builder

  • git clone
  • cd nixos-docker-sd-image-builder

Configure for Raspi4

  • modify /config/rpi4/default.nix to increase size of boot partition
    • this step is optional but I ran out of space in /boot pretty quickly with the default setting since I'm still learning and rebuilding a lot. Let's leave some room for trial & error.
    • sdImage.firmwareSize = 1024;
  • modify /config/sd-image.nix
    • ./rpi3 becomes ./rpi4
Icelandjack / Yoneda_II.markdown
Last active May 12, 2020
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 /
Last active Jul 11, 2020
Efficient matrix multiplication

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).


Matrix multiplication is a mathematical operation that defines the product of

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
compiler: ghc-
compiler-check: match-exact
resolver: ghc-
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 / 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 InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
projectivemotion / Advanced Bash Usage
Last active Aug 25, 2018
Cheatsheet of advanced bash commands presented in Introduction to Advanced Bash Usage - James Pannacciulli. Youtube:
View Advanced Bash Usage
Icelandjack /
Last active Jun 3, 2020
Type Classes and Constraints

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.

You can’t perform that action at this time.