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
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <launchdarkly/api.h> | |
#include <openssl/sha.h> | |
#include <lua.h> |
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
package main; | |
type Any(type) interface { }; | |
type Name(type a Any()) interface { | |
value(type)() a | |
}; | |
type Value(type a Any()) struct { | |
value a |
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 nix-shell | |
#!nix-shell -p "haskellPackages.ghcWithPackages (p: [ p.pandoc p.pandoc-types ])" -i runhaskell | |
{-# LANGUAGE OverloadedStrings #-} | |
import Text.Pandoc.JSON | |
import Text.Pandoc.Shared (tshow) | |
import Data.Text as T | |
main :: IO () |
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 precog.macro.ValueClass; | |
class ABC implements ValueClass { | |
var a: Int; | |
var b: Bool; | |
var c: String; | |
} | |
/* | |
class ABC extends ValueClass { |
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
type LoadedData<A> = | |
<B>(f: (a: A) => B, g: (e: Error) => B, b: B) => B; | |
function loaded<A>(a: A): LoadedData<A> { | |
return <B>(f: (a: A) => B, error: (e: Error) => B, empty: B) => f(a); | |
} | |
function error<A>(e: Error): LoadedData<A> { | |
return <B>(success: (a: A) => B, f: (e: Error) => B, empty: B) => f(e); | |
} |
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
macro $do { | |
case { $y:expr } => { | |
$y | |
} | |
case { $x:ident <- $y:expr $rest ... } => { | |
λ['>=']($y, function($x) { | |
return $do { $rest ... } | |
}); | |
} | |
} |
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
;; Connect using jabber-connect | |
;; My username from the HipChat configuration | |
;; from https://www.hipchat.com/account/xmpp | |
(setq jabber-account-list '(("10804_81219@chat.hipchat.com"))) | |
;; To join HipChat rooms easily | |
(defvar hipchat-number "10804") | |
(defvar hipchat-nickname "Brian McKenna") | |
(defun hipchat-join (room) |
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
module Payments where | |
data Customer = Customer { name :: String, age :: Int } deriving (Eq, Ord, Show) | |
-- I know partial record fields is an anti-pattern, but who's counting? | |
data Payment | |
= Cash { customer :: Customer, amount :: Double } | |
| Credit { customer :: Customer, amount :: Double, cardNumber :: Int } | |
| Check { customer :: Customer, amount :: Double, routingNumber :: Int, accountNumber :: Int } | |
deriving (Eq, Ord, 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
with import <nixpkgs> { }; | |
let | |
img = "bzImage"; | |
hyperkitCommand = '' | |
${hyperkit}/bin/hyperkit \ | |
-A \ | |
-m 512M \ | |
-s 0,hostbridge \ | |
-s 1,lpc \ |
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
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: Lcom/atlassian/marketplace/http/rest/v2/ | |
representations/RepresentationFactory$; | |
at scala.Predef$.assert(Predef.scala:170) | |
at scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:820) | |
at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isNestedClass(BTypes.scala:883) | |
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.toTypeKind(BCodeHelpers.scala:355) | |
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.toTypeKind(BCodeSkelBuilder.scala:50) | |
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.symInfoTK(BCodeSkelBuilder.scala:82) | |
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.ge |