Skip to content

Instantly share code, notes, and snippets.

View zephyrtronium's full-sized avatar
🌄
a mcdonald is a mcdonoid in the nuggetory of endoburgers

Branden J Brown zephyrtronium

🌄
a mcdonald is a mcdonoid in the nuggetory of endoburgers
View GitHub Profile
@zephyrtronium
zephyrtronium / iolang-114b1bench2.txt
Created December 22, 2019 17:57
benchstat files because benchstat works fine on my laptop but not on my desktop where i'm running the benchmarks
goos: windows
goarch: amd64
pkg: github.com/zephyrtronium/iolang
BenchmarkPerform/Local/Type-8 40107219 30.1 ns/op
BenchmarkPerform/Local/ThisContext-8 37600345 32.8 ns/op
BenchmarkPerform/Proto/Type-8 22702248 53.4 ns/op
BenchmarkPerform/Proto/ThisContext-8 21876691 52.5 ns/op
BenchmarkPerform/Ancestor/Type-8 5395551 222 ns/op
BenchmarkPerform/Ancestor/ThisContext-8 5519296 219 ns/op
BenchmarkGetSlot/Local-8 75202105 15.5 ns/op
@zephyrtronium
zephyrtronium / iolang-114b1bench.txt
Created December 18, 2019 07:50
no benchstat output
goos: windows
goarch: amd64
pkg: github.com/zephyrtronium/iolang
BenchmarkPerform/Local/Type-8 35388207 32.6 ns/op
BenchmarkPerform/Local/ThisContext-8 30839211 34.6 ns/op
BenchmarkPerform/Proto/Type-8 23138863 52.3 ns/op
BenchmarkPerform/Proto/ThisContext-8 21293094 55.7 ns/op
BenchmarkPerform/Ancestor/Type-8 5299240 227 ns/op
BenchmarkPerform/Ancestor/ThisContext-8 5241918 229 ns/op
BenchmarkGetSlot/Local-8 75203518 15.7 ns/op
@zephyrtronium
zephyrtronium / OOMatrices.java
Created July 30, 2019 20:15
Java polymorphic code tracing challenge
/**
Author: Branden J Brown
Created: 30 July 2019
Updated: 30 July 2019
OOMatrices is a code tracing challenge to analyze what types are involved in use
of an abstract class. It's not an example of a real matrix library. c:
**/
import java.util.*;
STR - increases attack damage
CON - increases HP
DEX - decreases attack cooldown, increases hit chance
AGI - decreases movement cooldown, increases evasion chance
==================================
aoe n means a circle with radius n
line n means a line with length n
t cone n means an isosceles triangle with primary angle t and length from corner to opposite midpoint n
@zephyrtronium
zephyrtronium / main.go
Created June 22, 2015 02:04
periodic email
package main
import (
"bytes"
"log"
"net/smtp"
"time"
)
func send() {
@zephyrtronium
zephyrtronium / autosed
Last active August 29, 2015 14:21
autosed
autosed uses sed-style syntax to perform replacements on previous messages, much like {bot.prefix}s does. It triggers automatically when someone says a line that starts with s or S with the second character being any of /\|!#$%&.:;?@ (usually / is used) with at least one more occurrence of the same character.
Text between the first and second occurrences is used as the search parameter. It is replaced with the text between the second and third occurrences. If there is no third occurrence, the first word after the second character is used. This can be empty, as well. If S was used instead of s, the search is case-sensitive.
Example: {b}s/something//{b} removes the last occurrence of the word "something". {b}s/something/some stuff/{b} replaces the last occurrence of the word "something" with "some stuff". {b}s/something/some stuff{b} replaces the last occurrence of the word "something" with "some".
package iolang
import (
"bytes"
"fmt"
)
type Message struct {
Object
Symbol Symbol
package iolang
import "fmt"
type OpTable struct {
Object
Operators map[string]Operator
}
type Operator struct {
package random
import (
"math"
"testing"
)
var _ = math.E
const (
------------------------------------------------------------------------------
RESULTS FOR THE UNIFORMITY OF P-VALUES AND THE PROPORTION OF PASSING SEQUENCES
------------------------------------------------------------------------------
generator is <data.mt64>
------------------------------------------------------------------------------
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 P-VALUE PROPORTION STATISTICAL TEST
------------------------------------------------------------------------------
6 8 13 11 12 11 11 7 12 9 0.834308 99/100 Frequency
7 4 12 7 14 11 11 14 15 5 0.115387 100/100 BlockFrequency
6 10 10 17 10 11 6 9 9 12 0.455937 100/100 CumulativeSums