-
Confirmation bias: a pattern that causes one to notice or look for things that confirm one's beliefs rather that counter-evidence.
-
Loss aversion: Loss aversion refers to people's tendency to prefer avoiding losses to acquiring equivalent gains: it is better to not lose $5 than to find $5. The principle is very prominent in the domain of economics. What distinguishes loss aversion from risk aversion is that the utility of a monetary payoff depends on what was previously experienced or was expected to happen. Some studies have suggested that losses are twice as powerful, psychologically, as gains.
-
Intuition: Personal experience coded into your personal neural network, which means your
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
{ws=explicit} | |
Document ::= WS* Forms EOF {ws=implicit} | |
Form ::= (&"(" List | &"[" Vector | &"{" Map| &"#{" Set| &"'" Quote| &"`" Backtick| &"@" Deref| &"~@" UnquoteSplicing| &"~" Unquote| &"#(" Lambda| !';' Symbol| &":" Keyword | Literal | Discard | Dispatch | Regex) {pin=1,fragment=true} | |
Forms ::= (Form WS* | Comment WS*)* {fragment=true} | |
List ::= OPEN_PAREN WS* Forms? WS* CLOSE_PAREN {pin=1,recoverUntil=CLOSE_PAREN} | |
Vector ::= OPEN_ARRAY WS* Forms? WS* CLOSE_ARRAY {pin=1,recoverUntil=CLOSE_ARRAY} |
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
%dw 2.0 | |
output application/json | |
fun mapUntil<T, V>( | |
iterableList: Array<T>, | |
predicate: (element: T, index: Number) -> ({value: V} | {done: Boolean}), | |
startIndex: Number = 0 | |
) = | |
iterableList match { | |
case [] -> [] |
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
colors: | |
primary: | |
background: '0x333333' | |
foreground: '0xd3d0c8' | |
cursor: | |
text: '0x000000' | |
cursor: '0xffffff' | |
normal: | |
black: '0x000000' | |
red: '0xf2777a' |
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
//Encoding: | |
float2 atanYX = atan2(normalIn.y,normalIn.x); | |
float2 normalOut = float2(atanYX/PI,normalIn.z); | |
normalOut = (normalOut+1.0)+0.5; | |
//Decoding: | |
float2 angles = normalOut*2.0- 1.0; | |
float2 theta = sincos(angles.x*PI,theta.x,theta.y); | |
float2 phi = float2(sqrt(1.0- angles.y*angles.y),angles.y); | |
float3 normal = float3(theta.y*phi.x,theta.x*phi.x,phi.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
// Encoding: | |
normalOut=normalize(normalIn.xy)*sqrt(normalIn.z*0.5+0.5); | |
// Decoding: | |
normal.z=length2(normalOut.xy)*2- 1; | |
normal.xy=normalize(normalOut.xy)*sqrt(1- normal.z*normal.z); |
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
float dist = length(lightVector); | |
float lightR = (lightPosRadius.w / uViewSize.y); | |
if(dist < lightR){ | |
float attenuation = dist/(1.0 - (dist/lightR) * (dist/lightR)); | |
attenuation = attenuation / lightR + 1.0; | |
attenuation = 1.0 / (attenuation * attenuation); | |
if (attenuation > 0.0) { |
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
Script::Script() { | |
} | |
Script::~Script() { | |
} | |
void Script::Initialize(char* src) { | |
v8::Isolate* isolate = v8::Isolate::GetCurrent(); | |
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 <eternity.hpp> | |
ScriptSystem::ScriptSystem() { | |
m_platform = 0; | |
m_isolate = 0; | |
m_scriptableCount = 0; | |
m_scriptablePoolSize = 0; | |
m_scriptables = 0; | |
} |
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
void function(global){ | |
if ('DataView' in global && 'ArrayBuffer' in global) { | |
return; | |
} | |
var hide = (function(){ | |
// check if we're in ES5 | |
if (typeof Object.getOwnPropertyNames === 'function' && !('prototype' in Object.getOwnPropertyNames)) { | |
var hidden = { enumerable: false }; |