Skip to content

Instantly share code, notes, and snippets.

Christian Takle christiantakle

  • Moixa
  • London
View GitHub Profile
View nixos-raspi4.md

Download the image builder

  • git clone git@github.com:Robertof/nixos-docker-sd-image-builder.git
  • 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
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
nadavrot / Matrix.md
Last active Jul 11, 2020
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 Jun 3, 2020
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.

You can’t perform that action at this time.