Skip to content

Instantly share code, notes, and snippets.

@nadavrot
nadavrot / Matrix.md
Last active June 8, 2026 09:10
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).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@agocorona
agocorona / Transient.cont.hs
Last active April 26, 2023 08:00
Optimized, simplified continuation monad that implement all the Transient effects (except Web, logging and distributed computing) with mock up implementation of some of them (https://github.com/transient-haskell/transient) Parallelism, concurrency, reactive, streaming, non-determinism, backtracking exceptions, state, early termination
{-# LANGUAGE MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables, FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
module TransientCont where
-- some imports
import Control.Applicative
import Control.Monad.IO.Class
import Control.Monad.Trans
layout post
title A comonad of graph decompositions
date 2016-04-02 13:02:54 -0400
comments true
author Rúnar
categories scala comonads
commentIssueId 22
@danidiaz
danidiaz / _FP reading lists.md
Last active January 15, 2026 20:31
assorted reading lists

A series of reading lists mostly related to functional programming.

@LukaHorvat
LukaHorvat / SliderPuzzle.hs
Created October 5, 2015 23:15
SliderPuzzle.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module SliderPuzzle where
import Prelude hiding (Either(..))
import Data.Vector (Vector, (//), (!?))
import qualified Data.Vector as Vec
import Control.Arrow (second, (***))
import Control.Monad.State.Strict
import Data.Set (Set)
import qualified Data.Set as Set
@paf31
paf31 / W.lhs
Last active November 3, 2022 13:26
Algorithm W
## Principal type-schemes for functional programs
**Luis Damas and Robin Milner, POPL '82**
> module W where
> import Data.List
> import Data.Maybe
> import Data.Function
@ekmett
ekmett / Success.hs
Created May 1, 2015 22:50
Replacing Failure by a Heap of Successes
{-# LANGUAGE DeriveFunctor, TypeFamilies #-}
module Success
( Parser(..)
, parse
) where
import Control.Applicative
import Control.Monad
import Data.Bifunctor
import Data.Profunctor
@chrisdone
chrisdone / typing.md
Last active May 7, 2026 09:33
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

{-#LANGUAGE GADTs, KindSignatures, FlexibleInstances, FunctionalDependencies, NoMonomorphismRestriction #-}
-- DOMAIN SPECIFIC LANGUAGES IN HASKELL
-- Fredrik Dyrkell
-- @lexicallyscoped | lexicallyscoped.com