This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key (kbd "s-k") 'point-to-register) | |
(global-set-key (kbd "s-j") 'jump-to-register) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
function prompt() { | |
B="$1" | |
read -p 'Delete? [y/n/s] ' result | |
case "$result" in | |
y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from ctypes import c_long, CFUNCTYPE | |
import llvmlite.binding as llvm | |
from llvmlite import ir | |
llvm.initialize() | |
llvm.initialize_native_target() | |
llvm.initialize_native_asmprinter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad (foldM) | |
import Control.Monad.State (StateT, modify, get, put, lift, evalStateT) | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
data KindExpr | |
= TCon String | |
| TVar String | |
| TAp KindExpr KindExpr | |
deriving (Show) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO (hFlush, stdout) | |
main :: IO () | |
main = do | |
putStr "enter a number> " | |
hFlush stdout | |
line <- getLine | |
runNested (read line) True | |
-- a will be the type Bool wrapped in a List n times by the end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Functor.Identity | |
import Text.Parsec | |
import Text.Parsec.Indent | |
example1 = "asdf(1 2 3):\n foo\n x:\n y\n z:\n q\n a" | |
-- Data structures | |
data Tree = Node [Value] [Tree] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (sort, permutations, elemIndex) | |
data Card = Card Suit Int | |
deriving (Show, Eq, Ord) | |
data Suit = Spades | Clubs | Hearts | Diamonds | |
deriving (Show, Eq, Ord) | |
suits = [Spades, Clubs, Hearts, Diamonds] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I have made minor changes to the file below to make it compile | |
-- with GHC 8.0 | |
----------------------------------------------------------------------------- | |
-- Thih: Typing Haskell in Haskell, main program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveFunctor #-} | |
-- This needs the 'free' package installed in order to build | |
import Control.Monad (when) | |
import Control.Monad.Free (Free (..)) | |
import System.IO (hFlush, stdout) | |
main :: IO () | |
main = runIOOp exampleProgram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; rdarkmod-theme.el --- Theme | |
;; Copyright (C) 2016 , Jeremy M | |
;; Author: Jeremy M | |
;; Version: 0.1 | |
;; Package-Requires: ((emacs "24")) | |
;; Created with ThemeCreator, https://github.com/mswift42/themecreator. | |
NewerOlder