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
[fg-386] ~ > cat sanity.cpp | |
#include <iostream> | |
#include <unordered_set> | |
using namespace std; | |
int main(int argc, char* argv[]) | |
{ | |
auto myset = unordered_set<int>{1,2,3}; |
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 mymap | |
type List func() (frontFunc, restFunc, emptyFunc) | |
type frontFunc func() (string, string) | |
type restFunc func() List | |
type emptyFunc func() bool | |
func NewList() List { | |
front := func() (string, 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
package cloj | |
import ( | |
"sync" | |
) | |
// Map is an example of a type I might need that has some | |
// inner bits that need to be in harmony for the whole thing | |
// to function. In this case, what we're imagining is a kv store | |
// of string -> string that is safe to concurrently access. |
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 wat | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
) | |
type noDupMap map[string]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
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"net/http" | |
"os" | |
"github.com/packrat386/melian" | |
) |
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
STR - 13 | |
DEX - 14 | |
CON - 11 | |
INT - 14 | |
WIS - 15 | |
CHA - 17 |
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 | |
import "fmt" | |
func handle(f func(input string) string) { fmt.Println(f("foo")) } | |
func main() { | |
handle(func(input string) string { | |
return handler(input, &ic{42}, &sc{"bar"}) | |
}) |
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 index | |
func Index(s, sep []byte) int { | |
pos := 0 | |
for { | |
if pos+len(sep) > len(s) { | |
return -1 | |
} |
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 re | |
import "fmt" | |
type builderEdge struct { | |
from int64 | |
to int64 | |
on rune | |
} |
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
From ee8b5f5c1f4072affd1c3d68209e39889831c56e Mon Sep 17 00:00:00 2001 | |
From: Aidan Coyle <packrat386@gmail.com> | |
Date: Sun, 10 Feb 2019 15:54:21 +0000 | |
Subject: [PATCH] Override the RB_TEST macro to check falsiness | |
Rather than only accepting the exact values Qnil and Qfalse, instead | |
check the class of the VALUE passed to see if it is FalseClass. | |
--- | |
eval.c | 16 ++++++++++++++++ | |
include/ruby/ruby.h | 12 ++++++------ |