Skip to content

Instantly share code, notes, and snippets.

View jackmott's full-sized avatar

Jack Mott jackmott

  • Looking for employment
  • Texas,USA
View GitHub Profile
@jackmott
jackmott / climate.md
Last active December 30, 2016 01:32
Climate Change Answer

So the immediate answer to your question is that pre 1900's climate data comes from a variety of sources. The instrumental record actually goes back at least as far as 1850 (That is how far the Koch Brothers/ Berkeley data set goes for instance. ) predating that, when we look at time scales of millions of years we have to use various proxies Which ones are used and how precise they are depends how far back in time you go. The geologic time record goes back at least far as 500 million years

On twitter you rightly point out that extrapolation of future results based on past results is invalid. Even if we did have 4 billion years of perfect climate record, we would not be able to just fit a trend curve or line to that data and predict the next 100 years of earth's climate. You state on twitter that this past climate data is the

@jackmott
jackmott / GalaxyText.cs
Created December 7, 2016 18:36
Turning a simple XML style format into a List of objects that MonoGame can render
public static List<GalaxyText> Parse(string text,
SpriteFont font,
SpriteFont fontBold,
SpriteFont fontItalic,
SpriteFont fontBoldItalic)
{
var result = new List<GalaxyText>();
var state = new Stack<ParseState>();
state.Push(new ParseState(font, Color.White));
@jackmott
jackmott / simdnoise.cs
Last active November 3, 2016 17:03
SIMD Perlin C#
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace FastNoise
{
public struct NoiseOutput
@jackmott
jackmott / 3dmaze.lua
Created October 2, 2016 12:58
Computer Craft / Minecraft 3D Maze Builder
--TODO - distribute torches more intelligently?
--TODO - more efficient ladder placement? turtle makes many unecessary moves to place them
--TODO - better ladder placement? ladders sometimes switch sides of the maze
--USAGE
--for large mazes, set up 3 chests in a row, each with one block of space between them:
--Put blocks in chest 1, to the right in chest 2 put torches, and in chest 3 ladders
--put the turtle on top of chest 1
--fuel up your turtle
@jackmott
jackmott / FastRust.rs
Created September 12, 2016 20:41
FasterRustGame
// Optimized game implementation in Rust
extern crate time;
use std::time::Duration;
use time::precise_time_ns;
use std::ops::{Add, Sub, Mul};
use std::{thread};
const BLOCKS_PER_CHUNK: usize = 65535;
@jackmott
jackmott / NaiveRust.rs
Last active September 12, 2016 15:55
Naive Rust Game
// Implementation contributed by https://github.com/Maplicant
// Optimized game implementation in Rust
extern crate time;
use time::precise_time_ns;
use std::ops::{Add, Sub, Mul};
static NUM_BLOCKS: usize = 65535;
static NUM_ENTITIES: usize = 1000;
static CHUNK_COUNT: usize = 100;
@jackmott
jackmott / FasterGame.cpp
Last active March 5, 2017 03:56
Faster Game CPP
#include <cstdio>
#include <cstdlib>
#include <chrono>
#include <thread>
#include <cmath>
#include <string>
#include <vector>
#include <array>
@jackmott
jackmott / NaiveGame.cpp
Created September 8, 2016 14:58
Naive C++ Game
// clarity.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <thread>
#include <math.h>
#include <string>
#include <vector>
@jackmott
jackmott / FasterGame.java
Last active September 12, 2016 01:21
Faster Java Game
class Vector
{
public float x, y, z;
public Vector(float x, float y, float z)
{
this.x = x;
this.y = y;
this.z = z;
}
@jackmott
jackmott / FasterGame.cs
Last active August 21, 2020 18:17
Faster CSharp Game
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Threading;
namespace bettercraft
{