Skip to content

Instantly share code, notes, and snippets.

View patrl's full-sized avatar

Patrick Elliott patrl

View GitHub Profile
with import <nixpkgs> {};
let src = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
# commit from: 2018-03-27
rev = "136eacc0ceefa8fb44677799e5639e083606ee5d";
sha256 = "04bz093x3zjkzp7ba8mh876a1a34kp3jrys87m79gbln5qvcd2ir";
# date = 2018-09-06T17:09:51+02:00;
};
myrust = (latest.rustChannels.stable.rust.override { extensions = [ "rust-src" ]; });
--- a/config.def.h 2018-03-20 21:29:59.000000000 +0100
+++ b/config.def.h 2018-09-14 22:58:13.142135461 +0200
@@ -5,8 +5,8 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
-static int borderpx = 2;
+static char *font = "Input Mono:pixelsize=11:antialias=true:autohint=true";
+static int borderpx = 4;
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
Module ForwardsBackwards where
import Data.Function ((&))
class A a b where
apply :: a -> b
instance A (a -> b) (a -> b) where
apply = ($)
--- a/config.def.h
+++ b/config.def.h
@@ -5,8 +5,8 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
-static int borderpx = 2;
+static char *font = "Input Mono:pixelsize=11:antialias=true:autohint=true";
+static int borderpx = 4;
\chapter{\emph{Irgendein} quantifier and local implicature} % <=== TITLE HERE
\authorAndAffil{Anton Benz and Nicole Gotzner}{Leibniz-Zentrum Allgemeine Sprachwissenschaft (ZAS)} % AUTHOR
% \addsnippetauthor
%\snippetauthor{AUTHOR4}{AUTHOR4AFFILIATION}
%\addsnippetauthor
%\snippetauthor{AUTHOR5}{AUTHOR5AFFILIATION}
%
% \usepackage{mathptmx}
% \usepackage{parskip}
% \usepackage{booktabs}
@patrl
patrl / ihaskell-win.md
Last active January 9, 2020 21:53
Setting up a jupyter notebook with iHaskell on windows

The existence of WSL 2, the nix package manager, and tweag.io's jupyterWith project make it (relatively) easy to set up a working jupyter notebook with the iHaskell kernel in windows 10.

Step 1: Install WSL 2

  • If you don't already have it up and running, start by making you sure you have WSL 2 installed and activated, by following the instructions here. At the time of writing, you need to join the windows insiders program (slow ring is sufficient).
  • I use Ubuntu from the windows store with WSL 2, but the following instructions should be compatible with any distribution.

Step 2: Install the nix package manager

@patrl
patrl / myweechat.md
Created January 23, 2020 17:10 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 2.8-dev

Enable mouse

/mouse enable

@patrl
patrl / .envrc
Created January 31, 2020 01:05
Boilerplate for a nice haskell hacking experience, with nix, direnv, lorri, cabal new-*, and ghcide
eval "$(lorri direnv)"
newtype ContBool a = ContBool { (>-) :: (a -> Bool) -> Bool }
instance Functor ContBool where
fmap f m = ContBool $ \k ->
m >-
\a ->
k $ f a
instance Applicative ContBool where
pure a = ContBool $ \k -> k a
@patrl
patrl / init-haskell.sh
Last active June 6, 2020 17:02 — forked from masaeedu/init-haskell.sh
Basic nix haskell setup
#!/usr/bin/env bash
set -Eeuxo pipefail
type git >/dev/null 2>&1 || { echo >&2 "I require git but it's not installed. Aborting."; exit 1; }
type nix >/dev/null 2>&1 || { echo >&2 "I require nix but it's not installed. Aborting."; exit 1; }
type niv >/dev/null 2>&1 || { echo >&2 "I require niv but it's not installed. Aborting."; exit 1; }
type direnv >/dev/null 2>&1 || { echo >&2 "I require direnv but it's not installed. Aborting."; exit 1; }
type lorri >/dev/null 2>&1 || { echo >&2 "I require lorri but it's not installed. Aborting."; exit 1; }
git init # initialize git repository