Skip to content

Instantly share code, notes, and snippets.

James CrazyPython

Block or report user

Report or block CrazyPython

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7fe9bdd19d05be458ec84276cf01a79e
int[3] newArr;
{
int i = 0;
foreach (int id; neighborhood) {
if (id != 0)
newArr[i++] = id;
}
}
int nextColor;
if (newArr[0] == newArr[1]) {
@CrazyPython
CrazyPython / How to build DPP on Ubuntu.md
Last active Sep 5, 2019
How to build DPP on Ubuntu for Dlang
View How to build DPP on Ubuntu.md

How to build DPP on Ubuntu

  1. install libclang-6.0-dev
  2. add dpp to your dependencies in your dub project
  3. dub run dpp
View gist:a292f752aebdf90b4c10486312f6c5f6
# Leadership
Syncinus, I think it’s best if you and the other devs hunker down and keep developing ArraX while I’m gone.
You are my deputy. You will be the king of ArraX while I’m gone.
If you choose to actively promote ArraX, you need 1) get confirmed 60fps under multiple tests 2) get a discussable gamemode in- the one I have in mind is CTHD 3) set up a system where you can buy servers dynamically based on how much demand.
It is absolutely imperative that you DO NOT promote ArraX until all 3 conditions are met. When I am back on the 5th, I can help implement all 3. It is crucial because you only have ONE chance to sell ArraX to Diep players.
## Motivation
Motivation and other’s self-confidence is a crucial element of how effective you effecticw your team is. Trust me on this one. Different things motivate different people. I nudge developers into working on Arras by giving them the self-confidence to try. I remind them that if they fail, as long as they tried, they can always talk about their failure.
View ctf.js
/** START GAMEMODE FILE **/
// gamemode files would be best in CoffeeScript
// real width is 3000
// food was originally 800, food would add an element of dodging
// this mode should have the leaderboard disabled on the client
// npm install driftless for more accurate timing
// also could npm install driftless help make arras faster, by maing gameloop execute more accurately?
gamemode = {}
gamemode.flagCarriers = []
gamemode.flagTimes = {}
View clientperformance.md

to help us gather more information on what's lagging the client, click the 3 dots on the left and find "Developer Tools": Then click "Performance:" Then click "Record." Play the game. You can minimize DevTools now. Once you've played for a while and have experienced FPS lag, open DevTools again by clicking the chrome icon on the windows taskbar and click the "download" icon:

View dngen.d
import std.stdio, std.traits, std.string, std.meta, std.algorithm, std.range;
// todo: make vim fold comments so I can write doc.d inline in the file
// support JS getters and setters for nested structs
// generate each involved struct to its own file
/++Write @DataViewName(<string literal>) before a struct to specify the
DataView a struct will be allocated on. Only applicable to
AllocationType.array +/
struct DataViewName {
View benchmark.sh
time node --trace-opt --trace-deopt -e '
function bench() {
const loops = 3000;
const objSize = 4 * 3
const i32StartOffset = loops * objSize
const i32Size = 4 * 2
const ab = new ArrayBuffer(i32StartOffset + i32Size)
const f32 = new Float32Array(ab, 0)
const i32 = new Int32Array(ab, i32StartOffset)
View benchmark.sh
time node --trace-opt --trace-deopt -e '
function bench() {
const loops = 3000;
const objSize = 4 * 3
const i32StartOffset = loops * objSize
const i32Size = 4 * 2
const ab = new ArrayBuffer(i32StartOffset + i32Size)
const f32 = new Float32Array(ab, 0)
const i32 = new Int32Array(ab, i32StartOffset)
View reminder.md

A code chunk's lines of code must be in the same order you want them to be when the code is converted for the computer.

<<a>>=
console.log(foo)
@

<<a>>+
var foo = "bar"
@
View gist:5565a0eb74127be26f8ca70b5dd7d40a
# An Introduction to Literate Programming, for "translators"
Start explaining how your Arras does *some area of technical expertise*, showing the code
behind what you're talking about as you explain. You must eventually use all
the code. Try to be logical in your explanation, for the sake of the human
reading it. When you want to say that a particular chunk of code will be
defined and explained later and not show it now, use this syntax:
<<chunk name>>
You can’t perform that action at this time.