Skip to content

Instantly share code, notes, and snippets.

View milesrout's full-sized avatar

Miles Rout milesrout

View GitHub Profile
set([u'magicschoolbuscrash', u'RationalMayhem', u'Vimda', u'mcilrain', u'ljcrabs', u'gringer', u'toomanybeersies', u'SirChristoffee', u'wesley_wyndam_pryce', u'rifter5000', u'Portadiam', u'smellyegg', u'DirectImageLinkerBot', u'IWantUsToMerge', u'sobri909', u'back-stabbath', u'naturalethic', u'presidentchimp', u'KhyronVorrac', u'holloway', u'yacob_uk', u'Throwaway_Kiwi', u'some_arab', u'bbqroast', u'WasterDave', u'hexasquid', u'SCombinator'])
#include <iostream>
#include <type_traits>
using namespace std;
#define ALVIN_SASSERT_IS_SAME(actual, expected) static_assert(std::is_same<actual, expected>::value, "Expected " #expected ", got " #actual ".");
struct Type {};
struct Function {
template <typename T>
///////////////////////////////////////////////////////
// f - function
// (f x) - (partially) apply the argument x to f
// ((f x) y) - apply the arguments x and y to f
// f - function
// f::of<x> - (partially) apply the argument x to f
// f::of<x>::of<y> - apply the arguments x and y to f
for (int i = 1; i <= 12; i++)
for (int j = 1; j <= 12; j++)
std::cout << setw(4) << i*j;
std::cout << std::endl;
size_t len = strlen((char*)str) + 1;
utf8char *buf = new utf8char[len];
template< class T > struct is_pointer_helper : std::false_type {};
template< class T > struct is_pointer_helper<T*> : std::true_type {};
template< class T > struct is_pointer : is_pointer_helper<typename std::remove_cv<T>::type> {};
@milesrout
milesrout / results
Last active December 30, 2015 03:45
PROPOSITIONS
miles@laptop:~/Projects/tableaux $ rustc test.rs && ./test
T
F
~(T)
~(F)
(T) ^ (T)
(T) v (T)
(T) -> (T)
((T) v (T)) ^ (T)
True
#[macro_use]
mod macros {
#[macro_export]
macro_rules! prop {
(($($t:tt)*)) => (prop!($($t)*));
(T) => (Proposition::True);
(F) => (Proposition::False);
(!$e:tt) => (Proposition::Not(box prop!($e)));
($e:tt ^ $f:tt) => (Proposition::And(box prop!($e), box prop!($f)));
($e:tt v $f:tt) => (Proposition::Or(box prop!($e), box prop!($f)));
bool operator<(const Version& other) {
if (major < other.major)
return true;
if (minor < other.minor)
return true;
if (revision < other.revision)
return true;
if (build < other.build)
return true;
return false;
Procedural Task/Quest Generation
1. Generate world
2. Populate world
3. Generate tasks
Generate World
1. Elevation
- Perlin noise?