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 / 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 #-}
@mrkgnao
mrkgnao / keymap.xkb
Created August 17, 2017 03:04
Under-construction XKB keymap: shift-reversed number row, modifiers galore, etc
xkb_keymap {
xkb_keycodes "evdev+aliases(qwerty)" {
minimum = 8;
maximum = 255;
<ESC> = 9;
<AE01> = 10;
<AE02> = 11;
<AE03> = 12;
<AE04> = 13;
<AE05> = 14;
{
allowBroken = true;
allowUnfree = true;
permittedInsecurePackages = [
"webkitgtk-2.4.11"
];
}
@mrkgnao
mrkgnao / EvalStrategy.md
Last active January 2, 2018 15:25
What evaluation strategy to use for a Haskell-like language? (and other questions)

I've been building an implementation of the "Sound and Complete" type system, as those of you who follow me on Twitter might know (hi!), and I'm fairly close to finishing the system of the paper.

I intend to extend it with support for the two things mentioned in the ending "Extensions" section:

  • constructors that take arguments

  • recursive types (like [ ])

and use it as a Core language for a new Haskell-like language. But I'm implementing an evaluator at present, as being able to "run" small programs is pretty motivating.

@mrkgnao
mrkgnao / TopSites.hs
Created February 19, 2018 16:19
What hosts do you visit most often in Firefox?
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import Protolude hiding ((:*:), optional)
import Database.Selda