Skip to content

Instantly share code, notes, and snippets.

View apples's full-sized avatar
🏳️‍🌈

Apples apples

🏳️‍🌈
View GitHub Profile
@apples
apples / vdom.lua
Last active March 4, 2020 06:21
Lua virtual DOM implementation (based on v1.0 of https://github.com/pomber/didact). NOW WITH HOOKS!
local linq = require('linq')
local class = require('class')
local component_base = class()
local function assign(dest, source)
for k,v in pairs(source) do
dest[k] = v
end
return dest
@apples
apples / dynamic_bitset.hpp
Last active July 29, 2018 22:05
Dynamic bitset
#include <bitset>
#include <cstddef>
class dynamic_bitset {
public:
using size_type = std::size_t;
static constexpr size_type word_size = 64;
using bitset = std::bitset<word_size>;
@apples
apples / document.md
Created May 20, 2017 22:01
Internet Security Starter Kit

placeholder

#ifndef BRAEBURN_RESOURCECACHE_HPP
#define BRAEBURN_RESOURCECACHE_HPP
#include <memory>
#include <string>
#include <unordered_map>
#include <typeindex>
namespace braeburn {
#ifndef RASPBERRY_HPP
#define RASPBERRY_HPP
#include <memory>
#include <utility>
#define DECL_ERASURE_MEMBER_CONCEPT(ConceptName, FuncName) \
template <typename Func> \
struct ConceptName; \
template <typename R, typename... Args> \

How to Dev a Game

The Journey

  1. Ideas and Design
  2. Engines and Scripting
  3. Art, Animation, and Audio
  4. Aesthetics and the Ludonarrative
  5. Scope and Minimum Viable Product
  6. Resources
@apples
apples / slides.html
Created March 26, 2015 21:40
slides.html
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Droid+Sans:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body { font-family: 'Helvetica', 'sans-serif' ; }
@apples
apples / Makefile
Last active August 29, 2015 14:16
Moral of the story: Use Scons.
# User Configuration
# Compiler flags
CPPFLAGS +=
CXXFLAGS += -std=c++1y -pedantic -Wall
LDFLAGS +=
LDLIBS +=
# Libraries and Executables to be built
LIBS += core
@apples
apples / better_assert.hpp
Created October 14, 2014 08:41
Better (read: slower) form of assert() with juicy output and exceptions.
#ifndef BETTER_ASSERT_HPP
#define BETTER_ASSERT_HPP
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
template <typename B>
struct _asserter {
@apples
apples / thread_worker.hpp
Created October 14, 2014 08:39
Automagic thread pool.
#ifndef THREAD_WORKER_HPP
#define THREAD_WORKER_HPP
#include <thread>
#include <future>
#include <mutex>
#include <condition_variable>
#include <list>
#include <utility>
#include <functional>