Skip to content

Instantly share code, notes, and snippets.

@Benvie
Benvie / Power_System_Providers.markdown
Last active July 24, 2019 01:56
Power System Providers

Internal Power Systems

  • Abstraction Magic
  • Accept Magic
  • Acid Magic
  • Adaption Magic
  • AddressSpace Magic
  • Alchemic Notation
  • Algorithm Magic
  • Alpha Magic
  • Alteration Magic
@Benvie
Benvie / item-system.md
Last active August 26, 2018 19:36
Item System

Multipliers

  • Level 10 to Expansion 1: 15x
  • Expansion 1 to Expansion 2: 167x
  • Expansion 2 to Expansion 3: 160x
  • Expansion 3 to Expansion 4: 37.5x

Income per year

  • Level 10: $200 thousand
  • Expansion 1: $3 million
  • Expansion 2: $500 million
@Benvie
Benvie / power-system.js
Last active January 29, 2019 05:12
Power System extraction
let PowerSystem;
async function extractPowerSystem() {
// Extract imprecise Power System reference from coordinates
let PowerSystem = [[Math.random(.312465), Math.random(.125645), Math.random(.093421)],
[Math.random(.075657), Math.random(.998979), Math.random(.000012)],
[Math.random(.777889), Math.random(.555455), Math.random(.333343)]];
// Refine Power System reference
PowerSystem = await PowerSystem.getPowerSystem();
@Benvie
Benvie / integral-executive.js
Last active July 26, 2018 21:51
Integral Executive
execute async function main() {
let pullIntegral, pushIntegral;
while (pullIntegral = await GodIntegration.pull(pushIntegral)) {
pushIntegral = await GodIntegration.push(pullIntegral);
}
}
@Benvie
Benvie / omega-monad.js
Last active July 14, 2018 20:12
Omega Monad from Haskell translated to JavaScript.
/**
* A depth-first traversal of nested thunks.
*
* @param thunks The list of thunks to traverse.
**/
async function omega(thunks) {
if (typeof thunks.iterate !== "function") {
thunks = [thunks];
}
for await (let thunk of thunks) {