I hereby claim:
- I am apparentlymart on github.
- I am apparentlymart (https://keybase.io/apparentlymart) on keybase.
- I have a public key whose fingerprint is BBE3 1AF5 8D12 1501 A495 FE10 6D98 B19B CF7A CB7A
To claim this, I am signing this object:
// Package set is an adaptation of an existing Set implementation I wrote (that | |
// originally used interface{} as its underlying type) to the current Go 2 | |
// Generics proposal at the time of this writing: | |
// https://go.googlesource.com/proposal/+/4a54a00950b56dd0096482d0edae46969d7432a6/design/go2draft-contracts.md | |
// | |
// This adaptation retains the existing feature that a set can be of any type, | |
// without that type needing to be extended with any additional methods, as long | |
// as the caller can provide a separate Rules type that provides the necessary | |
// additional operations. Generics allows the compiler to check the requirement | |
// that only sets with the same rules can be used together, which was previously |
# Note: this is written for and tested only in bash | |
function _go-here { | |
DIR="$1" | |
export GOPATH="$DIR" | |
export PATH="$GOPATH/bin":$PATH | |
echo Activating GOPATH="$GOPATH" | |
} | |
function go-here { |
var _ = require('highland'); | |
var items = [ | |
'a', | |
'b', | |
'c', | |
'd', | |
'e', | |
'f', |
I hereby claim:
To claim this, I am signing this object:
Beyond the read-only resources that existed in Terraform before data resources were an official feature, I'd like to make room for a new pattern for re-usable modules where they accept only the minimum set of ids they need as variables and look up other data via data sources.
Here's a motivating example:
variable "aws_subnet_id" {
description = "Id of the subnet where the EC2 instance will be created"
}
# Variables are set on the command line: | |
# padstone build version=v0.0.1 ami | |
variable "version" { | |
default = "dev" | |
} | |
provider "aws" { | |
region = "us-west-2" | |
} |
#include <stdio.h> | |
// we'd generate one of these for each distinct function signature | |
typedef struct { | |
void (*func)(); | |
void *env; | |
} Callable; | |
// we'd generate an environment struct for each function that needs one |
import time | |
import coll | |
enum HourType: | |
#: A 12-hour time in the morning. | |
AM | |
#: A 12-hour time in the afternoon/evening. | |
PM | |
#: A 24-hour time |
import max1234 | |
part MAX1 is max1234 | |
interface I2C: | |
pin DATA | |
pin CLOCK | |
interface SPIBus: |
import arduino | |
# Pin 13 has an LED connected to it on most Arduino boards | |
var led_pin = arduino.gpio[13] | |
# Time we'll wait between toggling the LED | |
var delay = arduino.delay.milliseconds(1000) | |
# Configure the LED pin as an output | |
led_pin.set_direction(OUTPUT) |