Title: Simple Sabotage Field Manual Author: Strategic Services Office of Strategic Services
Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.
Disclaimer 2: I should tidy this up but probably won’t.
Disclaimer 3: Yeah called it, better to be realistic.
Type classes are a language of their own, this is an attempt to document features and give a name to them.
jsonData='[{"name": "name#1","value": "value#1"},{"name": "name#2","value": "value#2"}]' | |
for row in $(echo "${jsonData}" | jq -r '.[] | @base64'); do | |
_jq() { | |
echo "${row}" | base64 --decode | jq -r "${1}" | |
} | |
# OPTIONAL | |
# Set each property of the row to a variable | |
name=$(_jq '.name') | |
value=$(_jq '.value') |
This is a quick & dirty way to attach an Akai MPK mini 2 USB MIDI controller to Linux so the Linux machine can act as its synthesizer. This approach should work for any modern USB MIDI instrument.
I looked around on the web and, surprisingly, I didn't find any simple options for quickly starting Fluidsynth up and wiring it to a MIDI controller for simple keyboard usage. There are a few out there that involve using Qsynth which is cool but I didn't want a GUI for something relatively simple.
{-# LANGUAGE ForeignFunctionInterface #-} | |
module Adder where | |
import Foreign.C | |
adder :: CInt -> CInt -> IO CInt | |
adder x y = return $ x + y | |
foreign export ccall adder :: CInt -> CInt -> IO CInt |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ImpredicativeTypes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module ObfuscatedSKI where | |
import Unsafe.Coerce (unsafeCoerce) | |
-------------------------------------------------------------------------------- | |
-- A Lambda to SKI Combinator Compiler, written entirely using SKI Combinators | |
-- |
-- A demonstration of Agda's mechanisms for generating proofs: | |
-- * 1. fromMaybe | |
-- * 2a. macros | |
-- * 2b. type-aware macros | |
-- * 2c. stuck macros | |
-- | |
-- Tested using Agda-2.6.1.1 and agda-stdlib-1.4 | |
module GeneratingCode where |
For the Trac ticket #14860
.
All these types are valid for h
, but its principal type involves -XQuantifiedConstraints
{-# Language FlexibleInstances, MultiParamTypeClasses, GADTs, QuantifiedConstraints #-}
import Data.Kind
type family FB (a::Type) (b::Type) :: Type where
{-# LANGUAGE GADTs, DeriveFunctor, LambdaCase #-} | |
import Data.Functor.Product | |
import Data.Void | |
import Control.Applicative | |
type Tag = String | |
type Attr = String | |
data HTML |