Skip to content

Instantly share code, notes, and snippets.

View silky's full-sized avatar

Noon van der Silk silky

View GitHub Profile
@silky
silky / notes.md
Last active November 7, 2023 12:32
notes (this is linked live on http://silky.github.io/)
@silky
silky / typing.md
Created September 22, 2022 15:24 — forked from chrisdone/typing.md
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 NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- * Typed tagless-final interpreters for
-- * Linear Lambda Calculus
-- * de Bruijn indices
-- Linear lambda-calculus: each bound variable
-- is referenced exactly once.
@silky
silky / default.nix
Created January 8, 2022 19:05 — forked from Gabriella439/default.nix
Nix build of vscode with haskell-language-server
let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz";
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq";
};
config = {
allowUnfree = true;
};
# a simple dashboard for the waveshare 2in7b screen
# to be ran inside: https://github.com/waveshare/e-Paper/tree/master/RaspberryPi%26JetsonNano/python/examples
# 1. install the latest versions of `pyowm` and `requests`
# 2. edit `OPEN_WEATHER_KEY`, `LOCATION`, and `NEWS_API_KEY`
import sys
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
@silky
silky / CalcComp.hs
Created August 25, 2021 12:24 — forked from sjoerdvisscher/CalcComp.hs
Calculating Dependently-Typed Compilers
-- https://icfp21.sigplan.org/details/icfp-2021-papers/21/Calculating-Dependently-Typed-Compilers-Functional-Pearl-
{-# LANGUAGE GADTs, DataKinds, TypeOperators, TypeFamilies, TypeApplications, KindSignatures, ScopedTypeVariables #-}
import Control.Applicative
import Data.Kind
import Data.Type.Equality
type family (a :: Bool) || (b :: Bool) :: Bool where
'False || b = b
'True || b = 'True
@silky
silky / README.md
Created June 10, 2021 07:38 — forked from vivshaw/README.md
🙈🙉🙊 Three Wise Monkeys 🙈🙉🙊
@silky
silky / SizedNBE.hs
Created April 13, 2021 11:55 — forked from ekmett/SizedNBE.hs
Sized NBE using the same schema as the typed one, but with natural number sizes on environments
{-# Language CPP #-}
{-# Language BlockArguments #-}
{-# Language GADTs #-}
{-# Language RankNTypes #-}
{-# Language ViewPatterns #-}
{-# Language TypeApplications #-}
{-# Language BangPatterns #-}
{-# Language TypeOperators #-}
{-# Language TypeFamilyDependencies #-}
{-# Language DataKinds #-}
{-# LANGUAGE DerivingStrategies, DerivingVia, TypeOperators, DataKinds,
DeriveGeneric #-}
module Rec where
import SameRepAs
import GHC.Generics ( Generic )
import qualified Data.Monoid as M
@silky
silky / notes.md
Created April 5, 2021 09:48
xmonad xinerama issue

if you don't install the xinerama headers before compiling xmonad, then the x11 package doesn't build with xinerama support

solution: install the libxinerama-dev library before building xmonad

alternatively, if you didn't do that, then i just deleted the entire ~/.stack and .stack-work folders and rebuilt it. then it worked.