Skip to content

Instantly share code, notes, and snippets.

/* @license GPL-2.0+ */
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
import std.stdio;
import std.math;
import core.time;
import core.time;
real myFmax(real a, real b) {
if (a > b) return a;
else return b;
}
attaaaggtttataccttcccaggtaacaaaccaaccaactttcgatctcttgtagatctgttctctaaacgaactttaaaatctgtgtggctgtcactcggctgcatgcttagtgcactcacgcagtataattaataactaattactgtcgttgacaggacacgagtaactcgtctatcttctgcaggctgcttacggtttcgtccgtgttgcagccgatcatcagcacatctaggtttcgtccgggtgtgaccgaaaggtaagatggagagccttgtccctggtttcaacgagaaaacacacgtccaactcagtttgcctgttttacaggttcgcgacgtgctcgtacgtggctttggagactccgtggaggaggtcttatcagaggcacgtcaacatcttaaagatggcacttgtggcttagtagaagttgaaaaaggcgttttgcctcaacttgaacagccctatgtgttcatcaaacgttcggatgctcgaactgcacctcatggtcatgttatggttgagctggtagcagaactcgaaggcattcagtacggtcgtagtggtgagacacttggtgtccttgtccctcatgtgggcgaaataccagtggcttaccgcaaggttcttcttcgtaagaacggtaataaaggagctggtggccatagttacggcgccgatctaaagtcatttgacttaggcgacgagcttggcactgatccttatgaagattttcaagaaaactggaacactaaacatagcagtggtgttacccgtgaactcatgcgtgagcttaacggaggggcatacactcgctatgtcgataacaacttctgtggccctgatggctaccctcttgagtgcattaaagaccttctagcacgtgctggtaaagcttcatgcactttgtccgaacaactggactttattgacactaagaggggtgtatactgctgccgtgaacatgagcatgaaattgcttggtacacggaacgttctgaaaagagctatgaattgcagaca

'Just enough' theory to start using CSS.

This is intended for programmers used to imperative programming, but have always felt frustrated with CSS, unable to grok it.

CSS has two important modes, box and flex.

Every CSS element has a default size.

This default size is what it renders as if you don't add any CSS.

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 September 5, 2019 18:55
How to build DPP on Ubuntu for Dlang

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
# 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.
/** 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 = {}

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:

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 {