Skip to content

Instantly share code, notes, and snippets.

@sigman78
sigman78 / 0_reuse_code.js
Created June 20, 2014 16:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sigman78
sigman78 / gist:36011107312c4b3f70bf16e722c87ee8
Created April 15, 2016 12:59 — forked from LearnCocos2D/gist:77f0ced228292676689f
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
@sigman78
sigman78 / deferred.hpp
Created September 13, 2018 10:43 — forked from till-varoquaux/deferred.hpp
A small asynchronous monad...
#pragma once
/**
* This is a quick abstraction over non-blocking asynchronous deferreds. In a
* way you can see those as non-blocking futures (whereas std::future are
* blocking).
* This implementation is devoid of fanciness. Amongst other things:
* - Deferreds are not cancelable
* - They are not threadsafe. Callbacks are ran in whichever thread the
* deferred was triggered and there's no mutex to protect from race condition
* while registering callbacks/setting values. This is what we use libev

Using O2D to Program Duck PCBs

Special Thanks to KacKLaPPen23 and iNViSiBiLiTi for making this guide possible and being generally excellent people!

Programming Duck PCBs with O2D is a notoriously shitty experience.

Luckily with O2D 1.10 and this guide it will be less shitty!

Prerequisites