Skip to content

Instantly share code, notes, and snippets.

@mrkgnao
mrkgnao / words1k.md
Created October 15, 2015 12:26
The top 1000 words in English

the of to and a in is it you that he was for on are with as I his they be at one have this from or had by hot word but what some we can out other were all there when up use your how said an each she which do their time if will way about many then them write would like so these her long make thing see him two has look more day could go come did number sound no most people my over know water than call first who may down side been now find any new work part take get place made live where after back little only round man year came show every good me give our under name very through just form sentence great think say help low line differ turn cause much mean before move right boy old too same tell does set three want air well also play small end put home read hand port large spell add even land here must big high such follow act why ask men change went light kind off need house picture try us again animal point mother world near build self earth father head stand own page should country found answer school grow st

with import <nixpkgs> {};
stdenv.mkDerivation {
name = "polybar-git";
src = ./polybar;
buildInputs =
[
boost
pkgconfig
@mrkgnao
mrkgnao / config.ini
Created January 11, 2017 18:20
My old polybar config
;=====================================================
;
; To learn more about how to configure Lemonbuddy
; go to https://github.com/jaagr/lemonbuddy
;
; The README contains a lot of information
;
;=====================================================
[settings]
@mrkgnao
mrkgnao / Neural.idr
Last active July 30, 2022 15:00
A quick Idris implementation of @mstksg's "dependent Haskell" neural networks
module Main
import Data.Vect
-- %hide transpose
dot : Num a => Vect n a -> Vect n a -> a
dot va vb = foldr (+) 0 $ zipWith (*) va vb
Matrix : (rows : Nat) -> (cols : Nat) -> Type -> Type
@mrkgnao
mrkgnao / IosevkaConfigGen.hs
Last active November 8, 2022 18:28
Render Iosevka ligatures to Private Use Area glyphs, for Emacs
{-# LANGUAGE RecordWildCards, Arrows #-}
import Numeric
import Data.Char
import Control.Monad
import Data.Monoid ((<>))
import Data.List (nub, sort, reverse)
data RepeatBounds = RB
@mrkgnao
mrkgnao / Liege.hs
Last active August 27, 2019 18:11
Servant handled using free monads of coproducts of functors :)
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE ConstrainedClassMethods #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE IncoherentInstances #-}
{-# LANGUAGE InstanceSigs #-}
@mrkgnao
mrkgnao / Eftee.hs
Last active September 23, 2019 15:43
An "optimized" version of ElvishJerricco's free arrow type
{-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
@mrkgnao
mrkgnao / error-log.md
Last active May 3, 2017 13:22
GHC Trac #13568

Without DataKinds:

$ cat A.hs B.hs
module A where

data T = A
module B where
@mrkgnao
mrkgnao / Tagless.hs
Created June 9, 2017 18:39
Lazy tagless optimization
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Tagless where
import Control.Arrow
import Control.Category
import Control.Monad.Reader
import Control.Monad.State
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}