-
Get started • • BigchainDB
-
Kadena: Scalable Blockchain | Smarter Contracts
-
kadena-io/pact: The Pact Smart Contract Language
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
// | |
// BackgroundTask.h | |
// tomtrack | |
// | |
// Created by Liam Edwards-Playne on 13/02/2016. | |
// | |
#import "RCTBridgeModule.h" | |
@interface BackgroundTask : NSObject <RCTBridgeModule> |
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
## A right-biased Either[L, R] implementation in Nim | |
import optional_t | |
type | |
EitherType* {.pure.} = enum | |
Left, Right | |
Either*[L, R] = object | |
kind: EitherType | |
right: Option[R] |
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
// @flow | |
import { guard, object, string, number } from 'decoders' | |
import type { Decoder } from 'decoders' | |
// This is the type-level "function" that pulls the generic out of the decoder | |
type ExtractDecoderType = <T>(d: Decoder<T>) => T | |
// Now we define our run-time decoder, without defining the type first... | |
const person = object({ | |
name: string, |
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 Result = { | |
type result('a, 'b) = | |
| Ok('a) | |
| Error('b); | |
let isOk = (result_) => | |
switch result_ { | |
| Ok(_) => true | |
| Error(_) => false | |
}; | |
let isError = (result_) => |
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 Emly.Parser | |
open Emly.UntypedAST | |
open FParsec | |
open FParsec.CharParsers | |
open Emly.ParserUtils | |
open Emly.ParserUtils.IndentationParserWithoutBacktracking | |
let keywords = | |
Set.ofList ["let"; "fun"; "rec"; "impure"; "in"; "of"; "if"; "then"; "else"; "match"; "with"; "type"; "foreign"; "mutable"] |
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
/** | |
* Tiny module to generate an Express middleware that maps the request path to | |
* a specified folder, allowing for "semi-static" routes without needing to | |
* define them ahead of time. | |
* | |
* Configuration can be passed to the `semiStatic` function when registering the | |
* middleware. The format is described below, with the "context" property being | |
* passed to the template's render call, and `context.req` being the request | |
* object itself. | |
* |
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
export default function createInjectMiddleware(map) { | |
return store => next => action => { | |
if (typeof action !== "object" | |
|| typeof action.payload !== "function" | |
|| action.meta == null | |
|| action.meta.inject == null) { | |
return next(action); | |
} | |
const defaultInjections = { |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.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
The Withdrawal | |
No junkie ever goes through withdrawal willingly. Oh no, we’ll do anything we can to stave off the sickness, but it’s not something that most will understand. For a Normal person, robbing your parents and cheating your friends and burning all the bridges around you for just a “high” makes no sense... But what they can’t understand is what we’re avoiding. | |
William S. Burroughs described it as a “thirst”, and I quite honestly can’t find a more apt description. It’s a thirst at the most basic level; your very cells and soul cry out to be quenched. It starts innocently enough: sniffles, like the beginning of a cold. That’s just the beginning. It takes a day or so for a junkie to start to feel the thirst, the hunger. But once it’s a hold of you, the agony and terror and fear that consumes your every waking thought (and most of your unwaking thoughts too) will bring even the strongest person into a place they could never imagine. | |
The first time I experienced it, I was 18. My best friend had a girlf |
NewerOlder