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
// my first program in C++ | |
#include <iostream> | |
using namespace std; | |
class Converter | |
{ | |
private: | |
Converter(){}; | |
public: |
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 sys | |
tests = set() | |
def run_tests(): | |
succ = True | |
for fun in tests: | |
for n, a, k, e in fun._tests: | |
r = fun(*a, **k) |
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
(require rackunit) | |
; lambda | |
(check-true (lambda? '(lambda (x) x))) | |
(check-true (lambda? '(lambda (x y z) z y x))) | |
(check-false (lambda? '(lambda (x 1) x))) | |
(check-false (lambda? '(lambda (x)))) | |
(check-false (lambda? '3)) | |
(check-equal? '(x) (lambda-params '(lambda (x) y))) |
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
root | |
= elements:(sexp+) {return {type: 'root', elements}} | |
sexp | |
= parenexp | |
/ delimited | |
/ id | |
parenexp | |
= type:$lparen elements:exp+ rparen {return {type, elements}} |
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
Unity Player [version: Unity 5.4.0p4_b15b5ae035b7] | |
KSP_x64.exe caused an Access Violation (0xc0000005) | |
in module KSP_x64.exe at 0033:000000c2. | |
Error occurred at 2016-12-06_140500. | |
C:\Users\Paul\Documents\ksp backups\1.2.1 - STOCK\KSP_x64.exe, run by Paul. | |
64% memory in use. | |
16367 MB physical memory [5843 MB free]. | |
32751 MB paging file [13818 MB free]. |
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
Initialize engine version: 5.4.0p4 (b15b5ae035b7) | |
GfxDevice: creating device client; threaded=1 | |
Direct3D: | |
Version: Direct3D 9.0c [aticfx32.dll 8.17.10.1404] | |
Renderer: AMD Radeon HD 6700 Series | |
Vendor: ATI | |
VRAM: 1010 MB (via DXGI) | |
Caps: Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=1 INTZ=1 NULL=1 RESZ=1 SlowINTZ=1 ATOC=0 | |
Begin MonoManager ReloadAssembly | |
Platform assembly: C:\Users\Paul\Documents\ksp backups\1.2.1 - STOCK\KSP_Data\Managed\UnityEngine.dll (this message is harmless) |
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
class Scope { | |
constructor(vars, parents) { | |
this.vars = vars || new Map() | |
this.parents = parents || [Scope.global] | |
} | |
get(name) { | |
if(this.vars.has(name)) { | |
return this.vars.get(name) | |
} else if(this.parents.length > 0) { | |
for(let p of this.parents) { |
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
(λ+2.+22)(λmnfx.mf(nfx))((λs0.s(s0))(λnfx.f(nfx))(λfx.x)) |
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
$name : Warlord Generator | |
$author : Paul | |
$description : Generates a random imperial warlord title. | |
$amount : 10 | |
$button : Fracture! | |
$adjective | |
High | |
Grand | |
Ultimate |
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
/** Sample die roller */ | |
function die(pattern) { | |
let [, sign = '+', amt = 1, sides = 6, num, mod] = die.regex.exec(pattern) | |
let gen | |
if (num) { | |
gen = _.fill(Number(num)) | |
} else { | |
let die = _.func(() => Math.floor(Math.random() * sides) + 1) | |
gen = _.combine(sum, ...Array(amt).fill(die)) | |
} |
NewerOlder