MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
-- https://wiki.haskell.org/Idiom_brackets | |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, FlexibleInstances, UndecidableInstances #-} | |
import Control.Applicative | |
import Control.Monad.Identity | |
class Applicative i => Idiomatic i f g | g -> f i where | |
idiomatic :: i f -> g | |
iI :: Idiomatic i f g => f -> g |
#!/usr/bin/env python | |
from time import sleep | |
from os import path as op | |
import sys | |
from subprocess import check_call, check_output | |
from glob import glob | |
def bdopen(fname): |
package dep | |
import scala.language._ | |
object Dep extends App { | |
sealed trait Nat { | |
type Plus[M <: Nat] <: Nat | |
def plus[M <: Nat](m: M): Plus[M] | |
} |
package net.arya.util.nice_range | |
/** | |
* Supports ranges and increments of things that aren't numbers. | |
* Example usage at the end. | |
* Created by arya on 8/4/14. | |
*/ | |
/** Syntax for constructing Ranges: start upTo end */ | |
object syntax { |
import org.scalacheck._ | |
import org.scalatest._ | |
import org.scalatest.prop.GeneratorDrivenPropertyChecks | |
class SubsetGenerator(set: String*) { | |
protected val subsets = set.toSet.subsets.toSeq | |
val arbitrarySubsetGen: Gen[Set[String]] = for { | |
subset <- Gen.oneOf(subsets) |
#!/bin/bash | |
# This script rotates the screen and touchscreen input 90 degrees each time it is called, | |
# also disables the touchpad, and enables the virtual keyboard accordingly | |
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766 | |
#### configuration | |
# find your Touchscreen and Touchpad device with `xinput` | |
TouchscreenDevice='ELAN Touchscreen' | |
TouchpadDevice='SynPS/2 Synaptics TouchPad' |
# Category Theory proofs in Idris | |
Idris is a language with dependent types, and is similar to Agda. | |
What distinguishes Idris is that it is intended to be a general-purpose language first, | |
and a theorem prover second. | |
To that end it supports optional totality checking | |
and features to support writing DSLs: | |
type classes, | |
do notation, | |
monad comprehensions (i.e., a more general form of list comprehension), |
/* | |
* RedEyes generates rich descriptions of the API, as well as valid examples for | |
* all parameters (in this case, example header, query parameter, and content). | |
* | |
* The API can also be used to generate client libraries in a variety of languages. | |
* | |
* Service handlers are strongly-typed (e.g. retrieveEmployees expects an integer | |
* and a ModelDesc). Any errors in using the API automatically generate rich | |
* descriptions on what was expected. | |
*/ |